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
337 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([[7046],{10402:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(5891),q=f(59301),C={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"},_=C,p=f(88853),P=function(y,Ce){return q.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:_}))},D=q.forwardRef(P),ye=D},18290:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(5891),q=f(59301),C={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"},_=C,p=f(88853),P=function(y,Ce){return q.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:_}))},D=q.forwardRef(P),ye=D},61441:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(5891),q=f(59301),C={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"},_=C,p=f(88853),P=function(y,Ce){return q.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:_}))},D=q.forwardRef(P),ye=D},30631:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(5891),q=f(59301),C={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"},_=C,p=f(88853),P=function(y,Ce){return q.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:_}))},D=q.forwardRef(P),ye=D},86902:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(5891),q=f(59301),C={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"},_=C,p=f(88853),P=function(y,Ce){return q.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:_}))},D=q.forwardRef(P),ye=D},21970:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(5891),q=f(59301),C={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"},_=C,p=f(88853),P=function(y,Ce){return q.createElement(p.Z,(0,E.Z)({},y,{ref:Ce,icon:_}))},D=q.forwardRef(P),ye=D},79906:function(){"use strict"},44383:function(){"use strict"},23744:function(on,Ee,f){"use strict";f.d(Ee,{t:function(){return N}});var E=f(59301),q=f(3113),C={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},_=f(92310),p=f.n(_),P=Object.defineProperty,D=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,y=(he,Oe,V)=>Oe in he?P(he,Oe,{enumerable:!0,configurable:!0,writable:!0,value:V}):he[Oe]=V,Ce=(he,Oe)=>{for(var V in Oe||(Oe={}))ye.call(Oe,V)&&y(he,V,Oe[V]);if(D)for(var V of D(Oe))ne.call(Oe,V)&&y(he,V,Oe[V]);return he};const N=({cancelText:he="\u53D6\u6D88",okText:Oe="\u786E\u5B9A",loading:V=!1,hasOkBtn:ke=!0,hasCancelBtn:nt=!0,okButtonProps:Ze={},onCancel:et=()=>{},onOk:U=()=>{},className:Z=""})=>E.createElement("div",{className:p()(C.buttonFixed,Z)},E.createElement("div",{className:C.buttonWrap},nt&&E.createElement(q.ZP,{size:"middle",className:`${C.button} mr20`,onClick:et},he),ke&&E.createElement(q.ZP,Ce({size:"middle",type:"primary",className:`${C.button} mr20`,loading:V,onClick:U},Ze),Oe)))},1568:function(on,Ee,f){"use strict";f.d(Ee,{h:function(){return Z}});var E=f(59301),q=f(57809),C=f(78241),_=f(3113),p=f(89780),P=f.n(p),D=f(79906),ye=f(44383),ne=Object.defineProperty,y=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,V=(S,c,b)=>c in S?ne(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,ke=(S,c)=>{for(var b in c||(c={}))he.call(c,b)&&V(S,b,c[b]);if(N)for(var b of N(c))Oe.call(c,b)&&V(S,b,c[b]);return S},nt=(S,c)=>y(S,Ce(c));const Ze=q.default.Option,et={labelCol:{span:4},wrapperCol:{span:20}},U={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"]};Ee.Z=({callback:S,onCancel:c})=>{const[b,I]=(0,E.useState)("python");function F(be){I(U[be][1])}function R(be){S(be)}return E.createElement(C.default,nt(ke({},et),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:R,style:{width:500}}),E.createElement(C.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},E.createElement(q.default,{getPopupContainer:be=>be.parentNode,onChange:F},Object.keys(U).map(be=>E.createElement(Ze,{key:be,value:be},U[be][0])))),E.createElement(C.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},E.createElement(Z,{mode:b})),E.createElement("div",{className:"flex-container flex-end"},E.createElement(_.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.createElement(_.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function Z({value:S,onChange:c,mode:b,options:I={}}){const F=(0,E.useRef)(),[R,be]=(0,E.useState)();return(0,E.useEffect)(()=>{if(R){let $e=function(Pe){const Se=Pe.getValue();c&&c(Se)};return R.on("change",$e),()=>{R.off("change",$e)}}},[R,c]),(0,E.useEffect)(()=>{R&&R.setOption("mode",b)},[R,b]),(0,E.useEffect)(()=>{R&&(S!==R.getValue()||S==="")&&setTimeout(()=>{R.setValue(S||"")},300)},[R,S]),(0,E.useEffect)(()=>{if(F.current&&!R){const $e=P().fromTextArea(F.current,ke({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},I));be($e)}},[F.current,R]),E.createElement("div",{className:"my-codemirror-container"},E.createElement("textarea",{ref:F}))}},83540:function(on,Ee,f){"use strict";f.r(Ee),f.d(Ee,{default:function(){return nt}});var E=f(59301),q=f(42203),C=f(78241),_=f(92832),p=f(1568),P=f(23744),D={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},ye=Object.defineProperty,ne=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,N=(Ze,et,U)=>et in Ze?ye(Ze,et,{enumerable:!0,configurable:!0,writable:!0,value:U}):Ze[et]=U,he=(Ze,et)=>{for(var U in et||(et={}))y.call(et,U)&&N(Ze,U,et[U]);if(ne)for(var U of ne(et))Ce.call(et,U)&&N(Ze,U,et[U]);return Ze},Oe=(Ze,et)=>{var U={};for(var Z in Ze)y.call(Ze,Z)&&et.indexOf(Z)<0&&(U[Z]=Ze[Z]);if(Ze!=null&&ne)for(var Z of ne(Ze))et.indexOf(Z)<0&&Ce.call(Ze,Z)&&(U[Z]=Ze[Z]);return U},V=(Ze,et,U)=>new Promise((Z,S)=>{var c=F=>{try{I(U.next(F))}catch(R){S(R)}},b=F=>{try{I(U.throw(F))}catch(R){S(R)}},I=F=>F.done?Z(F.value):Promise.resolve(F.value).then(c,b);I((U=U.apply(Ze,et)).next())});const ke=Ze=>{var et=Ze,{shixunsDetail:U,globalSetting:Z,loading:S,user:c,dispatch:b}=et,I=Oe(et,["shixunsDetail","globalSetting","loading","user","dispatch"]);const F=(0,q.useLocation)(),[R,be]=(0,E.useState)({}),$e=(0,E.useRef)(),Pe=(0,E.useRef)(),[Se]=C.default.useForm(),[at,Ge]=(0,E.useState)("");(0,E.useEffect)(()=>(b({type:"globalSetting/footerToggle",payload:!1}),()=>{b({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,E.useEffect)(()=>{const B=sessionStorage.getItem("pathArray");if(B){const k=B.split(",").join("/"),ee=k.indexOf("/")===0?k.substr(1):k;Ge(ee)}},[]),(0,E.useEffect)(()=>{var B,k,ee,te;Pe.current=(k=(B=F.pathname)==null?void 0:B.split("/"))==null?void 0:k[2],$e.current=((te=(ee=F.pathname)==null?void 0:ee.split("/"))==null?void 0:te[3])==="repository"},[]);const je=(...B)=>V(void 0,[...B],function*(k={}){if(yield b({type:"shixunsDetail/addRepositoryFile",payload:{id:Pe.current,message:k.commitMessage,content:k.codeMirror,path:`${at?`${at}/`:""}${k.path||""}`,secret_repository:$e.current?void 0:!0}})){const te=$e.current?`/shixuns/${Pe.current}/repository${at?`/master/shixun_show/${at}`:""}`:`/shixuns/${Pe.current}/secret_repository`;q.history.replace(te)}}),le=()=>{var B,k;q.history.push(`/shixuns/${Pe.current}/${(k=(B=F.pathname)==null?void 0:B.split("/"))==null?void 0:k[3]}${at?`/master/shixun_show/${at}`:""}`)};return E.createElement("section",{className:D.bg},E.createElement("div",{className:D.wrap},E.createElement("div",{className:D.title},"\u65B0\u5EFA\u6587\u4EF6"),E.createElement(C.default,{className:"mt10",form:Se,scrollToFirstError:!0,layout:"vertical",onFinish:je,onValuesChange:()=>be(he({},Se.getFieldsValue()))},E.createElement(C.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},E.createElement(C.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},E.createElement("span",null,E.createElement("span",{className:"mr5"},at?`${at}/`:""),E.createElement(_.default,{className:D.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),E.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")),E.createElement(C.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"}]},E.createElement(_.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"})),E.createElement("div",{className:"mt10 mb20"},E.createElement(C.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},E.createElement(p.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"]}}))),E.createElement(C.default.Item,{noStyle:!0},E.createElement(P.t,{okButtonProps:{htmlType:"submit"},onCancel:le})))))};var nt=(0,q.connect)(({shixunsDetail:Ze,loading:et,globalSetting:U,user:Z})=>({shixunsDetail:Ze,globalSetting:U,user:Z,loading:et.models.index}))(ke)},19080:function(on,Ee,f){"use strict";f.d(Ee,{F:function(){return p},Z:function(){return _}});var E=f(92310),q=f.n(E);const C=null;function _(P,D,ye){return q()({[`${P}-status-success`]:D==="success",[`${P}-status-warning`]:D==="warning",[`${P}-status-error`]:D==="error",[`${P}-status-validating`]:D==="validating",[`${P}-has-feedback`]:ye})}const p=(P,D)=>D||P},93891:function(on,Ee,f){"use strict";var E=f(59301),q=f(36355),C=f(64165);const _=p=>{const{componentName:P}=p,{getPrefixCls:D}=(0,E.useContext)(q.E_),ye=D("empty");switch(P){case"Table":case"List":return E.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return E.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE,className:`${ye}-small`});default:return E.createElement(C.Z,null)}};Ee.Z=_},64165:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return U}});var E=f(92310),q=f.n(E),C=f(59301),_=f(36355),p=f(9763),P=f(64993),D=f(88088),ne=()=>{const[,Z]=(0,D.Z)(),c=new P.C(Z.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return C.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},C.createElement("g",{fill:"none",fillRule:"evenodd"},C.createElement("g",{transform:"translate(24 31.67)"},C.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),C.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"}),C.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)"}),C.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"}),C.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"})),C.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"}),C.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},C.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),C.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ce=()=>{const[,Z]=(0,D.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:I}=Z,{borderColor:F,shadowColor:R,contentColor:be}=(0,C.useMemo)(()=>({borderColor:new P.C(S).onBackground(I).toHexShortString(),shadowColor:new P.C(c).onBackground(I).toHexShortString(),contentColor:new P.C(b).onBackground(I).toHexShortString()}),[S,c,b,I]);return C.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},C.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},C.createElement("ellipse",{fill:R,cx:"32",cy:"33",rx:"32",ry:"7"}),C.createElement("g",{fillRule:"nonzero",stroke:F},C.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"}),C.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:be}))))},N=f(83116),he=f(37613);const Oe=Z=>{const{componentCls:S,margin:c,marginXS:b,marginXL:I,fontSize:F,lineHeight:R}=Z;return{[S]:{marginInline:b,fontSize:F,lineHeight:R,textAlign:"center",[`${S}-image`]:{height:Z.emptyImgHeight,marginBottom:b,opacity:Z.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:Z.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:I,color:Z.colorTextDisabled,[`${S}-description`]:{color:Z.colorTextDisabled},[`${S}-image`]:{height:Z.emptyImgHeightMD}},"&-small":{marginBlock:b,color:Z.colorTextDisabled,[`${S}-image`]:{height:Z.emptyImgHeightSM}}}}};var V=(0,N.Z)("Empty",Z=>{const{componentCls:S,controlHeightLG:c}=Z,b=(0,he.TS)(Z,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Oe(b)]}),ke=function(Z,S){var c={};for(var b in Z)Object.prototype.hasOwnProperty.call(Z,b)&&S.indexOf(b)<0&&(c[b]=Z[b]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,b=Object.getOwnPropertySymbols(Z);I<b.length;I++)S.indexOf(b[I])<0&&Object.prototype.propertyIsEnumerable.call(Z,b[I])&&(c[b[I]]=Z[b[I]]);return c};const nt=C.createElement(ne,null),Ze=C.createElement(Ce,null),et=Z=>{var{className:S,rootClassName:c,prefixCls:b,image:I=nt,description:F,children:R,imageStyle:be,style:$e}=Z,Pe=ke(Z,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Se,direction:at,empty:Ge}=C.useContext(_.E_),je=Se("empty",b),[le,B]=V(je),[k]=(0,p.Z)("Empty"),ee=typeof F!="undefined"?F:k==null?void 0:k.description,te=typeof ee=="string"?ee:"empty";let _e=null;return typeof I=="string"?_e=C.createElement("img",{alt:te,src:I}):_e=I,le(C.createElement("div",Object.assign({className:q()(B,je,Ge==null?void 0:Ge.className,{[`${je}-normal`]:I===Ze,[`${je}-rtl`]:at==="rtl"},S,c),style:Object.assign(Object.assign({},Ge==null?void 0:Ge.style),$e)},Pe),C.createElement("div",{className:`${je}-image`,style:be},_e),ee&&C.createElement("div",{className:`${je}-description`},ee),R&&C.createElement("div",{className:`${je}-footer`},R)))};et.PRESENTED_IMAGE_DEFAULT=nt,et.PRESENTED_IMAGE_SIMPLE=Ze;var U=et},78241:function(on,Ee,f){"use strict";f.d(Ee,{default:function(){return Mt}});var E=f(26390),q=f(92310),C=f.n(q),_=f(43469),p=f(59301),P=f(62892),D=f(32441);function ye(g){const[T,j]=p.useState(g);return p.useEffect(()=>{const h=setTimeout(()=>{j(g)},g.length?0:10);return()=>{clearTimeout(h)}},[g]),T}var ne=f(17313),y=f(29878),Ce=f(8378),N=f(37613),he=f(83116),V=g=>{const{componentCls:T}=g,j=`${T}-show-help`,h=`${T}-show-help-item`;return{[j]:{transition:`opacity ${g.motionDurationSlow} ${g.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[h]:{overflow:"hidden",transition:`height ${g.motionDurationSlow} ${g.motionEaseInOut},
opacity ${g.motionDurationSlow} ${g.motionEaseInOut},
transform ${g.motionDurationSlow} ${g.motionEaseInOut} !important`,[`&${h}-appear, &${h}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${h}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ke=g=>({legend:{display:"block",width:"100%",marginBottom:g.marginLG,padding:0,color:g.colorTextDescription,fontSize:g.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`},label:{fontSize:g.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 ${g.controlOutlineWidth}px ${g.controlOutline}`},output:{display:"block",paddingTop:15,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight}}),nt=(g,T)=>{const{formItemCls:j}=g;return{[j]:{[`${j}-label > label`]:{height:T},[`${j}-control-input`]:{minHeight:T}}}},Ze=g=>{const{componentCls:T}=g;return{[g.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ne.Wf)(g)),ke(g)),{[`${T}-text`]:{display:"inline-block",paddingInlineEnd:g.paddingSM},"&-small":Object.assign({},nt(g,g.controlHeightSM)),"&-large":Object.assign({},nt(g,g.controlHeightLG))})}},et=g=>{const{formItemCls:T,iconCls:j,componentCls:h,rootPrefixCls:d,labelRequiredMarkColor:x,labelColor:L,labelFontSize:Y,labelHeight:H,labelColonMarginInlineStart:W,labelColonMarginInlineEnd:re,itemMarginBottom:de}=g;return{[T]:Object.assign(Object.assign({},(0,ne.Wf)(g)),{marginBottom:de,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${d}-row`]:{display:"none"},"&-has-warning":{[`${T}-split`]:{color:g.colorError}},"&-has-error":{[`${T}-split`]:{color:g.colorWarning}},[`${T}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${g.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:H,color:L,fontSize:Y,[`> ${j}`]:{fontSize:g.fontSize,verticalAlign:"top"},[`&${T}-required:not(${T}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:g.marginXXS,color:x,fontSize:g.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${h}-hide-required-mark &`]:{display:"none"}},[`${T}-optional`]:{display:"inline-block",marginInlineStart:g.marginXXS,color:g.colorTextDescription,[`${h}-hide-required-mark &`]:{display:"none"}},[`${T}-tooltip`]:{color:g.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:g.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:W,marginInlineEnd:re},[`&${T}-no-colon::after`]:{content:'"\\a0"'}}},[`${T}-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:g.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[T]:{"&-explain, &-extra":{clear:"both",color:g.colorTextDescription,fontSize:g.fontSize,lineHeight:g.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:g.controlHeightSM,transition:`color ${g.motionDurationMid} ${g.motionEaseOut}`},"&-explain":{"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning}}},[`&-with-help ${T}-explain`]:{height:"auto",opacity:1},[`${T}-feedback-icon`]:{fontSize:g.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:g.motionDurationMid,animationTimingFunction:g.motionEaseOutBack,pointerEvents:"none","&-success":{color:g.colorSuccess},"&-error":{color:g.colorError},"&-warning":{color:g.colorWarning},"&-validating":{color:g.colorPrimary}}})}},U=g=>{const{componentCls:T,formItemCls:j}=g;return{[`${T}-horizontal`]:{[`${j}-label`]:{flexGrow:0},[`${j}-control`]:{flex:"1 1 0",minWidth:0},[`${j}-label[class$='-24'], ${j}-label[class*='-24 ']`]:{[`& + ${j}-control`]:{minWidth:"unset"}}}}},Z=g=>{const{componentCls:T,formItemCls:j}=g;return{[`${T}-inline`]:{display:"flex",flexWrap:"wrap",[j]:{flex:"none",marginInlineEnd:g.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${j}-label,
> ${j}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${j}-label`]:{flex:"none"},[`${T}-text`]:{display:"inline-block"},[`${j}-has-feedback`]:{display:"inline-block"}}}}},S=g=>({padding:g.verticalLabelPadding,margin:g.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=g=>{const{componentCls:T,formItemCls:j,rootPrefixCls:h}=g;return{[`${j} ${j}-label`]:S(g),[T]:{[j]:{flexWrap:"wrap",[`${j}-label, ${j}-control`]:{[`&:not([class*=" ${h}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=g=>{const{componentCls:T,formItemCls:j,rootPrefixCls:h}=g;return{[`${T}-vertical`]:{[j]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${T}-item-control`]:{width:"100%"}}},[`${T}-vertical ${j}-label,
.${h}-col-24${j}-label,
.${h}-col-xl-24${j}-label`]:S(g),[`@media (max-width: ${g.screenXSMax}px)`]:[c(g),{[T]:{[`.${h}-col-xs-24${j}-label`]:S(g)}}],[`@media (max-width: ${g.screenSMMax}px)`]:{[T]:{[`.${h}-col-sm-24${j}-label`]:S(g)}},[`@media (max-width: ${g.screenMDMax}px)`]:{[T]:{[`.${h}-col-md-24${j}-label`]:S(g)}},[`@media (max-width: ${g.screenLGMax}px)`]:{[T]:{[`.${h}-col-lg-24${j}-label`]:S(g)}}}},I=(g,T)=>(0,N.TS)(g,{formItemCls:`${g.componentCls}-item`,rootPrefixCls:T});var F=(0,he.Z)("Form",(g,T)=>{let{rootPrefixCls:j}=T;const h=I(g,j);return[Ze(h),et(h),V(h),U(h),Z(h),b(h),(0,Ce.Z)(h),y.kr]},g=>({labelRequiredMarkColor:g.colorError,labelColor:g.colorTextHeading,labelFontSize:g.fontSize,labelHeight:g.controlHeight,labelColonMarginInlineStart:g.marginXXS/2,labelColonMarginInlineEnd:g.marginXS,itemMarginBottom:g.marginLG,verticalLabelPadding:`0 0 ${g.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const R=[];function be(g,T,j){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof g=="string"?g:`${T}-${h}`,error:g,errorStatus:j}}var Pe=g=>{let{help:T,helpStatus:j,errors:h=R,warnings:d=R,className:x,fieldId:L,onVisibleChanged:Y}=g;const{prefixCls:H}=p.useContext(D.Rk),W=`${H}-item-explain`,[,re]=F(H),de=(0,p.useMemo)(()=>(0,P.Z)(H),[H]),Fe=ye(h),M=ye(d),K=p.useMemo(()=>T!=null?[be(T,"help",j)]:[].concat((0,E.Z)(Fe.map((ue,Ne)=>be(ue,"error","error",Ne))),(0,E.Z)(M.map((ue,Ne)=>be(ue,"warning","warning",Ne)))),[T,j,Fe,M]),Be={};return L&&(Be.id=`${L}_help`),p.createElement(_.default,{motionDeadline:de.motionDeadline,motionName:`${H}-show-help`,visible:!!K.length,onVisibleChanged:Y},ue=>{const{className:Ne,style:De}=ue;return p.createElement("div",Object.assign({},Be,{className:C()(W,Ne,x,re),style:De,role:"alert"}),p.createElement(_.CSSMotionList,Object.assign({keys:K},(0,P.Z)(H),{motionName:`${H}-show-help-item`,component:!1}),ft=>{const{key:J,error:ae,errorStatus:Me,className:Xe,style:qe}=ft;return p.createElement("div",{key:J,className:C()(Xe,{[`${W}-${Me}`]:Me}),style:qe},ae)}))})},Se=f(95013),at=f(36355),Ge=f(1684),je=f(52946),le=f(19716),B=f(16722);const k=["parentNode"],ee="form_item";function te(g){return g===void 0||g===!1?[]:Array.isArray(g)?g:[g]}function _e(g,T){if(!g.length)return;const j=g.join("_");return T?`${T}_${j}`:k.includes(j)?`${ee}_${j}`:j}function ze(g,T,j,h,d,x){let L=h;return x!==void 0?L=x:j.validating?L="validating":g.length?L="error":T.length?L="warning":(j.touched||d&&j.validated)&&(L="success"),L}function ie(g){return te(g).join("_")}function Te(g){const[T]=(0,Se.useForm)(),j=p.useRef({}),h=p.useMemo(()=>g!=null?g:Object.assign(Object.assign({},T),{__INTERNAL__:{itemRef:d=>x=>{const L=ie(d);x?j.current[L]=x:delete j.current[L]}},scrollToField:function(d){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const L=te(d),Y=_e(L,h.__INTERNAL__.name),H=Y?document.getElementById(Y):null;H&&(0,B.Z)(H,Object.assign({scrollMode:"if-needed",block:"nearest"},x))},getFieldInstance:d=>{const x=ie(d);return j.current[x]}}),[g,T]);return[h]}var ce=f(28726),yt=function(g,T){var j={};for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&T.indexOf(h)<0&&(j[h]=g[h]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(g);d<h.length;d++)T.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(g,h[d])&&(j[h[d]]=g[h[d]]);return j};const Dt=(g,T)=>{const j=p.useContext(Ge.Z),{getPrefixCls:h,direction:d,form:x}=p.useContext(at.E_),{prefixCls:L,className:Y,rootClassName:H,size:W,disabled:re=j,form:de,colon:Fe,labelAlign:M,labelWrap:K,labelCol:Be,wrapperCol:ue,hideRequiredMark:Ne,layout:De="horizontal",scrollToFirstError:ft,requiredMark:J,onFinishFailed:ae,name:Me,style:Xe,feedbackIcons:qe}=g,st=yt(g,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Ut=(0,le.Z)(W),Rt=p.useContext(ce.Z),Wt=(0,p.useMemo)(()=>J!==void 0?J:x&&x.requiredMark!==void 0?x.requiredMark:!Ne,[Ne,J,x]),$t=Fe!=null?Fe:x==null?void 0:x.colon,Ct=h("form",L),[tn,Jt]=F(Ct),Zt=C()(Ct,`${Ct}-${De}`,{[`${Ct}-hide-required-mark`]:Wt===!1,[`${Ct}-rtl`]:d==="rtl",[`${Ct}-${Ut}`]:Ut},Jt,x==null?void 0:x.className,Y,H),[Xt]=Te(de),{__INTERNAL__:Nt}=Xt;Nt.name=Me;const xt=(0,p.useMemo)(()=>({name:Me,labelAlign:M,labelCol:Be,labelWrap:K,wrapperCol:ue,vertical:De==="vertical",colon:$t,requiredMark:Wt,itemRef:Nt.itemRef,form:Xt,feedbackIcons:qe}),[Me,M,Be,ue,De,$t,Wt,Xt,qe]);p.useImperativeHandle(T,()=>Xt);const Bt=(vn,Lt)=>{if(vn){let kt={block:"nearest"};typeof vn=="object"&&(kt=vn),Xt.scrollToField(Lt,kt)}},wt=vn=>{if(ae==null||ae(vn),vn.errorFields.length){const Lt=vn.errorFields[0].name;if(ft!==void 0){Bt(ft,Lt);return}x&&x.scrollToFirstError!==void 0&&Bt(x.scrollToFirstError,Lt)}};return tn(p.createElement(Ge.n,{disabled:re},p.createElement(je.q,{size:Ut},p.createElement(D.RV,Object.assign({},{validateMessages:Rt}),p.createElement(D.q3.Provider,{value:xt},p.createElement(Se.default,Object.assign({id:Me},st,{name:Me,onFinishFailed:wt,form:Xt,style:Object.assign(Object.assign({},x==null?void 0:x.style),Xe),className:Zt})))))))};var Je=p.forwardRef(Dt),Et=f(12383),lt=f(20475),Ht=f(92343),$=f(38298);function ve(g){if(typeof g=="function")return g;const T=(0,$.Z)(g);return T.length<=1?T[0]:T}const G=()=>{const{status:g,errors:T=[],warnings:j=[]}=(0,p.useContext)(D.aM);return{status:g,errors:T,warnings:j}};G.Context=D.aM;var Q=G,se=f(23073);function xe(g){const[T,j]=p.useState(g),h=(0,p.useRef)(null),d=(0,p.useRef)([]),x=(0,p.useRef)(!1);p.useEffect(()=>(x.current=!1,()=>{x.current=!0,se.Z.cancel(h.current),h.current=null}),[]);function L(Y){x.current||(h.current===null&&(d.current=[],h.current=(0,se.Z)(()=>{h.current=null,j(H=>{let W=H;return d.current.forEach(re=>{W=re(W)}),W})})),d.current.push(Y))}return[T,L]}function ge(){const{itemRef:g}=p.useContext(D.q3),T=p.useRef({});function j(h,d){const x=d&&typeof d=="object"&&d.ref,L=h.join("_");return(T.current.name!==L||T.current.originRef!==x)&&(T.current.name=L,T.current.originRef=x,T.current.ref=(0,lt.sQ)(g(h),x)),T.current.ref}return j}var oe=f(48886),fe=f(28800),We=f(64002),Ie=f(27382),me=f(37028);const Ke=g=>{const{formItemCls:T}=g;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${T}-control`]:{display:"flex"}}}};var we=(0,he.b)(["Form","item-item"],(g,T)=>{let{rootPrefixCls:j}=T;const h=I(g,j);return[Ke(h)]}),A=g=>{const{prefixCls:T,status:j,wrapperCol:h,children:d,errors:x,warnings:L,_internalItemRender:Y,extra:H,help:W,fieldId:re,marginBottom:de,onErrorVisibleChanged:Fe}=g,M=`${T}-item`,K=p.useContext(D.q3),Be=h||K.wrapperCol||{},ue=C()(`${M}-control`,Be.className),Ne=p.useMemo(()=>Object.assign({},K),[K]);delete Ne.labelCol,delete Ne.wrapperCol;const De=p.createElement("div",{className:`${M}-control-input`},p.createElement("div",{className:`${M}-control-input-content`},d)),ft=p.useMemo(()=>({prefixCls:T,status:j}),[T,j]),J=de!==null||x.length||L.length?p.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},p.createElement(D.Rk.Provider,{value:ft},p.createElement(Pe,{fieldId:re,errors:x,warnings:L,help:W,helpStatus:j,className:`${M}-explain-connected`,onVisibleChanged:Fe})),!!de&&p.createElement("div",{style:{width:0,height:de}})):null,ae={};re&&(ae.id=`${re}_extra`);const Me=H?p.createElement("div",Object.assign({},ae,{className:`${M}-extra`}),H):null,Xe=Y&&Y.mark==="pro_table_render"&&Y.render?Y.render(g,{input:De,errorList:J,extra:Me}):p.createElement(p.Fragment,null,De,J,Me);return p.createElement(D.q3.Provider,{value:Ne},p.createElement(me.Z,Object.assign({},Be,{className:ue}),Xe),p.createElement(we,{prefixCls:T}))},Qe=f(86902),ht=f(31724),He=f(9763),ut=f(6848),Pt=function(g,T){var j={};for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&T.indexOf(h)<0&&(j[h]=g[h]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(g);d<h.length;d++)T.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(g,h[d])&&(j[h[d]]=g[h[d]]);return j};function Gt(g){return g?typeof g=="object"&&!p.isValidElement(g)?g:{title:g}:null}var gt=g=>{let{prefixCls:T,label:j,htmlFor:h,labelCol:d,labelAlign:x,colon:L,required:Y,requiredMark:H,tooltip:W}=g;var re;const[de]=(0,He.Z)("Form"),{vertical:Fe,labelAlign:M,labelCol:K,labelWrap:Be,colon:ue}=p.useContext(D.q3);if(!j)return null;const Ne=d||K||{},De=x||M,ft=`${T}-item-label`,J=C()(ft,De==="left"&&`${ft}-left`,Ne.className,{[`${ft}-wrap`]:!!Be});let ae=j;const Me=L===!0||ue!==!1&&L!==!1;Me&&!Fe&&typeof j=="string"&&j.trim()!==""&&(ae=j.replace(/[:|]\s*$/,""));const qe=Gt(W);if(qe){const{icon:Wt=p.createElement(Qe.Z,null)}=qe,$t=Pt(qe,["icon"]),Ct=p.createElement(ut.Z,Object.assign({},$t),p.cloneElement(Wt,{className:`${T}-item-tooltip`,title:""}));ae=p.createElement(p.Fragment,null,ae,Ct)}const st=H==="optional",Ut=typeof H=="function";Ut?ae=H(ae,{required:!!Y}):st&&!Y&&(ae=p.createElement(p.Fragment,null,ae,p.createElement("span",{className:`${T}-item-optional`,title:""},(de==null?void 0:de.optional)||((re=ht.Z.Form)===null||re===void 0?void 0:re.optional))));const Rt=C()({[`${T}-item-required`]:Y,[`${T}-item-required-mark-optional`]:st||Ut,[`${T}-item-no-colon`]:!Me});return p.createElement(me.Z,Object.assign({},Ne,{className:J}),p.createElement("label",{htmlFor:h,className:Rt,title:typeof j=="string"?j:""},ae))},Yt=f(79999),zt=f(33130),pn=f(85404),un=f(50023);const bn={success:Yt.Z,warning:pn.Z,error:zt.Z,validating:un.Z};function Nn(g){let{children:T,errors:j,warnings:h,hasFeedback:d,validateStatus:x,prefixCls:L,meta:Y,noStyle:H}=g;const W=`${L}-item`,{feedbackIcons:re}=p.useContext(D.q3),de=ze(j,h,Y,null,!!d,x),{isFormItemInput:Fe,status:M}=p.useContext(D.aM),K=p.useMemo(()=>{var Be;let ue;if(d){const ft=d!==!0&&d.icons||re,J=de&&((Be=ft==null?void 0:ft({status:de,errors:j,warnings:h}))===null||Be===void 0?void 0:Be[de]),ae=de&&bn[de];ue=J!==!1&&ae?p.createElement("span",{className:C()(`${W}-feedback-icon`,`${W}-feedback-icon-${de}`)},J||p.createElement(ae,null)):null}let Ne=!0,De=de||"";return H&&(Ne=Fe,De=(de!=null?de:M)||""),{status:De,errors:j,warnings:h,hasFeedback:!!d,feedbackIcon:ue,isFormItemInput:Ne}},[de,d,H,Fe,M]);return p.createElement(D.aM.Provider,{value:K},T)}var gn=function(g,T){var j={};for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&T.indexOf(h)<0&&(j[h]=g[h]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(g);d<h.length;d++)T.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(g,h[d])&&(j[h[d]]=g[h[d]]);return j};function Bn(g){const{prefixCls:T,className:j,rootClassName:h,style:d,help:x,errors:L,warnings:Y,validateStatus:H,meta:W,hasFeedback:re,hidden:de,children:Fe,fieldId:M,required:K,isRequired:Be,onSubItemMetaChange:ue}=g,Ne=gn(g,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),De=`${T}-item`,{requiredMark:ft}=p.useContext(D.q3),J=p.useRef(null),ae=ye(L),Me=ye(Y),Xe=x!=null,qe=!!(Xe||L.length||Y.length),st=!!J.current&&(0,oe.Z)(J.current),[Ut,Rt]=p.useState(null);(0,fe.Z)(()=>{if(qe&&J.current){const Jt=getComputedStyle(J.current);Rt(parseInt(Jt.marginBottom,10))}},[qe,st]);const Wt=Jt=>{Jt||Rt(null)},Ct=function(){let Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Zt=Jt?ae:W.errors,Xt=Jt?Me:W.warnings;return ze(Zt,Xt,W,"",!!re,H)}(),tn=C()(De,j,h,{[`${De}-with-help`]:Xe||ae.length||Me.length,[`${De}-has-feedback`]:Ct&&re,[`${De}-has-success`]:Ct==="success",[`${De}-has-warning`]:Ct==="warning",[`${De}-has-error`]:Ct==="error",[`${De}-is-validating`]:Ct==="validating",[`${De}-hidden`]:de});return p.createElement("div",{className:tn,style:d,ref:J},p.createElement(Ie.Z,Object.assign({className:`${De}-row`},(0,We.Z)(Ne,["_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"])),p.createElement(gt,Object.assign({htmlFor:M},g,{requiredMark:ft,required:K!=null?K:Be,prefixCls:T})),p.createElement(A,Object.assign({},g,W,{errors:ae,warnings:Me,prefixCls:T,status:Ct,help:x,marginBottom:Ut,onErrorVisibleChanged:Wt}),p.createElement(D.qI.Provider,{value:ue},p.createElement(Nn,{prefixCls:T,meta:W,errors:W.errors,warnings:W.warnings,hasFeedback:re,validateStatus:Ct},Fe)))),!!Ut&&p.createElement("div",{className:`${De}-margin-offset`,style:{marginBottom:-Ut}}))}const dn="__SPLIT__",Wn=null,mn=p.memo(g=>{let{children:T}=g;return T},(g,T)=>g.value===T.value&&g.update===T.update&&g.childProps.length===T.childProps.length&&g.childProps.every((j,h)=>j===T.childProps[h]));function hn(g){return g!=null}function Ln(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function en(g){const{name:T,noStyle:j,className:h,dependencies:d,prefixCls:x,shouldUpdate:L,rules:Y,children:H,required:W,label:re,messageVariables:de,trigger:Fe="onChange",validateTrigger:M,hidden:K,help:Be}=g,{getPrefixCls:ue}=p.useContext(at.E_),{name:Ne}=p.useContext(D.q3),De=ve(H),ft=typeof De=="function",J=p.useContext(D.qI),{validateTrigger:ae}=p.useContext(Se.FieldContext),Me=M!==void 0?M:ae,Xe=hn(T),qe=ue("form",x),[st,Ut]=F(qe),Rt=p.useContext(Se.ListContext),Wt=p.useRef(),[$t,Ct]=xe({}),[tn,Jt]=(0,Et.Z)(()=>Ln()),Zt=Lt=>{const kt=Rt==null?void 0:Rt.getKey(Lt.name);if(Jt(Lt.destroy?Ln():Lt,!0),j&&Be!==!1&&J){let sn=Lt.name;if(Lt.destroy)sn=Wt.current||sn;else if(kt!==void 0){const[jt,Mn]=kt;sn=[jt].concat((0,E.Z)(Mn)),Wt.current=sn}J(Lt,sn)}},Xt=(Lt,kt)=>{Ct(sn=>{const jt=Object.assign({},sn),Kn=[].concat((0,E.Z)(Lt.name.slice(0,-1)),(0,E.Z)(kt)).join(dn);return Lt.destroy?delete jt[Kn]:jt[Kn]=Lt,jt})},[Nt,xt]=p.useMemo(()=>{const Lt=(0,E.Z)(tn.errors),kt=(0,E.Z)(tn.warnings);return Object.values($t).forEach(sn=>{Lt.push.apply(Lt,(0,E.Z)(sn.errors||[])),kt.push.apply(kt,(0,E.Z)(sn.warnings||[]))}),[Lt,kt]},[$t,tn.errors,tn.warnings]),Bt=ge();function wt(Lt,kt,sn){return j&&!K?p.createElement(Nn,{prefixCls:qe,hasFeedback:g.hasFeedback,validateStatus:g.validateStatus,meta:tn,errors:Nt,warnings:xt,noStyle:!0},Lt):p.createElement(Bn,Object.assign({key:"row"},g,{className:C()(h,Ut),prefixCls:qe,fieldId:kt,isRequired:sn,errors:Nt,warnings:xt,meta:tn,onSubItemMetaChange:Xt}),Lt)}if(!Xe&&!ft&&!d)return st(wt(De));let vn={};return typeof re=="string"?vn.label=re:T&&(vn.label=String(T)),de&&(vn=Object.assign(Object.assign({},vn),de)),st(p.createElement(Se.Field,Object.assign({},g,{messageVariables:vn,trigger:Fe,validateTrigger:Me,onMetaChange:Zt}),(Lt,kt,sn)=>{const jt=te(T).length&&kt?kt.name:[],Mn=_e(jt,Ne),Kn=W!==void 0?W:!!(Y&&Y.some(dt=>{if(dt&&typeof dt=="object"&&dt.required&&!dt.warningOnly)return!0;if(typeof dt=="function"){const nn=dt(sn);return nn&&nn.required&&!nn.warningOnly}return!1})),Ot=Object.assign({},Lt);let it=null;if(Array.isArray(De)&&Xe)it=De;else if(!(ft&&(!(L||d)||Xe))){if(!(d&&!ft&&!Xe))if((0,Ht.l$)(De)){const dt=Object.assign(Object.assign({},De.props),Ot);if(dt.id||(dt.id=Mn),Be||Nt.length>0||xt.length>0||g.extra){const Qt=[];(Be||Nt.length>0)&&Qt.push(`${Mn}_help`),g.extra&&Qt.push(`${Mn}_extra`),dt["aria-describedby"]=Qt.join(" ")}Nt.length>0&&(dt["aria-invalid"]="true"),Kn&&(dt["aria-required"]="true"),(0,lt.Yr)(De)&&(dt.ref=Bt(jt,De)),new Set([].concat((0,E.Z)(te(Fe)),(0,E.Z)(te(Me)))).forEach(Qt=>{dt[Qt]=function(){for(var At,ln,cn,On,Ve,Ae=arguments.length,pt=new Array(Ae),Ft=0;Ft<Ae;Ft++)pt[Ft]=arguments[Ft];(cn=Ot[Qt])===null||cn===void 0||(At=cn).call.apply(At,[Ot].concat(pt)),(Ve=(On=De.props)[Qt])===null||Ve===void 0||(ln=Ve).call.apply(ln,[On].concat(pt))}});const rn=[dt["aria-required"],dt["aria-invalid"],dt["aria-describedby"]];it=p.createElement(mn,{value:Ot[g.valuePropName||"value"],update:De,childProps:rn},(0,Ht.Tm)(De,dt))}else ft&&(L||d)&&!Xe?it=De(sn):it=De}return wt(it,Mn,Kn)}))}const Sn=en;Sn.useStatus=Q;var Xn=Sn,An=function(g,T){var j={};for(var h in g)Object.prototype.hasOwnProperty.call(g,h)&&T.indexOf(h)<0&&(j[h]=g[h]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(g);d<h.length;d++)T.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(g,h[d])&&(j[h[d]]=g[h[d]]);return j},lr=g=>{var{prefixCls:T,children:j}=g,h=An(g,["prefixCls","children"]);const{getPrefixCls:d}=p.useContext(at.E_),x=d("form",T),L=p.useMemo(()=>({prefixCls:x,status:"error"}),[x]);return p.createElement(Se.List,Object.assign({},h),(Y,H,W)=>p.createElement(D.Rk.Provider,{value:L},j(Y.map(re=>Object.assign(Object.assign({},re),{fieldKey:re.key})),H,{errors:W.errors,warnings:W.warnings})))};function Vt(){const{form:g}=(0,p.useContext)(D.q3);return g}const rt=Je;rt.Item=Xn,rt.List=lr,rt.ErrorList=Pe,rt.useForm=Te,rt.useFormInstance=Vt,rt.useWatch=Se.useWatch,rt.Provider=D.RV,rt.create=()=>{};var Mt=rt},9432:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return et},n:function(){return nt}});var E=f(33130),q=f(92310),C=f.n(q),_=f(93681),p=f(20475),P=f(59301),D=f(19080),ye=f(36355),ne=f(1684),y=f(19716),Ce=f(32441),N=f(33234),he=f(59412),Oe=f(9937);function V(U){return!!(U.prefix||U.suffix||U.allowClear)}var ke=function(U,Z){var S={};for(var c in U)Object.prototype.hasOwnProperty.call(U,c)&&Z.indexOf(c)<0&&(S[c]=U[c]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(U);b<c.length;b++)Z.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(U,c[b])&&(S[c[b]]=U[c[b]]);return S};function nt(U,Z){if(!U)return;U.focus(Z);const{cursor:S}=Z||{};if(S){const c=U.value.length;switch(S){case"start":U.setSelectionRange(0,0);break;case"end":U.setSelectionRange(c,c);break;default:U.setSelectionRange(0,c);break}}}var et=(0,P.forwardRef)((U,Z)=>{var S;const{prefixCls:c,bordered:b=!0,status:I,size:F,disabled:R,onBlur:be,onFocus:$e,suffix:Pe,allowClear:Se,addonAfter:at,addonBefore:Ge,className:je,style:le,styles:B,rootClassName:k,onChange:ee,classNames:te}=U,_e=ke(U,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ze,direction:ie,input:Te}=P.useContext(ye.E_),ce=ze("input",c),yt=(0,P.useRef)(null),[Dt,bt]=(0,Oe.ZP)(ce),{compactSize:Je,compactItemClassnames:Et}=(0,N.ri)(ce,ie),lt=(0,y.Z)(we=>{var tt;return(tt=F!=null?F:Je)!==null&&tt!==void 0?tt:we}),Ht=P.useContext(ne.Z),$=R!=null?R:Ht,{status:ve,hasFeedback:G,feedbackIcon:Q}=(0,P.useContext)(Ce.aM),se=(0,D.F)(ve,I),xe=V(U)||!!G,ge=(0,P.useRef)(xe);(0,P.useEffect)(()=>{var we;xe&&ge.current,ge.current=xe},[xe]);const oe=(0,he.Z)(yt,!0),fe=we=>{oe(),be==null||be(we)},We=we=>{oe(),$e==null||$e(we)},Ie=we=>{oe(),ee==null||ee(we)},me=(G||Pe)&&P.createElement(P.Fragment,null,Pe,G&&Q);let Ke;return typeof Se=="object"&&(Se!=null&&Se.clearIcon)?Ke=Se:Se&&(Ke={clearIcon:P.createElement(E.Z,null)}),Dt(P.createElement(_.default,Object.assign({ref:(0,p.sQ)(Z,yt),prefixCls:ce,autoComplete:Te==null?void 0:Te.autoComplete},_e,{disabled:$,onBlur:fe,onFocus:We,style:Object.assign(Object.assign({},Te==null?void 0:Te.style),le),styles:Object.assign(Object.assign({},Te==null?void 0:Te.styles),B),suffix:me,allowClear:Ke,className:C()(je,k,Et,Te==null?void 0:Te.className),onChange:Ie,addonAfter:at&&P.createElement(N.BR,null,P.createElement(Ce.Ux,{override:!0,status:!0},at)),addonBefore:Ge&&P.createElement(N.BR,null,P.createElement(Ce.Ux,{override:!0,status:!0},Ge)),classNames:Object.assign(Object.assign(Object.assign({},te),Te==null?void 0:Te.classNames),{input:C()({[`${ce}-sm`]:lt==="small",[`${ce}-lg`]:lt==="large",[`${ce}-rtl`]:ie==="rtl",[`${ce}-borderless`]:!b},!xe&&(0,D.Z)(ce,se),te==null?void 0:te.input,(S=Te==null?void 0:Te.classNames)===null||S===void 0?void 0:S.input,bt)}),classes:{affixWrapper:C()({[`${ce}-affix-wrapper-sm`]:lt==="small",[`${ce}-affix-wrapper-lg`]:lt==="large",[`${ce}-affix-wrapper-rtl`]:ie==="rtl",[`${ce}-affix-wrapper-borderless`]:!b},(0,D.Z)(`${ce}-affix-wrapper`,se,G),bt),wrapper:C()({[`${ce}-group-rtl`]:ie==="rtl"},bt),group:C()({[`${ce}-group-wrapper-sm`]:lt==="small",[`${ce}-group-wrapper-lg`]:lt==="large",[`${ce}-group-wrapper-rtl`]:ie==="rtl",[`${ce}-group-wrapper-disabled`]:$},(0,D.Z)(`${ce}-group-wrapper`,se,G),bt)}})))})},1643:function(on,Ee,f){"use strict";var E=f(33130),q=f(92310),C=f.n(q),_=f(9296),p=f(59301),P=f(19080),D=f(36355),ye=f(1684),ne=f(19716),y=f(32441),Ce=f(9432),N=f(9937),he=function(V,ke){var nt={};for(var Ze in V)Object.prototype.hasOwnProperty.call(V,Ze)&&ke.indexOf(Ze)<0&&(nt[Ze]=V[Ze]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Ze=Object.getOwnPropertySymbols(V);et<Ze.length;et++)ke.indexOf(Ze[et])<0&&Object.prototype.propertyIsEnumerable.call(V,Ze[et])&&(nt[Ze[et]]=V[Ze[et]]);return nt};const Oe=(0,p.forwardRef)((V,ke)=>{const{prefixCls:nt,bordered:Ze=!0,size:et,disabled:U,status:Z,allowClear:S,showCount:c,classNames:b,rootClassName:I,className:F}=V,R=he(V,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:be,direction:$e}=p.useContext(D.E_),Pe=(0,ne.Z)(et),Se=p.useContext(ye.Z),at=U!=null?U:Se,{status:Ge,hasFeedback:je,feedbackIcon:le}=p.useContext(y.aM),B=(0,P.F)(Ge,Z),k=p.useRef(null);p.useImperativeHandle(ke,()=>{var ie;return{resizableTextArea:(ie=k.current)===null||ie===void 0?void 0:ie.resizableTextArea,focus:Te=>{var ce,yt;(0,Ce.n)((yt=(ce=k.current)===null||ce===void 0?void 0:ce.resizableTextArea)===null||yt===void 0?void 0:yt.textArea,Te)},blur:()=>{var Te;return(Te=k.current)===null||Te===void 0?void 0:Te.blur()}}});const ee=be("input",nt);let te;typeof S=="object"&&(S!=null&&S.clearIcon)?te=S:S&&(te={clearIcon:p.createElement(E.Z,null)});const[_e,ze]=(0,N.ZP)(ee);return _e(p.createElement(_.default,Object.assign({},R,{disabled:at,allowClear:te,className:C()(F,I),classes:{affixWrapper:C()(`${ee}-textarea-affix-wrapper`,{[`${ee}-affix-wrapper-rtl`]:$e==="rtl",[`${ee}-affix-wrapper-borderless`]:!Ze,[`${ee}-affix-wrapper-sm`]:Pe==="small",[`${ee}-affix-wrapper-lg`]:Pe==="large",[`${ee}-textarea-show-count`]:c},(0,P.Z)(`${ee}-affix-wrapper`,B),ze)},classNames:Object.assign(Object.assign({},b),{textarea:C()({[`${ee}-borderless`]:!Ze,[`${ee}-sm`]:Pe==="small",[`${ee}-lg`]:Pe==="large"},(0,P.Z)(ee,B),ze,b==null?void 0:b.textarea)}),prefixCls:ee,suffix:je&&p.createElement("span",{className:`${ee}-textarea-suffix`},le),showCount:c,ref:k})))});Ee.Z=Oe},59412:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return q}});var E=f(59301);function q(C,_){const p=(0,E.useRef)([]),P=()=>{p.current.push(setTimeout(()=>{var D,ye,ne,y;!((D=C.current)===null||D===void 0)&&D.input&&((ye=C.current)===null||ye===void 0?void 0:ye.input.getAttribute("type"))==="password"&&(!((ne=C.current)===null||ne===void 0)&&ne.input.hasAttribute("value"))&&((y=C.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,E.useEffect)(()=>(_&&P(),()=>p.current.forEach(D=>{D&&clearTimeout(D)})),[]),P}},92832:function(on,Ee,f){"use strict";f.d(Ee,{default:function(){return Pe}});var E=f(92310),q=f.n(E),C=f(59301),_=f(36355),p=f(32441),P=f(9937),ye=Se=>{const{getPrefixCls:at,direction:Ge}=(0,C.useContext)(_.E_),{prefixCls:je,className:le}=Se,B=at("input-group",je),k=at("input"),[ee,te]=(0,P.ZP)(k),_e=q()(B,{[`${B}-lg`]:Se.size==="large",[`${B}-sm`]:Se.size==="small",[`${B}-compact`]:Se.compact,[`${B}-rtl`]:Ge==="rtl"},te,le),ze=(0,C.useContext)(p.aM),ie=(0,C.useMemo)(()=>Object.assign(Object.assign({},ze),{isFormItemInput:!1}),[ze]);return ee(C.createElement("span",{className:_e,style:Se.style,onMouseEnter:Se.onMouseEnter,onMouseLeave:Se.onMouseLeave,onFocus:Se.onFocus,onBlur:Se.onBlur},C.createElement(p.aM.Provider,{value:ie},Se.children)))},ne=f(9432),y=f(61441),Ce=f(30631),N=f(64002),he=f(20475),Oe=f(59412),V=function(Se,at){var Ge={};for(var je in Se)Object.prototype.hasOwnProperty.call(Se,je)&&at.indexOf(je)<0&&(Ge[je]=Se[je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,je=Object.getOwnPropertySymbols(Se);le<je.length;le++)at.indexOf(je[le])<0&&Object.prototype.propertyIsEnumerable.call(Se,je[le])&&(Ge[je[le]]=Se[je[le]]);return Ge};const ke=Se=>Se?C.createElement(Ce.Z,null):C.createElement(y.Z,null),nt={click:"onClick",hover:"onMouseOver"};var et=C.forwardRef((Se,at)=>{const{visibilityToggle:Ge=!0}=Se,je=typeof Ge=="object"&&Ge.visible!==void 0,[le,B]=(0,C.useState)(()=>je?Ge.visible:!1),k=(0,C.useRef)(null);C.useEffect(()=>{je&&B(Ge.visible)},[je,Ge]);const ee=(0,Oe.Z)(k),te=()=>{const{disabled:$}=Se;$||(le&&ee(),B(ve=>{var G;const Q=!ve;return typeof Ge=="object"&&((G=Ge.onVisibleChange)===null||G===void 0||G.call(Ge,Q)),Q}))},_e=$=>{const{action:ve="click",iconRender:G=ke}=Se,Q=nt[ve]||"",se=G(le),xe={[Q]:te,className:`${$}-icon`,key:"passwordIcon",onMouseDown:ge=>{ge.preventDefault()},onMouseUp:ge=>{ge.preventDefault()}};return C.cloneElement(C.isValidElement(se)?se:C.createElement("span",null,se),xe)},{className:ze,prefixCls:ie,inputPrefixCls:Te,size:ce}=Se,yt=V(Se,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Dt}=C.useContext(_.E_),bt=Dt("input",Te),Je=Dt("input-password",ie),Et=Ge&&_e(Je),lt=q()(Je,ze,{[`${Je}-${ce}`]:!!ce}),Ht=Object.assign(Object.assign({},(0,N.Z)(yt,["suffix","iconRender","visibilityToggle"])),{type:le?"text":"password",className:lt,prefixCls:bt,suffix:Et});return ce&&(Ht.size=ce),C.createElement(ne.Z,Object.assign({ref:(0,he.sQ)(at,k)},Ht))}),U=f(21970),Z=f(92343),S=f(3113),c=f(19716),b=f(33234),I=function(Se,at){var Ge={};for(var je in Se)Object.prototype.hasOwnProperty.call(Se,je)&&at.indexOf(je)<0&&(Ge[je]=Se[je]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,je=Object.getOwnPropertySymbols(Se);le<je.length;le++)at.indexOf(je[le])<0&&Object.prototype.propertyIsEnumerable.call(Se,je[le])&&(Ge[je[le]]=Se[je[le]]);return Ge},R=C.forwardRef((Se,at)=>{const{prefixCls:Ge,inputPrefixCls:je,className:le,size:B,suffix:k,enterButton:ee=!1,addonAfter:te,loading:_e,disabled:ze,onSearch:ie,onChange:Te,onCompositionStart:ce,onCompositionEnd:yt}=Se,Dt=I(Se,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:bt,direction:Je}=C.useContext(_.E_),Et=C.useRef(!1),lt=bt("input-search",Ge),Ht=bt("input",je),{compactSize:$}=(0,b.ri)(lt,Je),ve=(0,c.Z)(A=>{var Qe;return(Qe=B!=null?B:$)!==null&&Qe!==void 0?Qe:A}),G=C.useRef(null),Q=A=>{A&&A.target&&A.type==="click"&&ie&&ie(A.target.value,A,{source:"clear"}),Te&&Te(A)},se=A=>{var Qe;document.activeElement===((Qe=G.current)===null||Qe===void 0?void 0:Qe.input)&&A.preventDefault()},xe=A=>{var Qe,ht;ie&&ie((ht=(Qe=G.current)===null||Qe===void 0?void 0:Qe.input)===null||ht===void 0?void 0:ht.value,A,{source:"input"})},ge=A=>{Et.current||_e||xe(A)},oe=typeof ee=="boolean"?C.createElement(U.Z,null):null,fe=`${lt}-button`;let We;const Ie=ee||{},me=Ie.type&&Ie.type.__ANT_BUTTON===!0;me||Ie.type==="button"?We=(0,Z.Tm)(Ie,Object.assign({onMouseDown:se,onClick:A=>{var Qe,ht;(ht=(Qe=Ie==null?void 0:Ie.props)===null||Qe===void 0?void 0:Qe.onClick)===null||ht===void 0||ht.call(Qe,A),xe(A)},key:"enterButton"},me?{className:fe,size:ve}:{})):We=C.createElement(S.ZP,{className:fe,type:ee?"primary":void 0,size:ve,disabled:ze,key:"enterButton",onMouseDown:se,onClick:xe,loading:_e,icon:oe},ee),te&&(We=[We,(0,Z.Tm)(te,{key:"addonAfter"})]);const Ke=q()(lt,{[`${lt}-rtl`]:Je==="rtl",[`${lt}-${ve}`]:!!ve,[`${lt}-with-button`]:!!ee},le),we=A=>{Et.current=!0,ce==null||ce(A)},tt=A=>{Et.current=!1,yt==null||yt(A)};return C.createElement(ne.Z,Object.assign({ref:(0,he.sQ)(G,at),onPressEnter:ge},Dt,{size:ve,onCompositionStart:we,onCompositionEnd:tt,prefixCls:Ht,addonAfter:We,suffix:k,onChange:Q,className:Ke,disabled:ze}))}),be=f(1643);const $e=ne.Z;$e.Group=ye,$e.Search=R,$e.TextArea=be.Z,$e.Password=et;var Pe=$e},9937:function(on,Ee,f){"use strict";f.d(Ee,{M1:function(){return D},TM:function(){return Z},Xy:function(){return ye},bi:function(){return Ce},e5:function(){return U},ik:function(){return N},nz:function(){return p},pU:function(){return P},s7:function(){return he},x0:function(){return y}});var E=f(17313),q=f(74207),C=f(37613),_=f(83116);const p=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),P=S=>({borderColor:S.hoverBorderColor}),D=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({},P((0,C.TS)(S,{hoverBorderColor:S.colorBorder})))}),ne=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:I,borderRadiusLG:F,paddingInlineLG:R}=S;return{padding:`${c}px ${R}px`,fontSize:b,lineHeight:I,borderRadius:F}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Ce=(S,c)=>{const{componentCls:b,colorError:I,colorWarning:F,errorActiveShadow:R,warningActiveShadow:be,colorErrorBorderHover:$e,colorWarningBorderHover:Pe}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:I,"&:hover":{borderColor:$e},"&:focus, &-focused":Object.assign({},D((0,C.TS)(S,{activeBorderColor:I,activeShadow:R}))),[`${b}-prefix, ${b}-suffix`]:{color:I}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:F,"&:hover":{borderColor:Pe},"&:focus, &-focused":Object.assign({},D((0,C.TS)(S,{activeBorderColor:F,activeShadow:be}))),[`${b}-prefix, ${b}-suffix`]:{color:F}}}},N=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}`},p(S.colorTextPlaceholder)),{"&:hover":Object.assign({},P(S)),"&:focus, &-focused":Object.assign({},D(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({},ne(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),he=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({},ne(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,E.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}}}})}},Oe=S=>{const{componentCls:c,controlHeightSM:b,lineWidth:I}=S,R=(b-I*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,E.Wf)(S)),N(S)),Ce(S,c)),{'&[type="color"]':{height:S.controlHeight,[`&${c}-lg`]:{height:S.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},V=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`}}}},ke=S=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:I,motionDurationSlow:F,colorIcon:R,colorIconHover:be,iconCls:$e}=S;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N(S)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},P(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:I},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),V(S)),{[`${$e}${c}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${F}`,"&:hover":{color:be}}}),Ce(S,`${c}-affix-wrapper`))}},nt=S=>{const{componentCls:c,colorError:b,colorWarning:I,borderRadiusLG:F,borderRadiusSM:R}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,E.Wf)(S)),he(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:F,fontSize:S.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:I,borderColor:I}},"&-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}}}})}},Ze=S=>{const{componentCls:c,antCls:b}=S,I=`${c}-search`;return{[I]:{[`${c}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${c}-group-addon ${I}-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,[`${I}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${I}-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}}}},[`${I}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${I}-button`]:{height:S.controlHeightLG},[`&-small ${I}-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}}}}},et=S=>{const{componentCls:c,paddingLG:b}=S,I=`${c}-textarea`;return{[I]:{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${I}-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},[`${I}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function U(S){return(0,C.TS)(S,{inputAffixPadding:S.paddingXXS})}const Z=S=>{const{controlHeight:c,fontSize:b,lineHeight:I,lineWidth:F,controlHeightSM:R,controlHeightLG:be,fontSizeLG:$e,lineHeightLG:Pe,paddingSM:Se,controlPaddingHorizontalSM:at,controlPaddingHorizontal:Ge,colorFillAlter:je,colorPrimaryHover:le,controlOutlineWidth:B,controlOutline:k,colorErrorOutline:ee,colorWarningOutline:te}=S;return{paddingBlock:Math.max(Math.round((c-b*I)/2*10)/10-F,3),paddingBlockSM:Math.max(Math.round((R-b*I)/2*10)/10-F,0),paddingBlockLG:Math.ceil((be-$e*Pe)/2*10)/10-F,paddingInline:Se-F,paddingInlineSM:at-F,paddingInlineLG:Ge-F,addonBg:je,activeBorderColor:le,hoverBorderColor:le,activeShadow:`0 0 0 ${B}px ${k}`,errorActiveShadow:`0 0 0 ${B}px ${ee}`,warningActiveShadow:`0 0 0 ${B}px ${te}`}};Ee.ZP=(0,_.Z)("Input",S=>{const c=(0,C.TS)(S,U(S));return[Oe(c),et(c),ke(c),nt(c),Ze(c),(0,q.c)(c)]},Z)},57809:function(on,Ee,f){"use strict";var E=f(92310),q=f.n(E),C=f(77861),_=f(64002),p=f(59301),P=f(53487),D=f(62892),ye=f(19080),ne=f(36355),y=f(1684),Ce=f(93891),N=f(19716),he=f(32441),Oe=f(33234),V=f(14154),ke=f(58582),nt=f(84443),Ze=f(66339),et=function(b,I){var F={};for(var R in b)Object.prototype.hasOwnProperty.call(b,R)&&I.indexOf(R)<0&&(F[R]=b[R]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,R=Object.getOwnPropertySymbols(b);be<R.length;be++)I.indexOf(R[be])<0&&Object.prototype.propertyIsEnumerable.call(b,R[be])&&(F[R[be]]=b[R[be]]);return F};const U="SECRET_COMBOBOX_MODE_DO_NOT_USE",Z=(b,I)=>{var F,{prefixCls:R,bordered:be=!0,className:$e,rootClassName:Pe,getPopupContainer:Se,popupClassName:at,dropdownClassName:Ge,listHeight:je=256,placement:le,listItemHeight:B=24,size:k,disabled:ee,notFoundContent:te,status:_e,builtinPlacements:ze,dropdownMatchSelectWidth:ie,popupMatchSelectWidth:Te,direction:ce,style:yt,allowClear:Dt}=b,bt=et(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Je,getPrefixCls:Et,renderEmpty:lt,direction:Ht,virtual:$,popupMatchSelectWidth:ve,popupOverflow:G,select:Q}=p.useContext(ne.E_),se=Et("select",R),xe=Et(),ge=ce!=null?ce:Ht,{compactSize:oe,compactItemClassnames:fe}=(0,Oe.ri)(se,ge),[We,Ie]=(0,V.Z)(se),me=p.useMemo(()=>{const{mode:mn}=bt;if(mn!=="combobox")return mn===U?"combobox":mn},[bt.mode]),Ke=me==="multiple"||me==="tags",we=(0,nt.Z)(bt.suffixIcon,bt.showArrow),tt=(F=Te!=null?Te:ie)!==null&&F!==void 0?F:ve,{status:A,hasFeedback:Qe,isFormItemInput:ht,feedbackIcon:He}=p.useContext(he.aM),ut=(0,ye.F)(A,_e);let Pt;te!==void 0?Pt=te:me==="combobox"?Pt=null:Pt=(lt==null?void 0:lt("Select"))||p.createElement(Ce.Z,{componentName:"Select"});const{suffixIcon:Gt,itemIcon:an,removeIcon:gt,clearIcon:Yt}=(0,Ze.Z)(Object.assign(Object.assign({},bt),{multiple:Ke,hasFeedback:Qe,feedbackIcon:He,showSuffixIcon:we,prefixCls:se,showArrow:bt.showArrow,componentName:"Select"})),zt=Dt===!0?{clearIcon:Yt}:Dt,pn=(0,_.Z)(bt,["suffixIcon","itemIcon"]),un=q()(at||Ge,{[`${se}-dropdown-${ge}`]:ge==="rtl"},Pe,Ie),bn=(0,N.Z)(mn=>{var hn;return(hn=k!=null?k:oe)!==null&&hn!==void 0?hn:mn}),Nn=p.useContext(y.Z),gn=ee!=null?ee:Nn,Bn=q()({[`${se}-lg`]:bn==="large",[`${se}-sm`]:bn==="small",[`${se}-rtl`]:ge==="rtl",[`${se}-borderless`]:!be,[`${se}-in-form-item`]:ht},(0,ye.Z)(se,ut,Qe),fe,Q==null?void 0:Q.className,$e,Pe,Ie),dn=p.useMemo(()=>le!==void 0?le:ge==="rtl"?"bottomRight":"bottomLeft",[le,ge]),Wn=(0,ke.Z)(ze,G);return We(p.createElement(C.ZP,Object.assign({ref:I,virtual:$,showSearch:Q==null?void 0:Q.showSearch},pn,{style:Object.assign(Object.assign({},Q==null?void 0:Q.style),yt),dropdownMatchSelectWidth:tt,builtinPlacements:Wn,transitionName:(0,D.m)(xe,"slide-up",bt.transitionName),listHeight:je,listItemHeight:B,mode:me,prefixCls:se,placement:dn,direction:ge,suffixIcon:Gt,menuItemSelectedIcon:an,removeIcon:gt,allowClear:zt,notFoundContent:Pt,className:Bn,getPopupContainer:Se||Je,dropdownClassName:un,disabled:gn})))},S=p.forwardRef(Z),c=(0,P.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=U,S.Option=C.Wx,S.OptGroup=C.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,Ee.default=S},14154:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return S}});var E=f(17313),q=f(74207),C=f(37613),_=f(83116),p=f(13826),P=f(92899);const D=c=>{const{optionHeight:b,optionFontSize:I,optionLineHeight:F,optionPadding:R}=c;return{position:"relative",display:"block",minHeight:b,padding:R,color:c.colorText,fontWeight:"normal",fontSize:I,lineHeight:F,boxSizing:"border-box"}};var ne=c=>{const{antCls:b,componentCls:I}=c,F=`${I}-item`,R=`&${b}-slide-up-enter${b}-slide-up-enter-active`,be=`&${b}-slide-up-appear${b}-slide-up-appear-active`,$e=`&${b}-slide-up-leave${b}-slide-up-leave-active`,Pe=`${I}-dropdown-placement-`;return[{[`${I}-dropdown`]:Object.assign(Object.assign({},(0,E.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,[`
${R}${Pe}bottomLeft,
${be}${Pe}bottomLeft
`]:{animationName:p.fJ},[`
${R}${Pe}topLeft,
${be}${Pe}topLeft,
${R}${Pe}topRight,
${be}${Pe}topRight
`]:{animationName:p.Qt},[`${$e}${Pe}bottomLeft`]:{animationName:p.Uw},[`
${$e}${Pe}topLeft,
${$e}${Pe}topRight
`]:{animationName:p.ly},"&-hidden":{display:"none"},[`${F}`]:Object.assign(Object.assign({},D(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"},E.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${F}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${F}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${F}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${F}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,p.oN)(c,"slide-up"),(0,p.oN)(c,"slide-down"),(0,P.Fm)(c,"move-up"),(0,P.Fm)(c,"move-down")]};const y=2,Ce=c=>{let{controlHeightSM:b,controlHeight:I,lineWidth:F}=c;const R=(I-b)/2-F,be=Math.ceil(R/2);return[R,be]};function N(c,b){const{componentCls:I,iconCls:F}=c,R=`${I}-selection-overflow`,be=c.multipleSelectItemHeight,[$e]=Ce(c),Pe=b?`${I}-${b}`:"";return{[`${I}-multiple${Pe}`]:{fontSize:c.fontSize,[R]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${I}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${$e-y}px ${y*2}px`,borderRadius:c.borderRadius,[`${I}-show-search&`]:{cursor:"text"},[`${I}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${y}px 0`,lineHeight:`${be}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${I}-show-arrow ${I}-selector,
&${I}-allow-clear ${I}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${I}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:be,marginTop:y,marginBottom:y,lineHeight:`${be-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,[`${I}-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,E.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${F}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${R}-item + ${R}-item`]:{[`${I}-selection-search`]:{marginInlineStart:0}},[`${I}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-$e,"\n &-input,\n &-mirror\n ":{height:be,fontFamily:c.fontFamily,lineHeight:`${be}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"}},[`${I}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Oe=c=>{const{componentCls:b}=c,I=(0,C.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),F=(0,C.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,R]=Ce(c);return[N(c),N(I,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:R}}},N(F,"lg")]};function V(c,b){const{componentCls:I,inputPaddingHorizontalBase:F,borderRadius:R}=c,be=c.controlHeight-c.lineWidth*2,$e=Math.ceil(c.fontSize*1.25),Pe=b?`${I}-${b}`:"";return{[`${I}-single${Pe}`]:{fontSize:c.fontSize,[`${I}-selector`]:Object.assign(Object.assign({},(0,E.Wf)(c)),{display:"flex",borderRadius:R,[`${I}-selection-search`]:{position:"absolute",top:0,insetInlineStart:F,insetInlineEnd:F,bottom:0,"&-input":{width:"100%"}},[`
${I}-selection-item,
${I}-selection-placeholder
`]:{padding:0,lineHeight:`${be}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${be}px`}},[`${I}-selection-item`]:{position:"relative",userSelect:"none"},[`${I}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${I}-selection-item:after`,`${I}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${I}-show-arrow ${I}-selection-item,
&${I}-show-arrow ${I}-selection-placeholder
`]:{paddingInlineEnd:$e},[`&${I}-open ${I}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${I}-customize-input)`]:{[`${I}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${F}px`,[`${I}-selection-search-input`]:{height:be},"&:after":{lineHeight:`${be}px`}}},[`&${I}-customize-input`]:{[`${I}-selector`]:{"&:after":{display:"none"},[`${I}-selection-search`]:{position:"static",width:"100%"},[`${I}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${F}px`,"&:after":{display:"none"}}}}}}}function ke(c){const{componentCls:b}=c,I=c.controlPaddingHorizontalSM-c.lineWidth;return[V(c),V((0,C.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${b}-single${b}-sm`]:{[`&:not(${b}-customize-input)`]:{[`${b}-selection-search`]:{insetInlineStart:I,insetInlineEnd:I},[`${b}-selector`]:{padding:`0 ${I}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:I+c.fontSize*1.5},[`
&${b}-show-arrow ${b}-selection-item,
&${b}-show-arrow ${b}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},V((0,C.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const nt=c=>{const{componentCls:b,selectorBg:I}=c;return{position:"relative",backgroundColor:I,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"}}}},Ze=function(c,b){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:F,borderHoverColor:R,outlineColor:be,antCls:$e}=b,Pe=I?{[`${F}-selector`]:{borderColor:R}}:{};return{[c]:{[`&:not(${F}-disabled):not(${F}-customize-input):not(${$e}-pagination-size-changer)`]:Object.assign(Object.assign({},Pe),{[`${F}-focused& ${F}-selector`]:{borderColor:R,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${be}`,outline:0},[`&:hover ${F}-selector`]:{borderColor:R}})}}},et=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"}}}},U=c=>{const{componentCls:b,inputPaddingHorizontalBase:I,iconCls:F}=c;return{[b]:Object.assign(Object.assign({},(0,E.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},nt(c)),et(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},E.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},E.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,E.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[F]:{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:I,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:I+c.fontSize+c.paddingXS}}}},Z=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%"}}},U(c),ke(c),Oe(c),ne(c),{[`${b}-rtl`]:{direction:"rtl"}},Ze(b,(0,C.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),Ze(`${b}-status-error`,(0,C.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),Ze(`${b}-status-warning`,(0,C.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,q.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var S=(0,_.Z)("Select",(c,b)=>{let{rootPrefixCls:I}=b;const F=(0,C.TS)(c,{rootPrefixCls:I,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[Z(F)]},c=>{const{fontSize:b,lineHeight:I,controlHeight:F,controlPaddingHorizontal:R,zIndexPopupBase:be,colorText:$e,fontWeightStrong:Pe,controlItemBgActive:Se,controlItemBgHover:at,colorBgContainer:Ge,colorFillSecondary:je,controlHeightLG:le,controlHeightSM:B,colorBgContainerDisabled:k,colorTextDisabled:ee}=c;return{zIndexPopup:be+50,optionSelectedColor:$e,optionSelectedFontWeight:Pe,optionSelectedBg:Se,optionActiveBg:at,optionPadding:`${(F-b*I)/2}px ${R}px`,optionFontSize:b,optionLineHeight:I,optionHeight:F,selectorBg:Ge,clearBg:Ge,singleItemHeightLG:le,multipleItemBg:je,multipleItemBorderColor:"transparent",multipleItemHeight:B,multipleItemHeightLG:F,multipleSelectorBgDisabled:k,multipleItemColorDisabled:ee,multipleItemBorderColorDisabled:"transparent"}})},58582:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return q}});const E=C=>{const p={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:C==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},p),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},p),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},p),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},p),{points:["br","tr"],offset:[0,-4]})}};function q(C,_){return C||E(_)}},84443:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return E}});function E(q,C){return C!==void 0?C:q!==null}},66339:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});var E=f(10402),q=f(33130),C=f(72119),_=f(18290),p=f(50023),P=f(21970),D=f(59301);function ye(ne){let{suffixIcon:y,clearIcon:Ce,menuItemSelectedIcon:N,removeIcon:he,loading:Oe,multiple:V,hasFeedback:ke,prefixCls:nt,showSuffixIcon:Ze,feedbackIcon:et,showArrow:U,componentName:Z}=ne;const S=Ce!=null?Ce:D.createElement(q.Z,null),c=R=>y===null&&!ke&&!U?null:D.createElement(D.Fragment,null,Ze!==!1&&R,ke&&et);let b=null;if(y!==void 0)b=c(y);else if(Oe)b=c(D.createElement(p.Z,{spin:!0}));else{const R=`${nt}-suffix`;b=be=>{let{open:$e,showSearch:Pe}=be;return c($e&&Pe?D.createElement(P.Z,{className:R}):D.createElement(_.Z,{className:R}))}}let I=null;N!==void 0?I=N:V?I=D.createElement(E.Z,null):I=null;let F=null;return he!==void 0?F=he:F=D.createElement(C.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:I,removeIcon:F}}},8378:function(on,Ee){"use strict";const f=E=>({[E.componentCls]:{[`${E.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${E.motionDurationMid} ${E.motionEaseInOut},
opacity ${E.motionDurationMid} ${E.motionEaseInOut} !important`}},[`${E.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${E.motionDurationMid} ${E.motionEaseInOut},
opacity ${E.motionDurationMid} ${E.motionEaseInOut} !important`}}});Ee.Z=f},92899:function(on,Ee,f){"use strict";f.d(Ee,{Fm:function(){return N}});var E=f(9792),q=f(95406);const C=new E.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_=new E.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),p=new E.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P=new E.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),D=new E.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 E.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ne=new E.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 E.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ce={"move-up":{inKeyframes:ne,outKeyframes:y},"move-down":{inKeyframes:C,outKeyframes:_},"move-left":{inKeyframes:p,outKeyframes:P},"move-right":{inKeyframes:D,outKeyframes:ye}},N=(he,Oe)=>{const{antCls:V}=he,ke=`${V}-${Oe}`,{inKeyframes:nt,outKeyframes:Ze}=Ce[Oe];return[(0,q.R)(ke,nt,Ze,he.motionDurationMid),{[`
${ke}-enter,
${ke}-appear
`]:{opacity:0,animationTimingFunction:he.motionEaseOutCirc},[`${ke}-leave`]:{animationTimingFunction:he.motionEaseInOutCirc}}]}},13826:function(on,Ee,f){"use strict";f.d(Ee,{Qt:function(){return p},Uw:function(){return _},fJ:function(){return C},ly:function(){return P},oN:function(){return N}});var E=f(9792),q=f(95406);const C=new E.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_=new E.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new E.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),P=new E.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),D=new E.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ye=new E.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),ne=new E.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),y=new E.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ce={"slide-up":{inKeyframes:C,outKeyframes:_},"slide-down":{inKeyframes:p,outKeyframes:P},"slide-left":{inKeyframes:D,outKeyframes:ye},"slide-right":{inKeyframes:ne,outKeyframes:y}},N=(he,Oe)=>{const{antCls:V}=he,ke=`${V}-${Oe}`,{inKeyframes:nt,outKeyframes:Ze}=Ce[Oe];return[(0,q.R)(ke,nt,Ze,he.motionDurationMid),{[`
${ke}-enter,
${ke}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:he.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${ke}-leave`]:{animationTimingFunction:he.motionEaseInQuint}}]}},89780:function(on){(function(Ee,f){on.exports=f()})(this,function(){"use strict";var Ee=navigator.userAgent,f=navigator.platform,E=/gecko\/\d/i.test(Ee),q=/MSIE \d/.test(Ee),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ee),_=/Edge\/(\d+)/.exec(Ee),p=q||C||_,P=p&&(q?document.documentMode||6:+(_||C)[1]),D=!_&&/WebKit\//.test(Ee),ye=D&&/Qt\/\d+\.\d+/.test(Ee),ne=!_&&/Chrome\//.test(Ee),y=/Opera\//.test(Ee),Ce=/Apple Computer/.test(navigator.vendor),N=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ee),he=/PhantomJS/.test(Ee),Oe=!_&&/AppleWebKit/.test(Ee)&&/Mobile\/\w+/.test(Ee),V=/Android/.test(Ee),ke=Oe||V||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ee),nt=Oe||/Mac/.test(f),Ze=/\bCrOS\b/.test(Ee),et=/win/i.test(f),U=y&&Ee.match(/Version\/(\d*\.\d*)/);U&&(U=Number(U[1])),U&&U>=15&&(y=!1,D=!0);var Z=nt&&(ye||y&&(U==null||U<12.11)),S=E||p&&P>=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 I(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function F(e,t){return I(e).appendChild(t)}function R(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 be(e,t,r,n){var i=R(e,t,r,n);return i.setAttribute("role","presentation"),i}var $e;document.createRange?$e=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:$e=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 Pe(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 Se(){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 at(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Ge(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 je=function(e){e.select()};Oe?je=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(je=function(e){try{e.select()}catch(t){}});function le(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(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 k(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 ee=function(){this.id=null,this.f=null,this.time=0,this.handler=le(this.onTimeout,this)};ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ee.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 te(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var _e=50,ze={toString:function(){return"CodeMirror.Pass"}},ie={scroll:!1},Te={origin:"*mouse"},ce={origin:"+move"};function yt(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 Dt=[""];function bt(e){for(;Dt.length<=e;)Dt.push(Je(Dt)+" ");return Dt[e]}function Je(e){return e[e.length-1]}function Et(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 Ht(){}function $(e,t){var r;return Object.create?r=Object.create(e):(Ht.prototype=e,r=new Ht),t&&B(t,r),r}var ve=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function G(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ve.test(e))}function Q(e,t){return t?t.source.indexOf("\\w")>-1&&G(e)?!0:t.test(e):G(e)}function se(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var xe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ge(e){return e.charCodeAt(0)>=768&&xe.test(e)}function oe(e,t,r){for(;(r<0?t>0:t<e.length)&&ge(e.charAt(t));)t+=r;return t}function fe(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 We(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 Ie=null;function me(e,t,r){var n;Ie=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:Ie=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:Ie=i)}return n!=null?n:Ie}var Ke=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,v,m){this.level=u,this.from=v,this.to=m}return function(u,v){var m=v=="ltr"?"L":"R";if(u.length==0||v=="ltr"&&!n.test(u))return!1;for(var O=u.length,w=[],z=0;z<O;++z)w.push(r(u.charCodeAt(z)));for(var X=0,pe=m;X<O;++X){var Re=w[X];Re=="m"?w[X]=pe:pe=Re}for(var Ue=0,Le=m;Ue<O;++Ue){var Ye=w[Ue];Ye=="1"&&Le=="r"?w[Ue]="n":o.test(Ye)&&(Le=Ye,Ye=="r"&&(w[Ue]="R"))}for(var St=1,vt=w[0];St<O-1;++St){var _t=w[St];_t=="+"&&vt=="1"&&w[St+1]=="1"?w[St]="1":_t==","&&vt==w[St+1]&&(vt=="1"||vt=="n")&&(w[St]=vt),vt=_t}for(var wn=0;wn<O;++wn){var Gn=w[wn];if(Gn==",")w[wn]="N";else if(Gn=="%"){var Rn=void 0;for(Rn=wn+1;Rn<O&&w[Rn]=="%";++Rn);for(var Sr=wn&&w[wn-1]=="!"||Rn<O&&w[Rn]=="1"?"1":"N",dr=wn;dr<Rn;++dr)w[dr]=Sr;wn=Rn-1}}for(var $n=0,hr=m;$n<O;++$n){var Jn=w[$n];hr=="L"&&Jn=="1"?w[$n]="L":o.test(Jn)&&(hr=Jn)}for(var Zn=0;Zn<O;++Zn)if(i.test(w[Zn])){var zn=void 0;for(zn=Zn+1;zn<O&&i.test(w[zn]);++zn);for(var Dn=(Zn?w[Zn-1]:m)=="L",vr=(zn<O?w[zn]:m)=="L",Wi=Dn==vr?Dn?"L":"R":m,ai=Zn;ai<zn;++ai)w[ai]=Wi;Zn=zn-1}for(var nr=[],Br,Vn=0;Vn<O;)if(a.test(w[Vn])){var ba=Vn;for(++Vn;Vn<O&&a.test(w[Vn]);++Vn);nr.push(new s(0,ba,Vn))}else{var Vr=Vn,yi=nr.length,bi=v=="rtl"?1:0;for(++Vn;Vn<O&&w[Vn]!="L";++Vn);for(var ar=Vr;ar<Vn;)if(l.test(w[ar])){Vr<ar&&(nr.splice(yi,0,new s(1,Vr,ar)),yi+=bi);var Hi=ar;for(++ar;ar<Vn&&l.test(w[ar]);++ar);nr.splice(yi,0,new s(2,Hi,ar)),yi+=bi,Vr=ar}else++ar;Vr<Vn&&nr.splice(yi,0,new s(1,Vr,Vn))}return v=="ltr"&&(nr[0].level==1&&(Br=u.match(/^\s+/))&&(nr[0].from=Br[0].length,nr.unshift(new s(0,0,Br[0].length))),Je(nr).level==1&&(Br=u.match(/\s+$/))&&(Je(nr).to-=Br[0].length,nr.push(new s(0,O-Br[0].length,O)))),v=="rtl"?nr.reverse():nr}}();function we(e,t){var r=e.order;return r==null&&(r=e.order=Ke(e.text,t)),r}var tt=[],A=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]||tt).concat(r)}};function Qe(e,t){return e._handlers&&e._handlers[t]||tt}function ht(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=te(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function He(e,t){var r=Qe(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 ut(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),He(e,r||t.type,e,t),zt(t)||t.codemirrorIgnore}function Pt(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)te(r,t[n])==-1&&r.push(t[n])}function Gt(e,t){return Qe(e,t).length>0}function an(e){e.prototype.on=function(t,r){A(this,t,r)},e.prototype.off=function(t,r){ht(this,t,r)}}function gt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Yt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function zt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function pn(e){gt(e),Yt(e)}function un(e){return e.target||e.srcElement}function bn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),nt&&e.ctrlKey&&t==1&&(t=3),t}var Nn=function(){if(p&&P<9)return!1;var e=R("div");return"draggable"in e||"dragDrop"in e}(),gn;function Bn(e){if(gn==null){var t=R("span","\u200B");F(e,R("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(gn=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&P<8))}var r=gn?R("span","\u200B"):R("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var dn;function Wn(e){if(dn!=null)return dn;var t=F(e,document.createTextNode("A\u062EA")),r=$e(t,0,1).getBoundingClientRect(),n=$e(t,1,2).getBoundingClientRect();return I(e),!r||r.left==r.right?!1:dn=n.right-r.right<3}var mn=`
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/)},hn=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},Ln=function(){var e=R("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),en=null;function Sn(e){if(en!=null)return en;var t=F(e,R("span","x")),r=t.getBoundingClientRect(),n=$e(t,0,1).getBoundingClientRect();return en=Math.abs(r.left-n.left)>1}var Xn={},An={};function Or(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Xn[e]=t}function lr(e,t){An[e]=t}function Vt(e){if(typeof e=="string"&&An.hasOwnProperty(e))e=An[e];else if(e&&typeof e.name=="string"&&An.hasOwnProperty(e.name)){var t=An[e.name];typeof t=="string"&&(t={name:t}),e=$(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Vt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Vt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function rt(e,t){t=Vt(t);var r=Xn[t.name];if(!r)return rt(e,"text/plain");var n=r(e,t);if(Mt.hasOwnProperty(t.name)){var i=Mt[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 Mt={};function g(e,t){var r=Mt.hasOwnProperty(e)?Mt[e]:Mt[e]={};B(t,r)}function T(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 j(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=k(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?k(this.string,this.lineStart,this.tabSize):0)},d.prototype.indentation=function(){return k(this.string,null,this.tabSize)-(this.lineStart?k(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 x(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 L(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 Y(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function H(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function W(e){if(e.parent==null)return null;for(var t=e.parent,r=te(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 re(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 de(e,t){return t>=e.first&&t<e.first+e.size}function Fe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function M(e,t,r){if(r===void 0&&(r=null),!(this instanceof M))return new M(e,t,r);this.line=e,this.ch=t,this.sticky=r}function K(e,t){return e.line-t.line||e.ch-t.ch}function Be(e,t){return e.sticky==t.sticky&&K(e,t)==0}function ue(e){return M(e.line,e.ch)}function Ne(e,t){return K(e,t)<0?t:e}function De(e,t){return K(e,t)<0?e:t}function ft(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function J(e,t){if(t.line<e.first)return M(e.first,0);var r=e.first+e.size-1;return t.line>r?M(r,x(e,r).text.length):ae(t,x(e,t.line).text.length)}function ae(e,t){var r=e.ch;return r==null||r>t?M(e.line,t):r<0?M(e.line,0):e}function Me(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=J(e,t[n]);return r}var Xe=function(e,t){this.state=e,this.lookAhead=t},qe=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};qe.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},qe.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}},qe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},qe.fromSaved=function(e,t,r){return t instanceof Xe?new qe(e,T(e.mode,t.state),r,t.lookAhead):new qe(e,T(e.mode,t),r)},qe.prototype.save=function(e){var t=e!==!1?T(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xe(t,this.maxLookAhead):t};function st(e,t,r,n){var i=[e.state.modeGen],o={};Xt(e,t.text,e.doc.mode,r,function(u,v){return i.push(u,v)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var v=e.state.overlays[u],m=1,O=0;r.state=!0,Xt(e,t.text,v.mode,r,function(w,z){for(var X=m;O<w;){var pe=i[m];pe>w&&i.splice(m,1,w,i[m+1],pe),m+=2,O=Math.min(w,pe)}if(z)if(v.opaque)i.splice(X,m-X,w,"overlay "+z),m=X+2;else for(;X<m;X+=2){var Re=i[X+1];i[X+1]=(Re?Re+" ":"")+"overlay "+z}},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 Ut(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Rt(e,W(t)),i=t.text.length>e.options.maxHighlightLength&&T(e.doc.mode,n.state),o=st(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 Rt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new qe(n,!0,t);var o=Nt(e,t,r),a=o>n.first&&x(n,o-1).stateAfter,l=a?qe.fromSaved(n,a,o):new qe(n,h(n.mode),o);return n.iter(o,t,function(s){Wt(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 Wt(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==""&&$t(i,r.state);!o.eol();)Ct(i,o,r.state),o.start=o.pos}function $t(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=j(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Ct(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=j(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 tn=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Jt(e,t,r,n){var i=e.doc,o=i.mode,a;t=J(i,t);var l=x(i,t.line),s=Rt(e,t.line,r),u=new d(l.text,e.options.tabSize,s),v;for(n&&(v=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Ct(o,u,s.state),n&&v.push(new tn(u,a,T(i.mode,s.state)));return n?v:new tn(u,a,s.state)}function Zt(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,v=new d(t,e.options.tabSize,n),m,O=e.options.addModeClass&&[null];for(t==""&&Zt($t(r,n.state),o);!v.eol();){if(v.pos>e.options.maxHighlightLength?(l=!1,a&&Wt(e,t,n,v.pos),v.pos=t.length,m=null):m=Zt(Ct(r,v,n.state,O),o),O){var w=O[0].name;w&&(m="m-"+(m?w+" "+m:w))}if(!l||u!=m){for(;s<v.start;)s=Math.min(v.start,s+5e3),i(s,u);u=m}v.start=v.pos}for(;s<v.pos;){var z=Math.min(v.pos,s+5e3);i(z,u),s=z}}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=x(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof Xe?u.lookAhead:0)<=o.modeFrontier))return l;var v=k(s.text,null,e.options.tabSize);(i==null||n>v)&&(i=l-1,n=v)}return i}function xt(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=x(e,n).stateAfter;if(i&&(!(i instanceof Xe)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Bt=!1,wt=!1;function vn(){Bt=!0}function Lt(){wt=!0}function kt(e,t,r){this.marker=e,this.from=t,this.to=r}function sn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function jt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Mn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Kn(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 kt(a,o.from,s?null:o.to))}}return n}function Ot(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 kt(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function it(e,t){if(t.full)return null;var r=de(e,t.from.line)&&x(e,t.from.line).markedSpans,n=de(e,t.to.line)&&x(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=K(t.from,t.to)==0,l=Kn(r,i,a),s=Ot(n,o,a),u=t.text.length==1,v=Je(t.text).length+(u?i:0);if(l)for(var m=0;m<l.length;++m){var O=l[m];if(O.to==null){var w=sn(s,O.marker);w?u&&(O.to=w.to==null?null:w.to+v):O.to=i}}if(s)for(var z=0;z<s.length;++z){var X=s[z];if(X.to!=null&&(X.to+=v),X.from==null){var pe=sn(l,X.marker);pe||(X.from=v,u&&(l||(l=[])).push(X))}else X.from+=v,u&&(l||(l=[])).push(X)}l&&(l=dt(l)),s&&s!=l&&(s=dt(s));var Re=[l];if(!u){var Ue=t.text.length-2,Le;if(Ue>0&&l)for(var Ye=0;Ye<l.length;++Ye)l[Ye].to==null&&(Le||(Le=[])).push(new kt(l[Ye].marker,null,null));for(var St=0;St<Ue;++St)Re.push(Le);Re.push(s)}return Re}function dt(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 nn(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var z=0;z<w.markedSpans.length;++z){var X=w.markedSpans[z].marker;X.readOnly&&(!n||te(n,X)==-1)&&(n||(n=[])).push(X)}}),!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(!(K(u.to,l.from)<0||K(u.from,l.to)>0)){var v=[s,1],m=K(u.from,l.from),O=K(u.to,l.to);(m<0||!a.inclusiveLeft&&!m)&&v.push({from:u.from,to:l.from}),(O>0||!a.inclusiveRight&&!O)&&v.push({from:l.to,to:u.to}),i.splice.apply(i,v),s+=v.length-3}}return i}function rn(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 At(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function cn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=K(n.from,i.from)||At(e)-At(t);if(o)return-o;var a=K(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function On(e,t){var r=wt&&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||cn(n,i.marker)<0)&&(n=i.marker);return n}function Ve(e){return On(e,!0)}function Ae(e){return On(e,!1)}function pt(e,t){var r=wt&&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||cn(n,o.marker)<0)&&(n=o.marker)}return n}function Ft(e,t,r,n,i){var o=x(e,t),a=wt&&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),v=K(u.from,r)||At(s.marker)-At(i),m=K(u.to,n)||ln(s.marker)-ln(i);if(!(v>=0&&m<=0||v<=0&&m>=0)&&(v<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?K(u.to,r)>=0:K(u.to,r)>0)||v>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?K(u.from,n)<=0:K(u.from,n)<0)))return!0}}}function It(e){for(var t;t=Ve(e);)e=t.find(-1,!0).line;return e}function rr(e){for(var t;t=Ae(e);)e=t.find(1,!0).line;return e}function pr(e){for(var t,r;t=Ae(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function gr(e,t){var r=x(e,t),n=It(r);return r==n?t:W(n)}function Yn(e,t){if(t>e.lastLine())return t;var r=x(e,t),n;if(!Tn(e,r))return t;for(;n=Ae(r);)r=n.find(1,!0).line;return W(r)+1}function Tn(e,t){var r=wt&&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&&Hn(e,t,n))return!0}}}function Hn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Hn(e,n.line,sn(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)&&Hn(e,t,i))return!0}function Fn(e){e=It(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 sr(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ve(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Ae(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=x(r,r.first),t.maxLineLength=sr(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=sr(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var qn=function(e,t,r){this.text=e,Qt(this,t),this.height=r?r(this):1};qn.prototype.lineNo=function(){return W(this)},an(qn);function Kr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),rn(e),Qt(e,r);var i=n?n(e):1;i!=e.height&&H(e,i)}function Xr(e){e.parent=null,rn(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=be("span",null,null,D?"padding-right: .1px":null),n={pre:be("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=Zi,Wn(e.display.measure)&&(a=we(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&W(o);Ci(o,n,Ut(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Ge(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Ge(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Bn(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(D){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 He(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Ge(n.pre.className,n.textClass||"")),n}function Ir(e){var t=R("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zi(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,v;if(!s.test(t))e.col+=t.length,v=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,v),p&&P<9&&(u=!0),e.pos+=t.length;else{v=document.createDocumentFragment();for(var m=0;;){s.lastIndex=m;var O=s.exec(t),w=O?O.index-m:t.length-m;if(w){var z=document.createTextNode(l.slice(m,m+w));p&&P<9?v.appendChild(R("span",[z])):v.appendChild(z),e.map.push(e.pos,e.pos+w,z),e.col+=w,e.pos+=w}if(!O)break;m+=w+1;var X=void 0;if(O[0]==" "){var pe=e.cm.options.tabSize,Re=pe-e.col%pe;X=v.appendChild(R("span",bt(Re),"cm-tab")),X.setAttribute("role","presentation"),X.setAttribute("cm-text"," "),e.col+=Re}else O[0]=="\r"||O[0]==`
`?(X=v.appendChild(R("span",O[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),X.setAttribute("cm-text",O[0]),e.col+=1):(X=e.cm.options.specialCharPlaceholder(O[0]),X.setAttribute("cm-text",O[0]),p&&P<9?v.appendChild(R("span",[X])):v.appendChild(X),e.col+=1);e.map.push(e.pos,e.pos+1,X),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Ue=r||"";n&&(Ue+=n),i&&(Ue+=i);var Le=R("span",[v],Ue,o);if(a)for(var Ye in a)a.hasOwnProperty(Ye)&&Ye!="style"&&Ye!="class"&&Le.setAttribute(Ye,a[Ye]);return e.content.appendChild(Le)}e.content.appendChild(v)}}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,v=u+n.length;;){for(var m=void 0,O=0;O<t.length&&(m=t[O],!(m.to>u&&m.from<=u));O++);if(m.to>=v)return e(r,n,i,o,a,l,s);e(r,n.slice(0,m.to-u),i,o,null,l,s),o=null,n=n.slice(m.to-u),u=m.to}}}function Ur(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 Ci(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,v="",m,O,w=0,z,X,pe,Re,Ue;;){if(w==s){z=X=pe=O="",Ue=null,Re=null,w=1/0;for(var Le=[],Ye=void 0,St=0;St<n.length;++St){var vt=n[St],_t=vt.marker;if(_t.type=="bookmark"&&vt.from==s&&_t.widgetNode)Le.push(_t);else if(vt.from<=s&&(vt.to==null||vt.to>s||_t.collapsed&&vt.to==s&&vt.from==s)){if(vt.to!=null&&vt.to!=s&&w>vt.to&&(w=vt.to,X=""),_t.className&&(z+=" "+_t.className),_t.css&&(O=(O?O+";":"")+_t.css),_t.startStyle&&vt.from==s&&(pe+=" "+_t.startStyle),_t.endStyle&&vt.to==w&&(Ye||(Ye=[])).push(_t.endStyle,vt.to),_t.title&&((Ue||(Ue={})).title=_t.title),_t.attributes)for(var wn in _t.attributes)(Ue||(Ue={}))[wn]=_t.attributes[wn];_t.collapsed&&(!Re||cn(Re.marker,_t)<0)&&(Re=vt)}else vt.from>s&&w>vt.from&&(w=vt.from)}if(Ye)for(var Gn=0;Gn<Ye.length;Gn+=2)Ye[Gn+1]==w&&(X+=" "+Ye[Gn]);if(!Re||Re.from==s)for(var Rn=0;Rn<Le.length;++Rn)Ur(t,0,Le[Rn]);if(Re&&(Re.from||0)==s){if(Ur(t,(Re.to==null?l+1:Re.to)-s,Re.marker,Re.from==null),Re.to==null)return;Re.to==s&&(Re=!1)}}if(s>=l)break;for(var Sr=Math.min(l,w);;){if(v){var dr=s+v.length;if(!Re){var $n=dr>Sr?v.slice(0,Sr-s):v;t.addToken(t,$n,m?m+z:z,pe,s+$n.length==w?X:"",O,Ue)}if(dr>=Sr){v=v.slice(Sr-s),s=Sr;break}s=dr,pe=""}v=i.slice(o,o=r[u++]),m=Cr(r[u++],t.cm.options)}}}function xi(e,t,r){this.line=t,this.rest=pr(t),this.size=this.rest?W(Je(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Tn(e,t)}function jr(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new xi(e.doc,x(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 ct(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 Tt(e,t){var r=e.ownsGroup;if(r)try{ct(r)}finally{Ar=null,t(r)}}var mt=null;function ot(e,t){var r=Qe(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:mt?i=mt:(i=mt=[],setTimeout(Cn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function Cn(){var e=mt;mt=null;for(var t=0;t<e.length;++t)e[t]()}function xn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Un(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Bi(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=R("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),p&&P<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=ur(t);t.background=n.insertBefore(R("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Fr(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 Un(e,t){var r=t.text.className,n=Fr(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?ur(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=ur(t);t.gutterBackground=R("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=ur(t),l=t.gutter=R("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(R("div",Fe(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,v=o.hasOwnProperty(u)&&o[u];v&&l.appendChild(R("div",[v],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Bi(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);Hr(e,t,r)}function mo(e,t,r,n){var i=Fr(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),Hr(e,t,n),t.node}function Hr(e,t,r){if(Lr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Lr(e,t.rest[n],t,r,!1)}function Lr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=R("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Bo(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),ot(s,"redraw")}}function Bo(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 Tr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Pe(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;"),F(t.display.measure,R("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=un(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 wi(e){return e.lineSpace.offsetTop}function Ki(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=F(e.measure,R("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 _e-e.display.nativeBarWidth}function Zr(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function Ui(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Zr(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(W(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ko(e,t){t=It(t);var r=W(t),n=e.display.externalMeasured=new xi(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,F(e.display.lineMeasure,i.pre),n}function _i(e,t,r,n){return Pr(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=W(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(xn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=Ko(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 Pr(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=qt(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 qt(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 v=0;v<4;v++){for(;a&&ge(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&ge(t.line.text.charAt(i.coverStart+l));)++l;if(p&&P<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi($e(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}p&&P<11&&(u=Kt(e.display.measure,u))}else{a>0&&(s=n="right");var m;e.options.lineWrapping&&(m=o.getClientRects()).length>1?u=m[n=="right"?m.length-1:0]:u=o.getBoundingClientRect()}if(p&&P<9&&!a&&(!u||!u.left&&!u.right)){var O=o.parentNode.getClientRects()[0];O?u={left:O.left,right:O.left+Oi(e.display),top:O.top,bottom:O.bottom}:u=So}for(var w=u.top-t.rect.top,z=u.bottom-t.rect.top,X=(w+z)/2,pe=t.view.measure.heights,Re=0;Re<pe.length-1&&!(X<pe[Re]);Re++);var Ue=Re?pe[Re-1]:0,Le=pe[Re],Ye={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Ue,bottom:Le};return!u.left&&!u.right&&(Ye.bogus=!0),e.options.singleCursorHeightPerLine||(Ye.rtop=w,Ye.rbottom=z),Ye}function Kt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Sn(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 jn(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 er(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)jn(e.display.view[t])}function En(e){er(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ir(){return ne&&V?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mr(){return ne&&V?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function _r(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Tr(e.widgets[r]));return t}function xr(e,t,r,n,i){if(!i){var o=_r(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Fn(t);if(n=="local"?a+=wi(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:ir());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-=ir(),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 Nr(e,t,r,n,i){return n||(n=x(e.doc,t.line)),xr(e,n,_i(e,n,t.ch,i),r)}function yr(e,t,r,n,i,o){n=n||x(e.doc,t.line),i||(i=Jr(e,n));function a(z,X){var pe=Pr(e,i,z,X?"right":"left",o);return X?pe.left=pe.right:pe.right=pe.left,xr(e,n,pe,r)}var l=we(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 v(z,X,pe){var Re=l[X],Ue=Re.level==1;return a(pe?z-1:z,Ue!=pe)}var m=me(l,s,u),O=Ie,w=v(s,m,u=="before");return O!=null&&(w.other=v(s,O,u!="before")),w}function Ca(e,t){var r=0;t=J(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=x(e.doc,t.line),i=Fn(n)+wi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Uo(e,t,r,n,i){var o=M(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 Uo(n.first,0,null,-1,-1);var i=re(n,r),o=n.first+n.size-1;if(i>o)return Uo(n.first+n.size-1,x(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=x(n,i);;){var l=Bl(e,a,i,t,r),s=pt(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=x(n,i=u.line)}}function xa(e,t,r,n){n-=_r(t);var i=t.text.length,o=fe(function(a){return Pr(e,r,a-1).bottom<=n},i,0);return i=fe(function(a){return Pr(e,r,a).top>n},o,i),{begin:o,end:i}}function wa(e,t,r,n){r||(r=Jr(e,t));var i=xr(e,t,Pr(e,r,n),"line").top;return xa(e,t,r,i)}function _o(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Bl(e,t,r,n,i){i-=Fn(t);var o=Jr(e,t),a=_r(t),l=0,s=t.text.length,u=!0,v=we(t,e.doc.direction);if(v){var m=(e.options.lineWrapping?Ul:Kl)(e,t,r,o,v,n,i);u=m.level!=1,l=u?m.from:m.to-1,s=u?m.to:m.from-1}var O=null,w=null,z=fe(function(St){var vt=Pr(e,o,St);return vt.top+=a,vt.bottom+=a,_o(vt,n,i,!1)?(vt.top<=i&&vt.left<=n&&(O=St,w=vt),!0):!1},l,s),X,pe,Re=!1;if(w){var Ue=n-w.left<w.right-n,Le=Ue==u;z=O+(Le?0:1),pe=Le?"after":"before",X=Ue?w.left:w.right}else{!u&&(z==s||z==l)&&z++,pe=z==0?"after":z==t.text.length?"before":Pr(e,o,z-(u?1:0)).bottom+a<=i==u?"after":"before";var Ye=yr(e,M(r,z,pe),"line",t,o);X=Ye.left,Re=i<Ye.top?-1:i>=Ye.bottom?1:0}return z=oe(t.text,z,1),Uo(r,z,pe,Re,n-X)}function Kl(e,t,r,n,i,o,a){var l=fe(function(m){var O=i[m],w=O.level!=1;return _o(yr(e,M(r,w?O.to:O.from,w?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,v=yr(e,M(r,u?s.from:s.to,u?"after":"before"),"line",t,n);_o(v,o,a,!0)&&v.top>a&&(s=i[l-1])}return s}function Ul(e,t,r,n,i,o,a){var l=xa(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var v=null,m=null,O=0;O<i.length;O++){var w=i[O];if(!(w.from>=u||w.to<=s)){var z=w.level!=1,X=Pr(e,n,z?Math.min(u,w.to)-1:Math.max(s,w.from)).right,pe=X<o?o-X+1e9:X-o;(!v||m>pe)&&(v=w,m=pe)}}return v||(v=i[i.length-1]),v.from<s&&(v={from:s,to:v.to,level:v.level}),v.to>u&&(v={from:v.from,to:u,level:v.level}),v}var fi;function Ei(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fi==null){fi=R("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(R("br"));fi.appendChild(document.createTextNode("x"))}F(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),I(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=R("span","xxxxxxxxxx"),r=R("pre",[t],"CodeMirror-line-like");F(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 Ea(e){var t=Ei(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Oi(e.display)-3);return function(i){if(Tn(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=Ea(e);t.iter(function(n){var i=r(n);i!=n.height&&H(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&un(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(m){return null}var s=jo(e,o,a),u;if(n&&s.xRel>0&&(u=x(e.doc,s.line).text).length==s.ch){var v=k(u,u.length,e.options.tabSize)-u.length;s=M(s.line,Math.max(0,Math.round((o-yo(e.display).left)/Oi(e.display))-v))}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 cr(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)wt&&gr(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)wt&&Yn(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=Co(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=Co(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=Co(e,t,t,-1),s=Co(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=[]);te(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 Co(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!wt||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(;gr(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||_l(e,l,o)}}return n}function Ma(e,t,r){var n=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(R("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(R("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 xo(e,t){return e.top-t.top||e.left-t.left}function _l(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,Zr(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function v(Le,Ye,St,vt){Ye<0&&(Ye=0),Ye=Math.round(Ye),vt=Math.round(vt),o.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+Le+`px;
top: `+Ye+"px; width: "+(St==null?s-Le:St)+`px;
height: `+(vt-Ye)+"px"))}function m(Le,Ye,St){var vt=x(i,Le),_t=vt.text.length,wn,Gn;function Rn($n,hr){return Nr(e,M(Le,$n),"div",vt,hr)}function Sr($n,hr,Jn){var Zn=wa(e,vt,null,$n),zn=hr=="ltr"==(Jn=="after")?"left":"right",Dn=Jn=="after"?Zn.begin:Zn.end-(/\s/.test(vt.text.charAt(Zn.end-1))?2:1);return Rn(Dn,zn)[zn]}var dr=we(vt,i.direction);return We(dr,Ye||0,St==null?_t:St,function($n,hr,Jn,Zn){var zn=Jn=="ltr",Dn=Rn($n,zn?"left":"right"),vr=Rn(hr-1,zn?"right":"left"),Wi=Ye==null&&$n==0,ai=St==null&&hr==_t,nr=Zn==0,Br=!dr||Zn==dr.length-1;if(vr.top-Dn.top<=3){var Vn=(u?Wi:ai)&&nr,ba=(u?ai:Wi)&&Br,Vr=Vn?l:(zn?Dn:vr).left,yi=ba?s:(zn?vr:Dn).right;v(Vr,Dn.top,yi-Vr,Dn.bottom)}else{var bi,ar,Hi,Sa;zn?(bi=u&&Wi&&nr?l:Dn.left,ar=u?s:Sr($n,Jn,"before"),Hi=u?l:Sr(hr,Jn,"after"),Sa=u&&ai&&Br?s:vr.right):(bi=u?Sr($n,Jn,"before"):l,ar=!u&&Wi&&nr?s:Dn.right,Hi=!u&&ai&&Br?l:vr.left,Sa=u?Sr(hr,Jn,"after"):s),v(bi,Dn.top,ar-bi,Dn.bottom),Dn.bottom<vr.top&&v(l,Dn.bottom,null,vr.top),v(Hi,vr.top,Sa-Hi,vr.bottom)}(!wn||xo(Dn,wn)<0)&&(wn=Dn),xo(vr,wn)<0&&(wn=vr),(!Gn||xo(Dn,Gn)<0)&&(Gn=Dn),xo(vr,Gn)<0&&(Gn=vr)}),{start:wn,end:Gn}}var O=t.from(),w=t.to();if(O.line==w.line)m(O.line,O.ch,w.ch);else{var z=x(i,O.line),X=x(i,w.line),pe=It(z)==It(X),Re=m(O.line,O.ch,pe?z.text.length+1:null).end,Ue=m(w.line,pe?0:null,w.ch).start;pe&&(Re.top<Ue.top-2?(v(Re.right,Re.top,null,Re.bottom),v(l,Ue.top,Ue.left,Ue.bottom)):v(Re.right,Re.top,Ue.left-Re.right,Re.bottom)),Re.bottom<Ue.top&&v(l,Re.bottom,null,Ue.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 La(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||(He(e,"focus",e,t),e.state.focused=!0,at(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),D&&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&&(He(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 wo(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(p&&P<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 v=i.line.height-a;if((v>.005||v<-.005)&&(H(i.line,a),Ta(i.line),i.rest))for(var m=0;m<i.rest.length;m++)Ta(i.rest[m]);if(l>e.display.sizerWidth){var O=Math.ceil(l/Oi(e.display));O>e.display.maxLineLength&&(e.display.maxLineLength=O,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ta(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 Eo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wi(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=re(t,n),a=re(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=re(t,Fn(x(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=re(t,Fn(x(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!ut(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&&!he){var o=R("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-wi(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?M(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?M(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),v=e.doc.scrollTop,m=e.doc.scrollLeft;if(u.scrollTop!=null&&(Qi(e,u.scrollTop),Math.abs(e.doc.scrollTop-v)>1&&(a=!0)),u.scrollLeft!=null&&(vi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-m)>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=Ei(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=Ui(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Ki(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 v=Math.min(t.top,(u?l:t.bottom)-o);v!=i&&(a.scrollTop=v)}var m=e.options.fixedGutter?0:r.gutters.offsetWidth,O=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-m,w=Zr(e)-r.gutters.offsetWidth,z=t.right-t.left>w;return z&&(t.right=t.left+w),t.left<10?a.scrollLeft=0:t.left<O?a.scrollLeft=Math.max(0,t.left+m-(z?0:10)):t.right>w+O-3&&(a.scrollLeft=t.right+(z?0:10)-w),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=Ca(e,t.from),n=Ca(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||(E||ea(e,{top:t}),Pa(e,t,!0),E&&ea(e),eo(e,100))}function Pa(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,za(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+Ki(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=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),A(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),A(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,p&&P<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=nt&&!N?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},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;Na(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&wo(e),Na(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Na(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 Fa(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),A(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&&at(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&&Tt(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&&wo(t),e.barMeasure=Ji(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_i(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-Zr(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==Se();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&&$a(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Pa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,J(n,e.scrollToPos.from),J(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||He(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&He(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&He(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 _n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function or(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function kn(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,le(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Rt(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?T(t.mode,n.state):null,s=st(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,v=s.classes;v?o.styleClasses=v:u&&(o.styleClasses=null);for(var m=!a||a.length!=o.styles.length||u!=v&&(!u||!v||u.bgClass!=v.bgClass||u.textClass!=v.textClass),O=0;!m&&O<a.length;++O)m=a[O]!=o.styles[O];m&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Wt(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=Eo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Zr(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Gt(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)He.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=Se();if(!t||!Pe(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Pe(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==Se())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Pe(document.body,e.anchorNode)&&Pe(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)),wt&&(o=gr(e.doc,o),a=Yn(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=Fn(x(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),I(r.cursorDiv),I(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 $a(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Zr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Ki(e.display)-Ui(e),r.top)}),t.visible=Eo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Eo(e.display,e.doc,r));if(!qo(e,t))break;wo(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)){wo(e),$a(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(z){var X=z.nextSibling;return D&&nt&&e.display.currentWheelTarget==z?z.style.display="none":z.parentNode.removeChild(z),X}for(var s=n.view,u=n.viewFrom,v=0;v<s.length;v++){var m=s[v];if(!m.hidden)if(!m.node||m.node.parentNode!=o){var O=mo(e,m,u,r);o.insertBefore(O,a)}else{for(;a!=m.node;)a=l(a);var w=i&&t!=null&&t<=u&&m.lineNumber;m.changes&&(te(m.changes,"gutter")>-1&&(w=!1),xn(e,m,u,r)),w&&(I(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(Fe(e.options,u)))),a=m.node.nextSibling}u+=m.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 za(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=Fe(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(R("div",[R("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 Ha(e){var t=e.gutters,r=e.gutterSpecs;I(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(R("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){Ha(e.display),cr(e),za(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=be("div",null,"CodeMirror-code"),i.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=R("div",null,"CodeMirror-cursors"),i.measure=R("div",null,"CodeMirror-measure"),i.lineMeasure=R("div",null,"CodeMirror-measure"),i.lineSpace=be("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=be("div",[i.lineSpace],"CodeMirror-lines");i.mover=R("div",[o],null,"position: relative"),i.sizer=R("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=R("div",null,null,"position: absolute; height: "+_e+"px; width: 1px;"),i.gutters=R("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=R("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=R("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),p&&P<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!D&&!(E&&ke)&&(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),Ha(i),r.init(i)}var Mo=0,wr=null;p?wr=-.53:E?wr=15:ne?wr=-.7:Ce&&(wr=-1/3);function Za(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=Za(e);return t.x*=wr,t.y*=wr,t}function Ba(e,t){var r=Za(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&&nt&&D){e:for(var u=t.target,v=o.view;u!=a;u=u.parentNode)for(var m=0;m<v.length;m++)if(v[m].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!E&&!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)&&gt(t),o.wheelStartX=null;return}if(i&&wr!=null){var O=i*wr,w=e.doc.scrollTop,z=w+o.wrapper.clientHeight;O<0?w=Math.max(0,w+O-50):z=Math.min(e.doc.height,z+O+50),ea(e,{top:w,bottom:z})}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 X=a.scrollLeft-o.wheelStartX,pe=a.scrollTop-o.wheelStartY,Re=pe&&o.wheelDY&&pe/o.wheelDY||X&&o.wheelDX&&X/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Re&&(wr=(wr*Mo+Re)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Er=function(e,t){this.ranges=e,this.primIndex=t};Er.prototype.primary=function(){return this.ranges[this.primIndex]},Er.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(!Be(r.anchor,n.anchor)||!Be(r.head,n.head))return!1}return!0},Er.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new fn(ue(this.ranges[t].anchor),ue(this.ranges[t].head));return new Er(e,this.primIndex)},Er.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Er.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(K(t,n.from())>=0&&K(e,n.to())<=0)return r}return-1};var fn=function(e,t){this.anchor=e,this.head=t};fn.prototype.from=function(){return De(this.anchor,this.head)},fn.prototype.to=function(){return Ne(this.anchor,this.head)},fn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zr(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(O,w){return K(O.from(),w.from())}),r=te(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=K(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=De(l.from(),a.from()),v=Ne(l.to(),a.to()),m=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new fn(m?v:u,m?u:v))}}return new Er(t,r)}function ti(e,t){return new Er([new fn(e,t||e)],0)}function ni(e){return e.text?M(e.from.line+e.text.length-1,Je(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ka(e,t){if(K(e,t.from)<0)return e;if(K(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),M(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 fn(Ka(i.anchor,t),Ka(i.head,t)))}return zr(e.cm,r,e.sel.primIndex)}function Ua(e,t,r){return e.line==t.line?M(r.line,e.ch-t.ch+r.ch):M(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=M(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ua(l.from,i,o),u=Ua(ni(l),i,o);if(i=l.to,o=u,r=="around"){var v=e.sel.ranges[a],m=K(v.head,v.anchor)<0;n[a]=new fn(m?u:s,m?s:u)}else n[a]=new fn(s,s)}return new Er(n,e.sel.primIndex)}function oa(e){e.doc.mode=rt(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&&cr(e)}function ja(e,t){return t.from.ch==0&&t.to.ch==0&&Je(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(Ue){return r?r[Ue]:null}function o(Ue,Le,Ye){Kr(Ue,Le,Ye,n),ot(Ue,"change",Ue,t)}function a(Ue,Le){for(var Ye=[],St=Ue;St<Le;++St)Ye.push(new qn(u[St],i(St),n));return Ye}var l=t.from,s=t.to,u=t.text,v=x(e,l.line),m=x(e,s.line),O=Je(u),w=i(u.length-1),z=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 X=a(0,u.length-1);o(m,m.text,w),z&&e.remove(l.line,z),X.length&&e.insert(l.line,X)}else if(v==m)if(u.length==1)o(v,v.text.slice(0,l.ch)+O+v.text.slice(s.ch),w);else{var pe=a(1,u.length-1);pe.push(new qn(O+v.text.slice(s.ch),w,n)),o(v,v.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,pe)}else if(u.length==1)o(v,v.text.slice(0,l.ch)+u[0]+m.text.slice(s.ch),i(0)),e.remove(l.line+1,z);else{o(v,v.text.slice(0,l.ch)+u[0],i(0)),o(m,O+m.text.slice(s.ch),w);var Re=a(1,u.length-1);z>1&&e.remove(l.line+1,z-1),e.insert(l.line+1,Re)}ot(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 _a(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,cr(e)}function ka(e){(e.doc.direction=="rtl"?at:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){br(e,function(){ka(e),cr(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:ue(t.from),to:ni(t),text:L(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=Je(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),Je(e.done);if(e.done.length&&!Je(e.done).ranges)return Je(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Je(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=Je(a.changes),K(t.from,t.to)==0&&K(t.from,l.to)==0?l.to=ni(t):a.changes.push(la(e,t));else{var s=Je(i.done);for((!s||!s.ranges)&&Lo(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||He(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,Je(i.done),t))?i.done[i.done.length-1]=t:Lo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(i.undone)}function Lo(e,t){var r=Je(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=it(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 Li(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Er.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],v=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var m in u)(v=m.match(/^spans_(\d+)$/))&&te(t,Number(v[1]))>-1&&(Je(l)[m]=u[m],delete u[m])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=K(t,i)<0;o!=K(r,i)<0?(i=t,t=r):o!=K(t,r)<0&&(t=r)}return new fn(i,t)}else return new fn(r||t,t)}function To(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),tr(e,new Er([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=zr(e.cm,n,e.sel.primIndex);tr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,tr(e,zr(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){tr(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 fn(J(e,i[o].anchor),J(e,i[o].head))},origin:r&&r.origin};return He(e,"beforeSelectionChange",e,n),e.cm&&He(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?zr(e.cm,n.ranges,n.ranges.length-1):t}function qa(e,t,r){var n=e.history.done,i=Je(n);i&&i.ranges?(n[n.length-1]=t,Do(e,t,r)):tr(e,t,r)}function tr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(Gt(e,"beforeSelectionChange")||e.cm&&Gt(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(K(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,Pt(e.cm)),ot(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=Po(e,a.anchor,l&&l.anchor,r,n),u=Po(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 fn(s,u))}return i?zr(e.cm,i,t.primIndex):t}function Ti(e,t,r,n,i){var o=x(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,v="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(v?l.to>=t.ch:l.to>t.ch))){if(i&&(He(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var m=s.find(n<0?1:-1),O=void 0;if((n<0?v:u)&&(m=rl(e,m,-n,m&&m.line==t.line?o:null)),m&&m.line==t.line&&(O=K(m,r))&&(n<0?O<0:O>0))return Ti(e,m,t,n,i)}var w=s.find(n<0?-1:1);return(n<0?u:v)&&(w=rl(e,w,n,w.line==t.line?o:null)),w?Ti(e,w,t,n,i):null}}return t}function Po(e,t,r,n,i){var o=n||1,a=Ti(e,t,r,o,i)||!i&&Ti(e,t,r,o,!0)||Ti(e,t,r,-o,i)||!i&&Ti(e,t,r,-o,!0);return a||(e.cantEdit=!0,M(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?J(e,M(t.line-1)):null:r>0&&t.ch==(n||x(e,t.line)).text.length?t.line<e.first+e.size-1?M(t.line+1,0):null:new M(t.line,t.ch+r)}function il(e){e.setSelection(M(e.firstLine(),0),M(e.lastLine()),ie)}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=J(e,i)),o&&(n.to=J(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),He(e,"beforeChange",e,n),e.cm&&He(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 _n(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Gt(e,"beforeChange")||e.cm&&Gt(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=Bt&&!r&&nn(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]==""&&K(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,it(e,t));var n=[];ri(e,function(i,o){!o&&te(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,it(i,t))})}}function No(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(Lo(o,s),r&&!o.equals(e.sel)){tr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var v=[];Lo(a,s),s.push({changes:v,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var m=Gt(e,"beforeChange")||e.cm&&Gt(e.cm,"beforeChange"),O=function(X){var pe=o.changes[X];if(pe.origin=t,m&&!ol(e,pe,!1))return l.length=0,{};v.push(la(e,pe));var Re=X?ia(e,pe):Je(l);ro(e,pe,Re,Ya(e,pe)),!X&&e.cm&&e.cm.scrollIntoView({from:pe.from,to:ni(pe)});var Ue=[];ri(e,function(Le,Ye){!Ye&&te(Ue,Le.history)==-1&&(cl(Le.history,pe),Ue.push(Le.history)),ro(Le,pe,null,Ya(Le,pe))})},w=o.changes.length-1;w>=0;--w){var z=O(w);if(z)return z.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Er(Et(e.sel.ranges,function(i){return new fn(M(i.anchor.line+t,i.anchor.ch),M(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){cr(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 _n(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:M(e.first,0),to:M(t.to.line+i,t.to.ch),text:[Je(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:M(o,x(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=L(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,ie),e.cantEdit&&Po(e,M(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=W(It(x(n,o.line))),n.iter(s,a.line+1,function(w){if(w==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Pt(e),aa(n,t,r,Ea(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(w){var z=sr(w);z>i.maxLineLength&&(i.maxLine=w,i.maxLineLength=z,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),xt(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?cr(e):o.line==a.line&&t.text.length==1&&!ja(e.doc,t)?qr(e,o.line,"text"):cr(e,o.line,a.line+1,u);var v=Gt(e,"changes"),m=Gt(e,"change");if(m||v){var O={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};m&&ot(e,"change",e,O),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(O)}e.display.selForContextMenu=null}function Pi(e,t,r,n,i){var o;n||(n=r),K(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=M(u.from.line+n,u.from.ch),u.to=M(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=x(e,ft(e,t)):i=W(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),ot(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=te(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=W(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=Tr(this);H(r,Math.max(0,r.height-o)),e&&(br(e,function(){fl(e,r,-o),qr(e,n,"widget")}),ot(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=Tr(this)-t;i&&(Tn(this.doc,n)||H(n,n.height+i),r&&br(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),ot(r,"lineWidgetChanged",r,e,W(n))}))},an(lo);function fl(e,t,r){Fn(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&&!Tn(e,a)){var s=Fn(a)<e.scrollTop;H(a,a.height+Tr(i)),s&&Jo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ot(o,"lineWidgetAdded",o,i,typeof t=="number"?t:W(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),Gt(this,"clear")){var r=this.find();r&&ot(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=sn(a.markedSpans,this);e&&!this.collapsed?qr(e,W(a),"text"):e&&(l.to!=null&&(i=W(a)),l.from!=null&&(n=W(a))),a.markedSpans=jt(a.markedSpans,l),l.from==null&&this.collapsed&&!Tn(this.doc,a)&&e&&H(a,Ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=It(this.lines[s]),v=sr(u);v>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=v,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&cr(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&&ot(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=sn(o.markedSpans,this);if(a.from!=null&&(r=M(t?o:W(o),a.from),e==-1))return r;if(a.to!=null&&(n=M(t?o:W(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=W(t.line),a=ki(n,o);if(a&&(jn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Tn(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Tr(r)-l;s&&H(i,i.height+s)}ot(n,"markerChanged",n,e)})},ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||te(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(te(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},an(ii);function Ni(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return _n(e.cm,Ni)(e,t,r,n,i);var o=new ii(e,i),a=K(t,r);if(n&&B(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=be("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ft(e,t.line,t,r,o)||t.line!=r.line&&Ft(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt()}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(m){s&&o.collapsed&&!s.options.lineWrapping&&It(m)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&H(m,0),Mn(m,new kt(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(m){Tn(e,m)&&H(m,0)}),o.clearOnEnter&&A(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(vn(),(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)cr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var v=t.line;v<=r.line;v++)qr(s,v,"text");o.atomic&&tl(s.doc),ot(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();ot(this,"clear")}},so.prototype.find=function(e,t){return this.primary.find(e,t)},an(so);function Ss(e,t,r,n,i){n=B(n),n.shared=!1;var o=[Ni(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Ni(s,J(s,t),J(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=Je(o)}),new so(o,a)}function hl(e){return e.findMarks(M(e.first,0),e.clipPos(M(e.lastLine())),function(t){return t.parent})}function Cs(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(K(o,a)){var l=Ni(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function xs(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];te(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var ws=0,fr=function(e,t,r,n,i){if(!(this instanceof fr))return new fr(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new oo([new qn("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=M(r,0);this.sel=ti(o),this.history=new Ro(null),this.id=++ws,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}),tr(this,ti(o),ie)};fr.prototype=$(ao.prototype,{constructor:fr,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=Y(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:kn(function(e){var t=M(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:M(r,x(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),tr(this,ti(t),ie)}),replaceRange:function(e,t,r,n){t=J(this,t),r=r?J(this,r):t,Pi(this,e,t,r,n)},getRange:function(e,t,r){var n=L(this,J(this,e),J(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(de(this,e))return x(this,e)},getLineNumber:function(e){return W(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=x(this,e)),It(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return J(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:kn(function(e,t,r){Ja(this,J(this,typeof e=="number"?M(e,t||0):e),null,r)}),setSelection:kn(function(e,t,r){Ja(this,J(this,e),J(this,t||e),r)}),extendSelection:kn(function(e,t,r){To(this,J(this,e),t&&J(this,t),r)}),extendSelections:kn(function(e,t){Qa(this,Me(this,e),t)}),extendSelectionsBy:kn(function(e,t){var r=Et(this.sel.ranges,e);Qa(this,Me(this,r),t)}),setSelections:kn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new fn(J(this,e[i].anchor),J(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),tr(this,zr(this.cm,n,t),r)}}),addSelection:kn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new fn(J(this,e),J(this,t||e))),tr(this,zr(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=L(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=L(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:kn(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:kn(function(){No(this,"undo")}),redo:kn(function(){No(this,"redo")}),undoSelection:kn(function(){No(this,"undo",!0)}),redoSelection:kn(function(){No(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:Li(this.history.done),undone:Li(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=Li(e.done.slice(0),null,!0),t.undone=Li(e.undone.slice(0),null,!0)},setGutterMarker:kn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&se(i)&&(n.gutterMarkers=null),!0})}),clearGutter:kn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,se(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!de(this,e)||(t=e,e=x(this,e),!e))return null}else if(t=W(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:kn(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:kn(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:kn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ni(this,J(this,e),J(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=J(this,e),Ni(this,e,e,r,"bookmark")},findMarksAt:function(e){e=J(this,e);var t=[],r=x(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=J(this,e),t=J(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}),J(this,M(r,t))},indexFromPos:function(e){e=J(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 fr(Y(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 fr(Y(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}],Cs(n,hl(this)),n},unlinkDoc:function(e){if(e instanceof In&&(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),xs(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=Li(this.history.done,n),e.history.undone=Li(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):mn(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:kn(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))})}),fr.prototype.eachLine=fr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(ut(t,e)||$r(t.display,e))){gt(e),p&&(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&&_n(t,function(){r=J(t.doc,r);var w={from:r,to:r,text:t.doc.splitLines(o.filter(function(z){return z!=null}).join(t.doc.lineSeparator())),origin:"paste"};Di(t.doc,w),qa(t.doc,ti(J(t.doc,r),J(t.doc,ni(w))))})()},s=function(w,z){if(t.options.allowDropFileTypes&&te(t.options.allowDropFileTypes,w.type)==-1){l();return}var X=new FileReader;X.onerror=function(){return l()},X.onload=function(){var pe=X.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(pe)){l();return}o[z]=pe,l()},X.readAsText(w)},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 v=e.dataTransfer.getData("Text");if(v){var m;if(t.state.draggingText&&!t.state.draggingText.copy&&(m=t.listSelections()),Do(t.doc,ti(r,r)),m)for(var O=0;O<m.length;++O)Pi(t.doc,"",m[O].anchor,m[O].head,"drag");t.replaceSelection(v,"around","paste"),t.display.input.focus()}}catch(w){}}}}function Os(e,t){if(p&&(!e.state.draggingText||+new Date-vl<100)){pn(t);return}if(!(ut(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ce)){var r=R("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=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),F(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;A(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),A(window,"blur",function(){return gl(Ii)})}function Ls(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=nt?Gr.macDefault:Gr.pcDefault;function Ts(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=Et(r.split(" "),Ts),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=Fo(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),(Z?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Z?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 Fo(e){return typeof e=="string"?Gr[e]:e}function Fi(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&K(o.from,Je(n).to)<=0;){var a=n.pop();if(K(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--)Pi(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=oe(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 M(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=we(r,t.doc.direction);if(o){var a=i<0?Je(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var v=Jr(t,r);u=i<0?r.text.length-1:0;var m=Pr(t,v,u).top;u=fe(function(O){return Pr(t,v,O).top==m},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 M(n,u,s)}}return new M(n,i<0?r.text.length:0,i<0?"before":"after")}function Ps(e,t,r,n){var i=we(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=me(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(Re,Ue){return ca(t,Re instanceof M?Re.ch:Re,Ue)},s,u=function(Re){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Re)):{begin:0,end:t.text.length}},v=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var m=a.level==1==n<0,O=l(r,m?1:-1);if(O!=null&&(m?O<=a.to&&O<=v.end:O>=a.from&&O>=v.begin)){var w=m?"before":"after";return new M(r.line,O,w)}}var z=function(Re,Ue,Le){for(var Ye=function(wn,Gn){return Gn?new M(r.line,l(wn,1),"before"):new M(r.line,wn,"after")};Re>=0&&Re<i.length;Re+=Ue){var St=i[Re],vt=Ue>0==(St.level!=1),_t=vt?Le.begin:l(Le.end,-1);if(St.from<=_t&&_t<St.to||(_t=vt?St.from:l(St.to,-1),Le.begin<=_t&&_t<Le.end))return Ye(_t,vt)}},X=z(o+n,n,v);if(X)return X;var pe=n>0?v.end:l(v.begin,-1);return pe!=null&&!(n>0&&pe==t.text.length)&&(X=z(n>0?0:i.length-1,n,u(pe)),X)?X:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ie)},killLine:function(e){return Fi(e,function(t){if(t.empty()){var r=x(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:M(t.head.line+1,0)}:{from:t.head,to:M(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Fi(e,function(t){return{from:M(t.from().line,0),to:J(e.doc,M(t.to().line+1,0))}})},delLineLeft:function(e){return Fi(e,function(t){return{from:M(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Fi(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 Fi(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(M(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(M(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return xl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ns(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")},ce)},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")},ce)},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/)?xl(e,t.head):n},ce)},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=k(e.getLine(o.line),o.ch,n);t.push(bt(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=x(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new M(i.line,i.ch-1)),i.ch>0)i=new M(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),M(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=x(e.doc,i.line-1).text;a&&(i=new M(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),M(i.line-1,a.length-1),i,"+transpose"))}}r.push(new fn(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 Cl(e,t){var r=x(e.doc,t),n=It(r);return n!=r&&(t=W(n)),da(!0,e,n,t,1)}function Ns(e,t){var r=x(e.doc,t),n=rr(r);return n!=r&&(t=W(n)),da(!0,e,r,t,-1)}function xl(e,t){var r=Cl(e,t.line),n=x(e.doc,r.line),i=we(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 M(r.line,a?0:o,r.sticky)}return r}function $o(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)!=ze}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 Fs=new ee;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:Fs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),wl(e,i+" "+t,r,n))return!0}return wl(e,t,r,n)}function wl(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(gt(r),Xo(e)),!!i}function El(e,t){var r=Sl(t,!0);return r?t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(n){return $o(e,n,!0)})||ho(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return $o(e,n)}):ho(e,r,t,function(n){return $o(e,n)}):!1}function $s(e,t,r){return ho(e,"'"+r+"'",t,function(n){return $o(e,n,!0)})}var ha=null;function Ol(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Se(),!ut(t,e))){p&&P<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=El(t,e);y&&(ha=n?r:null,!n&&r==88&&!Ln&&(nt?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),E&&!nt&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&zs(t)}}function zs(e){var t=e.display.lineDiv;at(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),ht(document,"keyup",r),ht(document,"mouseover",r))}A(document,"keyup",r),A(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),ut(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||ut(t,e)||e.ctrlKey&&!e.altKey||nt&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,gt(e);return}if(!(y&&(!e.which||e.which<10)&&El(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&($s(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&&K(t,this.pos)==0&&r==this.button};var vo,po;function Hs(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(!(ut(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){D||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=bn(e),o=n?Hs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Zs(t,i,n,o,e))&&(i==1?n?Ks(t,n,o,e):un(e)==r.scroller&&gt(e):i==2?(n&&To(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(S?t.display.input.onContextMenu(e):La(t)))}}}function Zs(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)!=ze}finally{e.state.suppressEdits=!1}return l})}function Bs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=Ze?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=nt?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(nt?r.altKey:r.ctrlKey)),i}function Ks(e,t,r,n){p?setTimeout(le(Ra,e),0):e.curOp.focus=Se();var i=Bs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&Nn&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(K((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(K(a.to(),t)>0||t.xRel<0)?Us(e,n,t,i):js(e,n,t,i)}function Us(e,t,r,n){var i=e.display,o=!1,a=_n(e,function(u){D&&(i.scroller.draggable=!1),e.state.draggingText=!1,ht(i.wrapper.ownerDocument,"mouseup",a),ht(i.wrapper.ownerDocument,"mousemove",l),ht(i.scroller,"dragstart",s),ht(i.scroller,"drop",a),o||(gt(u),n.addNew||To(e.doc,r,null,null,n.extend),D&&!Ce||p&&P==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};D&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),A(i.wrapper.ownerDocument,"mouseup",a),A(i.wrapper.ownerDocument,"mousemove",l),A(i.scroller,"dragstart",s),A(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new fn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new fn(M(t.line,0),J(e.doc,M(t.line+1,0)));var n=r(e,t);return new fn(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;gt(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 fn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new fn(r,r)),r=di(e,t,!0,!0),l=-1;else{var v=Ll(e,r,n.unit);n.extend?a=sa(a,v.anchor,v.head,n.extend):a=v}n.addNew?l==-1?(l=u.length,tr(o,zr(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(tr(o,zr(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,Te):(l=0,tr(o,new Er([a],0),Te),s=o.sel);var m=r;function O(Le){if(K(m,Le)!=0)if(m=Le,n.unit=="rectangle"){for(var Ye=[],St=e.options.tabSize,vt=k(x(o,r.line).text,r.ch,St),_t=k(x(o,Le.line).text,Le.ch,St),wn=Math.min(vt,_t),Gn=Math.max(vt,_t),Rn=Math.min(r.line,Le.line),Sr=Math.min(e.lastLine(),Math.max(r.line,Le.line));Rn<=Sr;Rn++){var dr=x(o,Rn).text,$n=yt(dr,wn,St);wn==Gn?Ye.push(new fn(M(Rn,$n),M(Rn,$n))):dr.length>$n&&Ye.push(new fn(M(Rn,$n),M(Rn,yt(dr,Gn,St))))}Ye.length||Ye.push(new fn(r,r)),tr(o,zr(e,s.ranges.slice(0,l).concat(Ye),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Le)}else{var hr=a,Jn=Ll(e,Le,n.unit),Zn=hr.anchor,zn;K(Jn.anchor,Zn)>0?(zn=Jn.head,Zn=De(hr.from(),Jn.anchor)):(zn=Jn.anchor,Zn=Ne(hr.to(),Jn.head));var Dn=s.ranges.slice(0);Dn[l]=_s(e,new fn(J(o,Zn),zn)),tr(o,zr(e,Dn,l),Te)}}var w=i.wrapper.getBoundingClientRect(),z=0;function X(Le){var Ye=++z,St=di(e,Le,!0,n.unit=="rectangle");if(St)if(K(St,m)!=0){e.curOp.focus=Se(),O(St);var vt=Eo(i,o);(St.line>=vt.to||St.line<vt.from)&&setTimeout(_n(e,function(){z==Ye&&X(Le)}),150)}else{var _t=Le.clientY<w.top?-20:Le.clientY>w.bottom?20:0;_t&&setTimeout(_n(e,function(){z==Ye&&(i.scroller.scrollTop+=_t,X(Le))}),50)}}function pe(Le){e.state.selectingText=!1,z=1/0,Le&&(gt(Le),i.input.focus()),ht(i.wrapper.ownerDocument,"mousemove",Re),ht(i.wrapper.ownerDocument,"mouseup",Ue),o.history.lastSelOrigin=null}var Re=_n(e,function(Le){Le.buttons===0||!bn(Le)?pe(Le):X(Le)}),Ue=_n(e,pe);e.state.selectingText=Ue,A(i.wrapper.ownerDocument,"mousemove",Re),A(i.wrapper.ownerDocument,"mouseup",Ue)}function _s(e,t){var r=t.anchor,n=t.head,i=x(e.doc,r.line);if(K(r,n)==0&&r.sticky==n.sticky)return t;var o=we(i);if(!o)return t;var a=me(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 v=me(o,n.ch,n.sticky),m=v-a||(n.ch-r.ch)*(l.level==1?-1:1);v==s-1||v==s?u=m<0:u=m>0}var O=o[s+(u?-1:0)],w=u==(O.level==1),z=w?O.from:O.to,X=w?"after":"before";return r.ch==z&&r.sticky==X?t:new fn(new M(r.line,z,X),n)}function Tl(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(O){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&gt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Gt(e,r))return zt(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 v=re(e.doc,o),m=e.display.gutterSpecs[s];return He(e,r,e,v,m.className,t),zt(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Dl(e,t){$r(e.display,t)||ks(e,t)||ut(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return Gt(e,"gutterContextMenu")?Tl(e,t,"gutterContextMenu",!1):!1}function Pl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),En(e)}var $i={toString:function(){return"CodeMirror.Init"}},Nl={},zo={};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!=$i&&o(l,s,u)}:o)}e.defineOption=r,e.Init=$i,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),En(n),cr(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 v=s.text.indexOf(i,u);if(v==-1)break;u=v+i.length,o.push(M(a,v))}a++});for(var l=o.length-1;l>=0;l--)Pi(n.doc,i,o[l],M(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!=$i&&n.refresh()}),r("specialCharPlaceholder",Ir,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",ke?"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",!et),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Pl(n),to(n)},!0),r("keyMap","default",function(n,i,o){var a=Fo(i),l=o!=$i&&Fo(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){Fa(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!=$i;if(!t!=!n){var i=e.display.dragFunctions,o=t?A:ht;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?(at(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),Qn(e)),Vo(e),cr(e),En(e),setTimeout(function(){return Ri(e)},100)}function In(e,t){var r=this;if(!(this instanceof In))return new In(e,t);this.options=t=t?B(t):{},B(Nl,t,!1);var n=t.value;typeof n=="string"?n=new fr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new In.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Pl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(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 ee,keySeq:null,specialChars:null},t.autofocus&&!ke&&o.input.focus(),p&&P<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,_a(this,n),t.autofocus&&!ke||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Yo(r)},20):Ii(this);for(var a in zo)zo.hasOwnProperty(a)&&zo[a](this,t[a],$i);Wa(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),D&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}In.defaults=Nl,In.optionHandlers=zo;function Ys(e){var t=e.display;A(t.scroller,"mousedown",_n(e,Rl)),p&&P<11?A(t.scroller,"dblclick",_n(e,function(s){if(!ut(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){gt(s);var v=e.findWordAt(u);To(e.doc,v.anchor,v.head)}}})):A(t.scroller,"dblclick",function(s){return ut(e,s)||gt(s)}),A(t.scroller,"contextmenu",function(s){return Dl(e,s)}),A(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 v=u.left-s.left,m=u.top-s.top;return v*v+m*m>20*20}A(t.scroller,"touchstart",function(s){if(!ut(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)}}),A(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),A(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!$r(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var v=e.coordsChar(t.activeTouch,"page"),m;!u.prev||a(u,u.prev)?m=new fn(v,v):!u.prev.prev||a(u,u.prev.prev)?m=e.findWordAt(v):m=new fn(M(v.line,0),J(e.doc,M(v.line+1,0))),e.setSelection(m.anchor,m.head),e.focus(),gt(s)}i()}),A(t.scroller,"touchcancel",i),A(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),He(e,"scroll",e))}),A(t.scroller,"mousewheel",function(s){return Ba(e,s)}),A(t.scroller,"DOMMouseScroll",function(s){return Ba(e,s)}),A(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){ut(e,s)||pn(s)},over:function(s){ut(e,s)||(Is(e,s),pn(s))},start:function(s){return Os(e,s)},drop:_n(e,Es),leave:function(s){ut(e,s)||pl(e)}};var l=t.input.getField();A(l,"keyup",function(s){return Il.call(e,s)}),A(l,"keydown",_n(e,Ol)),A(l,"keypress",_n(e,Ml)),A(l,"focus",function(s){return Yo(e,s)}),A(l,"blur",function(s){return Ii(e,s)})}var ga=[];In.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=Rt(e,t).state:r="prev");var a=e.options.tabSize,l=x(i,t),s=k(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],v;if(!n&&!/\S/.test(l.text))v=0,r="not";else if(r=="smart"&&(v=i.mode.indent(o,l.text.slice(u.length),l.text),v==ze||v>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?v=k(x(i,t-1).text,null,a):v=0:r=="add"?v=s+e.options.indentUnit:r=="subtract"?v=s-e.options.indentUnit:typeof r=="number"&&(v=s+r),v=Math.max(0,v);var m="",O=0;if(e.options.indentWithTabs)for(var w=Math.floor(v/a);w;--w)O+=a,m+=" ";if(O<v&&(m+=bt(v-O)),m!=u)return Pi(i,m,M(t,0),M(t,u.length),"+input"),l.stateAfter=null,!0;for(var z=0;z<i.sel.ranges.length;z++){var X=i.sel.ranges[z];if(X.head.line==t&&X.head.ch<u.length){var pe=M(t,u.length);ua(i,z,new fn(pe,pe));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=mn(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 v=0;v<Wr.text.length;v++)u.push(o.splitLines(Wr.text[v]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Et(s,function(Re){return[Re]}));for(var m=e.curOp.updateInput,O=n.ranges.length-1;O>=0;O--){var w=n.ranges[O],z=w.from(),X=w.to();w.empty()&&(r&&r>0?z=M(z.line,z.ch-r):e.state.overwrite&&!l?X=M(X.line,Math.min(x(o,X.line).text.length,X.ch+Je(s).length)):l&&Wr&&Wr.lineWise&&Wr.text.join(`
`)==s.join(`
`)&&(z=X=M(z.line,0)));var pe={from:z,to:X,text:u?u[O%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,pe),ot(e,"inputRead",e,pe)}t&&!l&&Fl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=m),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 Fl(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(x(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=go(e,i.head.line,"smart"));a&&ot(e,"electricInput",e,i.head.line)}}}function $l(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:M(i,0),head:M(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function zl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Wl(){var e=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=R("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return D?e.style.width="1000px":e.setAttribute("wrap","off"),Oe&&(e.style.border="1px solid black"),zl(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)&&_n(this,t[n])(this,i,a),He(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"](Fo(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:or(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++,cr(this)}),removeOverlay:or(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++,cr(this);return}}}),indentLine:or(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),de(this.doc,n)&&go(this,n,i,o)}),indentSelection:or(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(),v=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var m=v;m<o;++m)go(this,m,n);var O=this.doc.sel.ranges;s.ch==0&&i.length==O.length&&O[a].from().ch>0&&ua(this.doc,a,new fn(s,O[a].to()),ie)}}}),getTokenAt:function(n,i){return Jt(this,n,i)},getLineTokens:function(n,i){return Jt(this,M(n),i,!0)},getTokenTypeAt:function(n){n=J(this.doc,n);var i=Ut(this,x(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 v=s?s.indexOf("overlay "):-1;return v<0?s:v==0?null:s.slice(0,v-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 v=0;v<a._global.length;v++){var m=a._global[v];m.pred(l,this)&&te(o,m.val)==-1&&o.push(m.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ft(o,n==null?o.first+o.size-1:n),Rt(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=J(this.doc,n):o=n?a.from():a.to(),yr(this,o,i||"page")},charCoords:function(n,i){return Nr(this,J(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,re(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=x(this.doc,n)}else l=n;return xr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Fn(l):0)},defaultTextHeight:function(){return Ei(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,J(this.doc,n));var u=n.bottom,v=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 m=Math.max(s.wrapper.clientHeight,this.doc.height),O=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>m)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=m&&(u=n.bottom),v+i.offsetWidth>O&&(v=O-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(v=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?v=0:l=="middle"&&(v=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=v+"px"),o&&Vl(this,{left:v,top:u,right:v+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:or(Ol),triggerOnKeyPress:or(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:or(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:or(function(n){Fl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=J(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:or(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()},ce)}),deleteH:or(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Fi(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=J(this.doc,n),v=0;v<i;++v){var m=yr(this,u,"div");if(s==null?s=m.left:m.left=s,u=Hl(this,m,l,o),u.hitSide)break}return u},moveV:or(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(v){if(s)return n<0?v.from():v.to();var m=yr(o,v.head,"div");v.goalColumn!=null&&(m.left=v.goalColumn),l.push(m.left);var O=Hl(o,m,n,i);return i=="page"&&v==a.sel.primary()&&Jo(o,Nr(o,O,"div").top-m.top),O},ce),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=x(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),v=Q(u,s)?function(m){return Q(m,s)}:/\s/.test(u)?function(m){return/\s/.test(m)}:function(m){return!/\s/.test(m)&&!Q(m)};a>0&&v(o.charAt(a-1));)--a;for(;l<o.length&&v(o.charAt(l));)++l}return new fn(M(n.line,a),M(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?at(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),He(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:or(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:Ui(this),clientWidth:Zr(this)}},scrollIntoView:or(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:M(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:or(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&&er(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,He(this,"refresh",this)}),operation:function(n){return br(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:or(function(){var n=this.display.cachedTextHeight;cr(this),this.curOp.forceUpdate=!0,En(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),ta(this.display),(n==null||Math.abs(n-Ei(this.display))>.5||this.options.lineWrapping)&&Vo(this),He(this,"refresh",this)}),swapDoc:or(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),_a(this,n),En(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,ot(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}},an(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=x(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var Ue=t.line+s;return Ue<e.first||Ue>=e.first+e.size?!1:(t=new M(Ue,t.ch,t.sticky),l=x(e,Ue))}function v(Ue){var Le;if(n=="codepoint"){var Ye=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(Ye)?Le=null:Le=new M(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(Ye>=55296&&Ye<56320?2:1))),-r)}else i?Le=Ps(e.cm,l,t,r):Le=fa(l,t,r);if(Le==null)if(!Ue&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=Le;return!0}if(n=="char"||n=="codepoint")v();else if(n=="column")v(!0);else if(n=="word"||n=="group")for(var m=null,O=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),z=!0;!(r<0&&!v(!z));z=!1){var X=l.text.charAt(t.ch)||`
`,pe=Q(X,w)?"w":O&&X==`
`?"n":!O||/\s/.test(X)?null:"p";if(O&&!z&&!pe&&(pe="s"),m&&m!=pe){r<0&&(r=1,v(),t.sticky="after");break}if(pe&&(m=pe),r>0&&!v(!z))break}var Re=Po(e,t,o,a,!0);return Be(o,Re)&&(Re.hitSide=!0),Re}function Hl(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*Ei(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 yn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};yn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;zl(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}A(i,"paste",function(l){!o(l)||ut(n,l)||Al(l,n)||P<=11&&setTimeout(_n(n,function(){return t.updateFromDOM()}),20)}),A(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),A(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),A(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),A(i,"touchstart",function(){return r.forceCompositionEnd()}),A(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||ut(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=$l(n);Wo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,ie),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 v=Wl(),m=v.firstChild;n.display.lineSpace.insertBefore(v,n.display.lineSpace.firstChild),m.value=Wr.text.join(`
`);var O=document.activeElement;je(m),setTimeout(function(){n.display.lineSpace.removeChild(v),O.focus(),O==i&&r.showPrimarySelection()},50)}}A(i,"copy",a),A(i,"cut",a)},yn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},yn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},yn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},yn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},yn.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=Ho(t,e.anchorNode,e.anchorOffset),a=Ho(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&K(De(o,a),n)==0&&K(Ne(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Zl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Zl(t,i);if(!u){var v=l[l.length-1].measure,m=v.maps?v.maps[v.maps.length-1]:v.map;u={node:m[m.length-1],offset:m[m.length-2]-m[m.length-3]}}if(!s||!u){e.removeAllRanges();return}var O=e.rangeCount&&e.getRangeAt(0),w;try{w=$e(s.node,s.offset,u.offset,u.node)}catch(z){}w&&(!E&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),O&&e.anchorNode==null?e.addRange(O):E&&this.startGracePeriod()),this.rememberSelection()}},yn.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)},yn.prototype.showMultipleSelections=function(e){F(this.cm.display.cursorDiv,e.cursors),F(this.cm.display.selectionDiv,e.selection)},yn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},yn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Pe(this.div,t)},yn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},yn.prototype.blur=function(){this.div.blur()},yn.prototype.getField=function(){return this.div},yn.prototype.supportsTouch=function(){return!0},yn.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)},yn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},yn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(V&&ne&&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=Ho(t,e.anchorNode,e.anchorOffset),n=Ho(t,e.focusNode,e.focusOffset);r&&n&&br(t,function(){tr(t.doc,ti(r,n),ie),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},yn.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=M(n.line-1,x(e.doc,n.line-1).length)),i.ch==x(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=M(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=W(t.view[0].line),l=t.view[0].node):(a=W(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=hi(e,i.line),u,v;if(s==t.view.length-1?(u=t.viewTo-1,v=t.lineDiv.lastChild):(u=W(t.view[s+1].line)-1,v=t.view[s+1].node.previousSibling),!l)return!1;for(var m=e.doc.splitLines(qs(e,l,v,a,u)),O=L(e.doc,M(a,0),M(u,x(e.doc,u).text.length));m.length>1&&O.length>1;)if(Je(m)==Je(O))m.pop(),O.pop(),u--;else if(m[0]==O[0])m.shift(),O.shift(),a++;else break;for(var w=0,z=0,X=m[0],pe=O[0],Re=Math.min(X.length,pe.length);w<Re&&X.charCodeAt(w)==pe.charCodeAt(w);)++w;for(var Ue=Je(m),Le=Je(O),Ye=Math.min(Ue.length-(m.length==1?w:0),Le.length-(O.length==1?w:0));z<Ye&&Ue.charCodeAt(Ue.length-z-1)==Le.charCodeAt(Le.length-z-1);)++z;if(m.length==1&&O.length==1&&a==n.line)for(;w&&w>n.ch&&Ue.charCodeAt(Ue.length-z-1)==Le.charCodeAt(Le.length-z-1);)w--,z++;m[m.length-1]=Ue.slice(0,Ue.length-z).replace(/^\u200b+/,""),m[0]=m[0].slice(w).replace(/\u200b+$/,"");var St=M(a,w),vt=M(u,O.length?Je(O).length-z:0);if(m.length>1||m[0]||K(St,vt))return Pi(e.doc,m,St,vt,"+input"),!0},yn.prototype.ensurePolled=function(){this.forceCompositionEnd()},yn.prototype.reset=function(){this.forceCompositionEnd()},yn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},yn.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))},yn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&br(this.cm,function(){return cr(e.cm)})},yn.prototype.setUneditable=function(e){e.contentEditable="false"},yn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||_n(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},yn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},yn.prototype.onContextMenu=function(){},yn.prototype.resetPosition=function(){},yn.prototype.needsContentAttribute=!0;function Zl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=x(e.doc,t.line),i=ji(r,n,t.line),o=we(n,e.doc.direction),a="left";if(o){var l=me(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 zi(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(w){return function(z){return z.id==w}}function v(){a&&(o+=l,s&&(o+=l),a=s=!1)}function m(w){w&&(v(),o+=w)}function O(w){if(w.nodeType==1){var z=w.getAttribute("cm-text");if(z){m(z);return}var X=w.getAttribute("cm-marker"),pe;if(X){var Re=e.findMarks(M(n,0),M(i+1,0),u(+X));Re.length&&(pe=Re[0].find(0))&&m(L(e.doc,pe.from,pe.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var Ue=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;Ue&&v();for(var Le=0;Le<w.childNodes.length;Le++)O(w.childNodes[Le]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),Ue&&(a=!0)}else w.nodeType==3&&m(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;O(t),t!=r;)t=t.nextSibling,s=!1;return o}function Ho(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return zi(e.clipPos(M(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||!Pe(n,t))return zi(M(W(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Je(e.rest):e.line;return zi(M(W(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 v(pe,Re,Ue){for(var Le=-1;Le<(u?u.length:0);Le++)for(var Ye=Le<0?s.map:u[Le],St=0;St<Ye.length;St+=3){var vt=Ye[St+2];if(vt==pe||vt==Re){var _t=W(Le<0?e.line:e.rest[Le]),wn=Ye[St]+Ue;return(Ue<0||vt!=pe)&&(wn=Ye[St+(Ue?1:0)]),M(_t,wn)}}}var m=v(a,l,r);if(m)return zi(m,i);for(var O=l.nextSibling,w=a?a.nodeValue.length-r:0;O;O=O.nextSibling){if(m=v(O,O.firstChild,0),m)return zi(M(m.line,m.ch-w),i);w+=O.textContent.length}for(var z=l.previousSibling,X=r;z;z=z.previousSibling){if(m=v(z,z.firstChild,-1),m)return zi(M(m.line,m.ch+X),i);X+=z.textContent.length}}var Pn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};Pn.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),Oe&&(i.style.width="0px"),A(i,"input",function(){p&&P>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),A(i,"paste",function(a){ut(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!ut(n,a)){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=$l(n);Wo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,ie):(r.prevInput="",i.value=l.text.join(`
`),je(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}A(i,"cut",o),A(i,"copy",o),A(e.scroller,"paste",function(a){if(!($r(e,a)||ut(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)}}),A(e.lineSpace,"selectstart",function(a){$r(e,a)||gt(a)}),A(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"})}}),A(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Pn.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},Pn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Pn.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},Pn.prototype.showSelection=function(e){var t=this.cm,r=t.display;F(r.cursorDiv,e.cursors),F(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Pn.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&&je(this.textarea),p&&P>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",p&&P>=9&&(this.hasSelection=null))}},Pn.prototype.getField=function(){return this.textarea},Pn.prototype.supportsTouch=function(){return!1},Pn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ke||Se()!=this.textarea))try{this.textarea.focus()}catch(e){}},Pn.prototype.blur=function(){this.textarea.blur()},Pn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Pn.prototype.receivedFocus=function(){this.slowPoll()},Pn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Pn.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)},Pn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||hn(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(p&&P>=9&&this.hasSelection===i||nt&&/[\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},Pn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Pn.prototype.onKeyPress=function(){p&&P>=9&&(this.hasSelection=null),this.fastPoll()},Pn.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&&_n(r,tr)(r.doc,ti(o),ie);var s=i.style.cssText,u=t.wrapper.style.cssText,v=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-v.top-5)+"px; left: "+(e.clientX-v.left-5)+`px;
z-index: 1000; background: `+(p?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;D&&(m=window.scrollY),n.input.focus(),D&&window.scrollTo(null,m),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=w,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function O(){if(i.selectionStart!=null){var X=r.somethingSelected(),pe="\u200B"+(X?i.value:"");i.value="\u21DA",i.value=pe,t.prevInput=X?"":"\u200B",i.selectionStart=1,i.selectionEnd=pe.length,n.selForContextMenu=r.doc.sel}}function w(){if(t.contextMenuPending==w&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,p&&P<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!p||p&&P<9)&&O();var X=0,pe=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?_n(r,il)(r):X++<10?n.detectingSelectAll=setTimeout(pe,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(pe,200)}}if(p&&P>=9&&O(),S){pn(e);var z=function(){ht(window,"mouseup",z),setTimeout(w,20)};A(window,"mouseup",z)}else setTimeout(w,50)},Pn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Pn.prototype.setUneditable=function(){},Pn.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?B(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=Se();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(A(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&&(ht(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=In(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=ht,e.on=A,e.wheelEventPixels=us,e.Doc=fr,e.splitLines=mn,e.countColumn=k,e.findColumn=yt,e.isWordChar=G,e.Pass=ze,e.signal=He,e.Line=qn,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=M,e.cmpPos=K,e.modes=Xn,e.mimeModes=An,e.resolveMode=Vt,e.getMode=rt,e.modeExtensions=Mt,e.extendMode=g,e.copyState=T,e.startState=h,e.innerMode=j,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=gt,e.e_stopPropagation=Yt,e.e_stop=pn,e.addClass=at,e.contains=Pe,e.rmClass=b,e.keyNames=oi}Gs(In),Qs(In);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Zo in fr.prototype)fr.prototype.hasOwnProperty(Zo)&&te(ru,Zo)<0&&(In.prototype[Zo]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[Zo]));return an(fr),In.inputStyles={textarea:Pn,contenteditable:yn},In.defineMode=function(e){!In.defaults.mode&&e!="null"&&(In.defaults.mode=e),Or.apply(this,arguments)},In.defineMIME=lr,In.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),In.defineMIME("text/plain","null"),In.defineExtension=function(e,t){In.prototype[e]=t},In.defineDocExtension=function(e,t){fr.prototype[e]=t},In.fromTextArea=tu,nu(In),In.version="5.58.2",In})},93681:function(on,Ee,f){"use strict";f.r(Ee),f.d(Ee,{BaseInput:function(){return y},default:function(){return et}});var E=f(5891),q=f(57259),C=f(80962),_=f(80665),p=f(92310),P=f.n(p),D=f(59301),ye=f(5643),ne=function(Z){var S,c,b=Z.inputElement,I=Z.prefixCls,F=Z.prefix,R=Z.suffix,be=Z.addonBefore,$e=Z.addonAfter,Pe=Z.className,Se=Z.style,at=Z.disabled,Ge=Z.readOnly,je=Z.focused,le=Z.triggerFocus,B=Z.allowClear,k=Z.value,ee=Z.handleReset,te=Z.hidden,_e=Z.classes,ze=Z.classNames,ie=Z.dataAttrs,Te=Z.styles,ce=Z.components,yt=(ce==null?void 0:ce.affixWrapper)||"span",Dt=(ce==null?void 0:ce.groupWrapper)||"span",bt=(ce==null?void 0:ce.wrapper)||"span",Je=(ce==null?void 0:ce.groupAddon)||"span",Et=(0,D.useRef)(null),lt=function(Ie){var me;(me=Et.current)!==null&&me!==void 0&&me.contains(Ie.target)&&(le==null||le())},Ht=function(){var Ie;if(!B)return null;var me=!at&&!Ge&&k,Ke="".concat(I,"-clear-icon"),we=(0,_.Z)(B)==="object"&&B!==null&&B!==void 0&&B.clearIcon?B.clearIcon:"\u2716";return D.createElement("span",{onClick:ee,onMouseDown:function(A){return A.preventDefault()},className:P()(Ke,(Ie={},(0,C.Z)(Ie,"".concat(Ke,"-hidden"),!me),(0,C.Z)(Ie,"".concat(Ke,"-has-suffix"),!!R),Ie)),role:"button",tabIndex:-1},we)},$=(0,D.cloneElement)(b,{value:k,hidden:te,className:P()((S=b.props)===null||S===void 0?void 0:S.className,!(0,ye.X3)(Z)&&!(0,ye.He)(Z)&&Pe)||null,style:(0,q.Z)((0,q.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,ye.X3)(Z)&&!(0,ye.He)(Z)?Se:{})});if((0,ye.X3)(Z)){var ve,G="".concat(I,"-affix-wrapper"),Q=P()(G,(ve={},(0,C.Z)(ve,"".concat(G,"-disabled"),at),(0,C.Z)(ve,"".concat(G,"-focused"),je),(0,C.Z)(ve,"".concat(G,"-readonly"),Ge),(0,C.Z)(ve,"".concat(G,"-input-with-clear-btn"),R&&B&&k),ve),!(0,ye.He)(Z)&&Pe,_e==null?void 0:_e.affixWrapper,ze==null?void 0:ze.affixWrapper),se=(R||B)&&D.createElement("span",{className:P()("".concat(I,"-suffix"),ze==null?void 0:ze.suffix),style:Te==null?void 0:Te.suffix},Ht(),R);$=D.createElement(yt,(0,E.Z)({className:Q,style:(0,q.Z)((0,q.Z)({},(0,ye.He)(Z)?void 0:Se),Te==null?void 0:Te.affixWrapper),hidden:!(0,ye.He)(Z)&&te,onClick:lt},ie==null?void 0:ie.affixWrapper,{ref:Et}),F&&D.createElement("span",{className:P()("".concat(I,"-prefix"),ze==null?void 0:ze.prefix),style:Te==null?void 0:Te.prefix},F),(0,D.cloneElement)(b,{value:k,hidden:null}),se)}if((0,ye.He)(Z)){var xe="".concat(I,"-group"),ge="".concat(xe,"-addon"),oe=P()("".concat(I,"-wrapper"),xe,_e==null?void 0:_e.wrapper),fe=P()("".concat(I,"-group-wrapper"),Pe,_e==null?void 0:_e.group);return D.createElement(Dt,{className:fe,style:Se,hidden:te},D.createElement(bt,{className:oe},be&&D.createElement(Je,{className:ge},be),(0,D.cloneElement)($,{hidden:null}),$e&&D.createElement(Je,{className:ge},$e)))}return $},y=ne,Ce=f(26390),N=f(29043),he=f(19149),Oe=f(35788),V=f(64002),ke=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],nt=(0,D.forwardRef)(function(U,Z){var S=U.autoComplete,c=U.onChange,b=U.onFocus,I=U.onBlur,F=U.onPressEnter,R=U.onKeyDown,be=U.prefixCls,$e=be===void 0?"rc-input":be,Pe=U.disabled,Se=U.htmlSize,at=U.className,Ge=U.maxLength,je=U.suffix,le=U.showCount,B=U.type,k=B===void 0?"text":B,ee=U.classes,te=U.classNames,_e=U.styles,ze=(0,he.Z)(U,ke),ie=(0,Oe.Z)(U.defaultValue,{value:U.value}),Te=(0,N.Z)(ie,2),ce=Te[0],yt=Te[1],Dt=(0,D.useState)(!1),bt=(0,N.Z)(Dt,2),Je=bt[0],Et=bt[1],lt=(0,D.useRef)(null),Ht=function(fe){lt.current&&(0,ye.nH)(lt.current,fe)};(0,D.useImperativeHandle)(Z,function(){return{focus:Ht,blur:function(){var fe;(fe=lt.current)===null||fe===void 0||fe.blur()},setSelectionRange:function(fe,We,Ie){var me;(me=lt.current)===null||me===void 0||me.setSelectionRange(fe,We,Ie)},select:function(){var fe;(fe=lt.current)===null||fe===void 0||fe.select()},input:lt.current}}),(0,D.useEffect)(function(){Et(function(oe){return oe&&Pe?!1:oe})},[Pe]);var $=function(fe){U.value===void 0&&yt(fe.target.value),lt.current&&(0,ye.rJ)(lt.current,fe,c)},ve=function(fe){F&&fe.key==="Enter"&&F(fe),R==null||R(fe)},G=function(fe){Et(!0),b==null||b(fe)},Q=function(fe){Et(!1),I==null||I(fe)},se=function(fe){yt(""),Ht(),lt.current&&(0,ye.rJ)(lt.current,fe,c)},xe=function(){var fe=(0,V.Z)(U,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return D.createElement("input",(0,E.Z)({autoComplete:S},fe,{onChange:$,onFocus:G,onBlur:Q,onKeyDown:ve,className:P()($e,(0,C.Z)({},"".concat($e,"-disabled"),Pe),te==null?void 0:te.input),style:_e==null?void 0:_e.input,ref:lt,size:Se,type:k}))},ge=function(){var fe=Number(Ge)>0;if(je||le){var We=(0,ye.D7)(ce),Ie=(0,Ce.Z)(We).length,me=(0,_.Z)(le)==="object"?le.formatter({value:We,count:Ie,maxLength:Ge}):"".concat(Ie).concat(fe?" / ".concat(Ge):"");return D.createElement(D.Fragment,null,!!le&&D.createElement("span",{className:P()("".concat($e,"-show-count-suffix"),(0,C.Z)({},"".concat($e,"-show-count-has-suffix"),!!je),te==null?void 0:te.count),style:(0,q.Z)({},_e==null?void 0:_e.count)},me),je)}return null};return D.createElement(y,(0,E.Z)({},ze,{prefixCls:$e,className:at,inputElement:xe(),handleReset:se,value:(0,ye.D7)(ce),focused:Je,triggerFocus:Ht,suffix:ge(),disabled:Pe,classes:ee,classNames:te,styles:_e}))}),Ze=nt,et=Ze},5643:function(on,Ee,f){"use strict";f.d(Ee,{D7:function(){return p},He:function(){return E},X3:function(){return q},nH:function(){return _},rJ:function(){return C}});function E(P){return!!(P.addonBefore||P.addonAfter)}function q(P){return!!(P.prefix||P.suffix||P.allowClear)}function C(P,D,ye,ne){if(ye){var y=D;if(D.type==="click"){var Ce=P.cloneNode(!0);y=Object.create(D,{target:{value:Ce},currentTarget:{value:Ce}}),Ce.value="",ye(y);return}if(ne!==void 0){y=Object.create(D,{target:{value:P},currentTarget:{value:P}}),P.value=ne,ye(y);return}ye(y)}}function _(P,D){if(P){P.focus(D);var ye=D||{},ne=ye.cursor;if(ne){var y=P.value.length;switch(ne){case"start":P.setSelectionRange(0,0);break;case"end":P.setSelectionRange(y,y);break;default:P.setSelectionRange(0,y)}}}}function p(P){return typeof P=="undefined"||P===null?"":String(P)}},11780:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return le}});var E=f(5891),q=f(57259),C=f(29043),_=f(19149),p=f(59301),P=f(92310),D=f.n(P),ye=f(29301),ne=f(28800),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ce=void 0;function N(B,k){var ee=B.prefixCls,te=B.invalidate,_e=B.item,ze=B.renderItem,ie=B.responsive,Te=B.responsiveDisabled,ce=B.registerSize,yt=B.itemKey,Dt=B.className,bt=B.style,Je=B.children,Et=B.display,lt=B.order,Ht=B.component,$=Ht===void 0?"div":Ht,ve=(0,_.Z)(B,y),G=ie&&!Et;function Q(fe){ce(yt,fe)}p.useEffect(function(){return function(){Q(null)}},[]);var se=ze&&_e!==Ce?ze(_e,{index:lt}):Je,xe;te||(xe={opacity:G?0:1,height:G?0:Ce,overflowY:G?"hidden":Ce,order:ie?lt:Ce,pointerEvents:G?"none":Ce,position:G?"absolute":Ce});var ge={};G&&(ge["aria-hidden"]=!0);var oe=p.createElement($,(0,E.Z)({className:D()(!te&&ee,Dt),style:(0,q.Z)((0,q.Z)({},xe),bt)},ge,ve,{ref:k}),se);return ie&&(oe=p.createElement(ye.Z,{onResize:function(We){var Ie=We.offsetWidth;Q(Ie)},disabled:Te},oe)),oe}var he=p.forwardRef(N);he.displayName="Item";var Oe=he,V=f(8107),ke=f(4676),nt=f(23073);function Ze(B){if(typeof MessageChannel=="undefined")(0,nt.Z)(B);else{var k=new MessageChannel;k.port1.onmessage=function(){return B()},k.port2.postMessage(void 0)}}function et(){var B=p.useRef(null),k=function(te){B.current||(B.current=[],Ze(function(){(0,ke.unstable_batchedUpdates)(function(){B.current.forEach(function(_e){_e()}),B.current=null})})),B.current.push(te)};return k}function U(B,k){var ee=p.useState(k),te=(0,C.Z)(ee,2),_e=te[0],ze=te[1],ie=(0,V.Z)(function(Te){B(function(){ze(Te)})});return[_e,ie]}var Z=p.createContext(null),S=["component"],c=["className"],b=["className"],I=function(k,ee){var te=p.useContext(Z);if(!te){var _e=k.component,ze=_e===void 0?"div":_e,ie=(0,_.Z)(k,S);return p.createElement(ze,(0,E.Z)({},ie,{ref:ee}))}var Te=te.className,ce=(0,_.Z)(te,c),yt=k.className,Dt=(0,_.Z)(k,b);return p.createElement(Z.Provider,{value:null},p.createElement(Oe,(0,E.Z)({ref:ee,className:D()(Te,yt)},ce,Dt)))},F=p.forwardRef(I);F.displayName="RawItem";var R=F,be=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],$e="responsive",Pe="invalidate";function Se(B){return"+ ".concat(B.length," ...")}function at(B,k){var ee=B.prefixCls,te=ee===void 0?"rc-overflow":ee,_e=B.data,ze=_e===void 0?[]:_e,ie=B.renderItem,Te=B.renderRawItem,ce=B.itemKey,yt=B.itemWidth,Dt=yt===void 0?10:yt,bt=B.ssr,Je=B.style,Et=B.className,lt=B.maxCount,Ht=B.renderRest,$=B.renderRawRest,ve=B.suffix,G=B.component,Q=G===void 0?"div":G,se=B.itemComponent,xe=B.onVisibleChange,ge=(0,_.Z)(B,be),oe=bt==="full",fe=et(),We=U(fe,null),Ie=(0,C.Z)(We,2),me=Ie[0],Ke=Ie[1],we=me||0,tt=U(fe,new Map),A=(0,C.Z)(tt,2),Qe=A[0],ht=A[1],He=U(fe,0),ut=(0,C.Z)(He,2),Pt=ut[0],Gt=ut[1],an=U(fe,0),gt=(0,C.Z)(an,2),Yt=gt[0],zt=gt[1],pn=U(fe,0),un=(0,C.Z)(pn,2),bn=un[0],Nn=un[1],gn=(0,p.useState)(null),Bn=(0,C.Z)(gn,2),dn=Bn[0],Wn=Bn[1],mn=(0,p.useState)(null),hn=(0,C.Z)(mn,2),Ln=hn[0],en=hn[1],Sn=p.useMemo(function(){return Ln===null&&oe?Number.MAX_SAFE_INTEGER:Ln||0},[Ln,me]),Xn=(0,p.useState)(!1),An=(0,C.Z)(Xn,2),Or=An[0],lr=An[1],Vt="".concat(te,"-item"),rt=Math.max(Pt,Yt),Mt=lt===$e,g=ze.length&&Mt,T=lt===Pe,j=g||typeof lt=="number"&&ze.length>lt,h=(0,p.useMemo)(function(){var ae=ze;return g?me===null&&oe?ae=ze:ae=ze.slice(0,Math.min(ze.length,we/Dt)):typeof lt=="number"&&(ae=ze.slice(0,lt)),ae},[ze,Dt,me,lt,g]),d=(0,p.useMemo)(function(){return g?ze.slice(Sn+1):ze.slice(h.length)},[ze,h,g,Sn]),x=(0,p.useCallback)(function(ae,Me){var Xe;return typeof ce=="function"?ce(ae):(Xe=ce&&(ae==null?void 0:ae[ce]))!==null&&Xe!==void 0?Xe:Me},[ce]),L=(0,p.useCallback)(ie||function(ae){return ae},[ie]);function Y(ae,Me,Xe){Ln===ae&&(Me===void 0||Me===dn)||(en(ae),Xe||(lr(ae<ze.length-1),xe==null||xe(ae)),Me!==void 0&&Wn(Me))}function H(ae,Me){Ke(Me.clientWidth)}function W(ae,Me){ht(function(Xe){var qe=new Map(Xe);return Me===null?qe.delete(ae):qe.set(ae,Me),qe})}function re(ae,Me){zt(Me),Gt(Yt)}function de(ae,Me){Nn(Me)}function Fe(ae){return Qe.get(x(h[ae],ae))}(0,ne.Z)(function(){if(we&&typeof rt=="number"&&h){var ae=bn,Me=h.length,Xe=Me-1;if(!Me){Y(0,null);return}for(var qe=0;qe<Me;qe+=1){var st=Fe(qe);if(oe&&(st=st||0),st===void 0){Y(qe-1,void 0,!0);break}if(ae+=st,Xe===0&&ae<=we||qe===Xe-1&&ae+Fe(Xe)<=we){Y(Xe,null);break}else if(ae+rt>we){Y(qe-1,ae-st-bn+Yt);break}}ve&&Fe(0)+bn>we&&Wn(null)}},[we,Qe,Yt,bn,x,h]);var M=Or&&!!d.length,K={};dn!==null&&g&&(K={position:"absolute",left:dn,top:0});var Be={prefixCls:Vt,responsive:g,component:se,invalidate:T},ue=Te?function(ae,Me){var Xe=x(ae,Me);return p.createElement(Z.Provider,{key:Xe,value:(0,q.Z)((0,q.Z)({},Be),{},{order:Me,item:ae,itemKey:Xe,registerSize:W,display:Me<=Sn})},Te(ae,Me))}:function(ae,Me){var Xe=x(ae,Me);return p.createElement(Oe,(0,E.Z)({},Be,{order:Me,key:Xe,item:ae,renderItem:L,itemKey:Xe,registerSize:W,display:Me<=Sn}))},Ne={order:M?Sn:Number.MAX_SAFE_INTEGER,className:"".concat(Vt,"-rest"),registerSize:re,display:M},De=Ht||Se,ft=$?p.createElement(Z.Provider,{value:(0,q.Z)((0,q.Z)({},Be),Ne)},$(d)):p.createElement(Oe,(0,E.Z)({},Be,Ne),typeof De=="function"?De(d):De),J=p.createElement(Q,(0,E.Z)({className:D()(!T&&te,Et),style:Je,ref:k},ge),h.map(ue),j?ft:null,ve&&p.createElement(Oe,(0,E.Z)({},Be,{responsive:Mt,responsiveDisabled:!g,order:Sn,className:"".concat(Vt,"-suffix"),registerSize:de,display:!0,style:K}),ve));return Mt?p.createElement(ye.Z,{onResize:H,disabled:!g},J):J}var Ge=p.forwardRef(at);Ge.displayName="Overflow",Ge.Item=R,Ge.RESPONSIVE=$e,Ge.INVALIDATE=Pe;var je=Ge,le=je},17115:function(on,Ee,f){"use strict";f.d(Ee,{ZP:function(){return D}});var E=f(29043),q=f(59301),C=f(87746),_=0,p=(0,C.Z)();function P(){var ye;return p?(ye=_,_+=1):ye="TEST_OR_SSR",ye}function D(ye){var ne=q.useState(),y=(0,E.Z)(ne,2),Ce=y[0],N=y[1];return q.useEffect(function(){N("rc_select_".concat(P()))},[]),ye||Ce}},77861:function(on,Ee,f){"use strict";f.d(Ee,{Ac:function(){return Ke},Xo:function(){return zt},Wx:function(){return un},ZP:function(){return j},lk:function(){return Z}});var E=f(5891),q=f(26390),C=f(80962),_=f(57259),p=f(29043),P=f(19149),D=f(80665),ye=f(35788),ne=f(51395),y=f(59301),Ce=f(92310),N=f.n(Ce),he=f(28800),Oe=f(93144),V=f(85108),ke=f(20475),nt=function(d){var x=d.className,L=d.customizeIcon,Y=d.customizeIconProps,H=d.onMouseDown,W=d.onClick,re=d.children,de;return typeof L=="function"?de=L(Y):de=L,y.createElement("span",{className:x,onMouseDown:function(M){M.preventDefault(),H&&H(M)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:W,"aria-hidden":!0},de!==void 0?de:y.createElement("span",{className:N()(x.split(/\s+/).map(function(Fe){return"".concat(Fe,"-icon")}))},re))},Ze=nt;function et(h,d,x,L,Y){var H=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,W=arguments.length>6?arguments[6]:void 0,re=arguments.length>7?arguments[7]:void 0,de=y.useMemo(function(){if((0,D.Z)(L)==="object")return L.clearIcon;if(Y)return Y},[L,Y]),Fe=y.useMemo(function(){return!!(!H&&L&&(x.length||W)&&!(re==="combobox"&&W===""))},[L,H,x.length,W,re]);return{allowClear:Fe,clearIcon:y.createElement(Ze,{className:"".concat(h,"-clear"),onMouseDown:d,customizeIcon:de},"\xD7")}}var U=y.createContext(null);function Z(){return y.useContext(U)}function S(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,d=y.useState(!1),x=(0,p.Z)(d,2),L=x[0],Y=x[1],H=y.useRef(null),W=function(){window.clearTimeout(H.current)};y.useEffect(function(){return W},[]);var re=function(Fe,M){W(),H.current=window.setTimeout(function(){Y(Fe),M&&M()},h)};return[L,re,W]}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,d=y.useRef(null),x=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(x.current)}},[]);function L(Y){(Y||d.current===null)&&(d.current=Y),window.clearTimeout(x.current),x.current=window.setTimeout(function(){d.current=null},h)}return[function(){return d.current},L]}function b(h,d,x,L){var Y=y.useRef(null);Y.current={open:d,triggerOpen:x,customizedTrigger:L},y.useEffect(function(){function H(W){var re;if(!((re=Y.current)!==null&&re!==void 0&&re.customizedTrigger)){var de=W.target;de.shadowRoot&&W.composed&&(de=W.composedPath()[0]||de),Y.current.open&&h().filter(function(Fe){return Fe}).every(function(Fe){return!Fe.contains(de)&&Fe!==de})&&Y.current.triggerOpen(!1)}}return window.addEventListener("mousedown",H),function(){return window.removeEventListener("mousedown",H)}},[])}var I=f(36994),F=f(11780),R=function(d,x){var L,Y,H=d.prefixCls,W=d.id,re=d.inputElement,de=d.disabled,Fe=d.tabIndex,M=d.autoFocus,K=d.autoComplete,Be=d.editable,ue=d.activeDescendantId,Ne=d.value,De=d.maxLength,ft=d.onKeyDown,J=d.onMouseDown,ae=d.onChange,Me=d.onPaste,Xe=d.onCompositionStart,qe=d.onCompositionEnd,st=d.open,Ut=d.attrs,Rt=re||y.createElement("input",null),Wt=Rt,$t=Wt.ref,Ct=Wt.props,tn=Ct.onKeyDown,Jt=Ct.onChange,Zt=Ct.onMouseDown,Xt=Ct.onCompositionStart,Nt=Ct.onCompositionEnd,xt=Ct.style;return(0,ne.Kp)(!("maxLength"in Rt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Rt=y.cloneElement(Rt,(0,_.Z)((0,_.Z)((0,_.Z)({type:"search"},Ct),{},{id:W,ref:(0,ke.sQ)(x,$t),disabled:de,tabIndex:Fe,autoComplete:K||"off",autoFocus:M,className:N()("".concat(H,"-selection-search-input"),(L=Rt)===null||L===void 0||(Y=L.props)===null||Y===void 0?void 0:Y.className),role:"combobox","aria-label":"Search","aria-expanded":st||!1,"aria-haspopup":"listbox","aria-owns":"".concat(W,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(W,"_list"),"aria-activedescendant":st?ue:void 0},Ut),{},{value:Be?Ne:"",maxLength:De,readOnly:!Be,unselectable:Be?null:"on",style:(0,_.Z)((0,_.Z)({},xt),{},{opacity:Be?null:0}),onKeyDown:function(wt){ft(wt),tn&&tn(wt)},onMouseDown:function(wt){J(wt),Zt&&Zt(wt)},onChange:function(wt){ae(wt),Jt&&Jt(wt)},onCompositionStart:function(wt){Xe(wt),Xt&&Xt(wt)},onCompositionEnd:function(wt){qe(wt),Nt&&Nt(wt)},onPaste:Me})),Rt},be=y.forwardRef(R);be.displayName="Input";var $e=be;function Pe(h){return Array.isArray(h)?h:h!==void 0?[h]:[]}var Se=typeof window!="undefined"&&window.document&&window.document.documentElement,at=Se;function Ge(h){return h!=null}function je(h){return!h&&h!==0}function le(h){return["string","number"].includes((0,D.Z)(h))}function B(h){var d=void 0;return h&&(le(h.title)?d=h.title.toString():le(h.label)&&(d=h.label.toString())),d}function k(h,d){at?y.useLayoutEffect(h,d):y.useEffect(h,d)}function ee(h){var d;return(d=h.key)!==null&&d!==void 0?d:h.value}var te=function(d){d.preventDefault(),d.stopPropagation()},_e=function(d){var x=d.id,L=d.prefixCls,Y=d.values,H=d.open,W=d.searchValue,re=d.autoClearSearchValue,de=d.inputRef,Fe=d.placeholder,M=d.disabled,K=d.mode,Be=d.showSearch,ue=d.autoFocus,Ne=d.autoComplete,De=d.activeDescendantId,ft=d.tabIndex,J=d.removeIcon,ae=d.maxTagCount,Me=d.maxTagTextLength,Xe=d.maxTagPlaceholder,qe=Xe===void 0?function(At){return"+ ".concat(At.length," ...")}:Xe,st=d.tagRender,Ut=d.onToggleOpen,Rt=d.onRemove,Wt=d.onInputChange,$t=d.onInputPaste,Ct=d.onInputKeyDown,tn=d.onInputMouseDown,Jt=d.onInputCompositionStart,Zt=d.onInputCompositionEnd,Xt=y.useRef(null),Nt=(0,y.useState)(0),xt=(0,p.Z)(Nt,2),Bt=xt[0],wt=xt[1],vn=(0,y.useState)(!1),Lt=(0,p.Z)(vn,2),kt=Lt[0],sn=Lt[1],jt="".concat(L,"-selection"),Mn=H||K==="multiple"&&re===!1||K==="tags"?W:"",Kn=K==="tags"||K==="multiple"&&re===!1||Be&&(H||kt);k(function(){wt(Xt.current.scrollWidth)},[Mn]);function Ot(At,ln,cn,On,Ve){return y.createElement("span",{className:N()("".concat(jt,"-item"),(0,C.Z)({},"".concat(jt,"-item-disabled"),cn)),title:B(At)},y.createElement("span",{className:"".concat(jt,"-item-content")},ln),On&&y.createElement(Ze,{className:"".concat(jt,"-item-remove"),onMouseDown:te,onClick:Ve,customizeIcon:J},"\xD7"))}function it(At,ln,cn,On,Ve){var Ae=function(Ft){te(Ft),Ut(!H)};return y.createElement("span",{onMouseDown:Ae},st({label:ln,value:At,disabled:cn,closable:On,onClose:Ve}))}function dt(At){var ln=At.disabled,cn=At.label,On=At.value,Ve=!M&&!ln,Ae=cn;if(typeof Me=="number"&&(typeof cn=="string"||typeof cn=="number")){var pt=String(Ae);pt.length>Me&&(Ae="".concat(pt.slice(0,Me),"..."))}var Ft=function(rr){rr&&rr.stopPropagation(),Rt(At)};return typeof st=="function"?it(On,Ae,ln,Ve,Ft):Ot(At,Ae,ln,Ve,Ft)}function nn(At){var ln=typeof qe=="function"?qe(At):qe;return Ot({title:ln},ln,!1)}var rn=y.createElement("div",{className:"".concat(jt,"-search"),style:{width:Bt},onFocus:function(){sn(!0)},onBlur:function(){sn(!1)}},y.createElement($e,{ref:de,open:H,prefixCls:L,id:x,inputElement:null,disabled:M,autoFocus:ue,autoComplete:Ne,editable:Kn,activeDescendantId:De,value:Mn,onKeyDown:Ct,onMouseDown:tn,onChange:Wt,onPaste:$t,onCompositionStart:Jt,onCompositionEnd:Zt,tabIndex:ft,attrs:(0,I.Z)(d,!0)}),y.createElement("span",{ref:Xt,className:"".concat(jt,"-search-mirror"),"aria-hidden":!0},Mn,"\xA0")),Qt=y.createElement(F.Z,{prefixCls:"".concat(jt,"-overflow"),data:Y,renderItem:dt,renderRest:nn,suffix:rn,itemKey:ee,maxCount:ae});return y.createElement(y.Fragment,null,Qt,!Y.length&&!Mn&&y.createElement("span",{className:"".concat(jt,"-placeholder")},Fe))},ze=_e,ie=function(d){var x=d.inputElement,L=d.prefixCls,Y=d.id,H=d.inputRef,W=d.disabled,re=d.autoFocus,de=d.autoComplete,Fe=d.activeDescendantId,M=d.mode,K=d.open,Be=d.values,ue=d.placeholder,Ne=d.tabIndex,De=d.showSearch,ft=d.searchValue,J=d.activeValue,ae=d.maxLength,Me=d.onInputKeyDown,Xe=d.onInputMouseDown,qe=d.onInputChange,st=d.onInputPaste,Ut=d.onInputCompositionStart,Rt=d.onInputCompositionEnd,Wt=d.title,$t=y.useState(!1),Ct=(0,p.Z)($t,2),tn=Ct[0],Jt=Ct[1],Zt=M==="combobox",Xt=Zt||De,Nt=Be[0],xt=ft||"";Zt&&J&&!tn&&(xt=J),y.useEffect(function(){Zt&&Jt(!1)},[Zt,J]);var Bt=M!=="combobox"&&!K&&!De?!1:!!xt,wt=Wt===void 0?B(Nt):Wt,vn=function(){if(Nt)return null;var kt=Bt?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(L,"-selection-placeholder"),style:kt},ue)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(L,"-selection-search")},y.createElement($e,{ref:H,prefixCls:L,id:Y,open:K,inputElement:x,disabled:W,autoFocus:re,autoComplete:de,editable:Xt,activeDescendantId:Fe,value:xt,onKeyDown:Me,onMouseDown:Xe,onChange:function(kt){Jt(!0),qe(kt)},onPaste:st,onCompositionStart:Ut,onCompositionEnd:Rt,tabIndex:Ne,attrs:(0,I.Z)(d,!0),maxLength:Zt?ae:void 0})),!Zt&&Nt?y.createElement("span",{className:"".concat(L,"-selection-item"),title:wt,style:Bt?{visibility:"hidden"}:void 0},Nt.label):null,vn())},Te=ie;function ce(h){return![V.Z.ESC,V.Z.SHIFT,V.Z.BACKSPACE,V.Z.TAB,V.Z.WIN_KEY,V.Z.ALT,V.Z.META,V.Z.WIN_KEY_RIGHT,V.Z.CTRL,V.Z.SEMICOLON,V.Z.EQUALS,V.Z.CAPS_LOCK,V.Z.CONTEXT_MENU,V.Z.F1,V.Z.F2,V.Z.F3,V.Z.F4,V.Z.F5,V.Z.F6,V.Z.F7,V.Z.F8,V.Z.F9,V.Z.F10,V.Z.F11,V.Z.F12].includes(h)}var yt=function(d,x){var L=(0,y.useRef)(null),Y=(0,y.useRef)(!1),H=d.prefixCls,W=d.open,re=d.mode,de=d.showSearch,Fe=d.tokenWithEnter,M=d.autoClearSearchValue,K=d.onSearch,Be=d.onSearchSubmit,ue=d.onToggleOpen,Ne=d.onInputKeyDown,De=d.domRef;y.useImperativeHandle(x,function(){return{focus:function(){L.current.focus()},blur:function(){L.current.blur()}}});var ft=c(0),J=(0,p.Z)(ft,2),ae=J[0],Me=J[1],Xe=function(xt){var Bt=xt.which;(Bt===V.Z.UP||Bt===V.Z.DOWN)&&xt.preventDefault(),Ne&&Ne(xt),Bt===V.Z.ENTER&&re==="tags"&&!Y.current&&!W&&(Be==null||Be(xt.target.value)),ce(Bt)&&ue(!0)},qe=function(){Me(!0)},st=(0,y.useRef)(null),Ut=function(xt){K(xt,!0,Y.current)!==!1&&ue(!0)},Rt=function(){Y.current=!0},Wt=function(xt){Y.current=!1,re!=="combobox"&&Ut(xt.target.value)},$t=function(xt){var Bt=xt.target.value;if(Fe&&st.current&&/[\r\n]/.test(st.current)){var wt=st.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Bt=Bt.replace(wt,st.current)}st.current=null,Ut(Bt)},Ct=function(xt){var Bt=xt.clipboardData,wt=Bt.getData("text");st.current=wt},tn=function(xt){var Bt=xt.target;if(Bt!==L.current){var wt=document.body.style.msTouchAction!==void 0;wt?setTimeout(function(){L.current.focus()}):L.current.focus()}},Jt=function(xt){var Bt=ae();xt.target!==L.current&&!Bt&&re!=="combobox"&&xt.preventDefault(),(re!=="combobox"&&(!de||!Bt)||!W)&&(W&&M!==!1&&K("",!0,!1),ue())},Zt={inputRef:L,onInputKeyDown:Xe,onInputMouseDown:qe,onInputChange:$t,onInputPaste:Ct,onInputCompositionStart:Rt,onInputCompositionEnd:Wt},Xt=re==="multiple"||re==="tags"?y.createElement(ze,(0,E.Z)({},d,Zt)):y.createElement(Te,(0,E.Z)({},d,Zt));return y.createElement("div",{ref:De,className:"".concat(H,"-selector"),onClick:tn,onMouseDown:Jt},Xt)},Dt=y.forwardRef(yt);Dt.displayName="Selector";var bt=Dt,Je=f(35593),Et=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],lt=function(d){var x=d===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:x,adjustY:1},htmlRegion:"scroll"}}},Ht=function(d,x){var L=d.prefixCls,Y=d.disabled,H=d.visible,W=d.children,re=d.popupElement,de=d.animation,Fe=d.transitionName,M=d.dropdownStyle,K=d.dropdownClassName,Be=d.direction,ue=Be===void 0?"ltr":Be,Ne=d.placement,De=d.builtinPlacements,ft=d.dropdownMatchSelectWidth,J=d.dropdownRender,ae=d.dropdownAlign,Me=d.getPopupContainer,Xe=d.empty,qe=d.getTriggerDOMNode,st=d.onPopupVisibleChange,Ut=d.onPopupMouseEnter,Rt=(0,P.Z)(d,Et),Wt="".concat(L,"-dropdown"),$t=re;J&&($t=J(re));var Ct=y.useMemo(function(){return De||lt(ft)},[De,ft]),tn=de?"".concat(Wt,"-").concat(de):Fe,Jt=typeof ft=="number",Zt=y.useMemo(function(){return Jt?null:ft===!1?"minWidth":"width"},[ft,Jt]),Xt=M;Jt&&(Xt=(0,_.Z)((0,_.Z)({},Xt),{},{width:ft}));var Nt=y.useRef(null);return y.useImperativeHandle(x,function(){return{getPopupElement:function(){return Nt.current}}}),y.createElement(Je.Z,(0,E.Z)({},Rt,{showAction:st?["click"]:[],hideAction:st?["click"]:[],popupPlacement:Ne||(ue==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ct,prefixCls:Wt,popupTransitionName:tn,popup:y.createElement("div",{ref:Nt,onMouseEnter:Ut},$t),stretch:Zt,popupAlign:ae,popupVisible:H,getPopupContainer:Me,popupClassName:N()(K,(0,C.Z)({},"".concat(Wt,"-empty"),Xe)),popupStyle:Xt,getTriggerDOMNode:qe,onPopupVisibleChange:st}),W)},$=y.forwardRef(Ht);$.displayName="SelectTrigger";var ve=$,G=f(17953);function Q(h,d){var x=h.key,L;return"value"in h&&(L=h.value),x!=null?x:L!==void 0?L:"rc-index-key-".concat(d)}function se(h,d){var x=h||{},L=x.label,Y=x.value,H=x.options,W=x.groupLabel,re=L||(d?"children":"label");return{label:re,value:Y||"value",options:H||"options",groupLabel:W||re}}function xe(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=d.fieldNames,L=d.childrenAsData,Y=[],H=se(x,!1),W=H.label,re=H.value,de=H.options,Fe=H.groupLabel;function M(K,Be){K.forEach(function(ue){if(Be||!(de in ue)){var Ne=ue[re];Y.push({key:Q(ue,Y.length),groupOption:Be,data:ue,label:ue[W],value:Ne})}else{var De=ue[Fe];De===void 0&&L&&(De=ue.label),Y.push({key:Q(ue,Y.length),group:!0,data:ue,label:De}),M(ue[de],!0)}})}return M(h,!1),Y}function ge(h){var d=(0,_.Z)({},h);return"props"in d||Object.defineProperty(d,"props",{get:function(){return(0,ne.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),d}}),d}function oe(h,d){if(!d||!d.length)return null;var x=!1;function L(H,W){var re=(0,G.Z)(W),de=re[0],Fe=re.slice(1);if(!de)return[H];var M=H.split(de);return x=x||M.length>1,M.reduce(function(K,Be){return[].concat((0,q.Z)(K),(0,q.Z)(L(Be,Fe)))},[]).filter(function(K){return K})}var Y=L(h,d);return x?Y:null}var fe=["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"],We=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Ie(h){return h==="tags"||h==="multiple"}var me=y.forwardRef(function(h,d){var x,L,Y=h.id,H=h.prefixCls,W=h.className,re=h.showSearch,de=h.tagRender,Fe=h.direction,M=h.omitDomProps,K=h.displayValues,Be=h.onDisplayValuesChange,ue=h.emptyOptions,Ne=h.notFoundContent,De=Ne===void 0?"Not Found":Ne,ft=h.onClear,J=h.mode,ae=h.disabled,Me=h.loading,Xe=h.getInputElement,qe=h.getRawInputElement,st=h.open,Ut=h.defaultOpen,Rt=h.onDropdownVisibleChange,Wt=h.activeValue,$t=h.onActiveValueChange,Ct=h.activeDescendantId,tn=h.searchValue,Jt=h.autoClearSearchValue,Zt=h.onSearch,Xt=h.onSearchSplit,Nt=h.tokenSeparators,xt=h.allowClear,Bt=h.suffixIcon,wt=h.clearIcon,vn=h.OptionList,Lt=h.animation,kt=h.transitionName,sn=h.dropdownStyle,jt=h.dropdownClassName,Mn=h.dropdownMatchSelectWidth,Kn=h.dropdownRender,Ot=h.dropdownAlign,it=h.placement,dt=h.builtinPlacements,nn=h.getPopupContainer,rn=h.showAction,Qt=rn===void 0?[]:rn,At=h.onFocus,ln=h.onBlur,cn=h.onKeyUp,On=h.onKeyDown,Ve=h.onMouseDown,Ae=(0,P.Z)(h,fe),pt=Ie(J),Ft=(re!==void 0?re:pt)||J==="combobox",It=(0,_.Z)({},Ae);We.forEach(function(qt){delete It[qt]}),M==null||M.forEach(function(qt){delete It[qt]});var rr=y.useState(!1),pr=(0,p.Z)(rr,2),gr=pr[0],Yn=pr[1];y.useEffect(function(){Yn((0,Oe.Z)())},[]);var Tn=y.useRef(null),Hn=y.useRef(null),Fn=y.useRef(null),sr=y.useRef(null),Qn=y.useRef(null),qn=S(),Kr=(0,p.Z)(qn,3),Xr=Kr[0],li=Kr[1],Yr=Kr[2];y.useImperativeHandle(d,function(){var qt,Kt;return{focus:(qt=sr.current)===null||qt===void 0?void 0:qt.focus,blur:(Kt=sr.current)===null||Kt===void 0?void 0:Kt.blur,scrollTo:function(er){var En;return(En=Qn.current)===null||En===void 0?void 0:En.scrollTo(er)}}});var Cr=y.useMemo(function(){var qt;if(J!=="combobox")return tn;var Kt=(qt=K[0])===null||qt===void 0?void 0:qt.value;return typeof Kt=="string"||typeof Kt=="number"?String(Kt):""},[tn,J,K]),Qr=J==="combobox"&&typeof Xe=="function"&&Xe()||null,Ir=typeof qe=="function"&&qe(),Zi=(0,ke.x1)(Hn,Ir==null||(x=Ir.props)===null||x===void 0?void 0:x.ref),Si=y.useState(!1),si=(0,p.Z)(Si,2),Ur=si[0],Ci=si[1];(0,he.Z)(function(){Ci(!0)},[]);var xi=(0,ye.Z)(!1,{defaultValue:Ut,value:st}),jr=(0,p.Z)(xi,2),Ar=jr[0],ui=jr[1],ct=Ur?Ar:!1,Tt=!De&&ue;(ae||Tt&&ct&&J==="combobox")&&(ct=!1);var mt=Tt?!1:ct,ot=y.useCallback(function(qt){var Kt=qt!==void 0?qt:!ct;ae||(ui(Kt),ct!==Kt&&(Rt==null||Rt(Kt)))},[ae,ct,ui,Rt]),Cn=y.useMemo(function(){return(Nt||[]).some(function(qt){return[`
`,`\r
`].includes(qt)})},[Nt]),xn=function(Kt,jn,er){var En=!0,ir=Kt;$t==null||$t(null);var mr=er?null:oe(Kt,Nt);return J!=="combobox"&&mr&&(ir="",Xt==null||Xt(mr),ot(!1),En=!1),Zt&&Cr!==ir&&Zt(ir,{source:jn?"typing":"effect"}),En},ur=function(Kt){!Kt||!Kt.trim()||Zt(Kt,{source:"submit"})};y.useEffect(function(){!ct&&!pt&&J!=="combobox"&&xn("",!1,!1)},[ct]),y.useEffect(function(){Ar&&ae&&ui(!1),ae&&li(!1)},[ae]);var Mr=c(),Fr=(0,p.Z)(Mr,2),Un=Fr[0],Rr=Fr[1],ci=function(Kt){var jn=Un(),er=Kt.which;if(er===V.Z.ENTER&&(J!=="combobox"&&Kt.preventDefault(),ct||ot(!0)),Rr(!!Cr),er===V.Z.BACKSPACE&&!jn&&pt&&!Cr&&K.length){for(var En=(0,q.Z)(K),ir=null,mr=En.length-1;mr>=0;mr-=1){var _r=En[mr];if(!_r.disabled){En.splice(mr,1),ir=_r;break}}ir&&Be(En,{type:"remove",values:[ir]})}for(var xr=arguments.length,kr=new Array(xr>1?xr-1:0),Nr=1;Nr<xr;Nr++)kr[Nr-1]=arguments[Nr];if(ct&&Qn.current){var yr;(yr=Qn.current).onKeyDown.apply(yr,[Kt].concat(kr))}On==null||On.apply(void 0,[Kt].concat(kr))},Bi=function(Kt){for(var jn=arguments.length,er=new Array(jn>1?jn-1:0),En=1;En<jn;En++)er[En-1]=arguments[En];if(ct&&Qn.current){var ir;(ir=Qn.current).onKeyUp.apply(ir,[Kt].concat(er))}cn==null||cn.apply(void 0,[Kt].concat(er))},mo=function(Kt){var jn=K.filter(function(er){return er!==Kt});Be(jn,{type:"remove",values:[Kt]})},Hr=y.useRef(!1),Lr=function(){li(!0),ae||(At&&!Hr.current&&At.apply(void 0,arguments),Qt.includes("focus")&&ot(!0)),Hr.current=!0},Bo=function(){li(!1,function(){Hr.current=!1,ot(!1)}),!ae&&(Cr&&(J==="tags"?Zt(Cr,{source:"submit"}):J==="multiple"&&Zt("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];y.useEffect(function(){return function(){Tr.forEach(function(qt){return clearTimeout(qt)}),Tr.splice(0,Tr.length)}},[]);var $r=function(Kt){var jn,er=Kt.target,En=(jn=Fn.current)===null||jn===void 0?void 0:jn.getPopupElement();if(En&&En.contains(er)){var ir=setTimeout(function(){var kr=Tr.indexOf(ir);if(kr!==-1&&Tr.splice(kr,1),Yr(),!gr&&!En.contains(document.activeElement)){var Nr;(Nr=sr.current)===null||Nr===void 0||Nr.focus()}});Tr.push(ir)}for(var mr=arguments.length,_r=new Array(mr>1?mr-1:0),xr=1;xr<mr;xr++)_r[xr-1]=arguments[xr];Ve==null||Ve.apply(void 0,[Kt].concat(_r))},wi=y.useState({}),Ki=(0,p.Z)(wi,2),yo=Ki[1];function Dr(){yo({})}var Zr;Ir&&(Zr=function(Kt){ot(Kt)}),b(function(){var qt;return[Tn.current,(qt=Fn.current)===null||qt===void 0?void 0:qt.getPopupElement()]},mt,ot,!!Ir);var Ui=y.useMemo(function(){return(0,_.Z)((0,_.Z)({},h),{},{notFoundContent:De,open:ct,triggerOpen:mt,id:Y,showSearch:Ft,multiple:pt,toggleOpen:ot})},[h,De,mt,ct,Y,Ft,pt,ot]),bo=!!Bt||Me,ji;bo&&(ji=y.createElement(Ze,{className:N()("".concat(H,"-arrow"),(0,C.Z)({},"".concat(H,"-arrow-loading"),Me)),customizeIcon:Bt,customizeIconProps:{loading:Me,searchValue:Cr,open:ct,focused:Xr,showSearch:Ft}}));var Ko=function(){var Kt;ft==null||ft(),(Kt=sr.current)===null||Kt===void 0||Kt.focus(),Be([],{type:"clear",values:K}),xn("",!1,!1)},_i=et(H,Ko,K,xt,wt,ae,Cr,J),ki=_i.allowClear,Jr=_i.clearIcon,Pr=y.createElement(vn,{ref:Qn}),So=N()(H,W,(L={},(0,C.Z)(L,"".concat(H,"-focused"),Xr),(0,C.Z)(L,"".concat(H,"-multiple"),pt),(0,C.Z)(L,"".concat(H,"-single"),!pt),(0,C.Z)(L,"".concat(H,"-allow-clear"),xt),(0,C.Z)(L,"".concat(H,"-show-arrow"),bo),(0,C.Z)(L,"".concat(H,"-disabled"),ae),(0,C.Z)(L,"".concat(H,"-loading"),Me),(0,C.Z)(L,"".concat(H,"-open"),ct),(0,C.Z)(L,"".concat(H,"-customize-input"),Qr),(0,C.Z)(L,"".concat(H,"-show-search"),Ft),L)),Gi=y.createElement(ve,{ref:Fn,disabled:ae,prefixCls:H,visible:mt,popupElement:Pr,animation:Lt,transitionName:kt,dropdownStyle:sn,dropdownClassName:jt,direction:Fe,dropdownMatchSelectWidth:Mn,dropdownRender:Kn,dropdownAlign:Ot,placement:it,builtinPlacements:dt,getPopupContainer:nn,empty:ue,getTriggerDOMNode:function(){return Hn.current},onPopupVisibleChange:Zr,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Zi}):y.createElement(bt,(0,E.Z)({},h,{domRef:Hn,prefixCls:H,inputElement:Qr,ref:sr,id:Y,showSearch:Ft,autoClearSearchValue:Jt,mode:J,activeDescendantId:Ct,tagRender:de,values:K,open:ct,onToggleOpen:ot,activeValue:Wt,searchValue:Cr,onSearch:xn,onSearchSubmit:ur,onRemove:mo,tokenWithEnter:Cn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,E.Z)({className:So},It,{ref:Tn,onMouseDown:$r,onKeyDown:ci,onKeyUp:Bi,onFocus:Lr,onBlur:Bo}),Xr&&!ct&&y.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(K.map(function(qt){var Kt=qt.label,jn=qt.value;return["number","string"].includes((0,D.Z)(Kt))?Kt:jn}).join(", "))),Gi,ji,ki&&Jr),y.createElement(U.Provider,{value:Ui},Vi)}),Ke=me,we=function(h,d){var x=y.useRef({values:new Map,options:new Map}),L=y.useMemo(function(){var H=x.current,W=H.values,re=H.options,de=h.map(function(K){if(K.label===void 0){var Be;return(0,_.Z)((0,_.Z)({},K),{},{label:(Be=W.get(K.value))===null||Be===void 0?void 0:Be.label})}return K}),Fe=new Map,M=new Map;return de.forEach(function(K){Fe.set(K.value,K),M.set(K.value,d.get(K.value)||re.get(K.value))}),x.current.values=Fe,x.current.options=M,de},[h,d]),Y=y.useCallback(function(H){return d.get(H)||x.current.options.get(H)},[d]);return[L,Y]};function tt(h,d){return Pe(h).join("").toUpperCase().includes(d)}var A=function(h,d,x,L,Y){return y.useMemo(function(){if(!x||L===!1)return h;var H=d.options,W=d.label,re=d.value,de=[],Fe=typeof L=="function",M=x.toUpperCase(),K=Fe?L:function(ue,Ne){return Y?tt(Ne[Y],M):Ne[H]?tt(Ne[W!=="children"?W:"label"],M):tt(Ne[re],M)},Be=Fe?function(ue){return ge(ue)}:function(ue){return ue};return h.forEach(function(ue){if(ue[H]){var Ne=K(x,Be(ue));if(Ne)de.push(ue);else{var De=ue[H].filter(function(ft){return K(x,Be(ft))});De.length&&de.push((0,_.Z)((0,_.Z)({},ue),{},(0,C.Z)({},H,De)))}return}K(x,Be(ue))&&de.push(ue)}),de},[h,L,Y,x,d])},Qe=f(17115),ht=f(38298),He=["children","value"],ut=["children"];function Pt(h){var d=h,x=d.key,L=d.props,Y=L.children,H=L.value,W=(0,P.Z)(L,He);return(0,_.Z)({key:x,value:H!==void 0?H:x,children:Y},W)}function Gt(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ht.Z)(h).map(function(x,L){if(!y.isValidElement(x)||!x.type)return null;var Y=x,H=Y.type.isSelectOptGroup,W=Y.key,re=Y.props,de=re.children,Fe=(0,P.Z)(re,ut);return d||!H?Pt(x):(0,_.Z)((0,_.Z)({key:"__RC_SELECT_GRP__".concat(W===null?L:W,"__"),label:W},Fe),{},{options:Gt(de)})}).filter(function(x){return x})}function an(h,d,x,L,Y){return y.useMemo(function(){var H=h,W=!h;W&&(H=Gt(d));var re=new Map,de=new Map,Fe=function(Be,ue,Ne){Ne&&typeof Ne=="string"&&Be.set(ue[Ne],ue)};function M(K){for(var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ue=0;ue<K.length;ue+=1){var Ne=K[ue];!Ne[x.options]||Be?(re.set(Ne[x.value],Ne),Fe(de,Ne,x.label),Fe(de,Ne,L),Fe(de,Ne,Y)):M(Ne[x.options],!0)}}return M(H),{options:H,valueOptions:re,labelOptions:de}},[h,d,x,L,Y])}function gt(h){var d=y.useRef();d.current=h;var x=y.useCallback(function(){return d.current.apply(d,arguments)},[]);return x}var Yt=function(){return null};Yt.isSelectOptGroup=!0;var zt=Yt,pn=function(){return null};pn.isSelectOption=!0;var un=pn,bn=f(79722),Nn=f(64002),gn=f(21881),Bn=y.createContext(null),dn=Bn;function Wn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var mn=["disabled","title","children","style","className"];function hn(h){return typeof h=="string"||typeof h=="number"}var Ln=function(d,x){var L=Z(),Y=L.prefixCls,H=L.id,W=L.open,re=L.multiple,de=L.mode,Fe=L.searchValue,M=L.toggleOpen,K=L.notFoundContent,Be=L.onPopupScroll,ue=y.useContext(dn),Ne=ue.flattenOptions,De=ue.onActiveValue,ft=ue.defaultActiveFirstOption,J=ue.onSelect,ae=ue.menuItemSelectedIcon,Me=ue.rawValues,Xe=ue.fieldNames,qe=ue.virtual,st=ue.direction,Ut=ue.listHeight,Rt=ue.listItemHeight,Wt="".concat(Y,"-item"),$t=(0,bn.Z)(function(){return Ne},[W,Ne],function(Ot,it){return it[0]&&Ot[1]!==it[1]}),Ct=y.useRef(null),tn=function(it){it.preventDefault()},Jt=function(it){Ct.current&&Ct.current.scrollTo(typeof it=="number"?{index:it}:it)},Zt=function(it){for(var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,nn=$t.length,rn=0;rn<nn;rn+=1){var Qt=(it+rn*dt+nn)%nn,At=$t[Qt],ln=At.group,cn=At.data;if(!ln&&!cn.disabled)return Qt}return-1},Xt=y.useState(function(){return Zt(0)}),Nt=(0,p.Z)(Xt,2),xt=Nt[0],Bt=Nt[1],wt=function(it){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Bt(it);var nn={source:dt?"keyboard":"mouse"},rn=$t[it];if(!rn){De(null,-1,nn);return}De(rn.value,it,nn)};(0,y.useEffect)(function(){wt(ft!==!1?Zt(0):-1)},[$t.length,Fe]);var vn=y.useCallback(function(Ot){return Me.has(Ot)&&de!=="combobox"},[de,(0,q.Z)(Me).toString(),Me.size]);(0,y.useEffect)(function(){var Ot=setTimeout(function(){if(!re&&W&&Me.size===1){var dt=Array.from(Me)[0],nn=$t.findIndex(function(rn){var Qt=rn.data;return Qt.value===dt});nn!==-1&&(wt(nn),Jt(nn))}});if(W){var it;(it=Ct.current)===null||it===void 0||it.scrollTo(void 0)}return function(){return clearTimeout(Ot)}},[W,Fe,Ne.length]);var Lt=function(it){it!==void 0&&J(it,{selected:!Me.has(it)}),re||M(!1)};if(y.useImperativeHandle(x,function(){return{onKeyDown:function(it){var dt=it.which,nn=it.ctrlKey;switch(dt){case V.Z.N:case V.Z.P:case V.Z.UP:case V.Z.DOWN:{var rn=0;if(dt===V.Z.UP?rn=-1:dt===V.Z.DOWN?rn=1:Wn()&&nn&&(dt===V.Z.N?rn=1:dt===V.Z.P&&(rn=-1)),rn!==0){var Qt=Zt(xt+rn,rn);Jt(Qt),wt(Qt,!0)}break}case V.Z.ENTER:{var At=$t[xt];At&&!At.data.disabled?Lt(At.value):Lt(void 0),W&&it.preventDefault();break}case V.Z.ESC:M(!1),W&&it.stopPropagation()}},onKeyUp:function(){},scrollTo:function(it){Jt(it)}}}),$t.length===0)return y.createElement("div",{role:"listbox",id:"".concat(H,"_list"),className:"".concat(Wt,"-empty"),onMouseDown:tn},K);var kt=Object.keys(Xe).map(function(Ot){return Xe[Ot]}),sn=function(it){return it.label};function jt(Ot,it){var dt=Ot.group;return{role:dt?"presentation":"option",id:"".concat(H,"_list_").concat(it)}}var Mn=function(it){var dt=$t[it];if(!dt)return null;var nn=dt.data||{},rn=nn.value,Qt=dt.group,At=(0,I.Z)(nn,!0),ln=sn(dt);return dt?y.createElement("div",(0,E.Z)({"aria-label":typeof ln=="string"&&!Qt?ln:null},At,{key:it},jt(dt,it),{"aria-selected":vn(rn)}),rn):null},Kn={role:"listbox",id:"".concat(H,"_list")};return y.createElement(y.Fragment,null,qe&&y.createElement("div",(0,E.Z)({},Kn,{style:{height:0,width:0,overflow:"hidden"}}),Mn(xt-1),Mn(xt),Mn(xt+1)),y.createElement(gn.Z,{itemKey:"key",ref:Ct,data:$t,height:Ut,itemHeight:Rt,fullHeight:!1,onMouseDown:tn,onScroll:Be,virtual:qe,direction:st,innerProps:qe?null:Kn},function(Ot,it){var dt,nn=Ot.group,rn=Ot.groupOption,Qt=Ot.data,At=Ot.label,ln=Ot.value,cn=Qt.key;if(nn){var On,Ve=(On=Qt.title)!==null&&On!==void 0?On:hn(At)?At.toString():void 0;return y.createElement("div",{className:N()(Wt,"".concat(Wt,"-group")),title:Ve},At!==void 0?At:cn)}var Ae=Qt.disabled,pt=Qt.title,Ft=Qt.children,It=Qt.style,rr=Qt.className,pr=(0,P.Z)(Qt,mn),gr=(0,Nn.Z)(pr,kt),Yn=vn(ln),Tn="".concat(Wt,"-option"),Hn=N()(Wt,Tn,rr,(dt={},(0,C.Z)(dt,"".concat(Tn,"-grouped"),rn),(0,C.Z)(dt,"".concat(Tn,"-active"),xt===it&&!Ae),(0,C.Z)(dt,"".concat(Tn,"-disabled"),Ae),(0,C.Z)(dt,"".concat(Tn,"-selected"),Yn),dt)),Fn=sn(Ot),sr=!ae||typeof ae=="function"||Yn,Qn=typeof Fn=="number"?Fn:Fn||ln,qn=hn(Qn)?Qn.toString():void 0;return pt!==void 0&&(qn=pt),y.createElement("div",(0,E.Z)({},(0,I.Z)(gr),qe?{}:jt(Ot,it),{"aria-selected":Yn,className:Hn,title:qn,onMouseMove:function(){xt===it||Ae||wt(it)},onClick:function(){Ae||Lt(ln)},style:It}),y.createElement("div",{className:"".concat(Tn,"-content")},Qn),y.isValidElement(ae)||Yn,sr&&y.createElement(Ze,{className:"".concat(Wt,"-option-state"),customizeIcon:ae,customizeIconProps:{isSelected:Yn}},Yn?"\u2713":null))}))},en=y.forwardRef(Ln);en.displayName="OptionList";var Sn=en;function Xn(h){var d=h.mode,x=h.options,L=h.children,Y=h.backfill,H=h.allowClear,W=h.placeholder,re=h.getInputElement,de=h.showSearch,Fe=h.onSearch,M=h.defaultOpen,K=h.autoFocus,Be=h.labelInValue,ue=h.value,Ne=h.inputValue,De=h.optionLabelProp,ft=isMultiple(d),J=de!==void 0?de:ft||d==="combobox",ae=x||convertChildrenToData(L);if(warning(d!=="tags"||ae.every(function(st){return!st.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),d==="tags"||d==="combobox"){var Me=ae.some(function(st){return st.options?st.options.some(function(Ut){return typeof("value"in Ut?Ut.value:Ut.key)=="number"}):typeof("value"in st?st.value:st.key)=="number"});warning(!Me,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(d!=="combobox"||!De,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(d==="combobox"||!Y,"`backfill` only works with `combobox` mode."),warning(d==="combobox"||!re,"`getInputElement` only work with `combobox` mode."),noteOnce(d!=="combobox"||!re||!H||!W,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Fe&&!J&&d!=="combobox"&&d!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!M||K,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ue!=null){var Xe=toArray(ue);warning(!Be||Xe.every(function(st){return _typeof(st)==="object"&&("key"in st||"value"in st)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ft||Array.isArray(ue),"`value` should be array when `mode` is `multiple` or `tags`")}if(L){var qe=null;toNodeArray(L).some(function(st){if(!React.isValidElement(st)||!st.type)return!1;var Ut=st,Rt=Ut.type;if(Rt.isSelectOption)return!1;if(Rt.isSelectOptGroup){var Wt=toNodeArray(st.props.children).every(function($t){return!React.isValidElement($t)||!st.type||$t.type.isSelectOption?!0:(qe=$t.type,!1)});return!Wt}return qe=Rt,!0}),qe&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(qe.displayName||qe.name||qe,"`.")),warning(Ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function An(h,d){if(h){var x=function L(Y){for(var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,W=0;W<Y.length;W++){var re=Y[W];if(re[d==null?void 0:d.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!H&&Array.isArray(re[d==null?void 0:d.options])&&L(re[d==null?void 0:d.options],!0))break}};x(h)}}var Or=null,lr=["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"],Vt=["inputValue"];function rt(h){return!h||(0,D.Z)(h)!=="object"}var Mt=y.forwardRef(function(h,d){var x=h.id,L=h.mode,Y=h.prefixCls,H=Y===void 0?"rc-select":Y,W=h.backfill,re=h.fieldNames,de=h.inputValue,Fe=h.searchValue,M=h.onSearch,K=h.autoClearSearchValue,Be=K===void 0?!0:K,ue=h.onSelect,Ne=h.onDeselect,De=h.dropdownMatchSelectWidth,ft=De===void 0?!0:De,J=h.filterOption,ae=h.filterSort,Me=h.optionFilterProp,Xe=h.optionLabelProp,qe=h.options,st=h.children,Ut=h.defaultActiveFirstOption,Rt=h.menuItemSelectedIcon,Wt=h.virtual,$t=h.direction,Ct=h.listHeight,tn=Ct===void 0?200:Ct,Jt=h.listItemHeight,Zt=Jt===void 0?20:Jt,Xt=h.value,Nt=h.defaultValue,xt=h.labelInValue,Bt=h.onChange,wt=(0,P.Z)(h,lr),vn=(0,Qe.ZP)(x),Lt=Ie(L),kt=!!(!qe&&st),sn=y.useMemo(function(){return J===void 0&&L==="combobox"?!1:J},[J,L]),jt=y.useMemo(function(){return se(re,kt)},[JSON.stringify(re),kt]),Mn=(0,ye.Z)("",{value:Fe!==void 0?Fe:de,postState:function(Tt){return Tt||""}}),Kn=(0,p.Z)(Mn,2),Ot=Kn[0],it=Kn[1],dt=an(qe,st,jt,Me,Xe),nn=dt.valueOptions,rn=dt.labelOptions,Qt=dt.options,At=y.useCallback(function(ct){var Tt=Pe(ct);return Tt.map(function(mt){var ot,Cn,xn,ur,Mr;if(rt(mt))ot=mt;else{var Fr;xn=mt.key,Cn=mt.label,ot=(Fr=mt.value)!==null&&Fr!==void 0?Fr:xn}var Un=nn.get(ot);if(Un){var Rr;if(Cn===void 0&&(Cn=Un==null?void 0:Un[Xe||jt.label]),xn===void 0&&(xn=(Rr=Un==null?void 0:Un.key)!==null&&Rr!==void 0?Rr:ot),ur=Un==null?void 0:Un.disabled,Mr=Un==null?void 0:Un.title,0)var ci}return{label:Cn,value:ot,key:xn,disabled:ur,title:Mr}})},[jt,Xe,nn]),ln=(0,ye.Z)(Nt,{value:Xt}),cn=(0,p.Z)(ln,2),On=cn[0],Ve=cn[1],Ae=y.useMemo(function(){var ct,Tt=At(On);return L==="combobox"&&je((ct=Tt[0])===null||ct===void 0?void 0:ct.value)?[]:Tt},[On,At,L]),pt=we(Ae,nn),Ft=(0,p.Z)(pt,2),It=Ft[0],rr=Ft[1],pr=y.useMemo(function(){if(!L&&It.length===1){var ct=It[0];if(ct.value===null&&(ct.label===null||ct.label===void 0))return[]}return It.map(function(Tt){var mt;return(0,_.Z)((0,_.Z)({},Tt),{},{label:(mt=Tt.label)!==null&&mt!==void 0?mt:Tt.value})})},[L,It]),gr=y.useMemo(function(){return new Set(It.map(function(ct){return ct.value}))},[It]);y.useEffect(function(){if(L==="combobox"){var ct,Tt=(ct=It[0])===null||ct===void 0?void 0:ct.value;it(Ge(Tt)?String(Tt):"")}},[It]);var Yn=gt(function(ct,Tt){var mt,ot=Tt!=null?Tt:ct;return mt={},(0,C.Z)(mt,jt.value,ct),(0,C.Z)(mt,jt.label,ot),mt}),Tn=y.useMemo(function(){if(L!=="tags")return Qt;var ct=(0,q.Z)(Qt),Tt=function(ot){return nn.has(ot)};return(0,q.Z)(It).sort(function(mt,ot){return mt.value<ot.value?-1:1}).forEach(function(mt){var ot=mt.value;Tt(ot)||ct.push(Yn(ot,mt.label))}),ct},[Yn,Qt,nn,It,L]),Hn=A(Tn,jt,Ot,sn,Me),Fn=y.useMemo(function(){return L!=="tags"||!Ot||Hn.some(function(ct){return ct[Me||"value"]===Ot})||Hn.some(function(ct){return ct[jt.value]===Ot})?Hn:[Yn(Ot)].concat((0,q.Z)(Hn))},[Yn,Me,L,Hn,Ot,jt]),sr=y.useMemo(function(){return ae?(0,q.Z)(Fn).sort(function(ct,Tt){return ae(ct,Tt)}):Fn},[Fn,ae]),Qn=y.useMemo(function(){return xe(sr,{fieldNames:jt,childrenAsData:kt})},[sr,jt,kt]),qn=function(Tt){var mt=At(Tt);if(Ve(mt),Bt&&(mt.length!==It.length||mt.some(function(xn,ur){var Mr;return((Mr=It[ur])===null||Mr===void 0?void 0:Mr.value)!==(xn==null?void 0:xn.value)}))){var ot=xt?mt:mt.map(function(xn){return xn.value}),Cn=mt.map(function(xn){return ge(rr(xn.value))});Bt(Lt?ot:ot[0],Lt?Cn:Cn[0])}},Kr=y.useState(null),Xr=(0,p.Z)(Kr,2),li=Xr[0],Yr=Xr[1],Cr=y.useState(0),Qr=(0,p.Z)(Cr,2),Ir=Qr[0],Zi=Qr[1],Si=Ut!==void 0?Ut:L!=="combobox",si=y.useCallback(function(ct,Tt){var mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=mt.source,Cn=ot===void 0?"keyboard":ot;Zi(Tt),W&&L==="combobox"&&ct!==null&&Cn==="keyboard"&&Yr(String(ct))},[W,L]),Ur=function(Tt,mt,ot){var Cn=function(){var Hr,Lr=rr(Tt);return[xt?{label:Lr==null?void 0:Lr[jt.label],value:Tt,key:(Hr=Lr==null?void 0:Lr.key)!==null&&Hr!==void 0?Hr:Tt}:Tt,ge(Lr)]};if(mt&&ue){var xn=Cn(),ur=(0,p.Z)(xn,2),Mr=ur[0],Fr=ur[1];ue(Mr,Fr)}else if(!mt&&Ne&&ot!=="clear"){var Un=Cn(),Rr=(0,p.Z)(Un,2),ci=Rr[0],Bi=Rr[1];Ne(ci,Bi)}},Ci=gt(function(ct,Tt){var mt,ot=Lt?Tt.selected:!0;ot?mt=Lt?[].concat((0,q.Z)(It),[ct]):[ct]:mt=It.filter(function(Cn){return Cn.value!==ct}),qn(mt),Ur(ct,ot),L==="combobox"?Yr(""):(!Ie||Be)&&(it(""),Yr(""))}),xi=function(Tt,mt){qn(Tt);var ot=mt.type,Cn=mt.values;(ot==="remove"||ot==="clear")&&Cn.forEach(function(xn){Ur(xn.value,!1,ot)})},jr=function(Tt,mt){if(it(Tt),Yr(null),mt.source==="submit"){var ot=(Tt||"").trim();if(ot){var Cn=Array.from(new Set([].concat((0,q.Z)(gr),[ot])));qn(Cn),Ur(ot,!0),it("")}return}mt.source!=="blur"&&(L==="combobox"&&qn(Tt),M==null||M(Tt))},Ar=function(Tt){var mt=Tt;L!=="tags"&&(mt=Tt.map(function(Cn){var xn=rn.get(Cn);return xn==null?void 0:xn.value}).filter(function(Cn){return Cn!==void 0}));var ot=Array.from(new Set([].concat((0,q.Z)(gr),(0,q.Z)(mt))));qn(ot),ot.forEach(function(Cn){Ur(Cn,!0)})},ui=y.useMemo(function(){var ct=Wt!==!1&&ft!==!1;return(0,_.Z)((0,_.Z)({},dt),{},{flattenOptions:Qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:Ci,menuItemSelectedIcon:Rt,rawValues:gr,fieldNames:jt,virtual:ct,direction:$t,listHeight:tn,listItemHeight:Zt,childrenAsData:kt})},[dt,Qn,si,Si,Ci,Rt,gr,jt,Wt,ft,tn,Zt,kt]);return y.createElement(dn.Provider,{value:ui},y.createElement(Ke,(0,E.Z)({},wt,{id:vn,prefixCls:H,ref:d,omitDomProps:Vt,mode:L,displayValues:pr,onDisplayValuesChange:xi,direction:$t,searchValue:Ot,onSearch:jr,autoClearSearchValue:Be,onSearchSplit:Ar,dropdownMatchSelectWidth:ft,OptionList:Sn,emptyOptions:!Qn.length,activeValue:li,activeDescendantId:"".concat(vn,"_list_").concat(Ir)})))}),g=Mt;g.Option=un,g.OptGroup=zt;var T=g,j=T},9296:function(on,Ee,f){"use strict";f.r(Ee),f.d(Ee,{ResizableTextArea:function(){return be},default:function(){return je}});var E=f(5891),q=f(57259),C=f(80962),_=f(80665),p=f(29043),P=f(19149),D=f(26390),ye=f(92310),ne=f.n(ye),y=f(93681),Ce=f(5643),N=f(35788),he=f(59301),Oe=f(29301),V=f(28800),ke=f(23073),nt=`
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;
`,Ze=["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"],et={},U;function Z(le){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=le.getAttribute("id")||le.getAttribute("data-reactid")||le.getAttribute("name");if(B&&et[k])return et[k];var ee=window.getComputedStyle(le),te=ee.getPropertyValue("box-sizing")||ee.getPropertyValue("-moz-box-sizing")||ee.getPropertyValue("-webkit-box-sizing"),_e=parseFloat(ee.getPropertyValue("padding-bottom"))+parseFloat(ee.getPropertyValue("padding-top")),ze=parseFloat(ee.getPropertyValue("border-bottom-width"))+parseFloat(ee.getPropertyValue("border-top-width")),ie=Ze.map(function(ce){return"".concat(ce,":").concat(ee.getPropertyValue(ce))}).join(";"),Te={sizingStyle:ie,paddingSize:_e,borderSize:ze,boxSizing:te};return B&&k&&(et[k]=Te),Te}function S(le){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;U||(U=document.createElement("textarea"),U.setAttribute("tab-index","-1"),U.setAttribute("aria-hidden","true"),document.body.appendChild(U)),le.getAttribute("wrap")?U.setAttribute("wrap",le.getAttribute("wrap")):U.removeAttribute("wrap");var te=Z(le,B),_e=te.paddingSize,ze=te.borderSize,ie=te.boxSizing,Te=te.sizingStyle;U.setAttribute("style","".concat(Te,";").concat(nt)),U.value=le.value||le.placeholder||"";var ce=void 0,yt=void 0,Dt,bt=U.scrollHeight;if(ie==="border-box"?bt+=ze:ie==="content-box"&&(bt-=_e),k!==null||ee!==null){U.value=" ";var Je=U.scrollHeight-_e;k!==null&&(ce=Je*k,ie==="border-box"&&(ce=ce+_e+ze),bt=Math.max(ce,bt)),ee!==null&&(yt=Je*ee,ie==="border-box"&&(yt=yt+_e+ze),Dt=bt>yt?"":"hidden",bt=Math.min(yt,bt))}var Et={height:bt,overflowY:Dt,resize:"none"};return ce&&(Et.minHeight=ce),yt&&(Et.maxHeight=yt),Et}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,I=1,F=2,R=he.forwardRef(function(le,B){var k=le,ee=k.prefixCls,te=k.onPressEnter,_e=k.defaultValue,ze=k.value,ie=k.autoSize,Te=k.onResize,ce=k.className,yt=k.style,Dt=k.disabled,bt=k.onChange,Je=k.onInternalAutoSize,Et=(0,P.Z)(k,c),lt=(0,N.Z)(_e,{value:ze,postState:function(zt){return zt!=null?zt:""}}),Ht=(0,p.Z)(lt,2),$=Ht[0],ve=Ht[1],G=function(zt){ve(zt.target.value),bt==null||bt(zt)},Q=he.useRef();he.useImperativeHandle(B,function(){return{textArea:Q.current}});var se=he.useMemo(function(){return ie&&(0,_.Z)(ie)==="object"?[ie.minRows,ie.maxRows]:[]},[ie]),xe=(0,p.Z)(se,2),ge=xe[0],oe=xe[1],fe=!!ie,We=function(){try{if(document.activeElement===Q.current){var zt=Q.current,pn=zt.selectionStart,un=zt.selectionEnd,bn=zt.scrollTop;Q.current.setSelectionRange(pn,un),Q.current.scrollTop=bn}}catch(Nn){}},Ie=he.useState(F),me=(0,p.Z)(Ie,2),Ke=me[0],we=me[1],tt=he.useState(),A=(0,p.Z)(tt,2),Qe=A[0],ht=A[1],He=function(){we(b)};(0,V.Z)(function(){fe&&He()},[ze,ge,oe,fe]),(0,V.Z)(function(){if(Ke===b)we(I);else if(Ke===I){var Yt=S(Q.current,!1,ge,oe);we(F),ht(Yt)}else We()},[Ke]);var ut=he.useRef(),Pt=function(){ke.Z.cancel(ut.current)},Gt=function(zt){Ke===F&&(Te==null||Te(zt),ie&&(Pt(),ut.current=(0,ke.Z)(function(){He()})))};he.useEffect(function(){return Pt},[]);var an=fe?Qe:null,gt=(0,q.Z)((0,q.Z)({},yt),an);return(Ke===b||Ke===I)&&(gt.overflowY="hidden",gt.overflowX="hidden"),he.createElement(Oe.Z,{onResize:Gt,disabled:!(ie||Te)},he.createElement("textarea",(0,E.Z)({},Et,{ref:Q,style:gt,className:ne()(ee,ce,(0,C.Z)({},"".concat(ee,"-disabled"),Dt)),disabled:Dt,value:$,onChange:G})))}),be=R,$e=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Pe(le,B){return(0,D.Z)(le||"").slice(0,B).join("")}function Se(le,B,k,ee){var te=k;return le?te=Pe(k,ee):(0,D.Z)(B||"").length<k.length&&(0,D.Z)(k||"").length>ee&&(te=B),te}var at=he.forwardRef(function(le,B){var k,ee=le.defaultValue,te=le.value,_e=le.onFocus,ze=le.onBlur,ie=le.onChange,Te=le.allowClear,ce=le.maxLength,yt=le.onCompositionStart,Dt=le.onCompositionEnd,bt=le.suffix,Je=le.prefixCls,Et=Je===void 0?"rc-textarea":Je,lt=le.classes,Ht=le.showCount,$=le.className,ve=le.style,G=le.disabled,Q=le.hidden,se=le.classNames,xe=le.styles,ge=le.onResize,oe=(0,P.Z)(le,$e),fe=(0,N.Z)(ee,{value:te,defaultValue:ee}),We=(0,p.Z)(fe,2),Ie=We[0],me=We[1],Ke=(0,he.useRef)(null),we=he.useState(!1),tt=(0,p.Z)(we,2),A=tt[0],Qe=tt[1],ht=he.useState(!1),He=(0,p.Z)(ht,2),ut=He[0],Pt=He[1],Gt=he.useRef(),an=he.useRef(0),gt=he.useState(null),Yt=(0,p.Z)(gt,2),zt=Yt[0],pn=Yt[1],un=function(){var rt;(rt=Ke.current)===null||rt===void 0||rt.textArea.focus()};(0,he.useImperativeHandle)(B,function(){return{resizableTextArea:Ke.current,focus:un,blur:function(){var rt;(rt=Ke.current)===null||rt===void 0||rt.textArea.blur()}}}),(0,he.useEffect)(function(){Qe(function(Vt){return!G&&Vt})},[G]);var bn=Number(ce)>0,Nn=function(rt){Pt(!0),Gt.current=Ie,an.current=rt.currentTarget.selectionStart,yt==null||yt(rt)},gn=function(rt){Pt(!1);var Mt=rt.currentTarget.value;if(bn){var g,T=an.current>=ce+1||an.current===((g=Gt.current)===null||g===void 0?void 0:g.length);Mt=Se(T,Gt.current,Mt,ce)}Mt!==Ie&&(me(Mt),(0,Ce.rJ)(rt.currentTarget,rt,ie,Mt)),Dt==null||Dt(rt)},Bn=function(rt){var Mt=rt.target.value;if(!ut&&bn){var g=rt.target.selectionStart>=ce+1||rt.target.selectionStart===Mt.length||!rt.target.selectionStart;Mt=Se(g,Ie,Mt,ce)}me(Mt),(0,Ce.rJ)(rt.currentTarget,rt,ie,Mt)},dn=function(rt){var Mt=oe.onPressEnter,g=oe.onKeyDown;rt.key==="Enter"&&Mt&&Mt(rt),g==null||g(rt)},Wn=function(rt){Qe(!0),_e==null||_e(rt)},mn=function(rt){Qe(!1),ze==null||ze(rt)},hn=function(rt){var Mt;me(""),un(),(0,Ce.rJ)((Mt=Ke.current)===null||Mt===void 0?void 0:Mt.textArea,rt,ie)},Ln=(0,Ce.D7)(Ie);!ut&&bn&&te==null&&(Ln=Pe(Ln,ce));var en=bt,Sn;if(Ht){var Xn=(0,D.Z)(Ln).length;(0,_.Z)(Ht)==="object"?Sn=Ht.formatter({value:Ln,count:Xn,maxLength:ce}):Sn="".concat(Xn).concat(bn?" / ".concat(ce):""),en=he.createElement(he.Fragment,null,en,he.createElement("span",{className:ne()("".concat(Et,"-data-count"),se==null?void 0:se.count),style:xe==null?void 0:xe.count},Sn))}var An=function(rt){var Mt;ge==null||ge(rt),(Mt=Ke.current)!==null&&Mt!==void 0&&Mt.textArea.style.height&&pn(!0)},Or=!oe.autoSize&&!Ht&&!Te,lr=he.createElement(y.BaseInput,{value:Ln,allowClear:Te,handleReset:hn,suffix:en,prefixCls:Et,classes:{affixWrapper:ne()(lt==null?void 0:lt.affixWrapper,(k={},(0,C.Z)(k,"".concat(Et,"-show-count"),Ht),(0,C.Z)(k,"".concat(Et,"-textarea-allow-clear"),Te),k))},disabled:G,focused:A,className:$,style:(0,q.Z)((0,q.Z)({},ve),zt&&!Or?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Sn=="string"?Sn:void 0}},hidden:Q,inputElement:he.createElement(be,(0,E.Z)({},oe,{onKeyDown:dn,onChange:Bn,onFocus:Wn,onBlur:mn,onCompositionStart:Nn,onCompositionEnd:gn,className:se==null?void 0:se.textarea,style:(0,q.Z)((0,q.Z)({},xe==null?void 0:xe.textarea),{},{resize:ve==null?void 0:ve.resize}),disabled:G,prefixCls:Et,onResize:An,ref:Ke}))});return lr}),Ge=at,je=Ge},21881:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return Ht}});var E=f(5891),q=f(80665),C=f(57259),_=f(80962),p=f(29043),P=f(19149),D=f(92310),ye=f.n(D),ne=f(29301),y=f(80764),Ce=f(28800),N=f(59301),he=f(4676),Oe=N.forwardRef(function($,ve){var G=$.height,Q=$.offsetY,se=$.offsetX,xe=$.children,ge=$.prefixCls,oe=$.onInnerResize,fe=$.innerProps,We=$.rtl,Ie=$.extra,me={},Ke={display:"flex",flexDirection:"column"};return Q!==void 0&&(me={height:G,position:"relative",overflow:"hidden"},Ke=(0,C.Z)((0,C.Z)({},Ke),{},(0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)({transform:"translateY(".concat(Q,"px)")},We?"marginRight":"marginLeft",-se),"position","absolute"),"left",0),"right",0),"top",0))),N.createElement("div",{style:me},N.createElement(ne.Z,{onResize:function(tt){var A=tt.offsetHeight;A&&oe&&oe()}},N.createElement("div",(0,E.Z)({style:Ke,className:ye()((0,_.Z)({},"".concat(ge,"-holder-inner"),ge)),ref:ve},fe),xe,Ie)))});Oe.displayName="Filler";var V=Oe;function ke($){var ve=$.children,G=$.setRef,Q=N.useCallback(function(se){G(se)},[]);return N.cloneElement(ve,{ref:Q})}function nt($,ve,G,Q,se,xe,ge,oe){var fe=oe.getKey;return $.slice(ve,G+1).map(function(We,Ie){var me=ve+Ie,Ke=ge(We,me,{style:{width:Q},offsetX:se}),we=fe(We);return N.createElement(ke,{key:we,setRef:function(A){return xe(We,A)}},Ke)})}function Ze($,ve,G,Q){var se=G-$,xe=ve-G,ge=Math.min(se,xe)*2;if(Q<=ge){var oe=Math.floor(Q/2);return Q%2?G+oe+1:G-oe}return se>xe?G-(Q-xe):G+(Q-se)}function et($,ve,G){var Q=$.length,se=ve.length,xe,ge;if(Q===0&&se===0)return null;Q<se?(xe=$,ge=ve):(xe=ve,ge=$);var oe={__EMPTY_ITEM__:!0};function fe(tt){return tt!==void 0?G(tt):oe}for(var We=null,Ie=Math.abs(Q-se)!==1,me=0;me<ge.length;me+=1){var Ke=fe(xe[me]),we=fe(ge[me]);if(Ke!==we){We=me,Ie=Ie||Ke!==fe(ge[me+1]);break}}return We===null?null:{index:We,multiple:Ie}}function U($,ve,G){var Q=N.useState($),se=(0,p.Z)(Q,2),xe=se[0],ge=se[1],oe=N.useState(null),fe=(0,p.Z)(oe,2),We=fe[0],Ie=fe[1];return N.useEffect(function(){var me=et(xe||[],$||[],ve);(me==null?void 0:me.index)!==void 0&&(G==null||G(me.index),Ie($[me.index])),ge($)},[$]),[We]}var Z=f(23073),S=(typeof navigator=="undefined"?"undefined":(0,q.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function($,ve,G,Q){var se=(0,N.useRef)(!1),xe=(0,N.useRef)(null);function ge(){clearTimeout(xe.current),se.current=!0,xe.current=setTimeout(function(){se.current=!1},50)}var oe=(0,N.useRef)({top:$,bottom:ve,left:G,right:Q});return oe.current.top=$,oe.current.bottom=ve,oe.current.left=G,oe.current.right=Q,function(fe,We){var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,me=fe?We<0&&oe.current.left||We>0&&oe.current.right:We<0&&oe.current.top||We>0&&oe.current.bottom;return Ie&&me?(clearTimeout(xe.current),se.current=!1):(!me||se.current)&&ge(),!se.current&&me}};function I($,ve,G,Q,se,xe,ge){var oe=(0,N.useRef)(0),fe=(0,N.useRef)(null),We=(0,N.useRef)(null),Ie=(0,N.useRef)(!1),me=b(ve,G,Q,se);function Ke(He,ut){if(Z.Z.cancel(fe.current),!me(!1,ut)){var Pt=He;if(!Pt._virtualHandled)Pt._virtualHandled=!0;else return;oe.current+=ut,We.current=ut,c||Pt.preventDefault(),fe.current=(0,Z.Z)(function(){var Gt=Ie.current?10:1;ge(oe.current*Gt,!1),oe.current=0})}}function we(He,ut){ge(ut,!0),c||He.preventDefault()}var tt=(0,N.useRef)(null),A=(0,N.useRef)(null);function Qe(He){if($){Z.Z.cancel(A.current),A.current=(0,Z.Z)(function(){tt.current=null},2);var ut=He.deltaX,Pt=He.deltaY,Gt=He.shiftKey,an=ut,gt=Pt;(tt.current==="sx"||!tt.current&&Gt&&Pt&&!ut)&&(an=Pt,gt=0,tt.current="sx");var Yt=Math.abs(an),zt=Math.abs(gt);tt.current===null&&(tt.current=xe&&Yt>zt?"x":"y"),tt.current==="y"?Ke(He,gt):we(He,an)}}function ht(He){$&&(Ie.current=He.detail===We.current)}return[Qe,ht]}function F($,ve,G,Q){var se=N.useMemo(function(){return[new Map,[]]},[$,G.id,Q]),xe=(0,p.Z)(se,2),ge=xe[0],oe=xe[1],fe=function(Ie){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ie,Ke=ge.get(Ie),we=ge.get(me);if(Ke===void 0||we===void 0)for(var tt=$.length,A=oe.length;A<tt;A+=1){var Qe,ht=$[A],He=ve(ht);ge.set(He,A);var ut=(Qe=G.get(He))!==null&&Qe!==void 0?Qe:Q;if(oe[A]=(oe[A-1]||0)+ut,He===Ie&&(Ke=A),He===me&&(we=A),Ke!==void 0&&we!==void 0)break}return{top:oe[Ke-1]||0,bottom:oe[we]}};return fe}var R=f(85899),be=f(79545),$e=f(68550),Pe=function(){function $(){(0,be.Z)(this,$),(0,_.Z)(this,"maps",void 0),(0,_.Z)(this,"id",0),(0,_.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,$e.Z)($,[{key:"set",value:function(G,Q){this.maps[G]=Q,this.id+=1,this.diffKeys.add(G)}},{key:"get",value:function(G){return this.maps[G]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),$}(),Se=Pe;function at($){var ve=parseFloat($);return isNaN(ve)?0:ve}function Ge($,ve,G){var Q=N.useState(0),se=(0,p.Z)(Q,2),xe=se[0],ge=se[1],oe=(0,N.useRef)(new Map),fe=(0,N.useRef)(new Se),We=(0,N.useRef)(0);function Ie(){We.current+=1}function me(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ie();var tt=function(){var ht=!1;oe.current.forEach(function(He,ut){if(He&&He.offsetParent){var Pt=(0,R.ZP)(He),Gt=Pt.offsetHeight,an=getComputedStyle(Pt),gt=an.marginTop,Yt=an.marginBottom,zt=at(gt),pn=at(Yt),un=Gt+zt+pn;fe.current.get(ut)!==un&&(fe.current.set(ut,un),ht=!0)}}),ht&&ge(function(He){return He+1})};if(we)tt();else{We.current+=1;var A=We.current;Promise.resolve().then(function(){A===We.current&&tt()})}}function Ke(we,tt){var A=$(we),Qe=oe.current.get(A);tt?(oe.current.set(A,tt),me()):oe.current.delete(A),!Qe!=!tt&&(tt?ve==null||ve(we):G==null||G(we))}return(0,N.useEffect)(function(){return Ie},[]),[Ke,me,fe.current,xe]}var je=14/15;function le($,ve,G){var Q=(0,N.useRef)(!1),se=(0,N.useRef)(0),xe=(0,N.useRef)(0),ge=(0,N.useRef)(null),oe=(0,N.useRef)(null),fe,We=function(we){if(Q.current){var tt=Math.ceil(we.touches[0].pageX),A=Math.ceil(we.touches[0].pageY),Qe=se.current-tt,ht=xe.current-A,He=Math.abs(Qe)>Math.abs(ht);He?se.current=tt:xe.current=A;var ut=G(He,He?Qe:ht,!1,we);ut&&we.preventDefault(),clearInterval(oe.current),ut&&(oe.current=setInterval(function(){He?Qe*=je:ht*=je;var Pt=Math.floor(He?Qe:ht);(!G(He,Pt,!0)||Math.abs(Pt)<=.1)&&clearInterval(oe.current)},16))}},Ie=function(){Q.current=!1,fe()},me=function(we){fe(),we.touches.length===1&&!Q.current&&(Q.current=!0,se.current=Math.ceil(we.touches[0].pageX),xe.current=Math.ceil(we.touches[0].pageY),ge.current=we.target,ge.current.addEventListener("touchmove",We,{passive:!1}),ge.current.addEventListener("touchend",Ie,{passive:!0}))};fe=function(){ge.current&&(ge.current.removeEventListener("touchmove",We),ge.current.removeEventListener("touchend",Ie))},(0,Ce.Z)(function(){return $&&ve.current.addEventListener("touchstart",me,{passive:!0}),function(){var Ke;(Ke=ve.current)===null||Ke===void 0||Ke.removeEventListener("touchstart",me),fe(),clearInterval(oe.current)}},[$])}function B($){return Math.floor(Math.pow($,.5))}function k($,ve){var G="touches"in $?$.touches[0]:$;return G[ve?"pageX":"pageY"]-window[ve?"scrollX":"scrollY"]}function ee($,ve,G){N.useEffect(function(){var Q=ve.current;if($&&Q){var se=!1,xe,ge,oe=function(){Z.Z.cancel(xe)},fe=function Ke(){oe(),xe=(0,Z.Z)(function(){G(ge),Ke()})},We=function(we){var tt=we;tt._virtualHandled||(tt._virtualHandled=!0,se=!0)},Ie=function(){se=!1,oe()},me=function(we){if(se){var tt=k(we,!1),A=Q.getBoundingClientRect(),Qe=A.top,ht=A.bottom;if(tt<=Qe){var He=Qe-tt;ge=-B(He),fe()}else if(tt>=ht){var ut=tt-ht;ge=B(ut),fe()}else oe()}};return Q.addEventListener("mousedown",We),Q.ownerDocument.addEventListener("mouseup",Ie),Q.ownerDocument.addEventListener("mousemove",me),function(){Q.removeEventListener("mousedown",We),Q.ownerDocument.removeEventListener("mouseup",Ie),Q.ownerDocument.removeEventListener("mousemove",me),oe()}}},[$])}var te=10;function _e($,ve,G,Q,se,xe,ge,oe){var fe=N.useRef(),We=N.useState(null),Ie=(0,p.Z)(We,2),me=Ie[0],Ke=Ie[1];return(0,Ce.Z)(function(){if(me&&me.times<te){if(!$.current){Ke(function(hn){return(0,C.Z)({},hn)});return}xe();var we=me.targetAlign,tt=me.originAlign,A=me.index,Qe=me.offset,ht=$.current.clientHeight,He=!1,ut=we,Pt=null;if(ht){for(var Gt=we||tt,an=0,gt=0,Yt=0,zt=Math.min(ve.length-1,A),pn=0;pn<=zt;pn+=1){var un=se(ve[pn]);gt=an;var bn=G.get(un);Yt=gt+(bn===void 0?Q:bn),an=Yt}for(var Nn=Gt==="top"?Qe:ht-Qe,gn=zt;gn>=0;gn-=1){var Bn=se(ve[gn]),dn=G.get(Bn);if(dn===void 0){He=!0;break}if(Nn-=dn,Nn<=0)break}switch(Gt){case"top":Pt=gt-Qe;break;case"bottom":Pt=Yt-ht+Qe;break;default:{var Wn=$.current.scrollTop,mn=Wn+ht;gt<Wn?ut="top":Yt>mn&&(ut="bottom")}}Pt!==null&&ge(Pt),Pt!==me.lastTop&&(He=!0)}He&&Ke((0,C.Z)((0,C.Z)({},me),{},{times:me.times+1,targetAlign:ut,lastTop:Pt}))}},[me,$.current]),function(we){if(we==null){oe();return}if(Z.Z.cancel(fe.current),typeof we=="number")ge(we);else if(we&&(0,q.Z)(we)==="object"){var tt,A=we.align;"index"in we?tt=we.index:tt=ve.findIndex(function(He){return se(He)===we.key});var Qe=we.offset,ht=Qe===void 0?0:Qe;Ke({times:0,index:tt,offset:ht,originAlign:A})}}}var ze=N.forwardRef(function($,ve){var G=$.prefixCls,Q=$.rtl,se=$.scrollOffset,xe=$.scrollRange,ge=$.onStartMove,oe=$.onStopMove,fe=$.onScroll,We=$.horizontal,Ie=$.spinSize,me=$.containerSize,Ke=$.style,we=$.thumbStyle,tt=N.useState(!1),A=(0,p.Z)(tt,2),Qe=A[0],ht=A[1],He=N.useState(null),ut=(0,p.Z)(He,2),Pt=ut[0],Gt=ut[1],an=N.useState(null),gt=(0,p.Z)(an,2),Yt=gt[0],zt=gt[1],pn=!Q,un=N.useRef(),bn=N.useRef(),Nn=N.useState(!1),gn=(0,p.Z)(Nn,2),Bn=gn[0],dn=gn[1],Wn=N.useRef(),mn=function(){clearTimeout(Wn.current),dn(!0),Wn.current=setTimeout(function(){dn(!1)},3e3)},hn=xe-me||0,Ln=me-Ie||0,en=N.useMemo(function(){if(se===0||hn===0)return 0;var g=se/hn;return g*Ln},[se,hn,Ln]),Sn=function(T){T.stopPropagation(),T.preventDefault()},Xn=N.useRef({top:en,dragging:Qe,pageY:Pt,startTop:Yt});Xn.current={top:en,dragging:Qe,pageY:Pt,startTop:Yt};var An=function(T){ht(!0),Gt(k(T,We)),zt(Xn.current.top),ge(),T.stopPropagation(),T.preventDefault()};N.useEffect(function(){var g=function(d){d.preventDefault()},T=un.current,j=bn.current;return T.addEventListener("touchstart",g,{passive:!1}),j.addEventListener("touchstart",An,{passive:!1}),function(){T.removeEventListener("touchstart",g),j.removeEventListener("touchstart",An)}},[]);var Or=N.useRef();Or.current=hn;var lr=N.useRef();lr.current=Ln,N.useEffect(function(){if(Qe){var g,T=function(d){var x=Xn.current,L=x.dragging,Y=x.pageY,H=x.startTop;Z.Z.cancel(g);var W=un.current.getBoundingClientRect(),re=me/(We?W.width:W.height);if(L){var de=(k(d,We)-Y)*re,Fe=H;!pn&&We?Fe-=de:Fe+=de;var M=Or.current,K=lr.current,Be=K?Fe/K:0,ue=Math.ceil(Be*M);ue=Math.max(ue,0),ue=Math.min(ue,M),g=(0,Z.Z)(function(){fe(ue,We)})}},j=function(){ht(!1),oe()};return window.addEventListener("mousemove",T,{passive:!0}),window.addEventListener("touchmove",T,{passive:!0}),window.addEventListener("mouseup",j,{passive:!0}),window.addEventListener("touchend",j,{passive:!0}),function(){window.removeEventListener("mousemove",T),window.removeEventListener("touchmove",T),window.removeEventListener("mouseup",j),window.removeEventListener("touchend",j),Z.Z.cancel(g)}}},[Qe]),N.useEffect(function(){return mn(),function(){clearTimeout(Wn.current)}},[se]),N.useImperativeHandle(ve,function(){return{delayHidden:mn}});var Vt="".concat(G,"-scrollbar"),rt={position:"absolute",visibility:Bn?null:"hidden"},Mt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return We?(rt.height=8,rt.left=0,rt.right=0,rt.bottom=0,Mt.height="100%",Mt.width=Ie,pn?Mt.left=en:Mt.right=en):(rt.width=8,rt.top=0,rt.bottom=0,pn?rt.right=0:rt.left=0,Mt.width="100%",Mt.height=Ie,Mt.top=en),N.createElement("div",{ref:un,className:ye()(Vt,(0,_.Z)((0,_.Z)((0,_.Z)({},"".concat(Vt,"-horizontal"),We),"".concat(Vt,"-vertical"),!We),"".concat(Vt,"-visible"),Bn)),style:(0,C.Z)((0,C.Z)({},rt),Ke),onMouseDown:Sn,onMouseMove:mn},N.createElement("div",{ref:bn,className:ye()("".concat(Vt,"-thumb"),(0,_.Z)({},"".concat(Vt,"-thumb-moving"),Qe)),style:(0,C.Z)((0,C.Z)({},Mt),we),onMouseDown:An}))}),ie=ze,Te=20;function ce(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=$/ve*$;return isNaN(G)&&(G=0),G=Math.max(G,Te),Math.floor(G)}var yt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Dt=[],bt={overflowY:"auto",overflowAnchor:"none"};function Je($,ve){var G=$.prefixCls,Q=G===void 0?"rc-virtual-list":G,se=$.className,xe=$.height,ge=$.itemHeight,oe=$.fullHeight,fe=oe===void 0?!0:oe,We=$.style,Ie=$.data,me=$.children,Ke=$.itemKey,we=$.virtual,tt=$.direction,A=$.scrollWidth,Qe=$.component,ht=Qe===void 0?"div":Qe,He=$.onScroll,ut=$.onVirtualScroll,Pt=$.onVisibleChange,Gt=$.innerProps,an=$.extraRender,gt=$.styles,Yt=(0,P.Z)($,yt),zt=N.useCallback(function(Ve){return typeof Ke=="function"?Ke(Ve):Ve==null?void 0:Ve[Ke]},[Ke]),pn=Ge(zt,null,null),un=(0,p.Z)(pn,4),bn=un[0],Nn=un[1],gn=un[2],Bn=un[3],dn=!!(we!==!1&&xe&&ge),Wn=N.useMemo(function(){return Object.values(gn.maps).reduce(function(Ve,Ae){return Ve+Ae},0)},[gn.id,gn.maps]),mn=dn&&Ie&&(Math.max(ge*Ie.length,Wn)>xe||!!A),hn=tt==="rtl",Ln=ye()(Q,(0,_.Z)({},"".concat(Q,"-rtl"),hn),se),en=Ie||Dt,Sn=(0,N.useRef)(),Xn=(0,N.useRef)(),An=(0,N.useRef)(),Or=(0,N.useState)(0),lr=(0,p.Z)(Or,2),Vt=lr[0],rt=lr[1],Mt=(0,N.useState)(0),g=(0,p.Z)(Mt,2),T=g[0],j=g[1],h=(0,N.useState)(!1),d=(0,p.Z)(h,2),x=d[0],L=d[1],Y=function(){L(!0)},H=function(){L(!1)},W={getKey:zt};function re(Ve){rt(function(Ae){var pt;typeof Ve=="function"?pt=Ve(Ae):pt=Ve;var Ft=Jt(pt);return Sn.current.scrollTop=Ft,Ft})}var de=(0,N.useRef)({start:0,end:en.length}),Fe=(0,N.useRef)(),M=U(en,zt),K=(0,p.Z)(M,1),Be=K[0];Fe.current=Be;var ue=N.useMemo(function(){if(!dn)return{scrollHeight:void 0,start:0,end:en.length-1,offset:void 0};if(!mn){var Ve;return{scrollHeight:((Ve=Xn.current)===null||Ve===void 0?void 0:Ve.offsetHeight)||0,start:0,end:en.length-1,offset:void 0}}for(var Ae=0,pt,Ft,It,rr=en.length,pr=0;pr<rr;pr+=1){var gr=en[pr],Yn=zt(gr),Tn=gn.get(Yn),Hn=Ae+(Tn===void 0?ge:Tn);Hn>=Vt&&pt===void 0&&(pt=pr,Ft=Ae),Hn>Vt+xe&&It===void 0&&(It=pr),Ae=Hn}return pt===void 0&&(pt=0,Ft=0,It=Math.ceil(xe/ge)),It===void 0&&(It=en.length-1),It=Math.min(It+1,en.length-1),{scrollHeight:Ae,start:pt,end:It,offset:Ft}},[mn,dn,Vt,en,Bn,xe]),Ne=ue.scrollHeight,De=ue.start,ft=ue.end,J=ue.offset;de.current.start=De,de.current.end=ft,N.useLayoutEffect(function(){var Ve=gn.getRecord();if(Ve.size===1){var Ae=Array.from(Ve)[0],pt=zt(en[De]);if(pt===Ae){var Ft=gn.get(Ae),It=Ft-ge;re(function(rr){return rr+It})}}gn.resetRecord()},[Ne]);var ae=N.useState({width:0,height:xe}),Me=(0,p.Z)(ae,2),Xe=Me[0],qe=Me[1],st=function(Ae){qe({width:Ae.offsetWidth,height:Ae.offsetHeight})},Ut=(0,N.useRef)(),Rt=(0,N.useRef)(),Wt=N.useMemo(function(){return ce(Xe.width,A)},[Xe.width,A]),$t=N.useMemo(function(){return ce(Xe.height,Ne)},[Xe.height,Ne]),Ct=Ne-xe,tn=(0,N.useRef)(Ct);tn.current=Ct;function Jt(Ve){var Ae=Ve;return Number.isNaN(tn.current)||(Ae=Math.min(Ae,tn.current)),Ae=Math.max(Ae,0),Ae}var Zt=Vt<=0,Xt=Vt>=Ct,Nt=T<=0,xt=T>=A,Bt=b(Zt,Xt,Nt,xt),wt=function(){return{x:hn?-T:T,y:Vt}},vn=(0,N.useRef)(wt()),Lt=(0,y.useEvent)(function(Ve){if(ut){var Ae=(0,C.Z)((0,C.Z)({},wt()),Ve);(vn.current.x!==Ae.x||vn.current.y!==Ae.y)&&(ut(Ae),vn.current=Ae)}});function kt(Ve,Ae){var pt=Ve;Ae?((0,he.flushSync)(function(){j(pt)}),Lt()):re(pt)}function sn(Ve){var Ae=Ve.currentTarget.scrollTop;Ae!==Vt&&re(Ae),He==null||He(Ve),Lt()}var jt=function(Ae){var pt=Ae,Ft=A?A-Xe.width:0;return pt=Math.max(pt,0),pt=Math.min(pt,Ft),pt},Mn=(0,y.useEvent)(function(Ve,Ae){Ae?((0,he.flushSync)(function(){j(function(pt){var Ft=pt+(hn?-Ve:Ve);return jt(Ft)})}),Lt()):re(function(pt){var Ft=pt+Ve;return Ft})}),Kn=I(dn,Zt,Xt,Nt,xt,!!A,Mn),Ot=(0,p.Z)(Kn,2),it=Ot[0],dt=Ot[1];le(dn,Sn,function(Ve,Ae,pt,Ft){var It=Ft;return Bt(Ve,Ae,pt)?!1:!It||!It._virtualHandled?(It&&(It._virtualHandled=!0),it({preventDefault:function(){},deltaX:Ve?Ae:0,deltaY:Ve?0:Ae}),!0):!1}),ee(mn,Sn,function(Ve){re(function(Ae){return Ae+Ve})}),(0,Ce.Z)(function(){function Ve(pt){var Ft=Zt&&pt.detail<0,It=Xt&&pt.detail>0;dn&&!Ft&&!It&&pt.preventDefault()}var Ae=Sn.current;return Ae.addEventListener("wheel",it,{passive:!1}),Ae.addEventListener("DOMMouseScroll",dt,{passive:!0}),Ae.addEventListener("MozMousePixelScroll",Ve,{passive:!1}),function(){Ae.removeEventListener("wheel",it),Ae.removeEventListener("DOMMouseScroll",dt),Ae.removeEventListener("MozMousePixelScroll",Ve)}},[dn,Zt,Xt]),(0,Ce.Z)(function(){if(A){var Ve=jt(T);j(Ve),Lt({x:Ve})}},[Xe.width,A]);var nn=function(){var Ae,pt;(Ae=Ut.current)===null||Ae===void 0||Ae.delayHidden(),(pt=Rt.current)===null||pt===void 0||pt.delayHidden()},rn=_e(Sn,en,gn,ge,zt,function(){return Nn(!0)},re,nn);N.useImperativeHandle(ve,function(){return{nativeElement:An.current,getScrollInfo:wt,scrollTo:function(Ae){function pt(Ft){return Ft&&(0,q.Z)(Ft)==="object"&&("left"in Ft||"top"in Ft)}pt(Ae)?(Ae.left!==void 0&&j(jt(Ae.left)),rn(Ae.top)):rn(Ae)}}}),(0,Ce.Z)(function(){if(Pt){var Ve=en.slice(De,ft+1);Pt(Ve,en)}},[De,ft,en]);var Qt=F(en,zt,gn,ge),At=an==null?void 0:an({start:De,end:ft,virtual:mn,offsetX:T,offsetY:J,rtl:hn,getSize:Qt}),ln=nt(en,De,ft,A,T,bn,me,W),cn=null;xe&&(cn=(0,C.Z)((0,_.Z)({},fe?"height":"maxHeight",xe),bt),dn&&(cn.overflowY="hidden",A&&(cn.overflowX="hidden"),x&&(cn.pointerEvents="none")));var On={};return hn&&(On.dir="rtl"),N.createElement("div",(0,E.Z)({ref:An,style:(0,C.Z)((0,C.Z)({},We),{},{position:"relative"}),className:Ln},On,Yt),N.createElement(ne.Z,{onResize:st},N.createElement(ht,{className:"".concat(Q,"-holder"),style:cn,ref:Sn,onScroll:sn,onMouseEnter:nn},N.createElement(V,{prefixCls:Q,height:Ne,offsetX:T,offsetY:J,scrollWidth:A,onInnerResize:Nn,ref:Xn,innerProps:Gt,rtl:hn,extra:At},ln))),mn&&Ne>xe&&N.createElement(ie,{ref:Ut,prefixCls:Q,scrollOffset:Vt,scrollRange:Ne,rtl:hn,onScroll:kt,onStartMove:Y,onStopMove:H,spinSize:$t,containerSize:Xe.height,style:gt==null?void 0:gt.verticalScrollBar,thumbStyle:gt==null?void 0:gt.verticalScrollBarThumb}),mn&&A>Xe.width&&N.createElement(ie,{ref:Rt,prefixCls:Q,scrollOffset:T,scrollRange:A,rtl:hn,onScroll:kt,onStartMove:Y,onStopMove:H,spinSize:Wt,containerSize:Xe.width,horizontal:!0,style:gt==null?void 0:gt.horizontalScrollBar,thumbStyle:gt==null?void 0:gt.horizontalScrollBarThumb}))}var Et=N.forwardRef(Je);Et.displayName="List";var lt=Et,Ht=lt},16722:function(on,Ee,f){"use strict";f.d(Ee,{Z:function(){return ye}});const E=ne=>typeof ne=="object"&&ne!=null&&ne.nodeType===1,q=(ne,y)=>(!y||ne!=="hidden")&&ne!=="visible"&&ne!=="clip",C=(ne,y)=>{if(ne.clientHeight<ne.scrollHeight||ne.clientWidth<ne.scrollWidth){const Ce=getComputedStyle(ne,null);return q(Ce.overflowY,y)||q(Ce.overflowX,y)||(N=>{const he=(Oe=>{if(!Oe.ownerDocument||!Oe.ownerDocument.defaultView)return null;try{return Oe.ownerDocument.defaultView.frameElement}catch(V){return null}})(N);return!!he&&(he.clientHeight<N.scrollHeight||he.clientWidth<N.scrollWidth)})(ne)}return!1},_=(ne,y,Ce,N,he,Oe,V,ke)=>Oe<ne&&V>y||Oe>ne&&V<y?0:Oe<=ne&&ke<=Ce||V>=y&&ke>=Ce?Oe-ne-N:V>y&&ke<Ce||Oe<ne&&ke>Ce?V-y+he:0,p=ne=>{const y=ne.parentElement;return y==null?ne.getRootNode().host||null:y},P=(ne,y)=>{var Ce,N,he,Oe;if(typeof document=="undefined")return[];const{scrollMode:V,block:ke,inline:nt,boundary:Ze,skipOverflowHiddenElements:et}=y,U=typeof Ze=="function"?Ze:ze=>ze!==Ze;if(!E(ne))throw new TypeError("Invalid target");const Z=document.scrollingElement||document.documentElement,S=[];let c=ne;for(;E(c)&&U(c);){if(c=p(c),c===Z){S.push(c);break}c!=null&&c===document.body&&C(c)&&!C(document.documentElement)||c!=null&&C(c,et)&&S.push(c)}const b=(N=(Ce=window.visualViewport)==null?void 0:Ce.width)!=null?N:innerWidth,I=(Oe=(he=window.visualViewport)==null?void 0:he.height)!=null?Oe:innerHeight,{scrollX:F,scrollY:R}=window,{height:be,width:$e,top:Pe,right:Se,bottom:at,left:Ge}=ne.getBoundingClientRect(),{top:je,right:le,bottom:B,left:k}=(ze=>{const ie=window.getComputedStyle(ze);return{top:parseFloat(ie.scrollMarginTop)||0,right:parseFloat(ie.scrollMarginRight)||0,bottom:parseFloat(ie.scrollMarginBottom)||0,left:parseFloat(ie.scrollMarginLeft)||0}})(ne);let ee=ke==="start"||ke==="nearest"?Pe-je:ke==="end"?at+B:Pe+be/2-je+B,te=nt==="center"?Ge+$e/2-k+le:nt==="end"?Se+le:Ge-k;const _e=[];for(let ze=0;ze<S.length;ze++){const ie=S[ze],{height:Te,width:ce,top:yt,right:Dt,bottom:bt,left:Je}=ie.getBoundingClientRect();if(V==="if-needed"&&Pe>=0&&Ge>=0&&at<=I&&Se<=b&&(ie===Z&&!C(ie)||Pe>=yt&&at<=bt&&Ge>=Je&&Se<=Dt))return _e;const Et=getComputedStyle(ie),lt=parseInt(Et.borderLeftWidth,10),Ht=parseInt(Et.borderTopWidth,10),$=parseInt(Et.borderRightWidth,10),ve=parseInt(Et.borderBottomWidth,10);let G=0,Q=0;const se="offsetWidth"in ie?ie.offsetWidth-ie.clientWidth-lt-$:0,xe="offsetHeight"in ie?ie.offsetHeight-ie.clientHeight-Ht-ve:0,ge="offsetWidth"in ie?ie.offsetWidth===0?0:ce/ie.offsetWidth:0,oe="offsetHeight"in ie?ie.offsetHeight===0?0:Te/ie.offsetHeight:0;if(Z===ie)G=ke==="start"?ee:ke==="end"?ee-I:ke==="nearest"?_(R,R+I,I,Ht,ve,R+ee,R+ee+be,be):ee-I/2,Q=nt==="start"?te:nt==="center"?te-b/2:nt==="end"?te-b:_(F,F+b,b,lt,$,F+te,F+te+$e,$e),G=Math.max(0,G+R),Q=Math.max(0,Q+F);else{G=ke==="start"?ee-yt-Ht:ke==="end"?ee-bt+ve+xe:ke==="nearest"?_(yt,bt,Te,Ht,ve+xe,ee,ee+be,be):ee-(yt+Te/2)+xe/2,Q=nt==="start"?te-Je-lt:nt==="center"?te-(Je+ce/2)+se/2:nt==="end"?te-Dt+$+se:_(Je,Dt,ce,lt,$+se,te,te+$e,$e);const{scrollLeft:fe,scrollTop:We}=ie;G=oe===0?0:Math.max(0,Math.min(We+G/oe,ie.scrollHeight-Te/oe+xe)),Q=ge===0?0:Math.max(0,Math.min(fe+Q/ge,ie.scrollWidth-ce/ge+se)),ee+=We-G,te+=fe-Q}_e.push({el:ie,top:G,left:Q})}return _e},D=ne=>ne===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(ne)?ne:{block:"start",inline:"nearest"};function ye(ne,y){if(!ne.isConnected||!(he=>{let Oe=he;for(;Oe&&Oe.parentNode;){if(Oe.parentNode===document)return!0;Oe=Oe.parentNode instanceof ShadowRoot?Oe.parentNode.host:Oe.parentNode}return!1})(ne))return;const Ce=(he=>{const Oe=window.getComputedStyle(he);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(ne);if((he=>typeof he=="object"&&typeof he.behavior=="function")(y))return y.behavior(P(ne,y));const N=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:he,top:Oe,left:V}of P(ne,D(y))){const ke=Oe-Ce.top+Ce.bottom,nt=V-Ce.left+Ce.right;he.scroll({top:ke,left:nt,behavior:N})}}}}]);