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
342 KiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(54476),D=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"},B=C,p=f(7657),P=function(y,Ie){return D.createElement(p.Z,(0,T.Z)({},y,{ref:Ie,icon:B}))},N=D.forwardRef(P),be=N},84105:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(54476),D=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"},B=C,p=f(7657),P=function(y,Ie){return D.createElement(p.Z,(0,T.Z)({},y,{ref:Ie,icon:B}))},N=D.forwardRef(P),be=N},73331:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(54476),D=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"},B=C,p=f(7657),P=function(y,Ie){return D.createElement(p.Z,(0,T.Z)({},y,{ref:Ie,icon:B}))},N=D.forwardRef(P),be=N},15277:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(54476),D=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"},B=C,p=f(7657),P=function(y,Ie){return D.createElement(p.Z,(0,T.Z)({},y,{ref:Ie,icon:B}))},N=D.forwardRef(P),be=N},61485:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(54476),D=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"},B=C,p=f(7657),P=function(y,Ie){return D.createElement(p.Z,(0,T.Z)({},y,{ref:Ie,icon:B}))},N=D.forwardRef(P),be=N},47472:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(54476),D=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"},B=C,p=f(7657),P=function(y,Ie){return D.createElement(p.Z,(0,T.Z)({},y,{ref:Ie,icon:B}))},N=D.forwardRef(P),be=N},66543:function(){"use strict"},59598:function(){"use strict"},84236:function(nn,Re,f){"use strict";f.d(Re,{t:function(){return A}});var T=f(59301),D=f(3113),C={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},B=f(92310),p=f.n(B),P=Object.defineProperty,N=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,y=(ge,De,Q)=>De in ge?P(ge,De,{enumerable:!0,configurable:!0,writable:!0,value:Q}):ge[De]=Q,Ie=(ge,De)=>{for(var Q in De||(De={}))be.call(De,Q)&&y(ge,Q,De[Q]);if(N)for(var Q of N(De))le.call(De,Q)&&y(ge,Q,De[Q]);return ge};const A=({cancelText:ge="\u53D6\u6D88",okText:De="\u786E\u5B9A",loading:Q=!1,hasOkBtn:Qe=!0,hasCancelBtn:tt=!0,okButtonProps:yt={},onCancel:Et=()=>{},onOk:oe=()=>{},className:k=""})=>T.createElement("div",{className:p()(C.buttonFixed,k)},T.createElement("div",{className:C.buttonWrap},tt&&T.createElement(D.ZP,{size:"middle",className:`${C.button} mr20`,onClick:Et},ge),Qe&&T.createElement(D.ZP,Ie({size:"middle",type:"primary",className:`${C.button} mr20`,loading:Q,onClick:oe},yt),De)))},44905:function(nn,Re,f){"use strict";f.d(Re,{h:function(){return k}});var T=f(59301),D=f(57809),C=f(78241),B=f(3113),p=f(89780),P=f.n(p),N=f(66543),be=f(59598),le=Object.defineProperty,y=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Q=(S,c,b)=>c in S?le(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,Qe=(S,c)=>{for(var b in c||(c={}))ge.call(c,b)&&Q(S,b,c[b]);if(A)for(var b of A(c))De.call(c,b)&&Q(S,b,c[b]);return S},tt=(S,c)=>y(S,Ie(c));const yt=D.default.Option,Et={labelCol:{span:4},wrapperCol:{span:20}},oe={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"]};Re.Z=({callback:S,onCancel:c})=>{const[b,I]=(0,T.useState)("python");function j(we){I(oe[we][1])}function R(we){S(we)}return T.createElement(C.default,tt(Qe({},Et),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:R,style:{width:500}}),T.createElement(C.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},T.createElement(D.default,{getPopupContainer:we=>we.parentNode,onChange:j},Object.keys(oe).map(we=>T.createElement(yt,{key:we,value:we},oe[we][0])))),T.createElement(C.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},T.createElement(k,{mode:b})),T.createElement("div",{className:"flex-container flex-end"},T.createElement(B.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.createElement(B.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function k({value:S,onChange:c,mode:b,options:I={}}){const j=(0,T.useRef)(),[R,we]=(0,T.useState)();return(0,T.useEffect)(()=>{if(R){let ke=function(Ke){const Ee=Ke.getValue();c&&c(Ee)};return R.on("change",ke),()=>{R.off("change",ke)}}},[R,c]),(0,T.useEffect)(()=>{R&&R.setOption("mode",b)},[R,b]),(0,T.useEffect)(()=>{R&&(S!==R.getValue()||S==="")&&setTimeout(()=>{R.setValue(S||"")},300)},[R,S]),(0,T.useEffect)(()=>{if(j.current&&!R){const ke=P().fromTextArea(j.current,Qe({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},I));we(ke)}},[j.current,R]),T.createElement("div",{className:"my-codemirror-container"},T.createElement("textarea",{ref:j}))}},54051:function(nn,Re,f){"use strict";f.r(Re),f.d(Re,{default:function(){return Ee}});var T=f(22688),D=f(59301),C=f(76560),B=f(78241),p=f(92832),P=f(44905),N=f(84236),be={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},le=Object.defineProperty,y=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,ge=(de,G,V)=>G in de?le(de,G,{enumerable:!0,configurable:!0,writable:!0,value:V}):de[G]=V,De=(de,G)=>{for(var V in G||(G={}))Ie.call(G,V)&&ge(de,V,G[V]);if(y)for(var V of y(G))A.call(G,V)&&ge(de,V,G[V]);return de},Q=(de,G)=>{var V={};for(var Z in de)Ie.call(de,Z)&&G.indexOf(Z)<0&&(V[Z]=de[Z]);if(de!=null&&y)for(var Z of y(de))G.indexOf(Z)<0&&A.call(de,Z)&&(V[Z]=de[Z]);return V},Qe=(de,G,V)=>new Promise((Z,_)=>{var ae=Ce=>{try{J(V.next(Ce))}catch(Le){_(Le)}},Y=Ce=>{try{J(V.throw(Ce))}catch(Le){_(Le)}},J=Ce=>Ce.done?Z(Ce.value):Promise.resolve(Ce.value).then(ae,Y);J((V=V.apply(de,G)).next())});const tt=de=>{var G=de,{shixunsDetail:V,globalSetting:Z,loading:_,user:ae,dispatch:Y}=G,J=Q(G,["shixunsDetail","globalSetting","loading","user","dispatch"]);const Ce=(0,C.useLocation)(),[Le,se]=(0,D.useState)({}),Me=(0,D.useRef)(),re=(0,D.useRef)(),[ht]=B.default.useForm(),[at,gt]=(0,D.useState)("");(0,D.useEffect)(()=>(Y({type:"globalSetting/footerToggle",payload:!1}),()=>{Y({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,D.useEffect)(()=>{const Ne=sessionStorage.getItem("pathArray");if(Ne){const M=Ne.split(",").join("/"),ve=M.indexOf("/")===0?M.substr(1):M;gt(ve)}},[]),(0,D.useEffect)(()=>{var Ne,M,ve,te;re.current=(M=(Ne=Ce.pathname)==null?void 0:Ne.split("/"))==null?void 0:M[2],Me.current=((te=(ve=Ce.pathname)==null?void 0:ve.split("/"))==null?void 0:te[3])==="repository"},[]);const Ye=(...Ne)=>Qe(void 0,[...Ne],function*(M={}){if(yield Y({type:"shixunsDetail/addRepositoryFile",payload:{id:re.current,message:M.commitMessage,content:M.codeMirror,path:`${at?`${at}/`:""}${M.path||""}`,secret_repository:Me.current?void 0:!0}})){const te=Me.current?`/shixuns/${re.current}/repository${at?`/master/shixun_show/${at}`:""}`:`/shixuns/${re.current}/secret_repository`;C.history.replace(te)}}),xt=()=>{var Ne,M;C.history.push(`/shixuns/${re.current}/${(M=(Ne=Ce.pathname)==null?void 0:Ne.split("/"))==null?void 0:M[3]}${at?`/master/shixun_show/${at}`:""}`)};return D.createElement("section",{className:be.bg},D.createElement("div",{className:be.wrap},D.createElement("div",{className:be.title},"\u65B0\u5EFA\u6587\u4EF6"),D.createElement(B.default,{className:"mt10",form:ht,scrollToFirstError:!0,layout:"vertical",onFinish:Ye,onValuesChange:()=>se(De({},ht.getFieldsValue()))},D.createElement(B.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},D.createElement(B.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},D.createElement("span",null,D.createElement("span",{className:"mr5"},at?`${at}/`:""),D.createElement(p.default,{className:be.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),D.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")),D.createElement(B.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"}]},D.createElement(p.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"})),D.createElement("div",{className:"mt10 mb20"},D.createElement(B.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},D.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"]}}))),D.createElement(B.default.Item,{noStyle:!0},D.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:xt})))))};var yt=(0,C.connect)(({shixunsDetail:de,loading:G,globalSetting:V,user:Z})=>({shixunsDetail:de,globalSetting:V,user:Z,loading:G.models.index}))(tt),Et={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},oe=Object.defineProperty,k=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,b=(de,G,V)=>G in de?oe(de,G,{enumerable:!0,configurable:!0,writable:!0,value:V}):de[G]=V,I=(de,G)=>{for(var V in G||(G={}))S.call(G,V)&&b(de,V,G[V]);if(k)for(var V of k(G))c.call(G,V)&&b(de,V,G[V]);return de},j=(de,G)=>{var V={};for(var Z in de)S.call(de,Z)&&G.indexOf(Z)<0&&(V[Z]=de[Z]);if(de!=null&&k)for(var Z of k(de))G.indexOf(Z)<0&&c.call(de,Z)&&(V[Z]=de[Z]);return V},R=(de,G,V)=>new Promise((Z,_)=>{var ae=Ce=>{try{J(V.next(Ce))}catch(Le){_(Le)}},Y=Ce=>{try{J(V.throw(Ce))}catch(Le){_(Le)}},J=Ce=>Ce.done?Z(Ce.value):Promise.resolve(Ce.value).then(ae,Y);J((V=V.apply(de,G)).next())});const we=de=>{var G=de,{shixunsDetail:V,globalSetting:Z,loading:_,user:ae,dispatch:Y}=G,J=j(G,["shixunsDetail","globalSetting","loading","user","dispatch"]);const Ce=(0,C.useLocation)(),[Le,se]=(0,D.useState)({}),Me=(0,D.useRef)(),re=(0,D.useRef)(),[ht]=B.default.useForm(),[at,gt]=(0,D.useState)("");(0,D.useEffect)(()=>(Y({type:"globalSetting/footerToggle",payload:!1}),()=>{Y({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,D.useEffect)(()=>{const Ne=sessionStorage.getItem("pathArray");if(Ne){const M=Ne.split(",").join("/"),ve=M.indexOf("/")===0?M.substr(1):M;gt(ve)}},[]),(0,D.useEffect)(()=>{var Ne,M,ve,te;re.current=(M=(Ne=Ce.pathname)==null?void 0:Ne.split("/"))==null?void 0:M[2],Me.current=((te=(ve=Ce.pathname)==null?void 0:ve.split("/"))==null?void 0:te[3])==="repository"},[]);const Ye=(...Ne)=>R(void 0,[...Ne],function*(M={}){if(yield Y({type:"shixunsDetail/addRepositoryFile",payload:{id:re.current,message:M.commitMessage,content:M.codeMirror,path:`${at?`${at}/`:""}${M.path||""}`,secret_repository:Me.current?void 0:!0}})){const te=Me.current?`/shixuns/${re.current}/repository${at?`/master/shixun_show/${at}`:""}`:`/shixuns/${re.current}/secret_repository`;C.history.replace(te)}}),xt=()=>{var Ne,M;C.history.push(`/shixuns/${re.current}/${(M=(Ne=Ce.pathname)==null?void 0:Ne.split("/"))==null?void 0:M[3]}${at?`/master/shixun_show/${at}`:""}`)};return D.createElement("section",{className:Et.bg},D.createElement("div",{className:Et.wrap},D.createElement("div",{className:Et.title},"\u65B0\u5EFA\u6587\u4EF6"),D.createElement(B.default,{className:"mt10",form:ht,scrollToFirstError:!0,layout:"vertical",onFinish:Ye,onValuesChange:()=>se(I({},ht.getFieldsValue()))},D.createElement(B.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},D.createElement(B.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},D.createElement("span",null,D.createElement("span",{className:"mr5"},at?`${at}/`:""),D.createElement(p.default,{className:Et.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),D.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")),D.createElement(B.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"}]},D.createElement(p.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"})),D.createElement("div",{className:"mt10 mb20"},D.createElement(B.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},D.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"]}}))),D.createElement(B.default.Item,{noStyle:!0},D.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:xt})))))};var ke=(0,C.connect)(({shixunsDetail:de,loading:G,globalSetting:V,user:Z})=>({shixunsDetail:de,globalSetting:V,user:Z,loading:G.models.index}))(we);const Ke=({globalSetting:de})=>{var G;switch(Number((G=de==null?void 0:de.setting)==null?void 0:G.theme)){case T.Fy.THEMEONE:return D.createElement(yt,null);case T.Fy.DEFAULT:default:return D.createElement(ke,null)}};var Ee=(0,C.connect)(({globalSetting:de})=>({globalSetting:de}))(Ke)},19080:function(nn,Re,f){"use strict";f.d(Re,{F:function(){return p},Z:function(){return B}});var T=f(92310),D=f.n(T);const C=null;function B(P,N,be){return D()({[`${P}-status-success`]:N==="success",[`${P}-status-warning`]:N==="warning",[`${P}-status-error`]:N==="error",[`${P}-status-validating`]:N==="validating",[`${P}-has-feedback`]:be})}const p=(P,N)=>N||P},93891:function(nn,Re,f){"use strict";var T=f(59301),D=f(36355),C=f(64165);const B=p=>{const{componentName:P}=p,{getPrefixCls:N}=(0,T.useContext)(D.E_),be=N("empty");switch(P){case"Table":case"List":return T.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return T.createElement(C.Z,{image:C.Z.PRESENTED_IMAGE_SIMPLE,className:`${be}-small`});default:return T.createElement(C.Z,null)}};Re.Z=B},64165:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return oe}});var T=f(92310),D=f.n(T),C=f(59301),B=f(36355),p=f(9763),P=f(64993),N=f(88088),le=()=>{const[,k]=(0,N.Z)(),c=new P.C(k.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"}))))},Ie=()=>{const[,k]=(0,N.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:I}=k,{borderColor:j,shadowColor:R,contentColor:we}=(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:j},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:we}))))},A=f(83116),ge=f(37613);const De=k=>{const{componentCls:S,margin:c,marginXS:b,marginXL:I,fontSize:j,lineHeight:R}=k;return{[S]:{marginInline:b,fontSize:j,lineHeight:R,textAlign:"center",[`${S}-image`]:{height:k.emptyImgHeight,marginBottom:b,opacity:k.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:k.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:I,color:k.colorTextDisabled,[`${S}-description`]:{color:k.colorTextDisabled},[`${S}-image`]:{height:k.emptyImgHeightMD}},"&-small":{marginBlock:b,color:k.colorTextDisabled,[`${S}-image`]:{height:k.emptyImgHeightSM}}}}};var Q=(0,A.Z)("Empty",k=>{const{componentCls:S,controlHeightLG:c}=k,b=(0,ge.TS)(k,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[De(b)]}),Qe=function(k,S){var c={};for(var b in k)Object.prototype.hasOwnProperty.call(k,b)&&S.indexOf(b)<0&&(c[b]=k[b]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,b=Object.getOwnPropertySymbols(k);I<b.length;I++)S.indexOf(b[I])<0&&Object.prototype.propertyIsEnumerable.call(k,b[I])&&(c[b[I]]=k[b[I]]);return c};const tt=C.createElement(le,null),yt=C.createElement(Ie,null),Et=k=>{var{className:S,rootClassName:c,prefixCls:b,image:I=tt,description:j,children:R,imageStyle:we,style:ke}=k,Ke=Qe(k,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Ee,direction:de,empty:G}=C.useContext(B.E_),V=Ee("empty",b),[Z,_]=Q(V),[ae]=(0,p.Z)("Empty"),Y=typeof j!="undefined"?j:ae==null?void 0:ae.description,J=typeof Y=="string"?Y:"empty";let Ce=null;return typeof I=="string"?Ce=C.createElement("img",{alt:J,src:I}):Ce=I,Z(C.createElement("div",Object.assign({className:D()(_,V,G==null?void 0:G.className,{[`${V}-normal`]:I===yt,[`${V}-rtl`]:de==="rtl"},S,c),style:Object.assign(Object.assign({},G==null?void 0:G.style),ke)},Ke),C.createElement("div",{className:`${V}-image`,style:we},Ce),Y&&C.createElement("div",{className:`${V}-description`},Y),R&&C.createElement("div",{className:`${V}-footer`},R)))};Et.PRESENTED_IMAGE_DEFAULT=tt,Et.PRESENTED_IMAGE_SIMPLE=yt;var oe=Et},78241:function(nn,Re,f){"use strict";f.d(Re,{default:function(){return Bt}});var T=f(94480),D=f(92310),C=f.n(D),B=f(77900),p=f(59301),P=f(62892),N=f(32441);function be(g){const[F,W]=p.useState(g);return p.useEffect(()=>{const d=setTimeout(()=>{W(g)},g.length?0:10);return()=>{clearTimeout(d)}},[g]),F}var le=f(17313),y=f(29878),Ie=f(8378),A=f(37613),ge=f(83116),Q=g=>{const{componentCls:F}=g,W=`${F}-show-help`,d=`${F}-show-help-item`;return{[W]:{transition:`opacity ${g.motionDurationSlow} ${g.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[d]:{overflow:"hidden",transition:`height ${g.motionDurationSlow} ${g.motionEaseInOut},
opacity ${g.motionDurationSlow} ${g.motionEaseInOut},
transform ${g.motionDurationSlow} ${g.motionEaseInOut} !important`,[`&${d}-appear, &${d}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${d}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Qe=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}}),tt=(g,F)=>{const{formItemCls:W}=g;return{[W]:{[`${W}-label > label`]:{height:F},[`${W}-control-input`]:{minHeight:F}}}},yt=g=>{const{componentCls:F}=g;return{[g.componentCls]:Object.assign(Object.assign(Object.assign({},(0,le.Wf)(g)),Qe(g)),{[`${F}-text`]:{display:"inline-block",paddingInlineEnd:g.paddingSM},"&-small":Object.assign({},tt(g,g.controlHeightSM)),"&-large":Object.assign({},tt(g,g.controlHeightLG))})}},Et=g=>{const{formItemCls:F,iconCls:W,componentCls:d,rootPrefixCls:h,labelRequiredMarkColor:x,labelColor:L,labelFontSize:ne,labelHeight:H,labelColonMarginInlineStart:$,labelColonMarginInlineEnd:he,itemMarginBottom:ce}=g;return{[F]:Object.assign(Object.assign({},(0,le.Wf)(g)),{marginBottom:ce,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${h}-row`]:{display:"none"},"&-has-warning":{[`${F}-split`]:{color:g.colorError}},"&-has-error":{[`${F}-split`]:{color:g.colorWarning}},[`${F}-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:ne,[`> ${W}`]:{fontSize:g.fontSize,verticalAlign:"top"},[`&${F}-required:not(${F}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:g.marginXXS,color:x,fontSize:g.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${d}-hide-required-mark &`]:{display:"none"}},[`${F}-optional`]:{display:"inline-block",marginInlineStart:g.marginXXS,color:g.colorTextDescription,[`${d}-hide-required-mark &`]:{display:"none"}},[`${F}-tooltip`]:{color:g.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:g.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:$,marginInlineEnd:he},[`&${F}-no-colon::after`]:{content:'"\\a0"'}}},[`${F}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${h}-col-'"]):not([class*="' ${h}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:g.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[F]:{"&-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 ${F}-explain`]:{height:"auto",opacity:1},[`${F}-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}}})}},oe=g=>{const{componentCls:F,formItemCls:W}=g;return{[`${F}-horizontal`]:{[`${W}-label`]:{flexGrow:0},[`${W}-control`]:{flex:"1 1 0",minWidth:0},[`${W}-label[class$='-24'], ${W}-label[class*='-24 ']`]:{[`& + ${W}-control`]:{minWidth:"unset"}}}}},k=g=>{const{componentCls:F,formItemCls:W}=g;return{[`${F}-inline`]:{display:"flex",flexWrap:"wrap",[W]:{flex:"none",marginInlineEnd:g.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${W}-label,
> ${W}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${W}-label`]:{flex:"none"},[`${F}-text`]:{display:"inline-block"},[`${W}-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:F,formItemCls:W,rootPrefixCls:d}=g;return{[`${W} ${W}-label`]:S(g),[F]:{[W]:{flexWrap:"wrap",[`${W}-label, ${W}-control`]:{[`&:not([class*=" ${d}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=g=>{const{componentCls:F,formItemCls:W,rootPrefixCls:d}=g;return{[`${F}-vertical`]:{[W]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${F}-item-control`]:{width:"100%"}}},[`${F}-vertical ${W}-label,
.${d}-col-24${W}-label,
.${d}-col-xl-24${W}-label`]:S(g),[`@media (max-width: ${g.screenXSMax}px)`]:[c(g),{[F]:{[`.${d}-col-xs-24${W}-label`]:S(g)}}],[`@media (max-width: ${g.screenSMMax}px)`]:{[F]:{[`.${d}-col-sm-24${W}-label`]:S(g)}},[`@media (max-width: ${g.screenMDMax}px)`]:{[F]:{[`.${d}-col-md-24${W}-label`]:S(g)}},[`@media (max-width: ${g.screenLGMax}px)`]:{[F]:{[`.${d}-col-lg-24${W}-label`]:S(g)}}}},I=(g,F)=>(0,A.TS)(g,{formItemCls:`${g.componentCls}-item`,rootPrefixCls:F});var j=(0,ge.Z)("Form",(g,F)=>{let{rootPrefixCls:W}=F;const d=I(g,W);return[yt(d),Et(d),Q(d),oe(d),k(d),b(d),(0,Ie.Z)(d),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 we(g,F,W){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof g=="string"?g:`${F}-${d}`,error:g,errorStatus:W}}var Ke=g=>{let{help:F,helpStatus:W,errors:d=R,warnings:h=R,className:x,fieldId:L,onVisibleChanged:ne}=g;const{prefixCls:H}=p.useContext(N.Rk),$=`${H}-item-explain`,[,he]=j(H),ce=(0,p.useMemo)(()=>(0,P.Z)(H),[H]),He=be(d),O=be(h),K=p.useMemo(()=>F!=null?[we(F,"help",W)]:[].concat((0,T.Z)(He.map((Se,je)=>we(Se,"error","error",je))),(0,T.Z)(O.map((Se,je)=>we(Se,"warning","warning",je)))),[F,W,He,O]),Ue={};return L&&(Ue.id=`${L}_help`),p.createElement(B.default,{motionDeadline:ce.motionDeadline,motionName:`${H}-show-help`,visible:!!K.length,onVisibleChanged:ne},Se=>{const{className:je,style:$e}=Se;return p.createElement("div",Object.assign({},Ue,{className:C()($,je,x,he),style:$e,role:"alert"}),p.createElement(B.CSSMotionList,Object.assign({keys:K},(0,P.Z)(H),{motionName:`${H}-show-help-item`,component:!1}),ct=>{const{key:ee,error:fe,errorStatus:ze,className:it,style:Ge}=ct;return p.createElement("div",{key:ee,className:C()(it,{[`${$}-${ze}`]:ze}),style:Ge},fe)}))})},Ee=f(95013),de=f(36355),G=f(1684),V=f(52946),Z=f(19716),_=f(16722);const ae=["parentNode"],Y="form_item";function J(g){return g===void 0||g===!1?[]:Array.isArray(g)?g:[g]}function Ce(g,F){if(!g.length)return;const W=g.join("_");return F?`${F}_${W}`:ae.includes(W)?`${Y}_${W}`:W}function Le(g,F,W,d,h,x){let L=d;return x!==void 0?L=x:W.validating?L="validating":g.length?L="error":F.length?L="warning":(W.touched||h&&W.validated)&&(L="success"),L}function se(g){return J(g).join("_")}function Me(g){const[F]=(0,Ee.useForm)(),W=p.useRef({}),d=p.useMemo(()=>g!=null?g:Object.assign(Object.assign({},F),{__INTERNAL__:{itemRef:h=>x=>{const L=se(h);x?W.current[L]=x:delete W.current[L]}},scrollToField:function(h){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const L=J(h),ne=Ce(L,d.__INTERNAL__.name),H=ne?document.getElementById(ne):null;H&&(0,_.Z)(H,Object.assign({scrollMode:"if-needed",block:"nearest"},x))},getFieldInstance:h=>{const x=se(h);return W.current[x]}}),[g,F]);return[d]}var re=f(28726),ht=function(g,F){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&F.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)F.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};const at=(g,F)=>{const W=p.useContext(G.Z),{getPrefixCls:d,direction:h,form:x}=p.useContext(de.E_),{prefixCls:L,className:ne,rootClassName:H,size:$,disabled:he=W,form:ce,colon:He,labelAlign:O,labelWrap:K,labelCol:Ue,wrapperCol:Se,hideRequiredMark:je,layout:$e="horizontal",scrollToFirstError:ct,requiredMark:ee,onFinishFailed:fe,name:ze,style:it,feedbackIcons:Ge}=g,lt=ht(g,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),_t=(0,Z.Z)($),Rt=p.useContext(re.Z),At=(0,p.useMemo)(()=>ee!==void 0?ee:x&&x.requiredMark!==void 0?x.requiredMark:!je,[je,ee,x]),$t=He!=null?He:x==null?void 0:x.colon,Ot=d("form",L),[qt,jt]=j(Ot),Ut=C()(Ot,`${Ot}-${$e}`,{[`${Ot}-hide-required-mark`]:At===!1,[`${Ot}-rtl`]:h==="rtl",[`${Ot}-${_t}`]:_t},jt,x==null?void 0:x.className,ne,H),[kt]=Me(ce),{__INTERNAL__:Lt}=kt;Lt.name=ze;const wt=(0,p.useMemo)(()=>({name:ze,labelAlign:O,labelCol:Ue,labelWrap:K,wrapperCol:Se,vertical:$e==="vertical",colon:$t,requiredMark:At,itemRef:Lt.itemRef,form:kt,feedbackIcons:Ge}),[ze,O,Ue,Se,$e,$t,At,kt,Ge]);p.useImperativeHandle(F,()=>kt);const zt=(fn,Pt)=>{if(fn){let Wt={block:"nearest"};typeof fn=="object"&&(Wt=fn),kt.scrollToField(Pt,Wt)}},It=fn=>{if(fe==null||fe(fn),fn.errorFields.length){const Pt=fn.errorFields[0].name;if(ct!==void 0){zt(ct,Pt);return}x&&x.scrollToFirstError!==void 0&&zt(x.scrollToFirstError,Pt)}};return qt(p.createElement(G.n,{disabled:he},p.createElement(V.q,{size:_t},p.createElement(N.RV,Object.assign({},{validateMessages:Rt}),p.createElement(N.q3.Provider,{value:wt},p.createElement(Ee.default,Object.assign({id:ze},lt,{name:ze,onFinishFailed:It,form:kt,style:Object.assign(Object.assign({},x==null?void 0:x.style),it),className:Ut})))))))};var Ye=p.forwardRef(at),xt=f(41799),Ne=f(8654),M=f(92343),ve=f(11592);function te(g){if(typeof g=="function")return g;const F=(0,ve.Z)(g);return F.length<=1?F[0]:F}const X=()=>{const{status:g,errors:F=[],warnings:W=[]}=(0,p.useContext)(N.aM);return{status:g,errors:F,warnings:W}};X.Context=N.aM;var ue=X,me=f(16089);function Oe(g){const[F,W]=p.useState(g),d=(0,p.useRef)(null),h=(0,p.useRef)([]),x=(0,p.useRef)(!1);p.useEffect(()=>(x.current=!1,()=>{x.current=!0,me.Z.cancel(d.current),d.current=null}),[]);function L(ne){x.current||(d.current===null&&(h.current=[],d.current=(0,me.Z)(()=>{d.current=null,W(H=>{let $=H;return h.current.forEach(he=>{$=he($)}),$})})),h.current.push(ne))}return[F,L]}function ye(){const{itemRef:g}=p.useContext(N.q3),F=p.useRef({});function W(d,h){const x=h&&typeof h=="object"&&h.ref,L=d.join("_");return(F.current.name!==L||F.current.originRef!==x)&&(F.current.name=L,F.current.originRef=x,F.current.ref=(0,Ne.sQ)(g(d),x)),F.current.ref}return W}var Ae=f(29194),ie=f(34280),Je=f(2738),pe=f(27382),Pe=f(37028);const Fe=g=>{const{formItemCls:F}=g;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${F}-control`]:{display:"flex"}}}};var Te=(0,ge.b)(["Form","item-item"],(g,F)=>{let{rootPrefixCls:W}=F;const d=I(g,W);return[Fe(d)]}),U=g=>{const{prefixCls:F,status:W,wrapperCol:d,children:h,errors:x,warnings:L,_internalItemRender:ne,extra:H,help:$,fieldId:he,marginBottom:ce,onErrorVisibleChanged:He}=g,O=`${F}-item`,K=p.useContext(N.q3),Ue=d||K.wrapperCol||{},Se=C()(`${O}-control`,Ue.className),je=p.useMemo(()=>Object.assign({},K),[K]);delete je.labelCol,delete je.wrapperCol;const $e=p.createElement("div",{className:`${O}-control-input`},p.createElement("div",{className:`${O}-control-input-content`},h)),ct=p.useMemo(()=>({prefixCls:F,status:W}),[F,W]),ee=ce!==null||x.length||L.length?p.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},p.createElement(N.Rk.Provider,{value:ct},p.createElement(Ke,{fieldId:he,errors:x,warnings:L,help:$,helpStatus:W,className:`${O}-explain-connected`,onVisibleChanged:He})),!!ce&&p.createElement("div",{style:{width:0,height:ce}})):null,fe={};he&&(fe.id=`${he}_extra`);const ze=H?p.createElement("div",Object.assign({},fe,{className:`${O}-extra`}),H):null,it=ne&&ne.mark==="pro_table_render"&&ne.render?ne.render(g,{input:$e,errorList:ee,extra:ze}):p.createElement(p.Fragment,null,$e,ee,ze);return p.createElement(N.q3.Provider,{value:je},p.createElement(Pe.Z,Object.assign({},Ue,{className:Se}),it),p.createElement(Te,{prefixCls:F}))},nt=f(61485),_e=f(31724),ut=f(9763),vt=f(6848),rn=function(g,F){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&F.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)F.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};function Zt(g){return g?typeof g=="object"&&!p.isValidElement(g)?g:{title:g}:null}var Dt=g=>{let{prefixCls:F,label:W,htmlFor:d,labelCol:h,labelAlign:x,colon:L,required:ne,requiredMark:H,tooltip:$}=g;var he;const[ce]=(0,ut.Z)("Form"),{vertical:He,labelAlign:O,labelCol:K,labelWrap:Ue,colon:Se}=p.useContext(N.q3);if(!W)return null;const je=h||K||{},$e=x||O,ct=`${F}-item-label`,ee=C()(ct,$e==="left"&&`${ct}-left`,je.className,{[`${ct}-wrap`]:!!Ue});let fe=W;const ze=L===!0||Se!==!1&&L!==!1;ze&&!He&&typeof W=="string"&&W.trim()!==""&&(fe=W.replace(/[:|]\s*$/,""));const Ge=Zt($);if(Ge){const{icon:At=p.createElement(nt.Z,null)}=Ge,$t=rn(Ge,["icon"]),Ot=p.createElement(vt.Z,Object.assign({},$t),p.cloneElement(At,{className:`${F}-item-tooltip`,title:""}));fe=p.createElement(p.Fragment,null,fe,Ot)}const lt=H==="optional",_t=typeof H=="function";_t?fe=H(fe,{required:!!ne}):lt&&!ne&&(fe=p.createElement(p.Fragment,null,fe,p.createElement("span",{className:`${F}-item-optional`,title:""},(ce==null?void 0:ce.optional)||((he=_e.Z.Form)===null||he===void 0?void 0:he.optional))));const Rt=C()({[`${F}-item-required`]:ne,[`${F}-item-required-mark-optional`]:lt||_t,[`${F}-item-no-colon`]:!ze});return p.createElement(Pe.Z,Object.assign({},je,{className:ee}),p.createElement("label",{htmlFor:d,className:Rt,title:typeof W=="string"?W:""},fe))},Xt=f(29679),Yt=f(19248),sn=f(96512),Cn=f(58617);const un={success:Xt.Z,warning:sn.Z,error:Yt.Z,validating:Cn.Z};function $n(g){let{children:F,errors:W,warnings:d,hasFeedback:h,validateStatus:x,prefixCls:L,meta:ne,noStyle:H}=g;const $=`${L}-item`,{feedbackIcons:he}=p.useContext(N.q3),ce=Le(W,d,ne,null,!!h,x),{isFormItemInput:He,status:O}=p.useContext(N.aM),K=p.useMemo(()=>{var Ue;let Se;if(h){const ct=h!==!0&&h.icons||he,ee=ce&&((Ue=ct==null?void 0:ct({status:ce,errors:W,warnings:d}))===null||Ue===void 0?void 0:Ue[ce]),fe=ce&&un[ce];Se=ee!==!1&&fe?p.createElement("span",{className:C()(`${$}-feedback-icon`,`${$}-feedback-icon-${ce}`)},ee||p.createElement(fe,null)):null}let je=!0,$e=ce||"";return H&&(je=He,$e=(ce!=null?ce:O)||""),{status:$e,errors:W,warnings:d,hasFeedback:!!h,feedbackIcon:Se,isFormItemInput:je}},[ce,h,H,He,O]);return p.createElement(N.aM.Provider,{value:K},F)}var zn=function(g,F){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&F.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)F.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W};function pn(g){const{prefixCls:F,className:W,rootClassName:d,style:h,help:x,errors:L,warnings:ne,validateStatus:H,meta:$,hasFeedback:he,hidden:ce,children:He,fieldId:O,required:K,isRequired:Ue,onSubItemMetaChange:Se}=g,je=zn(g,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),$e=`${F}-item`,{requiredMark:ct}=p.useContext(N.q3),ee=p.useRef(null),fe=be(L),ze=be(ne),it=x!=null,Ge=!!(it||L.length||ne.length),lt=!!ee.current&&(0,Ae.Z)(ee.current),[_t,Rt]=p.useState(null);(0,ie.Z)(()=>{if(Ge&&ee.current){const jt=getComputedStyle(ee.current);Rt(parseInt(jt.marginBottom,10))}},[Ge,lt]);const At=jt=>{jt||Rt(null)},Ot=function(){let jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ut=jt?fe:$.errors,kt=jt?ze:$.warnings;return Le(Ut,kt,$,"",!!he,H)}(),qt=C()($e,W,d,{[`${$e}-with-help`]:it||fe.length||ze.length,[`${$e}-has-feedback`]:Ot&&he,[`${$e}-has-success`]:Ot==="success",[`${$e}-has-warning`]:Ot==="warning",[`${$e}-has-error`]:Ot==="error",[`${$e}-is-validating`]:Ot==="validating",[`${$e}-hidden`]:ce});return p.createElement("div",{className:qt,style:h,ref:ee},p.createElement(pe.Z,Object.assign({className:`${$e}-row`},(0,Je.Z)(je,["_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(Dt,Object.assign({htmlFor:O},g,{requiredMark:ct,required:K!=null?K:Ue,prefixCls:F})),p.createElement(U,Object.assign({},g,$,{errors:fe,warnings:ze,prefixCls:F,status:Ot,help:x,marginBottom:_t,onErrorVisibleChanged:At}),p.createElement(N.qI.Provider,{value:Se},p.createElement($n,{prefixCls:F,meta:$,errors:$.errors,warnings:$.warnings,hasFeedback:he,validateStatus:Ot},He)))),!!_t&&p.createElement("div",{className:`${$e}-margin-offset`,style:{marginBottom:-_t}}))}const Ln="__SPLIT__",wn=null,In=p.memo(g=>{let{children:F}=g;return F},(g,F)=>g.value===F.value&&g.update===F.update&&g.childProps.length===F.childProps.length&&g.childProps.every((W,d)=>W===F.childProps[d]));function xn(g){return g!=null}function dn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Bn(g){const{name:F,noStyle:W,className:d,dependencies:h,prefixCls:x,shouldUpdate:L,rules:ne,children:H,required:$,label:he,messageVariables:ce,trigger:He="onChange",validateTrigger:O,hidden:K,help:Ue}=g,{getPrefixCls:Se}=p.useContext(de.E_),{name:je}=p.useContext(N.q3),$e=te(H),ct=typeof $e=="function",ee=p.useContext(N.qI),{validateTrigger:fe}=p.useContext(Ee.FieldContext),ze=O!==void 0?O:fe,it=xn(F),Ge=Se("form",x),[lt,_t]=j(Ge),Rt=p.useContext(Ee.ListContext),At=p.useRef(),[$t,Ot]=Oe({}),[qt,jt]=(0,xt.Z)(()=>dn()),Ut=Pt=>{const Wt=Rt==null?void 0:Rt.getKey(Pt.name);if(jt(Pt.destroy?dn():Pt,!0),W&&Ue!==!1&&ee){let an=Pt.name;if(Pt.destroy)an=At.current||an;else if(Wt!==void 0){const[Gt,En]=Wt;an=[Gt].concat((0,T.Z)(En)),At.current=an}ee(Pt,an)}},kt=(Pt,Wt)=>{Ot(an=>{const Gt=Object.assign({},an),Un=[].concat((0,T.Z)(Pt.name.slice(0,-1)),(0,T.Z)(Wt)).join(Ln);return Pt.destroy?delete Gt[Un]:Gt[Un]=Pt,Gt})},[Lt,wt]=p.useMemo(()=>{const Pt=(0,T.Z)(qt.errors),Wt=(0,T.Z)(qt.warnings);return Object.values($t).forEach(an=>{Pt.push.apply(Pt,(0,T.Z)(an.errors||[])),Wt.push.apply(Wt,(0,T.Z)(an.warnings||[]))}),[Pt,Wt]},[$t,qt.errors,qt.warnings]),zt=ye();function It(Pt,Wt,an){return W&&!K?p.createElement($n,{prefixCls:Ge,hasFeedback:g.hasFeedback,validateStatus:g.validateStatus,meta:qt,errors:Lt,warnings:wt,noStyle:!0},Pt):p.createElement(pn,Object.assign({key:"row"},g,{className:C()(d,_t),prefixCls:Ge,fieldId:Wt,isRequired:an,errors:Lt,warnings:wt,meta:qt,onSubItemMetaChange:kt}),Pt)}if(!it&&!ct&&!h)return lt(It($e));let fn={};return typeof he=="string"?fn.label=he:F&&(fn.label=String(F)),ce&&(fn=Object.assign(Object.assign({},fn),ce)),lt(p.createElement(Ee.Field,Object.assign({},g,{messageVariables:fn,trigger:He,validateTrigger:ze,onMetaChange:Ut}),(Pt,Wt,an)=>{const Gt=J(F).length&&Wt?Wt.name:[],En=Ce(Gt,je),Un=$!==void 0?$:!!(ne&&ne.some(ft=>{if(ft&&typeof ft=="object"&&ft.required&&!ft.warningOnly)return!0;if(typeof ft=="function"){const en=ft(an);return en&&en.required&&!en.warningOnly}return!1})),Mt=Object.assign({},Pt);let st=null;if(Array.isArray($e)&&it)st=$e;else if(!(ct&&(!(L||h)||it))){if(!(h&&!ct&&!it))if((0,M.l$)($e)){const ft=Object.assign(Object.assign({},$e.props),Mt);if(ft.id||(ft.id=En),Ue||Lt.length>0||wt.length>0||g.extra){const Vt=[];(Ue||Lt.length>0)&&Vt.push(`${En}_help`),g.extra&&Vt.push(`${En}_extra`),ft["aria-describedby"]=Vt.join(" ")}Lt.length>0&&(ft["aria-invalid"]="true"),Un&&(ft["aria-required"]="true"),(0,Ne.Yr)($e)&&(ft.ref=zt(Gt,$e)),new Set([].concat((0,T.Z)(J(He)),(0,T.Z)(J(ze)))).forEach(Vt=>{ft[Vt]=function(){for(var Ft,ln,gn,mn,Tn,Ve=arguments.length,Ze=new Array(Ve),mt=0;mt<Ve;mt++)Ze[mt]=arguments[mt];(gn=Mt[Vt])===null||gn===void 0||(Ft=gn).call.apply(Ft,[Mt].concat(Ze)),(Tn=(mn=$e.props)[Vt])===null||Tn===void 0||(ln=Tn).call.apply(ln,[mn].concat(Ze))}});const tn=[ft["aria-required"],ft["aria-invalid"],ft["aria-describedby"]];st=p.createElement(In,{value:Mt[g.valuePropName||"value"],update:$e,childProps:tn},(0,M.Tm)($e,ft))}else ct&&(L||h)&&!it?st=$e(an):st=$e}return It(st,En,Un)}))}const Qt=Bn;Qt.useStatus=ue;var Fn=Qt,Wn=function(g,F){var W={};for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&F.indexOf(d)<0&&(W[d]=g[d]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,d=Object.getOwnPropertySymbols(g);h<d.length;h++)F.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(g,d[h])&&(W[d[h]]=g[d[h]]);return W},pr=g=>{var{prefixCls:F,children:W}=g,d=Wn(g,["prefixCls","children"]);const{getPrefixCls:h}=p.useContext(de.E_),x=h("form",F),L=p.useMemo(()=>({prefixCls:x,status:"error"}),[x]);return p.createElement(Ee.List,Object.assign({},d),(ne,H,$)=>p.createElement(N.Rk.Provider,{value:L},W(ne.map(he=>Object.assign(Object.assign({},he),{fieldKey:he.key})),H,{errors:$.errors,warnings:$.warnings})))};function on(){const{form:g}=(0,p.useContext)(N.q3);return g}const rt=Ye;rt.Item=Fn,rt.List=pr,rt.ErrorList=Ke,rt.useForm=Me,rt.useFormInstance=on,rt.useWatch=Ee.useWatch,rt.Provider=N.RV,rt.create=()=>{};var Bt=rt},9432:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return Et},n:function(){return tt}});var T=f(19248),D=f(92310),C=f.n(D),B=f(93681),p=f(8654),P=f(59301),N=f(19080),be=f(36355),le=f(1684),y=f(19716),Ie=f(32441),A=f(33234),ge=f(59412),De=f(9937);function Q(oe){return!!(oe.prefix||oe.suffix||oe.allowClear)}var Qe=function(oe,k){var S={};for(var c in oe)Object.prototype.hasOwnProperty.call(oe,c)&&k.indexOf(c)<0&&(S[c]=oe[c]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(oe);b<c.length;b++)k.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(oe,c[b])&&(S[c[b]]=oe[c[b]]);return S};function tt(oe,k){if(!oe)return;oe.focus(k);const{cursor:S}=k||{};if(S){const c=oe.value.length;switch(S){case"start":oe.setSelectionRange(0,0);break;case"end":oe.setSelectionRange(c,c);break;default:oe.setSelectionRange(0,c);break}}}var Et=(0,P.forwardRef)((oe,k)=>{var S;const{prefixCls:c,bordered:b=!0,status:I,size:j,disabled:R,onBlur:we,onFocus:ke,suffix:Ke,allowClear:Ee,addonAfter:de,addonBefore:G,className:V,style:Z,styles:_,rootClassName:ae,onChange:Y,classNames:J}=oe,Ce=Qe(oe,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Le,direction:se,input:Me}=P.useContext(be.E_),re=Le("input",c),ht=(0,P.useRef)(null),[at,gt]=(0,De.ZP)(re),{compactSize:Ye,compactItemClassnames:xt}=(0,A.ri)(re,se),Ne=(0,y.Z)(Te=>{var qe;return(qe=j!=null?j:Ye)!==null&&qe!==void 0?qe:Te}),M=P.useContext(le.Z),ve=R!=null?R:M,{status:te,hasFeedback:X,feedbackIcon:ue}=(0,P.useContext)(Ie.aM),me=(0,N.F)(te,I),Oe=Q(oe)||!!X,ye=(0,P.useRef)(Oe);(0,P.useEffect)(()=>{var Te;Oe&&ye.current,ye.current=Oe},[Oe]);const Ae=(0,ge.Z)(ht,!0),ie=Te=>{Ae(),we==null||we(Te)},Je=Te=>{Ae(),ke==null||ke(Te)},pe=Te=>{Ae(),Y==null||Y(Te)},Pe=(X||Ke)&&P.createElement(P.Fragment,null,Ke,X&&ue);let Fe;return typeof Ee=="object"&&(Ee!=null&&Ee.clearIcon)?Fe=Ee:Ee&&(Fe={clearIcon:P.createElement(T.Z,null)}),at(P.createElement(B.default,Object.assign({ref:(0,p.sQ)(k,ht),prefixCls:re,autoComplete:Me==null?void 0:Me.autoComplete},Ce,{disabled:ve,onBlur:ie,onFocus:Je,style:Object.assign(Object.assign({},Me==null?void 0:Me.style),Z),styles:Object.assign(Object.assign({},Me==null?void 0:Me.styles),_),suffix:Pe,allowClear:Fe,className:C()(V,ae,xt,Me==null?void 0:Me.className),onChange:pe,addonAfter:de&&P.createElement(A.BR,null,P.createElement(Ie.Ux,{override:!0,status:!0},de)),addonBefore:G&&P.createElement(A.BR,null,P.createElement(Ie.Ux,{override:!0,status:!0},G)),classNames:Object.assign(Object.assign(Object.assign({},J),Me==null?void 0:Me.classNames),{input:C()({[`${re}-sm`]:Ne==="small",[`${re}-lg`]:Ne==="large",[`${re}-rtl`]:se==="rtl",[`${re}-borderless`]:!b},!Oe&&(0,N.Z)(re,me),J==null?void 0:J.input,(S=Me==null?void 0:Me.classNames)===null||S===void 0?void 0:S.input,gt)}),classes:{affixWrapper:C()({[`${re}-affix-wrapper-sm`]:Ne==="small",[`${re}-affix-wrapper-lg`]:Ne==="large",[`${re}-affix-wrapper-rtl`]:se==="rtl",[`${re}-affix-wrapper-borderless`]:!b},(0,N.Z)(`${re}-affix-wrapper`,me,X),gt),wrapper:C()({[`${re}-group-rtl`]:se==="rtl"},gt),group:C()({[`${re}-group-wrapper-sm`]:Ne==="small",[`${re}-group-wrapper-lg`]:Ne==="large",[`${re}-group-wrapper-rtl`]:se==="rtl",[`${re}-group-wrapper-disabled`]:ve},(0,N.Z)(`${re}-group-wrapper`,me,X),gt)}})))})},1643:function(nn,Re,f){"use strict";var T=f(19248),D=f(92310),C=f.n(D),B=f(9296),p=f(59301),P=f(19080),N=f(36355),be=f(1684),le=f(19716),y=f(32441),Ie=f(9432),A=f(9937),ge=function(Q,Qe){var tt={};for(var yt in Q)Object.prototype.hasOwnProperty.call(Q,yt)&&Qe.indexOf(yt)<0&&(tt[yt]=Q[yt]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,yt=Object.getOwnPropertySymbols(Q);Et<yt.length;Et++)Qe.indexOf(yt[Et])<0&&Object.prototype.propertyIsEnumerable.call(Q,yt[Et])&&(tt[yt[Et]]=Q[yt[Et]]);return tt};const De=(0,p.forwardRef)((Q,Qe)=>{const{prefixCls:tt,bordered:yt=!0,size:Et,disabled:oe,status:k,allowClear:S,showCount:c,classNames:b,rootClassName:I,className:j}=Q,R=ge(Q,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:we,direction:ke}=p.useContext(N.E_),Ke=(0,le.Z)(Et),Ee=p.useContext(be.Z),de=oe!=null?oe:Ee,{status:G,hasFeedback:V,feedbackIcon:Z}=p.useContext(y.aM),_=(0,P.F)(G,k),ae=p.useRef(null);p.useImperativeHandle(Qe,()=>{var se;return{resizableTextArea:(se=ae.current)===null||se===void 0?void 0:se.resizableTextArea,focus:Me=>{var re,ht;(0,Ie.n)((ht=(re=ae.current)===null||re===void 0?void 0:re.resizableTextArea)===null||ht===void 0?void 0:ht.textArea,Me)},blur:()=>{var Me;return(Me=ae.current)===null||Me===void 0?void 0:Me.blur()}}});const Y=we("input",tt);let J;typeof S=="object"&&(S!=null&&S.clearIcon)?J=S:S&&(J={clearIcon:p.createElement(T.Z,null)});const[Ce,Le]=(0,A.ZP)(Y);return Ce(p.createElement(B.default,Object.assign({},R,{disabled:de,allowClear:J,className:C()(j,I),classes:{affixWrapper:C()(`${Y}-textarea-affix-wrapper`,{[`${Y}-affix-wrapper-rtl`]:ke==="rtl",[`${Y}-affix-wrapper-borderless`]:!yt,[`${Y}-affix-wrapper-sm`]:Ke==="small",[`${Y}-affix-wrapper-lg`]:Ke==="large",[`${Y}-textarea-show-count`]:c},(0,P.Z)(`${Y}-affix-wrapper`,_),Le)},classNames:Object.assign(Object.assign({},b),{textarea:C()({[`${Y}-borderless`]:!yt,[`${Y}-sm`]:Ke==="small",[`${Y}-lg`]:Ke==="large"},(0,P.Z)(Y,_),Le,b==null?void 0:b.textarea)}),prefixCls:Y,suffix:V&&p.createElement("span",{className:`${Y}-textarea-suffix`},Z),showCount:c,ref:ae})))});Re.Z=De},59412:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return D}});var T=f(59301);function D(C,B){const p=(0,T.useRef)([]),P=()=>{p.current.push(setTimeout(()=>{var N,be,le,y;!((N=C.current)===null||N===void 0)&&N.input&&((be=C.current)===null||be===void 0?void 0:be.input.getAttribute("type"))==="password"&&(!((le=C.current)===null||le===void 0)&&le.input.hasAttribute("value"))&&((y=C.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,T.useEffect)(()=>(B&&P(),()=>p.current.forEach(N=>{N&&clearTimeout(N)})),[]),P}},92832:function(nn,Re,f){"use strict";f.d(Re,{default:function(){return Ke}});var T=f(92310),D=f.n(T),C=f(59301),B=f(36355),p=f(32441),P=f(9937),be=Ee=>{const{getPrefixCls:de,direction:G}=(0,C.useContext)(B.E_),{prefixCls:V,className:Z}=Ee,_=de("input-group",V),ae=de("input"),[Y,J]=(0,P.ZP)(ae),Ce=D()(_,{[`${_}-lg`]:Ee.size==="large",[`${_}-sm`]:Ee.size==="small",[`${_}-compact`]:Ee.compact,[`${_}-rtl`]:G==="rtl"},J,Z),Le=(0,C.useContext)(p.aM),se=(0,C.useMemo)(()=>Object.assign(Object.assign({},Le),{isFormItemInput:!1}),[Le]);return Y(C.createElement("span",{className:Ce,style:Ee.style,onMouseEnter:Ee.onMouseEnter,onMouseLeave:Ee.onMouseLeave,onFocus:Ee.onFocus,onBlur:Ee.onBlur},C.createElement(p.aM.Provider,{value:se},Ee.children)))},le=f(9432),y=f(73331),Ie=f(15277),A=f(2738),ge=f(8654),De=f(59412),Q=function(Ee,de){var G={};for(var V in Ee)Object.prototype.hasOwnProperty.call(Ee,V)&&de.indexOf(V)<0&&(G[V]=Ee[V]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,V=Object.getOwnPropertySymbols(Ee);Z<V.length;Z++)de.indexOf(V[Z])<0&&Object.prototype.propertyIsEnumerable.call(Ee,V[Z])&&(G[V[Z]]=Ee[V[Z]]);return G};const Qe=Ee=>Ee?C.createElement(Ie.Z,null):C.createElement(y.Z,null),tt={click:"onClick",hover:"onMouseOver"};var Et=C.forwardRef((Ee,de)=>{const{visibilityToggle:G=!0}=Ee,V=typeof G=="object"&&G.visible!==void 0,[Z,_]=(0,C.useState)(()=>V?G.visible:!1),ae=(0,C.useRef)(null);C.useEffect(()=>{V&&_(G.visible)},[V,G]);const Y=(0,De.Z)(ae),J=()=>{const{disabled:ve}=Ee;ve||(Z&&Y(),_(te=>{var X;const ue=!te;return typeof G=="object"&&((X=G.onVisibleChange)===null||X===void 0||X.call(G,ue)),ue}))},Ce=ve=>{const{action:te="click",iconRender:X=Qe}=Ee,ue=tt[te]||"",me=X(Z),Oe={[ue]:J,className:`${ve}-icon`,key:"passwordIcon",onMouseDown:ye=>{ye.preventDefault()},onMouseUp:ye=>{ye.preventDefault()}};return C.cloneElement(C.isValidElement(me)?me:C.createElement("span",null,me),Oe)},{className:Le,prefixCls:se,inputPrefixCls:Me,size:re}=Ee,ht=Q(Ee,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:at}=C.useContext(B.E_),gt=at("input",Me),Ye=at("input-password",se),xt=G&&Ce(Ye),Ne=D()(Ye,Le,{[`${Ye}-${re}`]:!!re}),M=Object.assign(Object.assign({},(0,A.Z)(ht,["suffix","iconRender","visibilityToggle"])),{type:Z?"text":"password",className:Ne,prefixCls:gt,suffix:xt});return re&&(M.size=re),C.createElement(le.Z,Object.assign({ref:(0,ge.sQ)(de,ae)},M))}),oe=f(47472),k=f(92343),S=f(3113),c=f(19716),b=f(33234),I=function(Ee,de){var G={};for(var V in Ee)Object.prototype.hasOwnProperty.call(Ee,V)&&de.indexOf(V)<0&&(G[V]=Ee[V]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,V=Object.getOwnPropertySymbols(Ee);Z<V.length;Z++)de.indexOf(V[Z])<0&&Object.prototype.propertyIsEnumerable.call(Ee,V[Z])&&(G[V[Z]]=Ee[V[Z]]);return G},R=C.forwardRef((Ee,de)=>{const{prefixCls:G,inputPrefixCls:V,className:Z,size:_,suffix:ae,enterButton:Y=!1,addonAfter:J,loading:Ce,disabled:Le,onSearch:se,onChange:Me,onCompositionStart:re,onCompositionEnd:ht}=Ee,at=I(Ee,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:gt,direction:Ye}=C.useContext(B.E_),xt=C.useRef(!1),Ne=gt("input-search",G),M=gt("input",V),{compactSize:ve}=(0,b.ri)(Ne,Ye),te=(0,c.Z)(U=>{var nt;return(nt=_!=null?_:ve)!==null&&nt!==void 0?nt:U}),X=C.useRef(null),ue=U=>{U&&U.target&&U.type==="click"&&se&&se(U.target.value,U,{source:"clear"}),Me&&Me(U)},me=U=>{var nt;document.activeElement===((nt=X.current)===null||nt===void 0?void 0:nt.input)&&U.preventDefault()},Oe=U=>{var nt,_e;se&&se((_e=(nt=X.current)===null||nt===void 0?void 0:nt.input)===null||_e===void 0?void 0:_e.value,U,{source:"input"})},ye=U=>{xt.current||Ce||Oe(U)},Ae=typeof Y=="boolean"?C.createElement(oe.Z,null):null,ie=`${Ne}-button`;let Je;const pe=Y||{},Pe=pe.type&&pe.type.__ANT_BUTTON===!0;Pe||pe.type==="button"?Je=(0,k.Tm)(pe,Object.assign({onMouseDown:me,onClick:U=>{var nt,_e;(_e=(nt=pe==null?void 0:pe.props)===null||nt===void 0?void 0:nt.onClick)===null||_e===void 0||_e.call(nt,U),Oe(U)},key:"enterButton"},Pe?{className:ie,size:te}:{})):Je=C.createElement(S.ZP,{className:ie,type:Y?"primary":void 0,size:te,disabled:Le,key:"enterButton",onMouseDown:me,onClick:Oe,loading:Ce,icon:Ae},Y),J&&(Je=[Je,(0,k.Tm)(J,{key:"addonAfter"})]);const Fe=D()(Ne,{[`${Ne}-rtl`]:Ye==="rtl",[`${Ne}-${te}`]:!!te,[`${Ne}-with-button`]:!!Y},Z),Te=U=>{xt.current=!0,re==null||re(U)},qe=U=>{xt.current=!1,ht==null||ht(U)};return C.createElement(le.Z,Object.assign({ref:(0,ge.sQ)(X,de),onPressEnter:ye},at,{size:te,onCompositionStart:Te,onCompositionEnd:qe,prefixCls:M,addonAfter:Je,suffix:ae,onChange:ue,className:Fe,disabled:Le}))}),we=f(1643);const ke=le.Z;ke.Group=be,ke.Search=R,ke.TextArea=we.Z,ke.Password=Et;var Ke=ke},9937:function(nn,Re,f){"use strict";f.d(Re,{M1:function(){return N},TM:function(){return k},Xy:function(){return be},bi:function(){return Ie},e5:function(){return oe},ik:function(){return A},nz:function(){return p},pU:function(){return P},s7:function(){return ge},x0:function(){return y}});var T=f(17313),D=f(74207),C=f(37613),B=f(83116);const p=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),P=S=>({borderColor:S.hoverBorderColor}),N=S=>({borderColor:S.activeBorderColor,boxShadow:S.activeShadow,outline:0}),be=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})))}),le=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:I,borderRadiusLG:j,paddingInlineLG:R}=S;return{padding:`${c}px ${R}px`,fontSize:b,lineHeight:I,borderRadius:j}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Ie=(S,c)=>{const{componentCls:b,colorError:I,colorWarning:j,errorActiveShadow:R,warningActiveShadow:we,colorErrorBorderHover:ke,colorWarningBorderHover:Ke}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:I,"&:hover":{borderColor:ke},"&:focus, &-focused":Object.assign({},N((0,C.TS)(S,{activeBorderColor:I,activeShadow:R}))),[`${b}-prefix, ${b}-suffix`]:{color:I}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:j,"&:hover":{borderColor:Ke},"&:focus, &-focused":Object.assign({},N((0,C.TS)(S,{activeBorderColor:j,activeShadow:we}))),[`${b}-prefix, ${b}-suffix`]:{color:j}}}},A=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({},N(S)),"&-disabled, &[disabled]":Object.assign({},be(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({},le(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ge=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({},le(S)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},y(S)),[`&-lg ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightLG},[`&-sm ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightSM},[`> ${c}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${c}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${S.paddingInline}px`,color:S.colorText,fontWeight:"normal",fontSize:S.fontSize,textAlign:"center",backgroundColor:S.colorFillAlter,border:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`,borderRadius:S.borderRadius,transition:`all ${S.motionDurationSlow}`,lineHeight:1,[`${b}-select`]:{margin:`-${S.paddingBlock+1}px -${S.paddingInline}px`,[`&${b}-select-single:not(${b}-select-customize-input)`]:{[`${b}-select-selector`]:{backgroundColor:"inherit",border:`${S.lineWidth}px ${S.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${b}-select-selector`]:{color:S.colorPrimary}}},[`${b}-cascader-picker`]:{margin:`-9px -${S.paddingInline}px`,backgroundColor:"transparent",[`${b}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,T.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:S.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${b}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-S.lineWidth,borderInlineEndWidth:S.lineWidth},[`${c}`]:{float:"none"},[`& > ${b}-select > ${b}-select-selector,
& > ${b}-select-auto-complete ${c},
& > ${b}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:S.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${b}-select-focused`]:{zIndex:1},[`& > ${b}-select > ${b}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${b}-select:first-child > ${b}-select-selector,
& > ${b}-select-auto-complete:first-child ${c},
& > ${b}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius},[`& > *:last-child,
& > ${b}-select:last-child > ${b}-select-selector,
& > ${b}-cascader-picker:last-child ${c},
& > ${b}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:S.lineWidth,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius},[`& > ${b}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-S.lineWidth,[`${c}-affix-wrapper`]:{borderRadius:0}},[`${c}-group-wrapper:not(:last-child)`]:{[`&${c}-search > ${c}-group`]:{[`& > ${c}-group-addon > ${c}-search-button`]:{borderRadius:0},[`& > ${c}`]:{borderStartStartRadius:S.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:S.borderRadius}}}})}},De=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,T.Wf)(S)),A(S)),Ie(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"}})}},Q=S=>{const{componentCls:c}=S;return{[`${c}-clear-icon`]:{margin:0,color:S.colorTextQuaternary,fontSize:S.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${S.motionDurationSlow}`,"&:hover":{color:S.colorTextTertiary},"&:active":{color:S.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${S.inputAffixPadding}px`}}}},Qe=S=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:I,motionDurationSlow:j,colorIcon:R,colorIconHover:we,iconCls:ke}=S;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A(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}}}),Q(S)),{[`${ke}${c}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${j}`,"&:hover":{color:we}}}),Ie(S,`${c}-affix-wrapper`))}},tt=S=>{const{componentCls:c,colorError:b,colorWarning:I,borderRadiusLG:j,borderRadiusSM:R}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,T.Wf)(S)),ge(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:j,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({},be(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}}}})}},yt=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 oe(S){return(0,C.TS)(S,{inputAffixPadding:S.paddingXXS})}const k=S=>{const{controlHeight:c,fontSize:b,lineHeight:I,lineWidth:j,controlHeightSM:R,controlHeightLG:we,fontSizeLG:ke,lineHeightLG:Ke,paddingSM:Ee,controlPaddingHorizontalSM:de,controlPaddingHorizontal:G,colorFillAlter:V,colorPrimaryHover:Z,controlOutlineWidth:_,controlOutline:ae,colorErrorOutline:Y,colorWarningOutline:J}=S;return{paddingBlock:Math.max(Math.round((c-b*I)/2*10)/10-j,3),paddingBlockSM:Math.max(Math.round((R-b*I)/2*10)/10-j,0),paddingBlockLG:Math.ceil((we-ke*Ke)/2*10)/10-j,paddingInline:Ee-j,paddingInlineSM:de-j,paddingInlineLG:G-j,addonBg:V,activeBorderColor:Z,hoverBorderColor:Z,activeShadow:`0 0 0 ${_}px ${ae}`,errorActiveShadow:`0 0 0 ${_}px ${Y}`,warningActiveShadow:`0 0 0 ${_}px ${J}`}};Re.ZP=(0,B.Z)("Input",S=>{const c=(0,C.TS)(S,oe(S));return[De(c),Et(c),Qe(c),tt(c),yt(c),(0,D.c)(c)]},k)},57809:function(nn,Re,f){"use strict";var T=f(92310),D=f.n(T),C=f(77861),B=f(2738),p=f(59301),P=f(53487),N=f(62892),be=f(19080),le=f(36355),y=f(1684),Ie=f(93891),A=f(19716),ge=f(32441),De=f(33234),Q=f(14154),Qe=f(58582),tt=f(84443),yt=f(66339),Et=function(b,I){var j={};for(var R in b)Object.prototype.hasOwnProperty.call(b,R)&&I.indexOf(R)<0&&(j[R]=b[R]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,R=Object.getOwnPropertySymbols(b);we<R.length;we++)I.indexOf(R[we])<0&&Object.prototype.propertyIsEnumerable.call(b,R[we])&&(j[R[we]]=b[R[we]]);return j};const oe="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=(b,I)=>{var j,{prefixCls:R,bordered:we=!0,className:ke,rootClassName:Ke,getPopupContainer:Ee,popupClassName:de,dropdownClassName:G,listHeight:V=256,placement:Z,listItemHeight:_=24,size:ae,disabled:Y,notFoundContent:J,status:Ce,builtinPlacements:Le,dropdownMatchSelectWidth:se,popupMatchSelectWidth:Me,direction:re,style:ht,allowClear:at}=b,gt=Et(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ye,getPrefixCls:xt,renderEmpty:Ne,direction:M,virtual:ve,popupMatchSelectWidth:te,popupOverflow:X,select:ue}=p.useContext(le.E_),me=xt("select",R),Oe=xt(),ye=re!=null?re:M,{compactSize:Ae,compactItemClassnames:ie}=(0,De.ri)(me,ye),[Je,pe]=(0,Q.Z)(me),Pe=p.useMemo(()=>{const{mode:In}=gt;if(In!=="combobox")return In===oe?"combobox":In},[gt.mode]),Fe=Pe==="multiple"||Pe==="tags",Te=(0,tt.Z)(gt.suffixIcon,gt.showArrow),qe=(j=Me!=null?Me:se)!==null&&j!==void 0?j:te,{status:U,hasFeedback:nt,isFormItemInput:_e,feedbackIcon:ut}=p.useContext(ge.aM),vt=(0,be.F)(U,Ce);let rn;J!==void 0?rn=J:Pe==="combobox"?rn=null:rn=(Ne==null?void 0:Ne("Select"))||p.createElement(Ie.Z,{componentName:"Select"});const{suffixIcon:Zt,itemIcon:Nt,removeIcon:Dt,clearIcon:Xt}=(0,yt.Z)(Object.assign(Object.assign({},gt),{multiple:Fe,hasFeedback:nt,feedbackIcon:ut,showSuffixIcon:Te,prefixCls:me,showArrow:gt.showArrow,componentName:"Select"})),Yt=at===!0?{clearIcon:Xt}:at,sn=(0,B.Z)(gt,["suffixIcon","itemIcon"]),Cn=D()(de||G,{[`${me}-dropdown-${ye}`]:ye==="rtl"},Ke,pe),un=(0,A.Z)(In=>{var xn;return(xn=ae!=null?ae:Ae)!==null&&xn!==void 0?xn:In}),$n=p.useContext(y.Z),zn=Y!=null?Y:$n,pn=D()({[`${me}-lg`]:un==="large",[`${me}-sm`]:un==="small",[`${me}-rtl`]:ye==="rtl",[`${me}-borderless`]:!we,[`${me}-in-form-item`]:_e},(0,be.Z)(me,vt,nt),ie,ue==null?void 0:ue.className,ke,Ke,pe),Ln=p.useMemo(()=>Z!==void 0?Z:ye==="rtl"?"bottomRight":"bottomLeft",[Z,ye]),wn=(0,Qe.Z)(Le,X);return Je(p.createElement(C.ZP,Object.assign({ref:I,virtual:ve,showSearch:ue==null?void 0:ue.showSearch},sn,{style:Object.assign(Object.assign({},ue==null?void 0:ue.style),ht),dropdownMatchSelectWidth:qe,builtinPlacements:wn,transitionName:(0,N.m)(Oe,"slide-up",gt.transitionName),listHeight:V,listItemHeight:_,mode:Pe,prefixCls:me,placement:Ln,direction:ye,suffixIcon:Zt,menuItemSelectedIcon:Nt,removeIcon:Dt,allowClear:Yt,notFoundContent:rn,className:pn,getPopupContainer:Ee||Ye,dropdownClassName:Cn,disabled:zn})))},S=p.forwardRef(k),c=(0,P.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=oe,S.Option=C.Wx,S.OptGroup=C.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,Re.default=S},14154:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return S}});var T=f(17313),D=f(74207),C=f(37613),B=f(83116),p=f(13826),P=f(92899);const N=c=>{const{optionHeight:b,optionFontSize:I,optionLineHeight:j,optionPadding:R}=c;return{position:"relative",display:"block",minHeight:b,padding:R,color:c.colorText,fontWeight:"normal",fontSize:I,lineHeight:j,boxSizing:"border-box"}};var le=c=>{const{antCls:b,componentCls:I}=c,j=`${I}-item`,R=`&${b}-slide-up-enter${b}-slide-up-enter-active`,we=`&${b}-slide-up-appear${b}-slide-up-appear-active`,ke=`&${b}-slide-up-leave${b}-slide-up-leave-active`,Ke=`${I}-dropdown-placement-`;return[{[`${I}-dropdown`]:Object.assign(Object.assign({},(0,T.Wf)(c)),{position:"absolute",top:-9999,zIndex:c.zIndexPopup,boxSizing:"border-box",padding:c.paddingXXS,overflow:"hidden",fontSize:c.fontSize,fontVariant:"initial",backgroundColor:c.colorBgElevated,borderRadius:c.borderRadiusLG,outline:"none",boxShadow:c.boxShadowSecondary,[`
${R}${Ke}bottomLeft,
${we}${Ke}bottomLeft
`]:{animationName:p.fJ},[`
${R}${Ke}topLeft,
${we}${Ke}topLeft,
${R}${Ke}topRight,
${we}${Ke}topRight
`]:{animationName:p.Qt},[`${ke}${Ke}bottomLeft`]:{animationName:p.Uw},[`
${ke}${Ke}topLeft,
${ke}${Ke}topRight
`]:{animationName:p.ly},"&-hidden":{display:"none"},[`${j}`]:Object.assign(Object.assign({},N(c)),{cursor:"pointer",transition:`background ${c.motionDurationSlow} ease`,borderRadius:c.borderRadiusSM,"&-group":{color:c.colorTextDescription,fontSize:c.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},T.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${j}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${j}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${j}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${j}-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,Ie=c=>{let{controlHeightSM:b,controlHeight:I,lineWidth:j}=c;const R=(I-b)/2-j,we=Math.ceil(R/2);return[R,we]};function A(c,b){const{componentCls:I,iconCls:j}=c,R=`${I}-selection-overflow`,we=c.multipleSelectItemHeight,[ke]=Ie(c),Ke=b?`${I}-${b}`:"";return{[`${I}-multiple${Ke}`]:{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:`${ke-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:`${we}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:we,marginTop:y,marginBottom:y,lineHeight:`${we-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,T.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${j}`]:{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-ke,"\n &-input,\n &-mirror\n ":{height:we,fontFamily:c.fontFamily,lineHeight:`${we}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 De=c=>{const{componentCls:b}=c,I=(0,C.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),j=(0,C.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,R]=Ie(c);return[A(c),A(I,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:R}}},A(j,"lg")]};function Q(c,b){const{componentCls:I,inputPaddingHorizontalBase:j,borderRadius:R}=c,we=c.controlHeight-c.lineWidth*2,ke=Math.ceil(c.fontSize*1.25),Ke=b?`${I}-${b}`:"";return{[`${I}-single${Ke}`]:{fontSize:c.fontSize,[`${I}-selector`]:Object.assign(Object.assign({},(0,T.Wf)(c)),{display:"flex",borderRadius:R,[`${I}-selection-search`]:{position:"absolute",top:0,insetInlineStart:j,insetInlineEnd:j,bottom:0,"&-input":{width:"100%"}},[`
${I}-selection-item,
${I}-selection-placeholder
`]:{padding:0,lineHeight:`${we}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${we}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:ke},[`&${I}-open ${I}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${I}-customize-input)`]:{[`${I}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${j}px`,[`${I}-selection-search-input`]:{height:we},"&:after":{lineHeight:`${we}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 ${j}px`,"&:after":{display:"none"}}}}}}}function Qe(c){const{componentCls:b}=c,I=c.controlPaddingHorizontalSM-c.lineWidth;return[Q(c),Q((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}}}},Q((0,C.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const tt=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"}}}},yt=function(c,b){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:j,borderHoverColor:R,outlineColor:we,antCls:ke}=b,Ke=I?{[`${j}-selector`]:{borderColor:R}}:{};return{[c]:{[`&:not(${j}-disabled):not(${j}-customize-input):not(${ke}-pagination-size-changer)`]:Object.assign(Object.assign({},Ke),{[`${j}-focused& ${j}-selector`]:{borderColor:R,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${we}`,outline:0},[`&:hover ${j}-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"}}}},oe=c=>{const{componentCls:b,inputPaddingHorizontalBase:I,iconCls:j}=c;return{[b]:Object.assign(Object.assign({},(0,T.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},tt(c)),Et(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},T.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},T.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,T.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:I,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[j]:{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}}}},k=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%"}}},oe(c),Qe(c),De(c),le(c),{[`${b}-rtl`]:{direction:"rtl"}},yt(b,(0,C.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),yt(`${b}-status-error`,(0,C.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),yt(`${b}-status-warning`,(0,C.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,D.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var S=(0,B.Z)("Select",(c,b)=>{let{rootPrefixCls:I}=b;const j=(0,C.TS)(c,{rootPrefixCls:I,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[k(j)]},c=>{const{fontSize:b,lineHeight:I,controlHeight:j,controlPaddingHorizontal:R,zIndexPopupBase:we,colorText:ke,fontWeightStrong:Ke,controlItemBgActive:Ee,controlItemBgHover:de,colorBgContainer:G,colorFillSecondary:V,controlHeightLG:Z,controlHeightSM:_,colorBgContainerDisabled:ae,colorTextDisabled:Y}=c;return{zIndexPopup:we+50,optionSelectedColor:ke,optionSelectedFontWeight:Ke,optionSelectedBg:Ee,optionActiveBg:de,optionPadding:`${(j-b*I)/2}px ${R}px`,optionFontSize:b,optionLineHeight:I,optionHeight:j,selectorBg:G,clearBg:G,singleItemHeightLG:Z,multipleItemBg:V,multipleItemBorderColor:"transparent",multipleItemHeight:_,multipleItemHeightLG:j,multipleSelectorBgDisabled:ae,multipleItemColorDisabled:Y,multipleItemBorderColorDisabled:"transparent"}})},58582:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return D}});const T=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 D(C,B){return C||T(B)}},84443:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return T}});function T(D,C){return C!==void 0?C:D!==null}},66339:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});var T=f(40001),D=f(19248),C=f(99267),B=f(84105),p=f(58617),P=f(47472),N=f(59301);function be(le){let{suffixIcon:y,clearIcon:Ie,menuItemSelectedIcon:A,removeIcon:ge,loading:De,multiple:Q,hasFeedback:Qe,prefixCls:tt,showSuffixIcon:yt,feedbackIcon:Et,showArrow:oe,componentName:k}=le;const S=Ie!=null?Ie:N.createElement(D.Z,null),c=R=>y===null&&!Qe&&!oe?null:N.createElement(N.Fragment,null,yt!==!1&&R,Qe&&Et);let b=null;if(y!==void 0)b=c(y);else if(De)b=c(N.createElement(p.Z,{spin:!0}));else{const R=`${tt}-suffix`;b=we=>{let{open:ke,showSearch:Ke}=we;return c(ke&&Ke?N.createElement(P.Z,{className:R}):N.createElement(B.Z,{className:R}))}}let I=null;A!==void 0?I=A:Q?I=N.createElement(T.Z,null):I=null;let j=null;return ge!==void 0?j=ge:j=N.createElement(C.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:I,removeIcon:j}}},8378:function(nn,Re){"use strict";const f=T=>({[T.componentCls]:{[`${T.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}},[`${T.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}}});Re.Z=f},92899:function(nn,Re,f){"use strict";f.d(Re,{Fm:function(){return A}});var T=f(36237),D=f(95406);const C=new T.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),B=new T.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),p=new T.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P=new T.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),N=new T.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),be=new T.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),le=new T.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y=new T.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ie={"move-up":{inKeyframes:le,outKeyframes:y},"move-down":{inKeyframes:C,outKeyframes:B},"move-left":{inKeyframes:p,outKeyframes:P},"move-right":{inKeyframes:N,outKeyframes:be}},A=(ge,De)=>{const{antCls:Q}=ge,Qe=`${Q}-${De}`,{inKeyframes:tt,outKeyframes:yt}=Ie[De];return[(0,D.R)(Qe,tt,yt,ge.motionDurationMid),{[`
${Qe}-enter,
${Qe}-appear
`]:{opacity:0,animationTimingFunction:ge.motionEaseOutCirc},[`${Qe}-leave`]:{animationTimingFunction:ge.motionEaseInOutCirc}}]}},13826:function(nn,Re,f){"use strict";f.d(Re,{Qt:function(){return p},Uw:function(){return B},fJ:function(){return C},ly:function(){return P},oN:function(){return A}});var T=f(36237),D=f(95406);const C=new T.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),B=new T.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),p=new T.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),P=new T.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),N=new T.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),be=new T.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),le=new T.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),y=new T.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ie={"slide-up":{inKeyframes:C,outKeyframes:B},"slide-down":{inKeyframes:p,outKeyframes:P},"slide-left":{inKeyframes:N,outKeyframes:be},"slide-right":{inKeyframes:le,outKeyframes:y}},A=(ge,De)=>{const{antCls:Q}=ge,Qe=`${Q}-${De}`,{inKeyframes:tt,outKeyframes:yt}=Ie[De];return[(0,D.R)(Qe,tt,yt,ge.motionDurationMid),{[`
${Qe}-enter,
${Qe}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ge.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Qe}-leave`]:{animationTimingFunction:ge.motionEaseInQuint}}]}},89780:function(nn){(function(Re,f){nn.exports=f()})(this,function(){"use strict";var Re=navigator.userAgent,f=navigator.platform,T=/gecko\/\d/i.test(Re),D=/MSIE \d/.test(Re),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Re),B=/Edge\/(\d+)/.exec(Re),p=D||C||B,P=p&&(D?document.documentMode||6:+(B||C)[1]),N=!B&&/WebKit\//.test(Re),be=N&&/Qt\/\d+\.\d+/.test(Re),le=!B&&/Chrome\//.test(Re),y=/Opera\//.test(Re),Ie=/Apple Computer/.test(navigator.vendor),A=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Re),ge=/PhantomJS/.test(Re),De=!B&&/AppleWebKit/.test(Re)&&/Mobile\/\w+/.test(Re),Q=/Android/.test(Re),Qe=De||Q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Re),tt=De||/Mac/.test(f),yt=/\bCrOS\b/.test(Re),Et=/win/i.test(f),oe=y&&Re.match(/Version\/(\d*\.\d*)/);oe&&(oe=Number(oe[1])),oe&&oe>=15&&(y=!1,N=!0);var k=tt&&(be||y&&(oe==null||oe<12.11)),S=T||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 j(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 we(e,t,r,n){var i=R(e,t,r,n);return i.setAttribute("role","presentation"),i}var ke;document.createRange?ke=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:ke=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 Ke(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 Ee(){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 de(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function G(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 V=function(e){e.select()};De?V=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:p&&(V=function(e){try{e.select()}catch(t){}});function Z(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function _(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 ae(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 Y=function(){this.id=null,this.f=null,this.time=0,this.handler=Z(this.onTimeout,this)};Y.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Y.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 J(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Ce=50,Le={toString:function(){return"CodeMirror.Pass"}},se={scroll:!1},Me={origin:"*mouse"},re={origin:"+move"};function ht(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 at=[""];function gt(e){for(;at.length<=e;)at.push(Ye(at)+" ");return at[e]}function Ye(e){return e[e.length-1]}function xt(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Ne(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function M(){}function ve(e,t){var r;return Object.create?r=Object.create(e):(M.prototype=e,r=new M),t&&_(t,r),r}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function X(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function ue(e,t){return t?t.source.indexOf("\\w")>-1&&X(e)?!0:t.test(e):X(e)}function me(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Oe=/[\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 ye(e){return e.charCodeAt(0)>=768&&Oe.test(e)}function Ae(e,t,r){for(;(r<0?t>0:t<e.length)&&ye(e.charAt(t));)t+=r;return t}function ie(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 Je(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 pe=null;function Pe(e,t,r){var n;pe=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:pe=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:pe=i)}return n!=null?n:pe}var Fe=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 E=u.length,w=[],z=0;z<E;++z)w.push(r(u.charCodeAt(z)));for(var q=0,xe=m;q<E;++q){var Be=w[q];Be=="m"?w[q]=xe:xe=Be}for(var Xe=0,We=m;Xe<E;++Xe){var et=w[Xe];et=="1"&&We=="r"?w[Xe]="n":o.test(et)&&(We=et,et=="r"&&(w[Xe]="R"))}for(var Ct=1,pt=w[0];Ct<E-1;++Ct){var Kt=w[Ct];Kt=="+"&&pt=="1"&&w[Ct+1]=="1"?w[Ct]="1":Kt==","&&pt==w[Ct+1]&&(pt=="1"||pt=="n")&&(w[Ct]=pt),pt=Kt}for(var Sn=0;Sn<E;++Sn){var Qn=w[Sn];if(Qn==",")w[Sn]="N";else if(Qn=="%"){var Dn=void 0;for(Dn=Sn+1;Dn<E&&w[Dn]=="%";++Dn);for(var br=Sn&&w[Sn-1]=="!"||Dn<E&&w[Dn]=="1"?"1":"N",dr=Sn;dr<Dn;++dr)w[dr]=br;Sn=Dn-1}}for(var Hn=0,hr=m;Hn<E;++Hn){var er=w[Hn];hr=="L"&&er=="1"?w[Hn]="L":o.test(er)&&(hr=er)}for(var jn=0;jn<E;++jn)if(i.test(w[jn])){var Zn=void 0;for(Zn=jn+1;Zn<E&&i.test(w[Zn]);++Zn);for(var Pn=(jn?w[jn-1]:m)=="L",vr=(Zn<E?w[Zn]:m)=="L",Bi=Pn==vr?Pn?"L":"R":m,ai=jn;ai<Zn;++ai)w[ai]=Bi;jn=Zn-1}for(var ir=[],Zr,Jn=0;Jn<E;)if(a.test(w[Jn])){var ba=Jn;for(++Jn;Jn<E&&a.test(w[Jn]);++Jn);ir.push(new s(0,ba,Jn))}else{var Vr=Jn,yi=ir.length,bi=v=="rtl"?1:0;for(++Jn;Jn<E&&w[Jn]!="L";++Jn);for(var lr=Vr;lr<Jn;)if(l.test(w[lr])){Vr<lr&&(ir.splice(yi,0,new s(1,Vr,lr)),yi+=bi);var Wi=lr;for(++lr;lr<Jn&&l.test(w[lr]);++lr);ir.splice(yi,0,new s(2,Wi,lr)),yi+=bi,Vr=lr}else++lr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return v=="ltr"&&(ir[0].level==1&&(Zr=u.match(/^\s+/))&&(ir[0].from=Zr[0].length,ir.unshift(new s(0,0,Zr[0].length))),Ye(ir).level==1&&(Zr=u.match(/\s+$/))&&(Ye(ir).to-=Zr[0].length,ir.push(new s(0,E-Zr[0].length,E)))),v=="rtl"?ir.reverse():ir}}();function Te(e,t){var r=e.order;return r==null&&(r=e.order=Fe(e.text,t)),r}var qe=[],U=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]||qe).concat(r)}};function nt(e,t){return e._handlers&&e._handlers[t]||qe}function _e(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=J(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ut(e,t){var r=nt(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 vt(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ut(e,r||t.type,e,t),Yt(t)||t.codemirrorIgnore}function rn(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)J(r,t[n])==-1&&r.push(t[n])}function Zt(e,t){return nt(e,t).length>0}function Nt(e){e.prototype.on=function(t,r){U(this,t,r)},e.prototype.off=function(t,r){_e(this,t,r)}}function Dt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Xt(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){Dt(e),Xt(e)}function Cn(e){return e.target||e.srcElement}function un(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),tt&&e.ctrlKey&&t==1&&(t=3),t}var $n=function(){if(p&&P<9)return!1;var e=R("div");return"draggable"in e||"dragDrop"in e}(),zn;function pn(e){if(zn==null){var t=R("span","\u200B");j(e,R("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(zn=t.offsetWidth<=1&&t.offsetHeight>2&&!(p&&P<8))}var r=zn?R("span","\u200B"):R("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Ln;function wn(e){if(Ln!=null)return Ln;var t=j(e,document.createTextNode("A\u062EA")),r=ke(t,0,1).getBoundingClientRect(),n=ke(t,1,2).getBoundingClientRect();return I(e),!r||r.left==r.right?!1:Ln=n.right-r.right<3}var In=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},xn=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},dn=function(){var e=R("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Bn=null;function Qt(e){if(Bn!=null)return Bn;var t=j(e,R("span","x")),r=t.getBoundingClientRect(),n=ke(t,0,1).getBoundingClientRect();return Bn=Math.abs(r.left-n.left)>1}var Fn={},Wn={};function Sr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fn[e]=t}function pr(e,t){Wn[e]=t}function on(e){if(typeof e=="string"&&Wn.hasOwnProperty(e))e=Wn[e];else if(e&&typeof e.name=="string"&&Wn.hasOwnProperty(e.name)){var t=Wn[e.name];typeof t=="string"&&(t={name:t}),e=ve(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return on("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return on("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function rt(e,t){t=on(t);var r=Fn[t.name];if(!r)return rt(e,"text/plain");var n=r(e,t);if(Bt.hasOwnProperty(t.name)){var i=Bt[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 Bt={};function g(e,t){var r=Bt.hasOwnProperty(e)?Bt[e]:Bt[e]={};_(t,r)}function F(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 W(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 d(e,t,r){return e.startState?e.startState(t,r):!0}var h=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};h.prototype.eol=function(){return this.pos>=this.string.length},h.prototype.sol=function(){return this.pos==this.lineStart},h.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},h.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},h.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},h.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},h.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},h.prototype.skipToEnd=function(){this.pos=this.string.length},h.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},h.prototype.backUp=function(e){this.pos-=e},h.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ae(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ae(this.string,this.lineStart,this.tabSize):0)},h.prototype.indentation=function(){return ae(this.string,null,this.tabSize)-(this.lineStart?ae(this.string,this.lineStart,this.tabSize):0)},h.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)}},h.prototype.current=function(){return this.string.slice(this.start,this.pos)},h.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},h.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},h.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 ne(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 $(e){if(e.parent==null)return null;for(var t=e.parent,r=J(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 he(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function ce(e,t){return t>=e.first&&t<e.first+e.size}function He(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function O(e,t,r){if(r===void 0&&(r=null),!(this instanceof O))return new O(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 Ue(e,t){return e.sticky==t.sticky&&K(e,t)==0}function Se(e){return O(e.line,e.ch)}function je(e,t){return K(e,t)<0?t:e}function $e(e,t){return K(e,t)<0?e:t}function ct(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ee(e,t){if(t.line<e.first)return O(e.first,0);var r=e.first+e.size-1;return t.line>r?O(r,x(e,r).text.length):fe(t,x(e,t.line).text.length)}function fe(e,t){var r=e.ch;return r==null||r>t?O(e.line,t):r<0?O(e.line,0):e}function ze(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ee(e,t[n]);return r}var it=function(e,t){this.state=e,this.lookAhead=t},Ge=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};Ge.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Ge.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}},Ge.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ge.fromSaved=function(e,t,r){return t instanceof it?new Ge(e,F(e.mode,t.state),r,t.lookAhead):new Ge(e,F(e.mode,t),r)},Ge.prototype.save=function(e){var t=e!==!1?F(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new it(t,this.maxLookAhead):t};function lt(e,t,r,n){var i=[e.state.modeGen],o={};kt(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,E=0;r.state=!0,kt(e,t.text,v.mode,r,function(w,z){for(var q=m;E<w;){var xe=i[m];xe>w&&i.splice(m,1,w,i[m+1],xe),m+=2,E=Math.min(w,xe)}if(z)if(v.opaque)i.splice(q,m-q,w,"overlay "+z),m=q+2;else for(;q<m;q+=2){var Be=i[q+1];i[q+1]=(Be?Be+" ":"")+"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 _t(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Rt(e,$(t)),i=t.text.length>e.options.maxHighlightLength&&F(e.doc.mode,n.state),o=lt(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 Ge(n,!0,t);var o=Lt(e,t,r),a=o>n.first&&x(n,o-1).stateAfter,l=a?Ge.fromSaved(n,a,o):new Ge(n,d(n.mode),o);return n.iter(o,t,function(s){At(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 At(e,t,r,n){var i=e.doc.mode,o=new h(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&$t(i,r.state);!o.eol();)Ot(i,o,r.state),o.start=o.pos}function $t(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=W(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function Ot(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=W(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 qt=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=ee(i,t);var l=x(i,t.line),s=Rt(e,t.line,r),u=new h(l.text,e.options.tabSize,s),v;for(n&&(v=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=Ot(o,u,s.state),n&&v.push(new qt(u,a,F(i.mode,s.state)));return n?v:new qt(u,a,s.state)}function Ut(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 kt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,v=new h(t,e.options.tabSize,n),m,E=e.options.addModeClass&&[null];for(t==""&&Ut($t(r,n.state),o);!v.eol();){if(v.pos>e.options.maxHighlightLength?(l=!1,a&&At(e,t,n,v.pos),v.pos=t.length,m=null):m=Ut(Ot(r,v,n.state,E),o),E){var w=E[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 Lt(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 it?u.lookAhead:0)<=o.modeFrontier))return l;var v=ae(s.text,null,e.options.tabSize);(i==null||n>v)&&(i=l-1,n=v)}return i}function wt(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 it)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var zt=!1,It=!1;function fn(){zt=!0}function Pt(){It=!0}function Wt(e,t,r){this.marker=e,this.from=t,this.to=r}function an(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Gt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function En(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Un(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!r||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Wt(a,o.from,s?null:o.to))}}return n}function Mt(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 Wt(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function st(e,t){if(t.full)return null;var r=ce(e,t.from.line)&&x(e,t.from.line).markedSpans,n=ce(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=Un(r,i,a),s=Mt(n,o,a),u=t.text.length==1,v=Ye(t.text).length+(u?i:0);if(l)for(var m=0;m<l.length;++m){var E=l[m];if(E.to==null){var w=an(s,E.marker);w?u&&(E.to=w.to==null?null:w.to+v):E.to=i}}if(s)for(var z=0;z<s.length;++z){var q=s[z];if(q.to!=null&&(q.to+=v),q.from==null){var xe=an(l,q.marker);xe||(q.from=v,u&&(l||(l=[])).push(q))}else q.from+=v,u&&(l||(l=[])).push(q)}l&&(l=ft(l)),s&&s!=l&&(s=ft(s));var Be=[l];if(!u){var Xe=t.text.length-2,We;if(Xe>0&&l)for(var et=0;et<l.length;++et)l[et].to==null&&(We||(We=[])).push(new Wt(l[et].marker,null,null));for(var Ct=0;Ct<Xe;++Ct)Be.push(We);Be.push(s)}return Be}function ft(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function en(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(w){if(w.markedSpans)for(var z=0;z<w.markedSpans.length;++z){var q=w.markedSpans[z].marker;q.readOnly&&(!n||J(n,q)==-1)&&(n||(n=[])).push(q)}}),!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),E=K(u.to,l.to);(m<0||!a.inclusiveLeft&&!m)&&v.push({from:u.from,to:l.from}),(E>0||!a.inclusiveRight&&!E)&&v.push({from:l.to,to:u.to}),i.splice.apply(i,v),s+=v.length-3}}return i}function tn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Vt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ft(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function gn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=K(n.from,i.from)||Ft(e)-Ft(t);if(o)return-o;var a=K(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=It&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||gn(n,i.marker)<0)&&(n=i.marker);return n}function Tn(e){return mn(e,!0)}function Ve(e){return mn(e,!1)}function Ze(e,t){var r=It&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||gn(n,o.marker)<0)&&(n=o.marker)}return n}function mt(e,t,r,n,i){var o=x(e,t),a=It&&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)||Ft(s.marker)-Ft(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 bt(e){for(var t;t=Tn(e);)e=t.find(-1,!0).line;return e}function vn(e){for(var t;t=Ve(e);)e=t.find(1,!0).line;return e}function Cr(e){for(var t,r;t=Ve(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Kn(e,t){var r=x(e,t),n=bt(r);return r==n?t:$(n)}function _n(e,t){if(t>e.lastLine())return t;var r=x(e,t),n;if(!Nn(e,r))return t;for(;n=Ve(r);)r=n.find(1,!0).line;return $(r)+1}function Nn(e,t){var r=It&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}}function kn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kn(e,n.line,an(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,i))return!0}function Mn(e){e=bt(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=Tn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Ve(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 tr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return $(this)},Nt(tr);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),tn(e),Vt(e,r);var i=n?n(e):1;i!=e.height&&H(e,i)}function Xr(e){e.parent=null,tn(e)}var li={},Yr={};function xr(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=we("span",null,null,N?"padding-right: .1px":null),n={pre:we("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Hi,wn(e.display.measure)&&(a=Te(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&$(o);Ci(o,n,_t(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=G(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=G(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(pn(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(N){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ut(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=G(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 Hi(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?Si(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,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 E=s.exec(t),w=E?E.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(!E)break;m+=w+1;var q=void 0;if(E[0]==" "){var xe=e.cm.options.tabSize,Be=xe-e.col%xe;q=v.appendChild(R("span",gt(Be),"cm-tab")),q.setAttribute("role","presentation"),q.setAttribute("cm-text"," "),e.col+=Be}else E[0]=="\r"||E[0]==`
`?(q=v.appendChild(R("span",E[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),q.setAttribute("cm-text",E[0]),e.col+=1):(q=e.cm.options.specialCharPlaceholder(E[0]),q.setAttribute("cm-text",E[0]),p&&P<9?v.appendChild(R("span",[q])):v.appendChild(q),e.col+=1);e.map.push(e.pos,e.pos+1,q),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Xe=r||"";n&&(Xe+=n),i&&(Xe+=i);var We=R("span",[v],Xe,o);if(a)for(var et in a)a.hasOwnProperty(et)&&et!="style"&&et!="class"&&We.setAttribute(et,a[et]);return e.content.appendChild(We)}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,E=0;E<t.length&&(m=t[E],!(m.to>u&&m.from<=u));E++);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 _r(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]),xr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,v="",m,E,w=0,z,q,xe,Be,Xe;;){if(w==s){z=q=xe=E="",Xe=null,Be=null,w=1/0;for(var We=[],et=void 0,Ct=0;Ct<n.length;++Ct){var pt=n[Ct],Kt=pt.marker;if(Kt.type=="bookmark"&&pt.from==s&&Kt.widgetNode)We.push(Kt);else if(pt.from<=s&&(pt.to==null||pt.to>s||Kt.collapsed&&pt.to==s&&pt.from==s)){if(pt.to!=null&&pt.to!=s&&w>pt.to&&(w=pt.to,q=""),Kt.className&&(z+=" "+Kt.className),Kt.css&&(E=(E?E+";":"")+Kt.css),Kt.startStyle&&pt.from==s&&(xe+=" "+Kt.startStyle),Kt.endStyle&&pt.to==w&&(et||(et=[])).push(Kt.endStyle,pt.to),Kt.title&&((Xe||(Xe={})).title=Kt.title),Kt.attributes)for(var Sn in Kt.attributes)(Xe||(Xe={}))[Sn]=Kt.attributes[Sn];Kt.collapsed&&(!Be||gn(Be.marker,Kt)<0)&&(Be=pt)}else pt.from>s&&w>pt.from&&(w=pt.from)}if(et)for(var Qn=0;Qn<et.length;Qn+=2)et[Qn+1]==w&&(q+=" "+et[Qn]);if(!Be||Be.from==s)for(var Dn=0;Dn<We.length;++Dn)_r(t,0,We[Dn]);if(Be&&(Be.from||0)==s){if(_r(t,(Be.to==null?l+1:Be.to)-s,Be.marker,Be.from==null),Be.to==null)return;Be.to==s&&(Be=!1)}}if(s>=l)break;for(var br=Math.min(l,w);;){if(v){var dr=s+v.length;if(!Be){var Hn=dr>br?v.slice(0,br-s):v;t.addToken(t,Hn,m?m+z:z,xe,s+Hn.length==w?q:"",E,Xe)}if(dr>=br){v=v.slice(br-s),s=br;break}s=dr,xe=""}v=i.slice(o,o=r[u++]),m=xr(r[u++],t.cm.options)}}}function xi(e,t,r){this.line=t,this.rest=Cr(t),this.size=this.rest?$(Ye(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Nn(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 Nr=null;function ui(e){Nr?Nr.ops.push(e):e.ownsGroup=Nr={ops:[e],delayedCallbacks:[]}}function dt(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{dt(r)}finally{Nr=null,t(r)}}var St=null;function ot(e,t){var r=nt(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Nr?i=Nr.delayedCallbacks:St?i=St:(i=St=[],setTimeout(yn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function yn(){var e=St;St=null;for(var t=0;t<e.length;++t)e[t]()}function bn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Gn(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Zi(e,t,n)}t.changes=null}function 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 Ar(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qr(e,t)}function Gn(e,t){var r=t.text.className,n=Ar(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",He(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,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 Zi(e,t,r){t.alignable&&(t.alignable=null);for(var n=c("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Wr(e,t,r)}function mo(e,t,r,n){var i=Ar(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),Wr(e,t,n),t.node}function Wr(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"),Zo(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 Zo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Tr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!Ke(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;"),j(t.display.measure,R("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function $r(e,t){for(var r=Cn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function 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=j(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 Ce-e.display.nativeBarWidth}function Hr(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function _i(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Hr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function ji(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if($(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ko(e,t){t=bt(t);var r=$(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,j(e.display.lineMeasure,i.pre),n}function Ui(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=$(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(bn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=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=Jt(e,t,r,n),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var So={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],a="left";if(r=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Vi(e,t){var r=So;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Jt(e,t,r,n){var i=Gi(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var v=0;v<4;v++){for(;a&&ye(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&ye(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(ke(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}p&&P<11&&(u=Ht(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 E=o.parentNode.getClientRects()[0];E?u={left:E.left,right:E.left+Oi(e.display),top:E.top,bottom:E.bottom}:u=So}for(var w=u.top-t.rect.top,z=u.bottom-t.rect.top,q=(w+z)/2,xe=t.view.measure.heights,Be=0;Be<xe.length-1&&!(q<xe[Be]);Be++);var Xe=Be?xe[Be-1]:0,We=xe[Be],et={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Xe,bottom:We};return!u.left&&!u.right&&(et.bogus=!0),e.options.singleCursorHeightPerLine||(et.rtop=w,et.rbottom=z),et}function Ht(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Qt(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function nr(e){e.display.externalMeasure=null,I(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function On(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function or(){return le&&Q?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function gr(){return le&&Q?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Tr(e.widgets[r]));return t}function wr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Mn(t);if(n=="local"?a+=wi(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:gr());var s=l.left+(n=="window"?0:or());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-=or(),i-=gr();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 Fr(e,t,r,n,i){return n||(n=x(e.doc,t.line)),wr(e,n,Ui(e,n,t.ch,i),r)}function mr(e,t,r,n,i,o){n=n||x(e.doc,t.line),i||(i=Jr(e,n));function a(z,q){var xe=Pr(e,i,z,q?"right":"left",o);return q?xe.left=xe.right:xe.right=xe.left,wr(e,n,xe,r)}var l=Te(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,q,xe){var Be=l[q],Xe=Be.level==1;return a(xe?z-1:z,Xe!=xe)}var m=Pe(l,s,u),E=pe,w=v(s,m,u=="before");return E!=null&&(w.other=v(s,E,u!="before")),w}function Ca(e,t){var r=0;t=ee(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=x(e.doc,t.line),i=Mn(n)+wi(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _o(e,t,r,n,i){var o=O(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 _o(n.first,0,null,-1,-1);var i=he(n,r),o=n.first+n.size-1;if(i>o)return _o(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=Zl(e,a,i,t,r),s=Ze(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=x(n,i=u.line)}}function xa(e,t,r,n){n-=Ur(t);var i=t.text.length,o=ie(function(a){return Pr(e,r,a-1).bottom<=n},i,0);return i=ie(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=wr(e,t,Pr(e,r,n),"line").top;return xa(e,t,r,i)}function Uo(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Zl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=Ur(t),l=0,s=t.text.length,u=!0,v=Te(t,e.doc.direction);if(v){var m=(e.options.lineWrapping?_l: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 E=null,w=null,z=ie(function(Ct){var pt=Pr(e,o,Ct);return pt.top+=a,pt.bottom+=a,Uo(pt,n,i,!1)?(pt.top<=i&&pt.left<=n&&(E=Ct,w=pt),!0):!1},l,s),q,xe,Be=!1;if(w){var Xe=n-w.left<w.right-n,We=Xe==u;z=E+(We?0:1),xe=We?"after":"before",q=Xe?w.left:w.right}else{!u&&(z==s||z==l)&&z++,xe=z==0?"after":z==t.text.length?"before":Pr(e,o,z-(u?1:0)).bottom+a<=i==u?"after":"before";var et=mr(e,O(r,z,xe),"line",t,o);q=et.left,Be=i<et.top?-1:i>=et.bottom?1:0}return z=Ae(t.text,z,1),_o(r,z,xe,Be,n-q)}function Kl(e,t,r,n,i,o,a){var l=ie(function(m){var E=i[m],w=E.level!=1;return Uo(mr(e,O(r,w?E.to:E.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=mr(e,O(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Uo(v,o,a,!0)&&v.top>a&&(s=i[l-1])}return s}function _l(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,E=0;E<i.length;E++){var w=i[E];if(!(w.from>=u||w.to<=s)){var z=w.level!=1,q=Pr(e,n,z?Math.min(u,w.to)-1:Math.max(s,w.from)).right,xe=q<o?o-q+1e9:q-o;(!v||m>xe)&&(v=w,m=xe)}}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"))}j(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");j(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(Nn(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&&Cn(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(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=ae(u,u.length,e.options.tabSize)-u.length;s=O(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)It&&Kn(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)It&&_n(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=[]);J(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(!It||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(;Kn(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function jl(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=jr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=jr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(jr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,hi(e,r)))),n.viewTo=r}function Oa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ia(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ma(e,l.head,i),s||Ul(e,l,o)}}return n}function Ma(e,t,r){var n=mr(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 Ul(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=yo(e.display),l=a.left,s=Math.max(n.sizerWidth,Hr(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function v(We,et,Ct,pt){et<0&&(et=0),et=Math.round(et),pt=Math.round(pt),o.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+We+`px;
top: `+et+"px; width: "+(Ct==null?s-We:Ct)+`px;
height: `+(pt-et)+"px"))}function m(We,et,Ct){var pt=x(i,We),Kt=pt.text.length,Sn,Qn;function Dn(Hn,hr){return Fr(e,O(We,Hn),"div",pt,hr)}function br(Hn,hr,er){var jn=wa(e,pt,null,Hn),Zn=hr=="ltr"==(er=="after")?"left":"right",Pn=er=="after"?jn.begin:jn.end-(/\s/.test(pt.text.charAt(jn.end-1))?2:1);return Dn(Pn,Zn)[Zn]}var dr=Te(pt,i.direction);return Je(dr,et||0,Ct==null?Kt:Ct,function(Hn,hr,er,jn){var Zn=er=="ltr",Pn=Dn(Hn,Zn?"left":"right"),vr=Dn(hr-1,Zn?"right":"left"),Bi=et==null&&Hn==0,ai=Ct==null&&hr==Kt,ir=jn==0,Zr=!dr||jn==dr.length-1;if(vr.top-Pn.top<=3){var Jn=(u?Bi:ai)&&ir,ba=(u?ai:Bi)&&Zr,Vr=Jn?l:(Zn?Pn:vr).left,yi=ba?s:(Zn?vr:Pn).right;v(Vr,Pn.top,yi-Vr,Pn.bottom)}else{var bi,lr,Wi,Sa;Zn?(bi=u&&Bi&&ir?l:Pn.left,lr=u?s:br(Hn,er,"before"),Wi=u?l:br(hr,er,"after"),Sa=u&&ai&&Zr?s:vr.right):(bi=u?br(Hn,er,"before"):l,lr=!u&&Bi&&ir?s:Pn.right,Wi=!u&&ai&&Zr?l:vr.left,Sa=u?br(hr,er,"after"):s),v(bi,Pn.top,lr-bi,Pn.bottom),Pn.bottom<vr.top&&v(l,Pn.bottom,null,vr.top),v(Wi,vr.top,Sa-Wi,vr.bottom)}(!Sn||xo(Pn,Sn)<0)&&(Sn=Pn),xo(vr,Sn)<0&&(Sn=vr),(!Qn||xo(Pn,Qn)<0)&&(Qn=Pn),xo(vr,Qn)<0&&(Qn=vr)}),{start:Sn,end:Qn}}var E=t.from(),w=t.to();if(E.line==w.line)m(E.line,E.ch,w.ch);else{var z=x(i,E.line),q=x(i,w.line),xe=bt(z)==bt(q),Be=m(E.line,E.ch,xe?z.text.length+1:null).end,Xe=m(w.line,xe?0:null,w.ch).start;xe&&(Be.top<Xe.top-2?(v(Be.right,Be.top,null,Be.bottom),v(l,Xe.top,Xe.left,Xe.bottom)):v(Be.right,Be.top,Xe.left-Be.right,Be.bottom)),Be.bottom<Xe.top&&v(l,Be.bottom,null,Xe.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||(ut(e,"focus",e,t),e.state.focused=!0,de(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),N&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xo(e))}function Ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ut(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 E=Math.ceil(l/Oi(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,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=he(t,n),a=he(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=he(t,Mn(x(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=he(t,Mn(x(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!vt(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&&!ge){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?O(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?O(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=mr(e,t),s=!r||r==t?l:mr(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=_i(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,E=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-m,w=Hr(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<E?a.scrollLeft=Math.max(0,t.left+m-(z?0:10)):t.right>w+E-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||(T||ea(e,{top:t}),Pa(e,t,!0),T&&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),U(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),U(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=tt&&!A?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Y,this.disableVert=new Y},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;Fa(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),Fa(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Fa(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 Na={native:pi,null:qi};function Aa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Na[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),U(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&&de(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=Ui(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Dr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Hr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ts(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Ee();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,ee(n,e.scrollToPos.from),ee(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||ut(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ut(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ut(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function yr(e,t){if(e.curOp)return t();gi(e);try{return t()}finally{mi(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function ar(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gi(t);try{return e.apply(this,arguments)}finally{mi(t)}}}function eo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,Z(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?F(t.mode,n.state):null,s=lt(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),E=0;!m&&E<a.length;++E)m=a[E]!=o.styles[E];m&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&At(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&&yr(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=Hr(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Zt(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ut.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=Ee();if(!t||!Ke(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&Ke(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==Ee())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Ke(document.body,e.anchorNode)&&Ke(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;Ba(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)),It&&(o=Kn(e.doc,o),a=_n(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jl(e,o,a),r.viewOffset=Mn(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==Hr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Ki(e.display)-_i(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 q=z.nextSibling;return N&&tt&&e.display.currentWheelTarget==z?z.style.display="none":z.parentNode.removeChild(z),q}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 E=mo(e,m,u,r);o.insertBefore(E,a)}else{for(;a!=m.node;)a=l(a);var w=i&&t!=null&&t<=u&&m.lineNumber;m.changes&&(J(m.changes,"gutter")>-1&&(w=!1),bn(e,m,u,r)),w&&(I(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(He(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 Ba(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=He(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(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 Wa(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){Wa(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=we("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=we("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=we("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: "+Ce+"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),!N&&!(T&&Qe)&&(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),Wa(i),r.init(i)}var Mo=0,Er=null;p?Er=-.53:T?Er=15:le?Er=-.7:Ie&&(Er=-1/3);function Ha(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function us(e){var t=Ha(e);return t.x*=Er,t.y*=Er,t}function Za(e,t){var r=Ha(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&tt&&N){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&&!T&&!y&&Er!=null){i&&s&&Qi(e,Math.max(0,a.scrollTop+i*Er)),vi(e,Math.max(0,a.scrollLeft+n*Er)),(!i||i&&s)&&Dt(t),o.wheelStartX=null;return}if(i&&Er!=null){var E=i*Er,w=e.doc.scrollTop,z=w+o.wrapper.clientHeight;E<0?w=Math.max(0,w+E-50):z=Math.min(e.doc.height,z+E+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 q=a.scrollLeft-o.wheelStartX,xe=a.scrollTop-o.wheelStartY,Be=xe&&o.wheelDY&&xe/o.wheelDY||q&&o.wheelDX&&q/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Be&&(Er=(Er*Mo+Be)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Or=function(e,t){this.ranges=e,this.primIndex=t};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Ue(r.anchor,n.anchor)||!Ue(r.head,n.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new cn(Se(this.ranges[t].anchor),Se(this.ranges[t].head));return new Or(e,this.primIndex)},Or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Or.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(K(t,n.from())>=0&&K(e,n.to())<=0)return r}return-1};var cn=function(e,t){this.anchor=e,this.head=t};cn.prototype.from=function(){return $e(this.anchor,this.head)},cn.prototype.to=function(){return je(this.anchor,this.head)},cn.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(E,w){return K(E.from(),w.from())}),r=J(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=$e(l.from(),a.from()),v=je(l.to(),a.to()),m=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new cn(m?v:u,m?u:v))}}return new Or(t,r)}function ti(e,t){return new Or([new cn(e,t||e)],0)}function ni(e){return e.text?O(e.from.line+e.text.length-1,Ye(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),O(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 cn(Ka(i.anchor,t),Ka(i.head,t)))}return zr(e.cm,r,e.sel.primIndex)}function _a(e,t,r){return e.line==t.line?O(r.line,e.ch-t.ch+r.ch):O(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=O(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=_a(l.from,i,o),u=_a(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 cn(m?u:s,m?s:u)}else n[a]=new cn(s,s)}return new Or(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&&Ye(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(Xe){return r?r[Xe]:null}function o(Xe,We,et){Kr(Xe,We,et,n),ot(Xe,"change",Xe,t)}function a(Xe,We){for(var et=[],Ct=Xe;Ct<We;++Ct)et.push(new tr(u[Ct],i(Ct),n));return et}var l=t.from,s=t.to,u=t.text,v=x(e,l.line),m=x(e,s.line),E=Ye(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 q=a(0,u.length-1);o(m,m.text,w),z&&e.remove(l.line,z),q.length&&e.insert(l.line,q)}else if(v==m)if(u.length==1)o(v,v.text.slice(0,l.ch)+E+v.text.slice(s.ch),w);else{var xe=a(1,u.length-1);xe.push(new tr(E+v.text.slice(s.ch),w,n)),o(v,v.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,xe)}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,E+m.text.slice(s.ch),w);var Be=a(1,u.length-1);z>1&&e.remove(l.line+1,z-1),e.insert(l.line+1,Be)}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 Ua(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Vo(e),oa(e),ka(e),e.options.lineWrapping||qn(e),e.options.mode=t.modeOption,cr(e)}function ka(e){(e.doc.direction=="rtl"?de:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){yr(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:Se(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=Ye(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),Ye(e.done);if(e.done.length&&!Ye(e.done).ranges)return Ye(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ye(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=Ye(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=Ye(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||ut(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,Ye(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=Ye(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=st(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?Or.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],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+)$/))&&J(t,Number(v[1]))>-1&&(Ye(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 cn(i,t)}else return new cn(r||t,t)}function To(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Or([sa(e.sel.primary(),t,r,i)],0),n)}function Qa(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=sa(e.sel.ranges[o],t[o],null,i);var a=zr(e.cm,n,e.sel.primIndex);rr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rr(e,zr(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){rr(e,ti(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new cn(ee(e,i[o].anchor),ee(e,i[o].head))},origin:r&&r.origin};return ut(e,"beforeSelectionChange",e,n),e.cm&&ut(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=Ye(n);i&&i.ranges?(n[n.length-1]=t,Do(e,t,r)):rr(e,t,r)}function rr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(Zt(e,"beforeSelectionChange")||e.cm&&Zt(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,rn(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 cn(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&&(ut(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),E=void 0;if((n<0?v:u)&&(m=rl(e,m,-n,m&&m.line==t.line?o:null)),m&&m.line==t.line&&(E=K(m,r))&&(n<0?E<0:E>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,O(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ee(e,O(t.line-1)):null:r>0&&t.ch==(n||x(e,t.line)).text.length?t.line<e.first+e.size-1?O(t.line+1,0):null:new O(t.line,t.ch+r)}function il(e){e.setSelection(O(e.firstLine(),0),O(e.lastLine()),se)}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=ee(e,i)),o&&(n.to=ee(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),ut(e,"beforeChange",e,n),e.cm&&ut(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Di(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=zt&&!r&&en(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)al(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else al(e,t)}}function al(e,t){if(!(t.text.length==1&&t.text[0]==""&&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,st(e,t));var n=[];ri(e,function(i,o){!o&&J(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,st(i,t))})}}function Fo(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)){rr(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=Zt(e,"beforeChange")||e.cm&&Zt(e.cm,"beforeChange"),E=function(q){var xe=o.changes[q];if(xe.origin=t,m&&!ol(e,xe,!1))return l.length=0,{};v.push(la(e,xe));var Be=q?ia(e,xe):Ye(l);ro(e,xe,Be,Ya(e,xe)),!q&&e.cm&&e.cm.scrollIntoView({from:xe.from,to:ni(xe)});var Xe=[];ri(e,function(We,et){!et&&J(Xe,We.history)==-1&&(cl(We.history,xe),Xe.push(We.history)),ro(We,xe,null,Ya(We,xe))})},w=o.changes.length-1;w>=0;--w){var z=E(w);if(z)return z.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(xt(e.sel.ranges,function(i){return new cn(O(i.anchor.line+t,i.anchor.ch),O(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 Xn(e.cm,ro)(e,t,r,n);if(t.to.line<e.first){ll(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ll(e,i),t={from:O(e.first,0),to:O(t.to.line+i,t.to.ch),text:[Ye(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:O(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,se),e.cantEdit&&Po(e,O(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=$(bt(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&&rn(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)),wt(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=Zt(e,"changes"),m=Zt(e,"change");if(m||v){var E={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};m&&ot(e,"change",e,E),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(E)}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=O(u.from.line+n,u.from.ch),u.to=O(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,ct(e,t)):i=$(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=J(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=$(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&&(yr(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&&(Nn(this.doc,n)||H(n,n.height+i),r&&yr(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),ot(r,"lineWidgetChanged",r,e,$(n))}))},Nt(lo);function fl(e,t,r){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Jo(e,r)}function bs(e,t,r,n){var i=new lo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),io(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!Nn(e,a)){var s=Mn(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:$(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),Zt(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=an(a.markedSpans,this);e&&!this.collapsed?qr(e,$(a),"text"):e&&(l.to!=null&&(i=$(a)),l.from!=null&&(n=$(a))),a.markedSpans=Gt(a.markedSpans,l),l.from==null&&this.collapsed&&!Nn(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=bt(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=an(o.markedSpans,this);if(a.from!=null&&(r=O(t?o:$(o),a.from),e==-1))return r;if(a.to!=null&&(n=O(t?o:$(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||yr(n,function(){var i=t.line,o=$(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Nn(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||J(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(J(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Nt(ii);function Fi(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Fi)(e,t,r,n,i);var o=new ii(e,i),a=K(t,r);if(n&&_(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=we("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(mt(e,t.line,t,r,o)||t.line!=r.line&&mt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Pt()}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&&bt(m)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&H(m,0),En(m,new Wt(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){Nn(e,m)&&H(m,0)}),o.clearOnEnter&&U(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(fn(),(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)},Nt(so);function Ss(e,t,r,n,i){n=_(n),n.shared=!1;var o=[Fi(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Fi(s,ee(s,t),ee(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=Ye(o)}),new so(o,a)}function hl(e){return e.findMarks(O(e.first,0),e.clipPos(O(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=Fi(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];J(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 tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=O(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}),rr(this,ti(o),se)};fr.prototype=ve(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=ne(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=O(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:O(r,x(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),se)}),replaceRange:function(e,t,r,n){t=ee(this,t),r=r?ee(this,r):t,Pi(this,e,t,r,n)},getRange:function(e,t,r){var n=L(this,ee(this,e),ee(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ce(this,e))return x(this,e)},getLineNumber:function(e){return $(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=x(this,e)),bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ee(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ja(this,ee(this,typeof e=="number"?O(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,ee(this,e),ee(this,t||e),r)}),extendSelection:Yn(function(e,t,r){To(this,ee(this,e),t&&ee(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,ze(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=xt(this.sel.ranges,e);Qa(this,ze(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new cn(ee(this,e[i].anchor),ee(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,zr(this.cm,n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new cn(ee(this,e),ee(this,t||e))),rr(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:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&t!="end"&&cs(this,n,t),s=n.length-1;s>=0;s--)Di(this,n[s]);l?qa(this,l):this.cm&&Mi(this.cm)}),undo:Yn(function(){Fo(this,"undo")}),redo:Yn(function(){Fo(this,"redo")}),undoSelection:Yn(function(){Fo(this,"undo",!0)}),redoSelection:Yn(function(){Fo(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:Yn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&me(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,me(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ce(this,e)||(t=e,e=x(this,e),!e))return null}else if(t=$(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Fi(this,ee(this,e),ee(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=ee(this,e),Fi(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ee(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=ee(this,e),t=ee(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}),ee(this,O(r,t))},indexFromPos:function(e){e=ee(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(ne(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new fr(ne(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Cs(n,hl(this)),n},unlinkDoc:function(e){if(e instanceof Rn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),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):In(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yn(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),fr.prototype.eachLine=fr.prototype.iter;var vl=0;function Es(e){var t=this;if(pl(t),!(vt(t,e)||$r(t.display,e))){Dt(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&&Xn(t,function(){r=ee(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(ee(t.doc,r),ee(t.doc,ni(w))))})()},s=function(w,z){if(t.options.allowDropFileTypes&&J(t.options.allowDropFileTypes,w.type)==-1){l();return}var q=new FileReader;q.onerror=function(){return l()},q.onload=function(){var xe=q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(xe)){l();return}o[z]=xe,l()},q.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 E=0;E<m.length;++E)Pi(t.doc,"",m[E].anchor,m[E].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)){sn(t);return}if(!(vt(e,t)||$r(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Ie)){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)),j(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;U(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Ls)},100))}),U(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 No=65;No<=90;No++)oi[No]=String.fromCharCode(No);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=tt?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=xt(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 Ni(e,t,r,n){t=Ao(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 Ni(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ni(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),(k?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(k?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 Ao(e){return typeof e=="string"?Gr[e]:e}function Ai(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,Ye(n).to)<=0;){var a=n.pop();if(K(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}yr(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=Ae(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 O(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=Te(r,t.doc.direction);if(o){var a=i<0?Ye(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=ie(function(E){return Pr(t,v,E).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 O(n,u,s)}}return new O(n,i<0?r.text.length:0,i<0?"before":"after")}function Ps(e,t,r,n){var i=Te(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=Pe(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return fa(t,r,n);var l=function(Be,Xe){return ca(t,Be instanceof O?Be.ch:Be,Xe)},s,u=function(Be){return e.options.lineWrapping?(s=s||Jr(e,t),wa(e,t,s,Be)):{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,E=l(r,m?1:-1);if(E!=null&&(m?E<=a.to&&E<=v.end:E>=a.from&&E>=v.begin)){var w=m?"before":"after";return new O(r.line,E,w)}}var z=function(Be,Xe,We){for(var et=function(Sn,Qn){return Qn?new O(r.line,l(Sn,1),"before"):new O(r.line,Sn,"after")};Be>=0&&Be<i.length;Be+=Xe){var Ct=i[Be],pt=Xe>0==(Ct.level!=1),Kt=pt?We.begin:l(We.end,-1);if(Ct.from<=Kt&&Kt<Ct.to||(Kt=pt?Ct.from:l(Ct.to,-1),We.begin<=Kt&&Kt<We.end))return et(Kt,pt)}},q=z(o+n,n,v);if(q)return q;var xe=n>0?v.end:l(v.begin,-1);return xe!=null&&!(n>0&&xe==t.text.length)&&(q=z(n>0?0:i.length-1,n,u(xe)),q)?q:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),se)},killLine:function(e){return Ai(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:O(t.head.line+1,0)}:{from:t.head,to:O(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ai(e,function(t){return{from:O(t.from().line,0),to:ee(e.doc,O(t.to().line+1,0))}})},delLineLeft:function(e){return Ai(e,function(t){return{from:O(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ai(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 Ai(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(O(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(O(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 Fs(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")},re)},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")},re)},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},re)},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=ae(e.getLine(o.line),o.ch,n);t.push(gt(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return yr(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 O(i.line,i.ch-1)),i.ch>0)i=new O(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),O(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 O(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),O(i.line-1,a.length-1),i,"+transpose"))}}r.push(new cn(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return yr(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=bt(r);return n!=r&&(t=$(n)),da(!0,e,n,t,1)}function Fs(e,t){var r=x(e.doc,t),n=vn(r);return n!=r&&(t=$(n)),da(!0,e,r,t,-1)}function xl(e,t){var r=Cl(e,t.line),n=x(e.doc,r.line),i=Te(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 O(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)!=Le}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function Ns(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ni(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ni(t,e.options.extraKeys,r,e)||Ni(t,e.options.keyMap,r,e)}var As=new Y;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:As.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=Ns(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(Dt(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=Ee(),!vt(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&&!dn&&(tt?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),T&&!tt&&!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;de(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),_e(document,"keyup",r),_e(document,"mouseover",r))}U(document,"keyup",r),U(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),vt(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!($r(t.display,e)||vt(t,e)||e.ctrlKey&&!e.altKey||tt&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,Dt(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 Bs=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+Bs>e&&K(t,this.pos)==0&&r==this.button};var vo,po;function Ws(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(!(vt(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,$r(r,e)){N||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=un(e),o=n?Ws(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Hs(t,i,n,o,e))&&(i==1?n?Ks(t,n,o,e):Cn(e)==r.scroller&&Dt(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 Hs(e,t,r,n,i){var o="Click";return n=="double"?o="Double"+o:n=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,ho(e,bl(o,i),i,function(a){if(typeof a=="string"&&(a=fo[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=Le}finally{e.state.suppressEdits=!1}return l})}function Zs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=yt?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=tt?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(tt?r.altKey:r.ctrlKey)),i}function Ks(e,t,r,n){p?setTimeout(Z(Ra,e),0):e.curOp.focus=Ee();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&$n&&!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)?_s(e,n,t,i):js(e,n,t,i)}function _s(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){N&&(i.scroller.draggable=!1),e.state.draggingText=!1,_e(i.wrapper.ownerDocument,"mouseup",a),_e(i.wrapper.ownerDocument,"mousemove",l),_e(i.scroller,"dragstart",s),_e(i.scroller,"drop",a),o||(Dt(u),n.addNew||To(e.doc,r,null,null,n.extend),N&&!Ie||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};N&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),U(i.wrapper.ownerDocument,"mouseup",a),U(i.wrapper.ownerDocument,"mousemove",l),U(i.scroller,"dragstart",s),U(i.scroller,"drop",a),La(e),setTimeout(function(){return i.input.focus()},20)}function Ll(e,t,r){if(r=="char")return new cn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new cn(O(t.line,0),ee(e.doc,O(t.line+1,0)));var n=r(e,t);return new cn(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;Dt(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 cn(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new cn(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,rr(o,zr(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(rr(o,zr(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,Me):(l=0,rr(o,new Or([a],0),Me),s=o.sel);var m=r;function E(We){if(K(m,We)!=0)if(m=We,n.unit=="rectangle"){for(var et=[],Ct=e.options.tabSize,pt=ae(x(o,r.line).text,r.ch,Ct),Kt=ae(x(o,We.line).text,We.ch,Ct),Sn=Math.min(pt,Kt),Qn=Math.max(pt,Kt),Dn=Math.min(r.line,We.line),br=Math.min(e.lastLine(),Math.max(r.line,We.line));Dn<=br;Dn++){var dr=x(o,Dn).text,Hn=ht(dr,Sn,Ct);Sn==Qn?et.push(new cn(O(Dn,Hn),O(Dn,Hn))):dr.length>Hn&&et.push(new cn(O(Dn,Hn),O(Dn,ht(dr,Qn,Ct))))}et.length||et.push(new cn(r,r)),rr(o,zr(e,s.ranges.slice(0,l).concat(et),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(We)}else{var hr=a,er=Ll(e,We,n.unit),jn=hr.anchor,Zn;K(er.anchor,jn)>0?(Zn=er.head,jn=$e(hr.from(),er.anchor)):(Zn=er.anchor,jn=je(hr.to(),er.head));var Pn=s.ranges.slice(0);Pn[l]=Us(e,new cn(ee(o,jn),Zn)),rr(o,zr(e,Pn,l),Me)}}var w=i.wrapper.getBoundingClientRect(),z=0;function q(We){var et=++z,Ct=di(e,We,!0,n.unit=="rectangle");if(Ct)if(K(Ct,m)!=0){e.curOp.focus=Ee(),E(Ct);var pt=Eo(i,o);(Ct.line>=pt.to||Ct.line<pt.from)&&setTimeout(Xn(e,function(){z==et&&q(We)}),150)}else{var Kt=We.clientY<w.top?-20:We.clientY>w.bottom?20:0;Kt&&setTimeout(Xn(e,function(){z==et&&(i.scroller.scrollTop+=Kt,q(We))}),50)}}function xe(We){e.state.selectingText=!1,z=1/0,We&&(Dt(We),i.input.focus()),_e(i.wrapper.ownerDocument,"mousemove",Be),_e(i.wrapper.ownerDocument,"mouseup",Xe),o.history.lastSelOrigin=null}var Be=Xn(e,function(We){We.buttons===0||!un(We)?xe(We):q(We)}),Xe=Xn(e,xe);e.state.selectingText=Xe,U(i.wrapper.ownerDocument,"mousemove",Be),U(i.wrapper.ownerDocument,"mouseup",Xe)}function Us(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=Te(i);if(!o)return t;var a=Pe(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=Pe(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 E=o[s+(u?-1:0)],w=u==(E.level==1),z=w?E.from:E.to,q=w?"after":"before";return r.ch==z&&r.sticky==q?t:new cn(new O(r.line,z,q),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(E){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Dt(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Zt(e,r))return Yt(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=he(e.doc,o),m=e.display.gutterSpecs[s];return ut(e,r,e,v,m.className,t),Yt(t)}}}function pa(e,t){return Tl(e,t,"gutterClick",!0)}function Dl(e,t){$r(e.display,t)||ks(e,t)||vt(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return Zt(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-"),On(e)}var $i={toString:function(){return"CodeMirror.Init"}},Fl={},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),On(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(O(a,v))}a++});for(var l=o.length-1;l>=0;l--)Pi(n.doc,i,o[l],O(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",Qe?"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=Ao(i),l=o!=$i&&Ao(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){Aa(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?U:_e;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?(de(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),On(e),setTimeout(function(){return Ri(e)},100)}function Rn(e,t){var r=this;if(!(this instanceof Rn))return new Rn(e,t);this.options=t=t?_(t):{},_(Fl,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 Rn.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"),Aa(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 Y,keySeq:null,specialChars:null},t.autofocus&&!Qe&&o.input.focus(),p&&P<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,Ua(this,n),t.autofocus&&!Qe||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);Ba(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),N&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Rn.defaults=Fl,Rn.optionHandlers=zo;function Ys(e){var t=e.display;U(t.scroller,"mousedown",Xn(e,Rl)),p&&P<11?U(t.scroller,"dblclick",Xn(e,function(s){if(!vt(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||$r(e.display,s))){Dt(s);var v=e.findWordAt(u);To(e.doc,v.anchor,v.head)}}})):U(t.scroller,"dblclick",function(s){return vt(e,s)||Dt(s)}),U(t.scroller,"contextmenu",function(s){return Dl(e,s)}),U(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}U(t.scroller,"touchstart",function(s){if(!vt(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)}}),U(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),U(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 cn(v,v):!u.prev.prev||a(u,u.prev.prev)?m=e.findWordAt(v):m=new cn(O(v.line,0),ee(e.doc,O(v.line+1,0))),e.setSelection(m.anchor,m.head),e.focus(),Dt(s)}i()}),U(t.scroller,"touchcancel",i),U(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),ut(e,"scroll",e))}),U(t.scroller,"mousewheel",function(s){return Za(e,s)}),U(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),U(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){vt(e,s)||sn(s)},over:function(s){vt(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,Es),leave:function(s){vt(e,s)||pl(e)}};var l=t.input.getField();U(l,"keyup",function(s){return Il.call(e,s)}),U(l,"keydown",Xn(e,Ol)),U(l,"keypress",Xn(e,Ml)),U(l,"focus",function(s){return Yo(e,s)}),U(l,"blur",function(s){return Ii(e,s)})}var ga=[];Rn.defineInitHook=function(e){return ga.push(e)};function go(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Rt(e,t).state:r="prev");var a=e.options.tabSize,l=x(i,t),s=ae(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==Le||v>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?v=ae(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="",E=0;if(e.options.indentWithTabs)for(var w=Math.floor(v/a);w;--w)E+=a,m+=" ";if(E<v&&(m+=gt(v-E)),m!=u)return Pi(i,m,O(t,0),O(t,u.length),"+input"),l.stateAfter=null,!0;for(var z=0;z<i.sel.ranges.length;z++){var q=i.sel.ranges[z];if(q.head.line==t&&q.head.ch<u.length){var xe=O(t,u.length);ua(i,z,new cn(xe,xe));break}}}var Br=null;function Bo(e){Br=e}function ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=In(t),u=null;if(l&&n.ranges.length>1)if(Br&&Br.text.join(`
`)==t){if(n.ranges.length%Br.text.length==0){u=[];for(var v=0;v<Br.text.length;v++)u.push(o.splitLines(Br.text[v]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=xt(s,function(Be){return[Be]}));for(var m=e.curOp.updateInput,E=n.ranges.length-1;E>=0;E--){var w=n.ranges[E],z=w.from(),q=w.to();w.empty()&&(r&&r>0?z=O(z.line,z.ch-r):e.state.overwrite&&!l?q=O(q.line,Math.min(x(o,q.line).text.length,q.ch+Ye(s).length)):l&&Br&&Br.lineWise&&Br.text.join(`
`)==s.join(`
`)&&(z=q=O(z.line,0)));var xe={from:z,to:q,text:u?u[E%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,xe),ot(e,"inputRead",e,xe)}t&&!l&&Al(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=m),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Nl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&yr(t,function(){return ma(t,r,0,null,"paste")}),!0}function Al(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:O(i,0),head:O(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 Bl(){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 N?e.style.width="1000px":e.setAttribute("wrap","off"),De&&(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)&&Xn(this,t[n])(this,i,a),ut(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"](Ao(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:ar(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");Ne(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:ar(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:ar(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ce(this.doc,n)&&go(this,n,i,o)}),indentSelection:ar(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 E=this.doc.sel.ranges;s.ch==0&&i.length==E.length&&E[a].from().ch>0&&ua(this.doc,a,new cn(s,E[a].to()),se)}}}),getTokenAt:function(n,i){return jt(this,n,i)},getLineTokens:function(n,i){return jt(this,O(n),i,!0)},getTokenTypeAt:function(n){n=ee(this.doc,n);var i=_t(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)&&J(o,m.val)==-1&&o.push(m.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ct(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=ee(this.doc,n):o=n?a.from():a.to(),mr(this,o,i||"page")},charCoords:function(n,i){return Fr(this,ee(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,he(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 wr(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Mn(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=mr(this,ee(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),E=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>E&&(v=E-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:ar(Ol),triggerOnKeyPress:ar(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:ar(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:ar(function(n){Al(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=ee(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:ar(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()},re)}),deleteH:ar(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Ai(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=ee(this.doc,n),v=0;v<i;++v){var m=mr(this,u,"div");if(s==null?s=m.left:m.left=s,u=Wl(this,m,l,o),u.hitSide)break}return u},moveV:ar(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=mr(o,v.head,"div");v.goalColumn!=null&&(m.left=v.goalColumn),l.push(m.left);var E=Wl(o,m,n,i);return i=="page"&&v==a.sel.primary()&&Jo(o,Fr(o,E,"div").top-m.top),E},re),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=ue(u,s)?function(m){return ue(m,s)}:/\s/.test(u)?function(m){return/\s/.test(m)}:function(m){return!/\s/.test(m)&&!ue(m)};a>0&&v(o.charAt(a-1));)--a;for(;l<o.length&&v(o.charAt(l));)++l}return new cn(O(n.line,a),O(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?de(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),ut(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ar(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:_i(this),clientWidth:Hr(this)}},scrollIntoView:ar(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:O(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:ar(function(n,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&nr(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){qr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,ut(this,"refresh",this)}),operation:function(n){return yr(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:ar(function(){var n=this.display.cachedTextHeight;cr(this),this.curOp.forceUpdate=!0,On(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),ut(this,"refresh",this)}),swapDoc:ar(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ua(this,n),On(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,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}},Nt(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 Xe=t.line+s;return Xe<e.first||Xe>=e.first+e.size?!1:(t=new O(Xe,t.ch,t.sticky),l=x(e,Xe))}function v(Xe){var We;if(n=="codepoint"){var et=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(et)?We=null:We=new O(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(et>=55296&&et<56320?2:1))),-r)}else i?We=Ps(e.cm,l,t,r):We=fa(l,t,r);if(We==null)if(!Xe&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=We;return!0}if(n=="char"||n=="codepoint")v();else if(n=="column")v(!0);else if(n=="word"||n=="group")for(var m=null,E=n=="group",w=e.cm&&e.cm.getHelper(t,"wordChars"),z=!0;!(r<0&&!v(!z));z=!1){var q=l.text.charAt(t.ch)||`
`,xe=ue(q,w)?"w":E&&q==`
`?"n":!E||/\s/.test(q)?null:"p";if(E&&!z&&!xe&&(xe="s"),m&&m!=xe){r<0&&(r=1,v(),t.sticky="after");break}if(xe&&(m=xe),r>0&&!v(!z))break}var Be=Po(e,t,o,a,!0);return Ue(o,Be)&&(Be.hitSide=!0),Be}function Wl(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 hn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Y,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hn.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}U(i,"paste",function(l){!o(l)||vt(n,l)||Nl(l,n)||P<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),U(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),U(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),U(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),U(i,"touchstart",function(){return r.forceCompositionEnd()}),U(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||vt(n,l))){if(n.somethingSelected())Bo({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=$l(n);Bo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,se),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Br.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var v=Bl(),m=v.firstChild;n.display.lineSpace.insertBefore(v,n.display.lineSpace.firstChild),m.value=Br.text.join(`
`);var E=document.activeElement;V(m),setTimeout(function(){n.display.lineSpace.removeChild(v),E.focus(),E==i&&r.showPrimarySelection()},50)}}U(i,"copy",a),U(i,"cut",a)},hn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},hn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},hn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hn.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=Wo(t,e.anchorNode,e.anchorOffset),a=Wo(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&K($e(o,a),n)==0&&K(je(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Hl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Hl(t,i);if(!u){var 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 E=e.rangeCount&&e.getRangeAt(0),w;try{w=ke(s.node,s.offset,u.offset,u.node)}catch(z){}w&&(!T&&t.state.focused?(e.collapse(s.node,s.offset),w.collapsed||(e.removeAllRanges(),e.addRange(w))):(e.removeAllRanges(),e.addRange(w)),E&&e.anchorNode==null?e.addRange(E):T&&this.startGracePeriod()),this.rememberSelection()}},hn.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)},hn.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},hn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ke(this.div,t)},hn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hn.prototype.blur=function(){this.div.blur()},hn.prototype.getField=function(){return this.div},hn.prototype.supportsTouch=function(){return!0},hn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():yr(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)},hn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(Q&&le&&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=Wo(t,e.anchorNode,e.anchorOffset),n=Wo(t,e.focusNode,e.focusOffset);r&&n&&yr(t,function(){rr(t.doc,ti(r,n),se),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},hn.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=O(n.line-1,x(e.doc,n.line-1).length)),i.ch==x(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=O(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=$(t.view[0].line),l=t.view[0].node):(a=$(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=$(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)),E=L(e.doc,O(a,0),O(u,x(e.doc,u).text.length));m.length>1&&E.length>1;)if(Ye(m)==Ye(E))m.pop(),E.pop(),u--;else if(m[0]==E[0])m.shift(),E.shift(),a++;else break;for(var w=0,z=0,q=m[0],xe=E[0],Be=Math.min(q.length,xe.length);w<Be&&q.charCodeAt(w)==xe.charCodeAt(w);)++w;for(var Xe=Ye(m),We=Ye(E),et=Math.min(Xe.length-(m.length==1?w:0),We.length-(E.length==1?w:0));z<et&&Xe.charCodeAt(Xe.length-z-1)==We.charCodeAt(We.length-z-1);)++z;if(m.length==1&&E.length==1&&a==n.line)for(;w&&w>n.ch&&Xe.charCodeAt(Xe.length-z-1)==We.charCodeAt(We.length-z-1);)w--,z++;m[m.length-1]=Xe.slice(0,Xe.length-z).replace(/^\u200b+/,""),m[0]=m[0].slice(w).replace(/\u200b+$/,"");var Ct=O(a,w),pt=O(u,E.length?Ye(E).length-z:0);if(m.length>1||m[0]||K(Ct,pt))return Pi(e.doc,m,Ct,pt,"+input"),!0},hn.prototype.ensurePolled=function(){this.forceCompositionEnd()},hn.prototype.reset=function(){this.forceCompositionEnd()},hn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},hn.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))},hn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&yr(this.cm,function(){return cr(e.cm)})},hn.prototype.setUneditable=function(e){e.contentEditable="false"},hn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},hn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hn.prototype.onContextMenu=function(){},hn.prototype.resetPosition=function(){},hn.prototype.needsContentAttribute=!0;function Hl(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=Te(n,e.doc.direction),a="left";if(o){var l=Pe(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 E(w){if(w.nodeType==1){var z=w.getAttribute("cm-text");if(z){m(z);return}var q=w.getAttribute("cm-marker"),xe;if(q){var Be=e.findMarks(O(n,0),O(i+1,0),u(+q));Be.length&&(xe=Be[0].find(0))&&m(L(e.doc,xe.from,xe.to).join(l));return}if(w.getAttribute("contenteditable")=="false")return;var Xe=/^(pre|div|p|li|table|br)$/i.test(w.nodeName);if(!/^br$/i.test(w.nodeName)&&w.textContent.length==0)return;Xe&&v();for(var We=0;We<w.childNodes.length;We++)E(w.childNodes[We]);/^(pre|p)$/i.test(w.nodeName)&&(s=!0),Xe&&(a=!0)}else w.nodeType==3&&m(w.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;E(t),t!=r;)t=t.nextSibling,s=!1;return o}function Wo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return zi(e.clipPos(O(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||!Ke(n,t))return zi(O($(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Ye(e.rest):e.line;return zi(O($(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(xe,Be,Xe){for(var We=-1;We<(u?u.length:0);We++)for(var et=We<0?s.map:u[We],Ct=0;Ct<et.length;Ct+=3){var pt=et[Ct+2];if(pt==xe||pt==Be){var Kt=$(We<0?e.line:e.rest[We]),Sn=et[Ct]+Xe;return(Xe<0||pt!=xe)&&(Sn=et[Ct+(Xe?1:0)]),O(Kt,Sn)}}}var m=v(a,l,r);if(m)return zi(m,i);for(var E=l.nextSibling,w=a?a.nodeValue.length-r:0;E;E=E.nextSibling){if(m=v(E,E.firstChild,0),m)return zi(O(m.line,m.ch-w),i);w+=E.textContent.length}for(var z=l.previousSibling,q=r;z;z=z.previousSibling){if(m=v(z,z.firstChild,-1),m)return zi(O(m.line,m.ch+q),i);q+=z.textContent.length}}var An=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Y,this.hasSelection=!1,this.composing=null};An.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),De&&(i.style.width="0px"),U(i,"input",function(){p&&P>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),U(i,"paste",function(a){vt(n,a)||Nl(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!vt(n,a)){if(n.somethingSelected())Bo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=$l(n);Bo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,se):(r.prevInput="",i.value=l.text.join(`
`),V(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}U(i,"cut",o),U(i,"copy",o),U(e.scroller,"paste",function(a){if(!($r(e,a)||vt(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)}}),U(e.lineSpace,"selectstart",function(a){$r(e,a)||Dt(a)}),U(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"})}}),U(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},An.prototype.createField=function(e){this.wrapper=Bl(),this.textarea=this.wrapper.firstChild},An.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},An.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=mr(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},An.prototype.showSelection=function(e){var t=this.cm,r=t.display;j(r.cursorDiv,e.cursors),j(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},An.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&&V(this.textarea),p&&P>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",p&&P>=9&&(this.hasSelection=null))}},An.prototype.getField=function(){return this.textarea},An.prototype.supportsTouch=function(){return!1},An.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Qe||Ee()!=this.textarea))try{this.textarea.focus()}catch(e){}},An.prototype.blur=function(){this.textarea.blur()},An.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},An.prototype.receivedFocus=function(){this.slowPoll()},An.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},An.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)},An.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xn(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||tt&&/[\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 yr(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},An.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},An.prototype.onKeyPress=function(){p&&P>=9&&(this.hasSelection=null),this.fastPoll()},An.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=di(r,e),a=n.scroller.scrollTop;if(!o||y)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),se);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;N&&(m=window.scrollY),n.input.focus(),N&&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 E(){if(i.selectionStart!=null){var q=r.somethingSelected(),xe="\u200B"+(q?i.value:"");i.value="\u21DA",i.value=xe,t.prevInput=q?"":"\u200B",i.selectionStart=1,i.selectionEnd=xe.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)&&E();var q=0,xe=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):q++<10?n.detectingSelectAll=setTimeout(xe,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(xe,200)}}if(p&&P>=9&&E(),S){sn(e);var z=function(){_e(window,"mouseup",z),setTimeout(w,20)};U(window,"mouseup",z)}else setTimeout(w,50)},An.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},An.prototype.setUneditable=function(){},An.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?_(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=Ee();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(U(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&&(_e(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rn(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=_e,e.on=U,e.wheelEventPixels=us,e.Doc=fr,e.splitLines=In,e.countColumn=ae,e.findColumn=ht,e.isWordChar=X,e.Pass=Le,e.signal=ut,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Na,e.Pos=O,e.cmpPos=K,e.modes=Fn,e.mimeModes=Wn,e.resolveMode=on,e.getMode=rt,e.modeExtensions=Bt,e.extendMode=g,e.copyState=F,e.startState=d,e.innerMode=W,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ni,e.normalizeKeyMap=Ds,e.StringStream=h,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=Dt,e.e_stopPropagation=Xt,e.e_stop=sn,e.addClass=de,e.contains=Ke,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ho in fr.prototype)fr.prototype.hasOwnProperty(Ho)&&J(ru,Ho)<0&&(Rn.prototype[Ho]=function(e){return function(){return e.apply(this.doc,arguments)}}(fr.prototype[Ho]));return Nt(fr),Rn.inputStyles={textarea:An,contenteditable:hn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),Sr.apply(this,arguments)},Rn.defineMIME=pr,Rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rn.defineMIME("text/plain","null"),Rn.defineExtension=function(e,t){Rn.prototype[e]=t},Rn.defineDocExtension=function(e,t){fr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(nn,Re,f){"use strict";f.r(Re),f.d(Re,{BaseInput:function(){return y},default:function(){return Et}});var T=f(54476),D=f(33885),C=f(20068),B=f(76190),p=f(92310),P=f.n(p),N=f(59301),be=f(5643),le=function(k){var S,c,b=k.inputElement,I=k.prefixCls,j=k.prefix,R=k.suffix,we=k.addonBefore,ke=k.addonAfter,Ke=k.className,Ee=k.style,de=k.disabled,G=k.readOnly,V=k.focused,Z=k.triggerFocus,_=k.allowClear,ae=k.value,Y=k.handleReset,J=k.hidden,Ce=k.classes,Le=k.classNames,se=k.dataAttrs,Me=k.styles,re=k.components,ht=(re==null?void 0:re.affixWrapper)||"span",at=(re==null?void 0:re.groupWrapper)||"span",gt=(re==null?void 0:re.wrapper)||"span",Ye=(re==null?void 0:re.groupAddon)||"span",xt=(0,N.useRef)(null),Ne=function(pe){var Pe;(Pe=xt.current)!==null&&Pe!==void 0&&Pe.contains(pe.target)&&(Z==null||Z())},M=function(){var pe;if(!_)return null;var Pe=!de&&!G&&ae,Fe="".concat(I,"-clear-icon"),Te=(0,B.Z)(_)==="object"&&_!==null&&_!==void 0&&_.clearIcon?_.clearIcon:"\u2716";return N.createElement("span",{onClick:Y,onMouseDown:function(U){return U.preventDefault()},className:P()(Fe,(pe={},(0,C.Z)(pe,"".concat(Fe,"-hidden"),!Pe),(0,C.Z)(pe,"".concat(Fe,"-has-suffix"),!!R),pe)),role:"button",tabIndex:-1},Te)},ve=(0,N.cloneElement)(b,{value:ae,hidden:J,className:P()((S=b.props)===null||S===void 0?void 0:S.className,!(0,be.X3)(k)&&!(0,be.He)(k)&&Ke)||null,style:(0,D.Z)((0,D.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,be.X3)(k)&&!(0,be.He)(k)?Ee:{})});if((0,be.X3)(k)){var te,X="".concat(I,"-affix-wrapper"),ue=P()(X,(te={},(0,C.Z)(te,"".concat(X,"-disabled"),de),(0,C.Z)(te,"".concat(X,"-focused"),V),(0,C.Z)(te,"".concat(X,"-readonly"),G),(0,C.Z)(te,"".concat(X,"-input-with-clear-btn"),R&&_&&ae),te),!(0,be.He)(k)&&Ke,Ce==null?void 0:Ce.affixWrapper,Le==null?void 0:Le.affixWrapper),me=(R||_)&&N.createElement("span",{className:P()("".concat(I,"-suffix"),Le==null?void 0:Le.suffix),style:Me==null?void 0:Me.suffix},M(),R);ve=N.createElement(ht,(0,T.Z)({className:ue,style:(0,D.Z)((0,D.Z)({},(0,be.He)(k)?void 0:Ee),Me==null?void 0:Me.affixWrapper),hidden:!(0,be.He)(k)&&J,onClick:Ne},se==null?void 0:se.affixWrapper,{ref:xt}),j&&N.createElement("span",{className:P()("".concat(I,"-prefix"),Le==null?void 0:Le.prefix),style:Me==null?void 0:Me.prefix},j),(0,N.cloneElement)(b,{value:ae,hidden:null}),me)}if((0,be.He)(k)){var Oe="".concat(I,"-group"),ye="".concat(Oe,"-addon"),Ae=P()("".concat(I,"-wrapper"),Oe,Ce==null?void 0:Ce.wrapper),ie=P()("".concat(I,"-group-wrapper"),Ke,Ce==null?void 0:Ce.group);return N.createElement(at,{className:ie,style:Ee,hidden:J},N.createElement(gt,{className:Ae},we&&N.createElement(Ye,{className:ye},we),(0,N.cloneElement)(ve,{hidden:null}),ke&&N.createElement(Ye,{className:ye},ke)))}return ve},y=le,Ie=f(94480),A=f(42978),ge=f(75931),De=f(18929),Q=f(2738),Qe=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],tt=(0,N.forwardRef)(function(oe,k){var S=oe.autoComplete,c=oe.onChange,b=oe.onFocus,I=oe.onBlur,j=oe.onPressEnter,R=oe.onKeyDown,we=oe.prefixCls,ke=we===void 0?"rc-input":we,Ke=oe.disabled,Ee=oe.htmlSize,de=oe.className,G=oe.maxLength,V=oe.suffix,Z=oe.showCount,_=oe.type,ae=_===void 0?"text":_,Y=oe.classes,J=oe.classNames,Ce=oe.styles,Le=(0,ge.Z)(oe,Qe),se=(0,De.Z)(oe.defaultValue,{value:oe.value}),Me=(0,A.Z)(se,2),re=Me[0],ht=Me[1],at=(0,N.useState)(!1),gt=(0,A.Z)(at,2),Ye=gt[0],xt=gt[1],Ne=(0,N.useRef)(null),M=function(ie){Ne.current&&(0,be.nH)(Ne.current,ie)};(0,N.useImperativeHandle)(k,function(){return{focus:M,blur:function(){var ie;(ie=Ne.current)===null||ie===void 0||ie.blur()},setSelectionRange:function(ie,Je,pe){var Pe;(Pe=Ne.current)===null||Pe===void 0||Pe.setSelectionRange(ie,Je,pe)},select:function(){var ie;(ie=Ne.current)===null||ie===void 0||ie.select()},input:Ne.current}}),(0,N.useEffect)(function(){xt(function(Ae){return Ae&&Ke?!1:Ae})},[Ke]);var ve=function(ie){oe.value===void 0&&ht(ie.target.value),Ne.current&&(0,be.rJ)(Ne.current,ie,c)},te=function(ie){j&&ie.key==="Enter"&&j(ie),R==null||R(ie)},X=function(ie){xt(!0),b==null||b(ie)},ue=function(ie){xt(!1),I==null||I(ie)},me=function(ie){ht(""),M(),Ne.current&&(0,be.rJ)(Ne.current,ie,c)},Oe=function(){var ie=(0,Q.Z)(oe,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return N.createElement("input",(0,T.Z)({autoComplete:S},ie,{onChange:ve,onFocus:X,onBlur:ue,onKeyDown:te,className:P()(ke,(0,C.Z)({},"".concat(ke,"-disabled"),Ke),J==null?void 0:J.input),style:Ce==null?void 0:Ce.input,ref:Ne,size:Ee,type:ae}))},ye=function(){var ie=Number(G)>0;if(V||Z){var Je=(0,be.D7)(re),pe=(0,Ie.Z)(Je).length,Pe=(0,B.Z)(Z)==="object"?Z.formatter({value:Je,count:pe,maxLength:G}):"".concat(pe).concat(ie?" / ".concat(G):"");return N.createElement(N.Fragment,null,!!Z&&N.createElement("span",{className:P()("".concat(ke,"-show-count-suffix"),(0,C.Z)({},"".concat(ke,"-show-count-has-suffix"),!!V),J==null?void 0:J.count),style:(0,D.Z)({},Ce==null?void 0:Ce.count)},Pe),V)}return null};return N.createElement(y,(0,T.Z)({},Le,{prefixCls:ke,className:de,inputElement:Oe(),handleReset:me,value:(0,be.D7)(re),focused:Ye,triggerFocus:M,suffix:ye(),disabled:Ke,classes:Y,classNames:J,styles:Ce}))}),yt=tt,Et=yt},5643:function(nn,Re,f){"use strict";f.d(Re,{D7:function(){return p},He:function(){return T},X3:function(){return D},nH:function(){return B},rJ:function(){return C}});function T(P){return!!(P.addonBefore||P.addonAfter)}function D(P){return!!(P.prefix||P.suffix||P.allowClear)}function C(P,N,be,le){if(be){var y=N;if(N.type==="click"){var Ie=P.cloneNode(!0);y=Object.create(N,{target:{value:Ie},currentTarget:{value:Ie}}),Ie.value="",be(y);return}if(le!==void 0){y=Object.create(N,{target:{value:P},currentTarget:{value:P}}),P.value=le,be(y);return}be(y)}}function B(P,N){if(P){P.focus(N);var be=N||{},le=be.cursor;if(le){var y=P.value.length;switch(le){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(nn,Re,f){"use strict";f.d(Re,{Z:function(){return Z}});var T=f(54476),D=f(33885),C=f(42978),B=f(75931),p=f(59301),P=f(92310),N=f.n(P),be=f(29301),le=f(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ie=void 0;function A(_,ae){var Y=_.prefixCls,J=_.invalidate,Ce=_.item,Le=_.renderItem,se=_.responsive,Me=_.responsiveDisabled,re=_.registerSize,ht=_.itemKey,at=_.className,gt=_.style,Ye=_.children,xt=_.display,Ne=_.order,M=_.component,ve=M===void 0?"div":M,te=(0,B.Z)(_,y),X=se&&!xt;function ue(ie){re(ht,ie)}p.useEffect(function(){return function(){ue(null)}},[]);var me=Le&&Ce!==Ie?Le(Ce,{index:Ne}):Ye,Oe;J||(Oe={opacity:X?0:1,height:X?0:Ie,overflowY:X?"hidden":Ie,order:se?Ne:Ie,pointerEvents:X?"none":Ie,position:X?"absolute":Ie});var ye={};X&&(ye["aria-hidden"]=!0);var Ae=p.createElement(ve,(0,T.Z)({className:N()(!J&&Y,at),style:(0,D.Z)((0,D.Z)({},Oe),gt)},ye,te,{ref:ae}),me);return se&&(Ae=p.createElement(be.Z,{onResize:function(Je){var pe=Je.offsetWidth;ue(pe)},disabled:Me},Ae)),Ae}var ge=p.forwardRef(A);ge.displayName="Item";var De=ge,Q=f(6089),Qe=f(4676),tt=f(16089);function yt(_){if(typeof MessageChannel=="undefined")(0,tt.Z)(_);else{var ae=new MessageChannel;ae.port1.onmessage=function(){return _()},ae.port2.postMessage(void 0)}}function Et(){var _=p.useRef(null),ae=function(J){_.current||(_.current=[],yt(function(){(0,Qe.unstable_batchedUpdates)(function(){_.current.forEach(function(Ce){Ce()}),_.current=null})})),_.current.push(J)};return ae}function oe(_,ae){var Y=p.useState(ae),J=(0,C.Z)(Y,2),Ce=J[0],Le=J[1],se=(0,Q.Z)(function(Me){_(function(){Le(Me)})});return[Ce,se]}var k=p.createContext(null),S=["component"],c=["className"],b=["className"],I=function(ae,Y){var J=p.useContext(k);if(!J){var Ce=ae.component,Le=Ce===void 0?"div":Ce,se=(0,B.Z)(ae,S);return p.createElement(Le,(0,T.Z)({},se,{ref:Y}))}var Me=J.className,re=(0,B.Z)(J,c),ht=ae.className,at=(0,B.Z)(ae,b);return p.createElement(k.Provider,{value:null},p.createElement(De,(0,T.Z)({ref:Y,className:N()(Me,ht)},re,at)))},j=p.forwardRef(I);j.displayName="RawItem";var R=j,we=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],ke="responsive",Ke="invalidate";function Ee(_){return"+ ".concat(_.length," ...")}function de(_,ae){var Y=_.prefixCls,J=Y===void 0?"rc-overflow":Y,Ce=_.data,Le=Ce===void 0?[]:Ce,se=_.renderItem,Me=_.renderRawItem,re=_.itemKey,ht=_.itemWidth,at=ht===void 0?10:ht,gt=_.ssr,Ye=_.style,xt=_.className,Ne=_.maxCount,M=_.renderRest,ve=_.renderRawRest,te=_.suffix,X=_.component,ue=X===void 0?"div":X,me=_.itemComponent,Oe=_.onVisibleChange,ye=(0,B.Z)(_,we),Ae=gt==="full",ie=Et(),Je=oe(ie,null),pe=(0,C.Z)(Je,2),Pe=pe[0],Fe=pe[1],Te=Pe||0,qe=oe(ie,new Map),U=(0,C.Z)(qe,2),nt=U[0],_e=U[1],ut=oe(ie,0),vt=(0,C.Z)(ut,2),rn=vt[0],Zt=vt[1],Nt=oe(ie,0),Dt=(0,C.Z)(Nt,2),Xt=Dt[0],Yt=Dt[1],sn=oe(ie,0),Cn=(0,C.Z)(sn,2),un=Cn[0],$n=Cn[1],zn=(0,p.useState)(null),pn=(0,C.Z)(zn,2),Ln=pn[0],wn=pn[1],In=(0,p.useState)(null),xn=(0,C.Z)(In,2),dn=xn[0],Bn=xn[1],Qt=p.useMemo(function(){return dn===null&&Ae?Number.MAX_SAFE_INTEGER:dn||0},[dn,Pe]),Fn=(0,p.useState)(!1),Wn=(0,C.Z)(Fn,2),Sr=Wn[0],pr=Wn[1],on="".concat(J,"-item"),rt=Math.max(rn,Xt),Bt=Ne===ke,g=Le.length&&Bt,F=Ne===Ke,W=g||typeof Ne=="number"&&Le.length>Ne,d=(0,p.useMemo)(function(){var fe=Le;return g?Pe===null&&Ae?fe=Le:fe=Le.slice(0,Math.min(Le.length,Te/at)):typeof Ne=="number"&&(fe=Le.slice(0,Ne)),fe},[Le,at,Pe,Ne,g]),h=(0,p.useMemo)(function(){return g?Le.slice(Qt+1):Le.slice(d.length)},[Le,d,g,Qt]),x=(0,p.useCallback)(function(fe,ze){var it;return typeof re=="function"?re(fe):(it=re&&(fe==null?void 0:fe[re]))!==null&&it!==void 0?it:ze},[re]),L=(0,p.useCallback)(se||function(fe){return fe},[se]);function ne(fe,ze,it){dn===fe&&(ze===void 0||ze===Ln)||(Bn(fe),it||(pr(fe<Le.length-1),Oe==null||Oe(fe)),ze!==void 0&&wn(ze))}function H(fe,ze){Fe(ze.clientWidth)}function $(fe,ze){_e(function(it){var Ge=new Map(it);return ze===null?Ge.delete(fe):Ge.set(fe,ze),Ge})}function he(fe,ze){Yt(ze),Zt(Xt)}function ce(fe,ze){$n(ze)}function He(fe){return nt.get(x(d[fe],fe))}(0,le.Z)(function(){if(Te&&typeof rt=="number"&&d){var fe=un,ze=d.length,it=ze-1;if(!ze){ne(0,null);return}for(var Ge=0;Ge<ze;Ge+=1){var lt=He(Ge);if(Ae&&(lt=lt||0),lt===void 0){ne(Ge-1,void 0,!0);break}if(fe+=lt,it===0&&fe<=Te||Ge===it-1&&fe+He(it)<=Te){ne(it,null);break}else if(fe+rt>Te){ne(Ge-1,fe-lt-un+Xt);break}}te&&He(0)+un>Te&&wn(null)}},[Te,nt,Xt,un,x,d]);var O=Sr&&!!h.length,K={};Ln!==null&&g&&(K={position:"absolute",left:Ln,top:0});var Ue={prefixCls:on,responsive:g,component:me,invalidate:F},Se=Me?function(fe,ze){var it=x(fe,ze);return p.createElement(k.Provider,{key:it,value:(0,D.Z)((0,D.Z)({},Ue),{},{order:ze,item:fe,itemKey:it,registerSize:$,display:ze<=Qt})},Me(fe,ze))}:function(fe,ze){var it=x(fe,ze);return p.createElement(De,(0,T.Z)({},Ue,{order:ze,key:it,item:fe,renderItem:L,itemKey:it,registerSize:$,display:ze<=Qt}))},je={order:O?Qt:Number.MAX_SAFE_INTEGER,className:"".concat(on,"-rest"),registerSize:he,display:O},$e=M||Ee,ct=ve?p.createElement(k.Provider,{value:(0,D.Z)((0,D.Z)({},Ue),je)},ve(h)):p.createElement(De,(0,T.Z)({},Ue,je),typeof $e=="function"?$e(h):$e),ee=p.createElement(ue,(0,T.Z)({className:N()(!F&&J,xt),style:Ye,ref:ae},ye),d.map(Se),W?ct:null,te&&p.createElement(De,(0,T.Z)({},Ue,{responsive:Bt,responsiveDisabled:!g,order:Qt,className:"".concat(on,"-suffix"),registerSize:ce,display:!0,style:K}),te));return Bt?p.createElement(be.Z,{onResize:H,disabled:!g},ee):ee}var G=p.forwardRef(de);G.displayName="Overflow",G.Item=R,G.RESPONSIVE=ke,G.INVALIDATE=Ke;var V=G,Z=V},17115:function(nn,Re,f){"use strict";f.d(Re,{ZP:function(){return N}});var T=f(42978),D=f(59301),C=f(47273),B=0,p=(0,C.Z)();function P(){var be;return p?(be=B,B+=1):be="TEST_OR_SSR",be}function N(be){var le=D.useState(),y=(0,T.Z)(le,2),Ie=y[0],A=y[1];return D.useEffect(function(){A("rc_select_".concat(P()))},[]),be||Ie}},77861:function(nn,Re,f){"use strict";f.d(Re,{Ac:function(){return Fe},Xo:function(){return Yt},Wx:function(){return Cn},ZP:function(){return W},lk:function(){return k}});var T=f(54476),D=f(94480),C=f(20068),B=f(33885),p=f(42978),P=f(75931),N=f(76190),be=f(18929),le=f(48736),y=f(59301),Ie=f(92310),A=f.n(Ie),ge=f(34280),De=f(49658),Q=f(10228),Qe=f(8654),tt=function(h){var x=h.className,L=h.customizeIcon,ne=h.customizeIconProps,H=h.onMouseDown,$=h.onClick,he=h.children,ce;return typeof L=="function"?ce=L(ne):ce=L,y.createElement("span",{className:x,onMouseDown:function(O){O.preventDefault(),H&&H(O)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:$,"aria-hidden":!0},ce!==void 0?ce:y.createElement("span",{className:A()(x.split(/\s+/).map(function(He){return"".concat(He,"-icon")}))},he))},yt=tt;function Et(d,h,x,L,ne){var H=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,$=arguments.length>6?arguments[6]:void 0,he=arguments.length>7?arguments[7]:void 0,ce=y.useMemo(function(){if((0,N.Z)(L)==="object")return L.clearIcon;if(ne)return ne},[L,ne]),He=y.useMemo(function(){return!!(!H&&L&&(x.length||$)&&!(he==="combobox"&&$===""))},[L,H,x.length,$,he]);return{allowClear:He,clearIcon:y.createElement(yt,{className:"".concat(d,"-clear"),onMouseDown:h,customizeIcon:ce},"\xD7")}}var oe=y.createContext(null);function k(){return y.useContext(oe)}function S(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,h=y.useState(!1),x=(0,p.Z)(h,2),L=x[0],ne=x[1],H=y.useRef(null),$=function(){window.clearTimeout(H.current)};y.useEffect(function(){return $},[]);var he=function(He,O){$(),H.current=window.setTimeout(function(){ne(He),O&&O()},d)};return[L,he,$]}function c(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,h=y.useRef(null),x=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(x.current)}},[]);function L(ne){(ne||h.current===null)&&(h.current=ne),window.clearTimeout(x.current),x.current=window.setTimeout(function(){h.current=null},d)}return[function(){return h.current},L]}function b(d,h,x,L){var ne=y.useRef(null);ne.current={open:h,triggerOpen:x,customizedTrigger:L},y.useEffect(function(){function H($){var he;if(!((he=ne.current)!==null&&he!==void 0&&he.customizedTrigger)){var ce=$.target;ce.shadowRoot&&$.composed&&(ce=$.composedPath()[0]||ce),ne.current.open&&d().filter(function(He){return He}).every(function(He){return!He.contains(ce)&&He!==ce})&&ne.current.triggerOpen(!1)}}return window.addEventListener("mousedown",H),function(){return window.removeEventListener("mousedown",H)}},[])}var I=f(26112),j=f(11780),R=function(h,x){var L,ne,H=h.prefixCls,$=h.id,he=h.inputElement,ce=h.disabled,He=h.tabIndex,O=h.autoFocus,K=h.autoComplete,Ue=h.editable,Se=h.activeDescendantId,je=h.value,$e=h.maxLength,ct=h.onKeyDown,ee=h.onMouseDown,fe=h.onChange,ze=h.onPaste,it=h.onCompositionStart,Ge=h.onCompositionEnd,lt=h.open,_t=h.attrs,Rt=he||y.createElement("input",null),At=Rt,$t=At.ref,Ot=At.props,qt=Ot.onKeyDown,jt=Ot.onChange,Ut=Ot.onMouseDown,kt=Ot.onCompositionStart,Lt=Ot.onCompositionEnd,wt=Ot.style;return(0,le.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,B.Z)((0,B.Z)((0,B.Z)({type:"search"},Ot),{},{id:$,ref:(0,Qe.sQ)(x,$t),disabled:ce,tabIndex:He,autoComplete:K||"off",autoFocus:O,className:A()("".concat(H,"-selection-search-input"),(L=Rt)===null||L===void 0||(ne=L.props)===null||ne===void 0?void 0:ne.className),role:"combobox","aria-label":"Search","aria-expanded":lt||!1,"aria-haspopup":"listbox","aria-owns":"".concat($,"_list"),"aria-autocomplete":"list","aria-controls":"".concat($,"_list"),"aria-activedescendant":lt?Se:void 0},_t),{},{value:Ue?je:"",maxLength:$e,readOnly:!Ue,unselectable:Ue?null:"on",style:(0,B.Z)((0,B.Z)({},wt),{},{opacity:Ue?null:0}),onKeyDown:function(It){ct(It),qt&&qt(It)},onMouseDown:function(It){ee(It),Ut&&Ut(It)},onChange:function(It){fe(It),jt&&jt(It)},onCompositionStart:function(It){it(It),kt&&kt(It)},onCompositionEnd:function(It){Ge(It),Lt&&Lt(It)},onPaste:ze})),Rt},we=y.forwardRef(R);we.displayName="Input";var ke=we;function Ke(d){return Array.isArray(d)?d:d!==void 0?[d]:[]}var Ee=typeof window!="undefined"&&window.document&&window.document.documentElement,de=Ee;function G(d){return d!=null}function V(d){return!d&&d!==0}function Z(d){return["string","number"].includes((0,N.Z)(d))}function _(d){var h=void 0;return d&&(Z(d.title)?h=d.title.toString():Z(d.label)&&(h=d.label.toString())),h}function ae(d,h){de?y.useLayoutEffect(d,h):y.useEffect(d,h)}function Y(d){var h;return(h=d.key)!==null&&h!==void 0?h:d.value}var J=function(h){h.preventDefault(),h.stopPropagation()},Ce=function(h){var x=h.id,L=h.prefixCls,ne=h.values,H=h.open,$=h.searchValue,he=h.autoClearSearchValue,ce=h.inputRef,He=h.placeholder,O=h.disabled,K=h.mode,Ue=h.showSearch,Se=h.autoFocus,je=h.autoComplete,$e=h.activeDescendantId,ct=h.tabIndex,ee=h.removeIcon,fe=h.maxTagCount,ze=h.maxTagTextLength,it=h.maxTagPlaceholder,Ge=it===void 0?function(Ft){return"+ ".concat(Ft.length," ...")}:it,lt=h.tagRender,_t=h.onToggleOpen,Rt=h.onRemove,At=h.onInputChange,$t=h.onInputPaste,Ot=h.onInputKeyDown,qt=h.onInputMouseDown,jt=h.onInputCompositionStart,Ut=h.onInputCompositionEnd,kt=y.useRef(null),Lt=(0,y.useState)(0),wt=(0,p.Z)(Lt,2),zt=wt[0],It=wt[1],fn=(0,y.useState)(!1),Pt=(0,p.Z)(fn,2),Wt=Pt[0],an=Pt[1],Gt="".concat(L,"-selection"),En=H||K==="multiple"&&he===!1||K==="tags"?$:"",Un=K==="tags"||K==="multiple"&&he===!1||Ue&&(H||Wt);ae(function(){It(kt.current.scrollWidth)},[En]);function Mt(Ft,ln,gn,mn,Tn){return y.createElement("span",{className:A()("".concat(Gt,"-item"),(0,C.Z)({},"".concat(Gt,"-item-disabled"),gn)),title:_(Ft)},y.createElement("span",{className:"".concat(Gt,"-item-content")},ln),mn&&y.createElement(yt,{className:"".concat(Gt,"-item-remove"),onMouseDown:J,onClick:Tn,customizeIcon:ee},"\xD7"))}function st(Ft,ln,gn,mn,Tn){var Ve=function(mt){J(mt),_t(!H)};return y.createElement("span",{onMouseDown:Ve},lt({label:ln,value:Ft,disabled:gn,closable:mn,onClose:Tn}))}function ft(Ft){var ln=Ft.disabled,gn=Ft.label,mn=Ft.value,Tn=!O&&!ln,Ve=gn;if(typeof ze=="number"&&(typeof gn=="string"||typeof gn=="number")){var Ze=String(Ve);Ze.length>ze&&(Ve="".concat(Ze.slice(0,ze),"..."))}var mt=function(vn){vn&&vn.stopPropagation(),Rt(Ft)};return typeof lt=="function"?st(mn,Ve,ln,Tn,mt):Mt(Ft,Ve,ln,Tn,mt)}function en(Ft){var ln=typeof Ge=="function"?Ge(Ft):Ge;return Mt({title:ln},ln,!1)}var tn=y.createElement("div",{className:"".concat(Gt,"-search"),style:{width:zt},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},y.createElement(ke,{ref:ce,open:H,prefixCls:L,id:x,inputElement:null,disabled:O,autoFocus:Se,autoComplete:je,editable:Un,activeDescendantId:$e,value:En,onKeyDown:Ot,onMouseDown:qt,onChange:At,onPaste:$t,onCompositionStart:jt,onCompositionEnd:Ut,tabIndex:ct,attrs:(0,I.Z)(h,!0)}),y.createElement("span",{ref:kt,className:"".concat(Gt,"-search-mirror"),"aria-hidden":!0},En,"\xA0")),Vt=y.createElement(j.Z,{prefixCls:"".concat(Gt,"-overflow"),data:ne,renderItem:ft,renderRest:en,suffix:tn,itemKey:Y,maxCount:fe});return y.createElement(y.Fragment,null,Vt,!ne.length&&!En&&y.createElement("span",{className:"".concat(Gt,"-placeholder")},He))},Le=Ce,se=function(h){var x=h.inputElement,L=h.prefixCls,ne=h.id,H=h.inputRef,$=h.disabled,he=h.autoFocus,ce=h.autoComplete,He=h.activeDescendantId,O=h.mode,K=h.open,Ue=h.values,Se=h.placeholder,je=h.tabIndex,$e=h.showSearch,ct=h.searchValue,ee=h.activeValue,fe=h.maxLength,ze=h.onInputKeyDown,it=h.onInputMouseDown,Ge=h.onInputChange,lt=h.onInputPaste,_t=h.onInputCompositionStart,Rt=h.onInputCompositionEnd,At=h.title,$t=y.useState(!1),Ot=(0,p.Z)($t,2),qt=Ot[0],jt=Ot[1],Ut=O==="combobox",kt=Ut||$e,Lt=Ue[0],wt=ct||"";Ut&&ee&&!qt&&(wt=ee),y.useEffect(function(){Ut&&jt(!1)},[Ut,ee]);var zt=O!=="combobox"&&!K&&!$e?!1:!!wt,It=At===void 0?_(Lt):At,fn=function(){if(Lt)return null;var Wt=zt?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(L,"-selection-placeholder"),style:Wt},Se)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(L,"-selection-search")},y.createElement(ke,{ref:H,prefixCls:L,id:ne,open:K,inputElement:x,disabled:$,autoFocus:he,autoComplete:ce,editable:kt,activeDescendantId:He,value:wt,onKeyDown:ze,onMouseDown:it,onChange:function(Wt){jt(!0),Ge(Wt)},onPaste:lt,onCompositionStart:_t,onCompositionEnd:Rt,tabIndex:je,attrs:(0,I.Z)(h,!0),maxLength:Ut?fe:void 0})),!Ut&&Lt?y.createElement("span",{className:"".concat(L,"-selection-item"),title:It,style:zt?{visibility:"hidden"}:void 0},Lt.label):null,fn())},Me=se;function re(d){return![Q.Z.ESC,Q.Z.SHIFT,Q.Z.BACKSPACE,Q.Z.TAB,Q.Z.WIN_KEY,Q.Z.ALT,Q.Z.META,Q.Z.WIN_KEY_RIGHT,Q.Z.CTRL,Q.Z.SEMICOLON,Q.Z.EQUALS,Q.Z.CAPS_LOCK,Q.Z.CONTEXT_MENU,Q.Z.F1,Q.Z.F2,Q.Z.F3,Q.Z.F4,Q.Z.F5,Q.Z.F6,Q.Z.F7,Q.Z.F8,Q.Z.F9,Q.Z.F10,Q.Z.F11,Q.Z.F12].includes(d)}var ht=function(h,x){var L=(0,y.useRef)(null),ne=(0,y.useRef)(!1),H=h.prefixCls,$=h.open,he=h.mode,ce=h.showSearch,He=h.tokenWithEnter,O=h.autoClearSearchValue,K=h.onSearch,Ue=h.onSearchSubmit,Se=h.onToggleOpen,je=h.onInputKeyDown,$e=h.domRef;y.useImperativeHandle(x,function(){return{focus:function(){L.current.focus()},blur:function(){L.current.blur()}}});var ct=c(0),ee=(0,p.Z)(ct,2),fe=ee[0],ze=ee[1],it=function(wt){var zt=wt.which;(zt===Q.Z.UP||zt===Q.Z.DOWN)&&wt.preventDefault(),je&&je(wt),zt===Q.Z.ENTER&&he==="tags"&&!ne.current&&!$&&(Ue==null||Ue(wt.target.value)),re(zt)&&Se(!0)},Ge=function(){ze(!0)},lt=(0,y.useRef)(null),_t=function(wt){K(wt,!0,ne.current)!==!1&&Se(!0)},Rt=function(){ne.current=!0},At=function(wt){ne.current=!1,he!=="combobox"&&_t(wt.target.value)},$t=function(wt){var zt=wt.target.value;if(He&&lt.current&&/[\r\n]/.test(lt.current)){var It=lt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");zt=zt.replace(It,lt.current)}lt.current=null,_t(zt)},Ot=function(wt){var zt=wt.clipboardData,It=zt.getData("text");lt.current=It},qt=function(wt){var zt=wt.target;if(zt!==L.current){var It=document.body.style.msTouchAction!==void 0;It?setTimeout(function(){L.current.focus()}):L.current.focus()}},jt=function(wt){var zt=fe();wt.target!==L.current&&!zt&&he!=="combobox"&&wt.preventDefault(),(he!=="combobox"&&(!ce||!zt)||!$)&&($&&O!==!1&&K("",!0,!1),Se())},Ut={inputRef:L,onInputKeyDown:it,onInputMouseDown:Ge,onInputChange:$t,onInputPaste:Ot,onInputCompositionStart:Rt,onInputCompositionEnd:At},kt=he==="multiple"||he==="tags"?y.createElement(Le,(0,T.Z)({},h,Ut)):y.createElement(Me,(0,T.Z)({},h,Ut));return y.createElement("div",{ref:$e,className:"".concat(H,"-selector"),onClick:qt,onMouseDown:jt},kt)},at=y.forwardRef(ht);at.displayName="Selector";var gt=at,Ye=f(35593),xt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ne=function(h){var x=h===!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"}}},M=function(h,x){var L=h.prefixCls,ne=h.disabled,H=h.visible,$=h.children,he=h.popupElement,ce=h.animation,He=h.transitionName,O=h.dropdownStyle,K=h.dropdownClassName,Ue=h.direction,Se=Ue===void 0?"ltr":Ue,je=h.placement,$e=h.builtinPlacements,ct=h.dropdownMatchSelectWidth,ee=h.dropdownRender,fe=h.dropdownAlign,ze=h.getPopupContainer,it=h.empty,Ge=h.getTriggerDOMNode,lt=h.onPopupVisibleChange,_t=h.onPopupMouseEnter,Rt=(0,P.Z)(h,xt),At="".concat(L,"-dropdown"),$t=he;ee&&($t=ee(he));var Ot=y.useMemo(function(){return $e||Ne(ct)},[$e,ct]),qt=ce?"".concat(At,"-").concat(ce):He,jt=typeof ct=="number",Ut=y.useMemo(function(){return jt?null:ct===!1?"minWidth":"width"},[ct,jt]),kt=O;jt&&(kt=(0,B.Z)((0,B.Z)({},kt),{},{width:ct}));var Lt=y.useRef(null);return y.useImperativeHandle(x,function(){return{getPopupElement:function(){return Lt.current}}}),y.createElement(Ye.Z,(0,T.Z)({},Rt,{showAction:lt?["click"]:[],hideAction:lt?["click"]:[],popupPlacement:je||(Se==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ot,prefixCls:At,popupTransitionName:qt,popup:y.createElement("div",{ref:Lt,onMouseEnter:_t},$t),stretch:Ut,popupAlign:fe,popupVisible:H,getPopupContainer:ze,popupClassName:A()(K,(0,C.Z)({},"".concat(At,"-empty"),it)),popupStyle:kt,getTriggerDOMNode:Ge,onPopupVisibleChange:lt}),$)},ve=y.forwardRef(M);ve.displayName="SelectTrigger";var te=ve,X=f(66712);function ue(d,h){var x=d.key,L;return"value"in d&&(L=d.value),x!=null?x:L!==void 0?L:"rc-index-key-".concat(h)}function me(d,h){var x=d||{},L=x.label,ne=x.value,H=x.options,$=x.groupLabel,he=L||(h?"children":"label");return{label:he,value:ne||"value",options:H||"options",groupLabel:$||he}}function Oe(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=h.fieldNames,L=h.childrenAsData,ne=[],H=me(x,!1),$=H.label,he=H.value,ce=H.options,He=H.groupLabel;function O(K,Ue){K.forEach(function(Se){if(Ue||!(ce in Se)){var je=Se[he];ne.push({key:ue(Se,ne.length),groupOption:Ue,data:Se,label:Se[$],value:je})}else{var $e=Se[He];$e===void 0&&L&&($e=Se.label),ne.push({key:ue(Se,ne.length),group:!0,data:Se,label:$e}),O(Se[ce],!0)}})}return O(d,!1),ne}function ye(d){var h=(0,B.Z)({},d);return"props"in h||Object.defineProperty(h,"props",{get:function(){return(0,le.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),h}}),h}function Ae(d,h){if(!h||!h.length)return null;var x=!1;function L(H,$){var he=(0,X.Z)($),ce=he[0],He=he.slice(1);if(!ce)return[H];var O=H.split(ce);return x=x||O.length>1,O.reduce(function(K,Ue){return[].concat((0,D.Z)(K),(0,D.Z)(L(Ue,He)))},[]).filter(function(K){return K})}var ne=L(d,h);return x?ne:null}var ie=["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"],Je=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function pe(d){return d==="tags"||d==="multiple"}var Pe=y.forwardRef(function(d,h){var x,L,ne=d.id,H=d.prefixCls,$=d.className,he=d.showSearch,ce=d.tagRender,He=d.direction,O=d.omitDomProps,K=d.displayValues,Ue=d.onDisplayValuesChange,Se=d.emptyOptions,je=d.notFoundContent,$e=je===void 0?"Not Found":je,ct=d.onClear,ee=d.mode,fe=d.disabled,ze=d.loading,it=d.getInputElement,Ge=d.getRawInputElement,lt=d.open,_t=d.defaultOpen,Rt=d.onDropdownVisibleChange,At=d.activeValue,$t=d.onActiveValueChange,Ot=d.activeDescendantId,qt=d.searchValue,jt=d.autoClearSearchValue,Ut=d.onSearch,kt=d.onSearchSplit,Lt=d.tokenSeparators,wt=d.allowClear,zt=d.suffixIcon,It=d.clearIcon,fn=d.OptionList,Pt=d.animation,Wt=d.transitionName,an=d.dropdownStyle,Gt=d.dropdownClassName,En=d.dropdownMatchSelectWidth,Un=d.dropdownRender,Mt=d.dropdownAlign,st=d.placement,ft=d.builtinPlacements,en=d.getPopupContainer,tn=d.showAction,Vt=tn===void 0?[]:tn,Ft=d.onFocus,ln=d.onBlur,gn=d.onKeyUp,mn=d.onKeyDown,Tn=d.onMouseDown,Ve=(0,P.Z)(d,ie),Ze=pe(ee),mt=(he!==void 0?he:Ze)||ee==="combobox",bt=(0,B.Z)({},Ve);Je.forEach(function(Jt){delete bt[Jt]}),O==null||O.forEach(function(Jt){delete bt[Jt]});var vn=y.useState(!1),Cr=(0,p.Z)(vn,2),Kn=Cr[0],_n=Cr[1];y.useEffect(function(){_n((0,De.Z)())},[]);var Nn=y.useRef(null),kn=y.useRef(null),Mn=y.useRef(null),sr=y.useRef(null),qn=y.useRef(null),tr=S(),Kr=(0,p.Z)(tr,3),Xr=Kr[0],li=Kr[1],Yr=Kr[2];y.useImperativeHandle(h,function(){var Jt,Ht;return{focus:(Jt=sr.current)===null||Jt===void 0?void 0:Jt.focus,blur:(Ht=sr.current)===null||Ht===void 0?void 0:Ht.blur,scrollTo:function(nr){var On;return(On=qn.current)===null||On===void 0?void 0:On.scrollTo(nr)}}});var xr=y.useMemo(function(){var Jt;if(ee!=="combobox")return qt;var Ht=(Jt=K[0])===null||Jt===void 0?void 0:Jt.value;return typeof Ht=="string"||typeof Ht=="number"?String(Ht):""},[qt,ee,K]),Qr=ee==="combobox"&&typeof it=="function"&&it()||null,Ir=typeof Ge=="function"&&Ge(),Hi=(0,Qe.x1)(kn,Ir==null||(x=Ir.props)===null||x===void 0?void 0:x.ref),Si=y.useState(!1),si=(0,p.Z)(Si,2),_r=si[0],Ci=si[1];(0,ge.Z)(function(){Ci(!0)},[]);var xi=(0,be.Z)(!1,{defaultValue:_t,value:lt}),jr=(0,p.Z)(xi,2),Nr=jr[0],ui=jr[1],dt=_r?Nr:!1,Tt=!$e&&Se;(fe||Tt&&dt&&ee==="combobox")&&(dt=!1);var St=Tt?!1:dt,ot=y.useCallback(function(Jt){var Ht=Jt!==void 0?Jt:!dt;fe||(ui(Ht),dt!==Ht&&(Rt==null||Rt(Ht)))},[fe,dt,ui,Rt]),yn=y.useMemo(function(){return(Lt||[]).some(function(Jt){return[`
`,`\r
`].includes(Jt)})},[Lt]),bn=function(Ht,Vn,nr){var On=!0,or=Ht;$t==null||$t(null);var gr=nr?null:Ae(Ht,Lt);return ee!=="combobox"&&gr&&(or="",kt==null||kt(gr),ot(!1),On=!1),Ut&&xr!==or&&Ut(or,{source:Vn?"typing":"effect"}),On},ur=function(Ht){!Ht||!Ht.trim()||Ut(Ht,{source:"submit"})};y.useEffect(function(){!dt&&!Ze&&ee!=="combobox"&&bn("",!1,!1)},[dt]),y.useEffect(function(){Nr&&fe&&ui(!1),fe&&li(!1)},[fe]);var Mr=c(),Ar=(0,p.Z)(Mr,2),Gn=Ar[0],Rr=Ar[1],ci=function(Ht){var Vn=Gn(),nr=Ht.which;if(nr===Q.Z.ENTER&&(ee!=="combobox"&&Ht.preventDefault(),dt||ot(!0)),Rr(!!xr),nr===Q.Z.BACKSPACE&&!Vn&&Ze&&!xr&&K.length){for(var On=(0,D.Z)(K),or=null,gr=On.length-1;gr>=0;gr-=1){var Ur=On[gr];if(!Ur.disabled){On.splice(gr,1),or=Ur;break}}or&&Ue(On,{type:"remove",values:[or]})}for(var wr=arguments.length,kr=new Array(wr>1?wr-1:0),Fr=1;Fr<wr;Fr++)kr[Fr-1]=arguments[Fr];if(dt&&qn.current){var mr;(mr=qn.current).onKeyDown.apply(mr,[Ht].concat(kr))}mn==null||mn.apply(void 0,[Ht].concat(kr))},Zi=function(Ht){for(var Vn=arguments.length,nr=new Array(Vn>1?Vn-1:0),On=1;On<Vn;On++)nr[On-1]=arguments[On];if(dt&&qn.current){var or;(or=qn.current).onKeyUp.apply(or,[Ht].concat(nr))}gn==null||gn.apply(void 0,[Ht].concat(nr))},mo=function(Ht){var Vn=K.filter(function(nr){return nr!==Ht});Ue(Vn,{type:"remove",values:[Ht]})},Wr=y.useRef(!1),Lr=function(){li(!0),fe||(Ft&&!Wr.current&&Ft.apply(void 0,arguments),Vt.includes("focus")&&ot(!0)),Wr.current=!0},Zo=function(){li(!1,function(){Wr.current=!1,ot(!1)}),!fe&&(xr&&(ee==="tags"?Ut(xr,{source:"submit"}):ee==="multiple"&&Ut("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Tr=[];y.useEffect(function(){return function(){Tr.forEach(function(Jt){return clearTimeout(Jt)}),Tr.splice(0,Tr.length)}},[]);var $r=function(Ht){var Vn,nr=Ht.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var or=setTimeout(function(){var kr=Tr.indexOf(or);if(kr!==-1&&Tr.splice(kr,1),Yr(),!Kn&&!On.contains(document.activeElement)){var Fr;(Fr=sr.current)===null||Fr===void 0||Fr.focus()}});Tr.push(or)}for(var gr=arguments.length,Ur=new Array(gr>1?gr-1:0),wr=1;wr<gr;wr++)Ur[wr-1]=arguments[wr];Tn==null||Tn.apply(void 0,[Ht].concat(Ur))},wi=y.useState({}),Ki=(0,p.Z)(wi,2),yo=Ki[1];function Dr(){yo({})}var Hr;Ir&&(Hr=function(Ht){ot(Ht)}),b(function(){var Jt;return[Nn.current,(Jt=Mn.current)===null||Jt===void 0?void 0:Jt.getPopupElement()]},St,ot,!!Ir);var _i=y.useMemo(function(){return(0,B.Z)((0,B.Z)({},d),{},{notFoundContent:$e,open:dt,triggerOpen:St,id:ne,showSearch:mt,multiple:Ze,toggleOpen:ot})},[d,$e,St,dt,ne,mt,Ze,ot]),bo=!!zt||ze,ji;bo&&(ji=y.createElement(yt,{className:A()("".concat(H,"-arrow"),(0,C.Z)({},"".concat(H,"-arrow-loading"),ze)),customizeIcon:zt,customizeIconProps:{loading:ze,searchValue:xr,open:dt,focused:Xr,showSearch:mt}}));var Ko=function(){var Ht;ct==null||ct(),(Ht=sr.current)===null||Ht===void 0||Ht.focus(),Ue([],{type:"clear",values:K}),bn("",!1,!1)},Ui=Et(H,Ko,K,wt,It,fe,xr,ee),ki=Ui.allowClear,Jr=Ui.clearIcon,Pr=y.createElement(fn,{ref:qn}),So=A()(H,$,(L={},(0,C.Z)(L,"".concat(H,"-focused"),Xr),(0,C.Z)(L,"".concat(H,"-multiple"),Ze),(0,C.Z)(L,"".concat(H,"-single"),!Ze),(0,C.Z)(L,"".concat(H,"-allow-clear"),wt),(0,C.Z)(L,"".concat(H,"-show-arrow"),bo),(0,C.Z)(L,"".concat(H,"-disabled"),fe),(0,C.Z)(L,"".concat(H,"-loading"),ze),(0,C.Z)(L,"".concat(H,"-open"),dt),(0,C.Z)(L,"".concat(H,"-customize-input"),Qr),(0,C.Z)(L,"".concat(H,"-show-search"),mt),L)),Gi=y.createElement(te,{ref:Mn,disabled:fe,prefixCls:H,visible:St,popupElement:Pr,animation:Pt,transitionName:Wt,dropdownStyle:an,dropdownClassName:Gt,direction:He,dropdownMatchSelectWidth:En,dropdownRender:Un,dropdownAlign:Mt,placement:st,builtinPlacements:ft,getPopupContainer:en,empty:Se,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Hr,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Hi}):y.createElement(gt,(0,T.Z)({},d,{domRef:kn,prefixCls:H,inputElement:Qr,ref:sr,id:ne,showSearch:mt,autoClearSearchValue:jt,mode:ee,activeDescendantId:Ot,tagRender:ce,values:K,open:dt,onToggleOpen:ot,activeValue:At,searchValue:xr,onSearch:bn,onSearchSubmit:ur,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,T.Z)({className:So},bt,{ref:Nn,onMouseDown:$r,onKeyDown:ci,onKeyUp:Zi,onFocus:Lr,onBlur:Zo}),Xr&&!dt&&y.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(K.map(function(Jt){var Ht=Jt.label,Vn=Jt.value;return["number","string"].includes((0,N.Z)(Ht))?Ht:Vn}).join(", "))),Gi,ji,ki&&Jr),y.createElement(oe.Provider,{value:_i},Vi)}),Fe=Pe,Te=function(d,h){var x=y.useRef({values:new Map,options:new Map}),L=y.useMemo(function(){var H=x.current,$=H.values,he=H.options,ce=d.map(function(K){if(K.label===void 0){var Ue;return(0,B.Z)((0,B.Z)({},K),{},{label:(Ue=$.get(K.value))===null||Ue===void 0?void 0:Ue.label})}return K}),He=new Map,O=new Map;return ce.forEach(function(K){He.set(K.value,K),O.set(K.value,h.get(K.value)||he.get(K.value))}),x.current.values=He,x.current.options=O,ce},[d,h]),ne=y.useCallback(function(H){return h.get(H)||x.current.options.get(H)},[h]);return[L,ne]};function qe(d,h){return Ke(d).join("").toUpperCase().includes(h)}var U=function(d,h,x,L,ne){return y.useMemo(function(){if(!x||L===!1)return d;var H=h.options,$=h.label,he=h.value,ce=[],He=typeof L=="function",O=x.toUpperCase(),K=He?L:function(Se,je){return ne?qe(je[ne],O):je[H]?qe(je[$!=="children"?$:"label"],O):qe(je[he],O)},Ue=He?function(Se){return ye(Se)}:function(Se){return Se};return d.forEach(function(Se){if(Se[H]){var je=K(x,Ue(Se));if(je)ce.push(Se);else{var $e=Se[H].filter(function(ct){return K(x,Ue(ct))});$e.length&&ce.push((0,B.Z)((0,B.Z)({},Se),{},(0,C.Z)({},H,$e)))}return}K(x,Ue(Se))&&ce.push(Se)}),ce},[d,L,ne,x,h])},nt=f(17115),_e=f(11592),ut=["children","value"],vt=["children"];function rn(d){var h=d,x=h.key,L=h.props,ne=L.children,H=L.value,$=(0,P.Z)(L,ut);return(0,B.Z)({key:x,value:H!==void 0?H:x,children:ne},$)}function Zt(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,_e.Z)(d).map(function(x,L){if(!y.isValidElement(x)||!x.type)return null;var ne=x,H=ne.type.isSelectOptGroup,$=ne.key,he=ne.props,ce=he.children,He=(0,P.Z)(he,vt);return h||!H?rn(x):(0,B.Z)((0,B.Z)({key:"__RC_SELECT_GRP__".concat($===null?L:$,"__"),label:$},He),{},{options:Zt(ce)})}).filter(function(x){return x})}function Nt(d,h,x,L,ne){return y.useMemo(function(){var H=d,$=!d;$&&(H=Zt(h));var he=new Map,ce=new Map,He=function(Ue,Se,je){je&&typeof je=="string"&&Ue.set(Se[je],Se)};function O(K){for(var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=0;Se<K.length;Se+=1){var je=K[Se];!je[x.options]||Ue?(he.set(je[x.value],je),He(ce,je,x.label),He(ce,je,L),He(ce,je,ne)):O(je[x.options],!0)}}return O(H),{options:H,valueOptions:he,labelOptions:ce}},[d,h,x,L,ne])}function Dt(d){var h=y.useRef();h.current=d;var x=y.useCallback(function(){return h.current.apply(h,arguments)},[]);return x}var Xt=function(){return null};Xt.isSelectOptGroup=!0;var Yt=Xt,sn=function(){return null};sn.isSelectOption=!0;var Cn=sn,un=f(80547),$n=f(2738),zn=f(48911),pn=y.createContext(null),Ln=pn;function wn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function xn(d){return typeof d=="string"||typeof d=="number"}var dn=function(h,x){var L=k(),ne=L.prefixCls,H=L.id,$=L.open,he=L.multiple,ce=L.mode,He=L.searchValue,O=L.toggleOpen,K=L.notFoundContent,Ue=L.onPopupScroll,Se=y.useContext(Ln),je=Se.flattenOptions,$e=Se.onActiveValue,ct=Se.defaultActiveFirstOption,ee=Se.onSelect,fe=Se.menuItemSelectedIcon,ze=Se.rawValues,it=Se.fieldNames,Ge=Se.virtual,lt=Se.direction,_t=Se.listHeight,Rt=Se.listItemHeight,At="".concat(ne,"-item"),$t=(0,un.Z)(function(){return je},[$,je],function(Mt,st){return st[0]&&Mt[1]!==st[1]}),Ot=y.useRef(null),qt=function(st){st.preventDefault()},jt=function(st){Ot.current&&Ot.current.scrollTo(typeof st=="number"?{index:st}:st)},Ut=function(st){for(var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,en=$t.length,tn=0;tn<en;tn+=1){var Vt=(st+tn*ft+en)%en,Ft=$t[Vt],ln=Ft.group,gn=Ft.data;if(!ln&&!gn.disabled)return Vt}return-1},kt=y.useState(function(){return Ut(0)}),Lt=(0,p.Z)(kt,2),wt=Lt[0],zt=Lt[1],It=function(st){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;zt(st);var en={source:ft?"keyboard":"mouse"},tn=$t[st];if(!tn){$e(null,-1,en);return}$e(tn.value,st,en)};(0,y.useEffect)(function(){It(ct!==!1?Ut(0):-1)},[$t.length,He]);var fn=y.useCallback(function(Mt){return ze.has(Mt)&&ce!=="combobox"},[ce,(0,D.Z)(ze).toString(),ze.size]);(0,y.useEffect)(function(){var Mt=setTimeout(function(){if(!he&&$&&ze.size===1){var ft=Array.from(ze)[0],en=$t.findIndex(function(tn){var Vt=tn.data;return Vt.value===ft});en!==-1&&(It(en),jt(en))}});if($){var st;(st=Ot.current)===null||st===void 0||st.scrollTo(void 0)}return function(){return clearTimeout(Mt)}},[$,He,je.length]);var Pt=function(st){st!==void 0&&ee(st,{selected:!ze.has(st)}),he||O(!1)};if(y.useImperativeHandle(x,function(){return{onKeyDown:function(st){var ft=st.which,en=st.ctrlKey;switch(ft){case Q.Z.N:case Q.Z.P:case Q.Z.UP:case Q.Z.DOWN:{var tn=0;if(ft===Q.Z.UP?tn=-1:ft===Q.Z.DOWN?tn=1:wn()&&en&&(ft===Q.Z.N?tn=1:ft===Q.Z.P&&(tn=-1)),tn!==0){var Vt=Ut(wt+tn,tn);jt(Vt),It(Vt,!0)}break}case Q.Z.ENTER:{var Ft=$t[wt];Ft&&!Ft.data.disabled?Pt(Ft.value):Pt(void 0),$&&st.preventDefault();break}case Q.Z.ESC:O(!1),$&&st.stopPropagation()}},onKeyUp:function(){},scrollTo:function(st){jt(st)}}}),$t.length===0)return y.createElement("div",{role:"listbox",id:"".concat(H,"_list"),className:"".concat(At,"-empty"),onMouseDown:qt},K);var Wt=Object.keys(it).map(function(Mt){return it[Mt]}),an=function(st){return st.label};function Gt(Mt,st){var ft=Mt.group;return{role:ft?"presentation":"option",id:"".concat(H,"_list_").concat(st)}}var En=function(st){var ft=$t[st];if(!ft)return null;var en=ft.data||{},tn=en.value,Vt=ft.group,Ft=(0,I.Z)(en,!0),ln=an(ft);return ft?y.createElement("div",(0,T.Z)({"aria-label":typeof ln=="string"&&!Vt?ln:null},Ft,{key:st},Gt(ft,st),{"aria-selected":fn(tn)}),tn):null},Un={role:"listbox",id:"".concat(H,"_list")};return y.createElement(y.Fragment,null,Ge&&y.createElement("div",(0,T.Z)({},Un,{style:{height:0,width:0,overflow:"hidden"}}),En(wt-1),En(wt),En(wt+1)),y.createElement(zn.Z,{itemKey:"key",ref:Ot,data:$t,height:_t,itemHeight:Rt,fullHeight:!1,onMouseDown:qt,onScroll:Ue,virtual:Ge,direction:lt,innerProps:Ge?null:Un},function(Mt,st){var ft,en=Mt.group,tn=Mt.groupOption,Vt=Mt.data,Ft=Mt.label,ln=Mt.value,gn=Vt.key;if(en){var mn,Tn=(mn=Vt.title)!==null&&mn!==void 0?mn:xn(Ft)?Ft.toString():void 0;return y.createElement("div",{className:A()(At,"".concat(At,"-group")),title:Tn},Ft!==void 0?Ft:gn)}var Ve=Vt.disabled,Ze=Vt.title,mt=Vt.children,bt=Vt.style,vn=Vt.className,Cr=(0,P.Z)(Vt,In),Kn=(0,$n.Z)(Cr,Wt),_n=fn(ln),Nn="".concat(At,"-option"),kn=A()(At,Nn,vn,(ft={},(0,C.Z)(ft,"".concat(Nn,"-grouped"),tn),(0,C.Z)(ft,"".concat(Nn,"-active"),wt===st&&!Ve),(0,C.Z)(ft,"".concat(Nn,"-disabled"),Ve),(0,C.Z)(ft,"".concat(Nn,"-selected"),_n),ft)),Mn=an(Mt),sr=!fe||typeof fe=="function"||_n,qn=typeof Mn=="number"?Mn:Mn||ln,tr=xn(qn)?qn.toString():void 0;return Ze!==void 0&&(tr=Ze),y.createElement("div",(0,T.Z)({},(0,I.Z)(Kn),Ge?{}:Gt(Mt,st),{"aria-selected":_n,className:kn,title:tr,onMouseMove:function(){wt===st||Ve||It(st)},onClick:function(){Ve||Pt(ln)},style:bt}),y.createElement("div",{className:"".concat(Nn,"-content")},qn),y.isValidElement(fe)||_n,sr&&y.createElement(yt,{className:"".concat(At,"-option-state"),customizeIcon:fe,customizeIconProps:{isSelected:_n}},_n?"\u2713":null))}))},Bn=y.forwardRef(dn);Bn.displayName="OptionList";var Qt=Bn;function Fn(d){var h=d.mode,x=d.options,L=d.children,ne=d.backfill,H=d.allowClear,$=d.placeholder,he=d.getInputElement,ce=d.showSearch,He=d.onSearch,O=d.defaultOpen,K=d.autoFocus,Ue=d.labelInValue,Se=d.value,je=d.inputValue,$e=d.optionLabelProp,ct=isMultiple(h),ee=ce!==void 0?ce:ct||h==="combobox",fe=x||convertChildrenToData(L);if(warning(h!=="tags"||fe.every(function(lt){return!lt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),h==="tags"||h==="combobox"){var ze=fe.some(function(lt){return lt.options?lt.options.some(function(_t){return typeof("value"in _t?_t.value:_t.key)=="number"}):typeof("value"in lt?lt.value:lt.key)=="number"});warning(!ze,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(h!=="combobox"||!$e,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(h==="combobox"||!ne,"`backfill` only works with `combobox` mode."),warning(h==="combobox"||!he,"`getInputElement` only work with `combobox` mode."),noteOnce(h!=="combobox"||!he||!H||!$,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),He&&!ee&&h!=="combobox"&&h!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!O||K,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Se!=null){var it=toArray(Se);warning(!Ue||it.every(function(lt){return _typeof(lt)==="object"&&("key"in lt||"value"in lt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ct||Array.isArray(Se),"`value` should be array when `mode` is `multiple` or `tags`")}if(L){var Ge=null;toNodeArray(L).some(function(lt){if(!React.isValidElement(lt)||!lt.type)return!1;var _t=lt,Rt=_t.type;if(Rt.isSelectOption)return!1;if(Rt.isSelectOptGroup){var At=toNodeArray(lt.props.children).every(function($t){return!React.isValidElement($t)||!lt.type||$t.type.isSelectOption?!0:(Ge=$t.type,!1)});return!At}return Ge=Rt,!0}),Ge&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ge.displayName||Ge.name||Ge,"`.")),warning(je===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Wn(d,h){if(d){var x=function L(ne){for(var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=0;$<ne.length;$++){var he=ne[$];if(he[h==null?void 0:h.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!H&&Array.isArray(he[h==null?void 0:h.options])&&L(he[h==null?void 0:h.options],!0))break}};x(d)}}var Sr=null,pr=["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"],on=["inputValue"];function rt(d){return!d||(0,N.Z)(d)!=="object"}var Bt=y.forwardRef(function(d,h){var x=d.id,L=d.mode,ne=d.prefixCls,H=ne===void 0?"rc-select":ne,$=d.backfill,he=d.fieldNames,ce=d.inputValue,He=d.searchValue,O=d.onSearch,K=d.autoClearSearchValue,Ue=K===void 0?!0:K,Se=d.onSelect,je=d.onDeselect,$e=d.dropdownMatchSelectWidth,ct=$e===void 0?!0:$e,ee=d.filterOption,fe=d.filterSort,ze=d.optionFilterProp,it=d.optionLabelProp,Ge=d.options,lt=d.children,_t=d.defaultActiveFirstOption,Rt=d.menuItemSelectedIcon,At=d.virtual,$t=d.direction,Ot=d.listHeight,qt=Ot===void 0?200:Ot,jt=d.listItemHeight,Ut=jt===void 0?20:jt,kt=d.value,Lt=d.defaultValue,wt=d.labelInValue,zt=d.onChange,It=(0,P.Z)(d,pr),fn=(0,nt.ZP)(x),Pt=pe(L),Wt=!!(!Ge&&lt),an=y.useMemo(function(){return ee===void 0&&L==="combobox"?!1:ee},[ee,L]),Gt=y.useMemo(function(){return me(he,Wt)},[JSON.stringify(he),Wt]),En=(0,be.Z)("",{value:He!==void 0?He:ce,postState:function(Tt){return Tt||""}}),Un=(0,p.Z)(En,2),Mt=Un[0],st=Un[1],ft=Nt(Ge,lt,Gt,ze,it),en=ft.valueOptions,tn=ft.labelOptions,Vt=ft.options,Ft=y.useCallback(function(dt){var Tt=Ke(dt);return Tt.map(function(St){var ot,yn,bn,ur,Mr;if(rt(St))ot=St;else{var Ar;bn=St.key,yn=St.label,ot=(Ar=St.value)!==null&&Ar!==void 0?Ar:bn}var Gn=en.get(ot);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[it||Gt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:ot),ur=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:ot,key:bn,disabled:ur,title:Mr}})},[Gt,it,en]),ln=(0,be.Z)(Lt,{value:kt}),gn=(0,p.Z)(ln,2),mn=gn[0],Tn=gn[1],Ve=y.useMemo(function(){var dt,Tt=Ft(mn);return L==="combobox"&&V((dt=Tt[0])===null||dt===void 0?void 0:dt.value)?[]:Tt},[mn,Ft,L]),Ze=Te(Ve,en),mt=(0,p.Z)(Ze,2),bt=mt[0],vn=mt[1],Cr=y.useMemo(function(){if(!L&&bt.length===1){var dt=bt[0];if(dt.value===null&&(dt.label===null||dt.label===void 0))return[]}return bt.map(function(Tt){var St;return(0,B.Z)((0,B.Z)({},Tt),{},{label:(St=Tt.label)!==null&&St!==void 0?St:Tt.value})})},[L,bt]),Kn=y.useMemo(function(){return new Set(bt.map(function(dt){return dt.value}))},[bt]);y.useEffect(function(){if(L==="combobox"){var dt,Tt=(dt=bt[0])===null||dt===void 0?void 0:dt.value;st(G(Tt)?String(Tt):"")}},[bt]);var _n=Dt(function(dt,Tt){var St,ot=Tt!=null?Tt:dt;return St={},(0,C.Z)(St,Gt.value,dt),(0,C.Z)(St,Gt.label,ot),St}),Nn=y.useMemo(function(){if(L!=="tags")return Vt;var dt=(0,D.Z)(Vt),Tt=function(ot){return en.has(ot)};return(0,D.Z)(bt).sort(function(St,ot){return St.value<ot.value?-1:1}).forEach(function(St){var ot=St.value;Tt(ot)||dt.push(_n(ot,St.label))}),dt},[_n,Vt,en,bt,L]),kn=U(Nn,Gt,Mt,an,ze),Mn=y.useMemo(function(){return L!=="tags"||!Mt||kn.some(function(dt){return dt[ze||"value"]===Mt})||kn.some(function(dt){return dt[Gt.value]===Mt})?kn:[_n(Mt)].concat((0,D.Z)(kn))},[_n,ze,L,kn,Mt,Gt]),sr=y.useMemo(function(){return fe?(0,D.Z)(Mn).sort(function(dt,Tt){return fe(dt,Tt)}):Mn},[Mn,fe]),qn=y.useMemo(function(){return Oe(sr,{fieldNames:Gt,childrenAsData:Wt})},[sr,Gt,Wt]),tr=function(Tt){var St=Ft(Tt);if(Tn(St),zt&&(St.length!==bt.length||St.some(function(bn,ur){var Mr;return((Mr=bt[ur])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var ot=wt?St:St.map(function(bn){return bn.value}),yn=St.map(function(bn){return ye(vn(bn.value))});zt(Pt?ot:ot[0],Pt?yn:yn[0])}},Kr=y.useState(null),Xr=(0,p.Z)(Kr,2),li=Xr[0],Yr=Xr[1],xr=y.useState(0),Qr=(0,p.Z)(xr,2),Ir=Qr[0],Hi=Qr[1],Si=_t!==void 0?_t:L!=="combobox",si=y.useCallback(function(dt,Tt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=St.source,yn=ot===void 0?"keyboard":ot;Hi(Tt),$&&L==="combobox"&&dt!==null&&yn==="keyboard"&&Yr(String(dt))},[$,L]),_r=function(Tt,St,ot){var yn=function(){var Wr,Lr=vn(Tt);return[wt?{label:Lr==null?void 0:Lr[Gt.label],value:Tt,key:(Wr=Lr==null?void 0:Lr.key)!==null&&Wr!==void 0?Wr:Tt}:Tt,ye(Lr)]};if(St&&Se){var bn=yn(),ur=(0,p.Z)(bn,2),Mr=ur[0],Ar=ur[1];Se(Mr,Ar)}else if(!St&&je&&ot!=="clear"){var Gn=yn(),Rr=(0,p.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];je(ci,Zi)}},Ci=Dt(function(dt,Tt){var St,ot=Pt?Tt.selected:!0;ot?St=Pt?[].concat((0,D.Z)(bt),[dt]):[dt]:St=bt.filter(function(yn){return yn.value!==dt}),tr(St),_r(dt,ot),L==="combobox"?Yr(""):(!pe||Ue)&&(st(""),Yr(""))}),xi=function(Tt,St){tr(Tt);var ot=St.type,yn=St.values;(ot==="remove"||ot==="clear")&&yn.forEach(function(bn){_r(bn.value,!1,ot)})},jr=function(Tt,St){if(st(Tt),Yr(null),St.source==="submit"){var ot=(Tt||"").trim();if(ot){var yn=Array.from(new Set([].concat((0,D.Z)(Kn),[ot])));tr(yn),_r(ot,!0),st("")}return}St.source!=="blur"&&(L==="combobox"&&tr(Tt),O==null||O(Tt))},Nr=function(Tt){var St=Tt;L!=="tags"&&(St=Tt.map(function(yn){var bn=tn.get(yn);return bn==null?void 0:bn.value}).filter(function(yn){return yn!==void 0}));var ot=Array.from(new Set([].concat((0,D.Z)(Kn),(0,D.Z)(St))));tr(ot),ot.forEach(function(yn){_r(yn,!0)})},ui=y.useMemo(function(){var dt=At!==!1&&ct!==!1;return(0,B.Z)((0,B.Z)({},ft),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:Ci,menuItemSelectedIcon:Rt,rawValues:Kn,fieldNames:Gt,virtual:dt,direction:$t,listHeight:qt,listItemHeight:Ut,childrenAsData:Wt})},[ft,qn,si,Si,Ci,Rt,Kn,Gt,At,ct,qt,Ut,Wt]);return y.createElement(Ln.Provider,{value:ui},y.createElement(Fe,(0,T.Z)({},It,{id:fn,prefixCls:H,ref:h,omitDomProps:on,mode:L,displayValues:Cr,onDisplayValuesChange:xi,direction:$t,searchValue:Mt,onSearch:jr,autoClearSearchValue:Ue,onSearchSplit:Nr,dropdownMatchSelectWidth:ct,OptionList:Qt,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(fn,"_list_").concat(Ir)})))}),g=Bt;g.Option=Cn,g.OptGroup=Yt;var F=g,W=F},9296:function(nn,Re,f){"use strict";f.r(Re),f.d(Re,{ResizableTextArea:function(){return we},default:function(){return V}});var T=f(54476),D=f(33885),C=f(20068),B=f(76190),p=f(42978),P=f(75931),N=f(94480),be=f(92310),le=f.n(be),y=f(93681),Ie=f(5643),A=f(18929),ge=f(59301),De=f(29301),Q=f(34280),Qe=f(16089),tt=`
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;
`,yt=["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={},oe;function k(Z){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=Z.getAttribute("id")||Z.getAttribute("data-reactid")||Z.getAttribute("name");if(_&&Et[ae])return Et[ae];var Y=window.getComputedStyle(Z),J=Y.getPropertyValue("box-sizing")||Y.getPropertyValue("-moz-box-sizing")||Y.getPropertyValue("-webkit-box-sizing"),Ce=parseFloat(Y.getPropertyValue("padding-bottom"))+parseFloat(Y.getPropertyValue("padding-top")),Le=parseFloat(Y.getPropertyValue("border-bottom-width"))+parseFloat(Y.getPropertyValue("border-top-width")),se=yt.map(function(re){return"".concat(re,":").concat(Y.getPropertyValue(re))}).join(";"),Me={sizingStyle:se,paddingSize:Ce,borderSize:Le,boxSizing:J};return _&&ae&&(Et[ae]=Me),Me}function S(Z){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;oe||(oe=document.createElement("textarea"),oe.setAttribute("tab-index","-1"),oe.setAttribute("aria-hidden","true"),document.body.appendChild(oe)),Z.getAttribute("wrap")?oe.setAttribute("wrap",Z.getAttribute("wrap")):oe.removeAttribute("wrap");var J=k(Z,_),Ce=J.paddingSize,Le=J.borderSize,se=J.boxSizing,Me=J.sizingStyle;oe.setAttribute("style","".concat(Me,";").concat(tt)),oe.value=Z.value||Z.placeholder||"";var re=void 0,ht=void 0,at,gt=oe.scrollHeight;if(se==="border-box"?gt+=Le:se==="content-box"&&(gt-=Ce),ae!==null||Y!==null){oe.value=" ";var Ye=oe.scrollHeight-Ce;ae!==null&&(re=Ye*ae,se==="border-box"&&(re=re+Ce+Le),gt=Math.max(re,gt)),Y!==null&&(ht=Ye*Y,se==="border-box"&&(ht=ht+Ce+Le),at=gt>ht?"":"hidden",gt=Math.min(ht,gt))}var xt={height:gt,overflowY:at,resize:"none"};return re&&(xt.minHeight=re),ht&&(xt.maxHeight=ht),xt}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,I=1,j=2,R=ge.forwardRef(function(Z,_){var ae=Z,Y=ae.prefixCls,J=ae.onPressEnter,Ce=ae.defaultValue,Le=ae.value,se=ae.autoSize,Me=ae.onResize,re=ae.className,ht=ae.style,at=ae.disabled,gt=ae.onChange,Ye=ae.onInternalAutoSize,xt=(0,P.Z)(ae,c),Ne=(0,A.Z)(Ce,{value:Le,postState:function(Yt){return Yt!=null?Yt:""}}),M=(0,p.Z)(Ne,2),ve=M[0],te=M[1],X=function(Yt){te(Yt.target.value),gt==null||gt(Yt)},ue=ge.useRef();ge.useImperativeHandle(_,function(){return{textArea:ue.current}});var me=ge.useMemo(function(){return se&&(0,B.Z)(se)==="object"?[se.minRows,se.maxRows]:[]},[se]),Oe=(0,p.Z)(me,2),ye=Oe[0],Ae=Oe[1],ie=!!se,Je=function(){try{if(document.activeElement===ue.current){var Yt=ue.current,sn=Yt.selectionStart,Cn=Yt.selectionEnd,un=Yt.scrollTop;ue.current.setSelectionRange(sn,Cn),ue.current.scrollTop=un}}catch($n){}},pe=ge.useState(j),Pe=(0,p.Z)(pe,2),Fe=Pe[0],Te=Pe[1],qe=ge.useState(),U=(0,p.Z)(qe,2),nt=U[0],_e=U[1],ut=function(){Te(b)};(0,Q.Z)(function(){ie&&ut()},[Le,ye,Ae,ie]),(0,Q.Z)(function(){if(Fe===b)Te(I);else if(Fe===I){var Xt=S(ue.current,!1,ye,Ae);Te(j),_e(Xt)}else Je()},[Fe]);var vt=ge.useRef(),rn=function(){Qe.Z.cancel(vt.current)},Zt=function(Yt){Fe===j&&(Me==null||Me(Yt),se&&(rn(),vt.current=(0,Qe.Z)(function(){ut()})))};ge.useEffect(function(){return rn},[]);var Nt=ie?nt:null,Dt=(0,D.Z)((0,D.Z)({},ht),Nt);return(Fe===b||Fe===I)&&(Dt.overflowY="hidden",Dt.overflowX="hidden"),ge.createElement(De.Z,{onResize:Zt,disabled:!(se||Me)},ge.createElement("textarea",(0,T.Z)({},xt,{ref:ue,style:Dt,className:le()(Y,re,(0,C.Z)({},"".concat(Y,"-disabled"),at)),disabled:at,value:ve,onChange:X})))}),we=R,ke=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ke(Z,_){return(0,N.Z)(Z||"").slice(0,_).join("")}function Ee(Z,_,ae,Y){var J=ae;return Z?J=Ke(ae,Y):(0,N.Z)(_||"").length<ae.length&&(0,N.Z)(ae||"").length>Y&&(J=_),J}var de=ge.forwardRef(function(Z,_){var ae,Y=Z.defaultValue,J=Z.value,Ce=Z.onFocus,Le=Z.onBlur,se=Z.onChange,Me=Z.allowClear,re=Z.maxLength,ht=Z.onCompositionStart,at=Z.onCompositionEnd,gt=Z.suffix,Ye=Z.prefixCls,xt=Ye===void 0?"rc-textarea":Ye,Ne=Z.classes,M=Z.showCount,ve=Z.className,te=Z.style,X=Z.disabled,ue=Z.hidden,me=Z.classNames,Oe=Z.styles,ye=Z.onResize,Ae=(0,P.Z)(Z,ke),ie=(0,A.Z)(Y,{value:J,defaultValue:Y}),Je=(0,p.Z)(ie,2),pe=Je[0],Pe=Je[1],Fe=(0,ge.useRef)(null),Te=ge.useState(!1),qe=(0,p.Z)(Te,2),U=qe[0],nt=qe[1],_e=ge.useState(!1),ut=(0,p.Z)(_e,2),vt=ut[0],rn=ut[1],Zt=ge.useRef(),Nt=ge.useRef(0),Dt=ge.useState(null),Xt=(0,p.Z)(Dt,2),Yt=Xt[0],sn=Xt[1],Cn=function(){var rt;(rt=Fe.current)===null||rt===void 0||rt.textArea.focus()};(0,ge.useImperativeHandle)(_,function(){return{resizableTextArea:Fe.current,focus:Cn,blur:function(){var rt;(rt=Fe.current)===null||rt===void 0||rt.textArea.blur()}}}),(0,ge.useEffect)(function(){nt(function(on){return!X&&on})},[X]);var un=Number(re)>0,$n=function(rt){rn(!0),Zt.current=pe,Nt.current=rt.currentTarget.selectionStart,ht==null||ht(rt)},zn=function(rt){rn(!1);var Bt=rt.currentTarget.value;if(un){var g,F=Nt.current>=re+1||Nt.current===((g=Zt.current)===null||g===void 0?void 0:g.length);Bt=Ee(F,Zt.current,Bt,re)}Bt!==pe&&(Pe(Bt),(0,Ie.rJ)(rt.currentTarget,rt,se,Bt)),at==null||at(rt)},pn=function(rt){var Bt=rt.target.value;if(!vt&&un){var g=rt.target.selectionStart>=re+1||rt.target.selectionStart===Bt.length||!rt.target.selectionStart;Bt=Ee(g,pe,Bt,re)}Pe(Bt),(0,Ie.rJ)(rt.currentTarget,rt,se,Bt)},Ln=function(rt){var Bt=Ae.onPressEnter,g=Ae.onKeyDown;rt.key==="Enter"&&Bt&&Bt(rt),g==null||g(rt)},wn=function(rt){nt(!0),Ce==null||Ce(rt)},In=function(rt){nt(!1),Le==null||Le(rt)},xn=function(rt){var Bt;Pe(""),Cn(),(0,Ie.rJ)((Bt=Fe.current)===null||Bt===void 0?void 0:Bt.textArea,rt,se)},dn=(0,Ie.D7)(pe);!vt&&un&&J==null&&(dn=Ke(dn,re));var Bn=gt,Qt;if(M){var Fn=(0,N.Z)(dn).length;(0,B.Z)(M)==="object"?Qt=M.formatter({value:dn,count:Fn,maxLength:re}):Qt="".concat(Fn).concat(un?" / ".concat(re):""),Bn=ge.createElement(ge.Fragment,null,Bn,ge.createElement("span",{className:le()("".concat(xt,"-data-count"),me==null?void 0:me.count),style:Oe==null?void 0:Oe.count},Qt))}var Wn=function(rt){var Bt;ye==null||ye(rt),(Bt=Fe.current)!==null&&Bt!==void 0&&Bt.textArea.style.height&&sn(!0)},Sr=!Ae.autoSize&&!M&&!Me,pr=ge.createElement(y.BaseInput,{value:dn,allowClear:Me,handleReset:xn,suffix:Bn,prefixCls:xt,classes:{affixWrapper:le()(Ne==null?void 0:Ne.affixWrapper,(ae={},(0,C.Z)(ae,"".concat(xt,"-show-count"),M),(0,C.Z)(ae,"".concat(xt,"-textarea-allow-clear"),Me),ae))},disabled:X,focused:U,className:ve,style:(0,D.Z)((0,D.Z)({},te),Yt&&!Sr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qt=="string"?Qt:void 0}},hidden:ue,inputElement:ge.createElement(we,(0,T.Z)({},Ae,{onKeyDown:Ln,onChange:pn,onFocus:wn,onBlur:In,onCompositionStart:$n,onCompositionEnd:zn,className:me==null?void 0:me.textarea,style:(0,D.Z)((0,D.Z)({},Oe==null?void 0:Oe.textarea),{},{resize:te==null?void 0:te.resize}),disabled:X,prefixCls:xt,onResize:Wn,ref:Fe}))});return pr}),G=de,V=G},48911:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return Ne}});var T=f(54476),D=f(76190),C=f(33885),B=f(20068),p=f(42978),P=f(75931),N=f(92310),be=f.n(N),le=f(29301),y=f(70425),Ie=f(34280),A=f(59301),ge=f(4676),De=A.forwardRef(function(M,ve){var te=M.height,X=M.offsetY,ue=M.offsetX,me=M.children,Oe=M.prefixCls,ye=M.onInnerResize,Ae=M.innerProps,ie=M.rtl,Je=M.extra,pe={},Pe={display:"flex",flexDirection:"column"};return X!==void 0&&(pe={height:te,position:"relative",overflow:"hidden"},Pe=(0,C.Z)((0,C.Z)({},Pe),{},(0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)((0,B.Z)({transform:"translateY(".concat(X,"px)")},ie?"marginRight":"marginLeft",-ue),"position","absolute"),"left",0),"right",0),"top",0))),A.createElement("div",{style:pe},A.createElement(le.Z,{onResize:function(Te){var qe=Te.offsetHeight;qe&&ye&&ye()}},A.createElement("div",(0,T.Z)({style:Pe,className:be()((0,B.Z)({},"".concat(Oe,"-holder-inner"),Oe)),ref:ve},Ae),me,Je)))});De.displayName="Filler";var Q=De;function Qe(M){var ve=M.children,te=M.setRef,X=A.useCallback(function(ue){te(ue)},[]);return A.cloneElement(ve,{ref:X})}function tt(M,ve,te,X,ue,me,Oe,ye){var Ae=ye.getKey;return M.slice(ve,te+1).map(function(ie,Je){var pe=ve+Je,Pe=Oe(ie,pe,{style:{width:X},offsetX:ue}),Fe=Ae(ie);return A.createElement(Qe,{key:Fe,setRef:function(qe){return me(ie,qe)}},Pe)})}function yt(M,ve,te,X){var ue=te-M,me=ve-te,Oe=Math.min(ue,me)*2;if(X<=Oe){var ye=Math.floor(X/2);return X%2?te+ye+1:te-ye}return ue>me?te-(X-me):te+(X-ue)}function Et(M,ve,te){var X=M.length,ue=ve.length,me,Oe;if(X===0&&ue===0)return null;X<ue?(me=M,Oe=ve):(me=ve,Oe=M);var ye={__EMPTY_ITEM__:!0};function Ae(Te){return Te!==void 0?te(Te):ye}for(var ie=null,Je=Math.abs(X-ue)!==1,pe=0;pe<Oe.length;pe+=1){var Pe=Ae(me[pe]),Fe=Ae(Oe[pe]);if(Pe!==Fe){ie=pe,Je=Je||Pe!==Ae(Oe[pe+1]);break}}return ie===null?null:{index:ie,multiple:Je}}function oe(M,ve,te){var X=A.useState(M),ue=(0,p.Z)(X,2),me=ue[0],Oe=ue[1],ye=A.useState(null),Ae=(0,p.Z)(ye,2),ie=Ae[0],Je=Ae[1];return A.useEffect(function(){var pe=Et(me||[],M||[],ve);(pe==null?void 0:pe.index)!==void 0&&(te==null||te(pe.index),Je(M[pe.index])),Oe(M)},[M]),[ie]}var k=f(16089),S=(typeof navigator=="undefined"?"undefined":(0,D.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function(M,ve,te,X){var ue=(0,A.useRef)(!1),me=(0,A.useRef)(null);function Oe(){clearTimeout(me.current),ue.current=!0,me.current=setTimeout(function(){ue.current=!1},50)}var ye=(0,A.useRef)({top:M,bottom:ve,left:te,right:X});return ye.current.top=M,ye.current.bottom=ve,ye.current.left=te,ye.current.right=X,function(Ae,ie){var Je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,pe=Ae?ie<0&&ye.current.left||ie>0&&ye.current.right:ie<0&&ye.current.top||ie>0&&ye.current.bottom;return Je&&pe?(clearTimeout(me.current),ue.current=!1):(!pe||ue.current)&&Oe(),!ue.current&&pe}};function I(M,ve,te,X,ue,me,Oe){var ye=(0,A.useRef)(0),Ae=(0,A.useRef)(null),ie=(0,A.useRef)(null),Je=(0,A.useRef)(!1),pe=b(ve,te,X,ue);function Pe(_e,ut){if(k.Z.cancel(Ae.current),!pe(!1,ut)){var vt=_e;if(!vt._virtualHandled)vt._virtualHandled=!0;else return;ye.current+=ut,ie.current=ut,c||vt.preventDefault(),Ae.current=(0,k.Z)(function(){var rn=Je.current?10:1;Oe(ye.current*rn,!1),ye.current=0})}}function Fe(_e,ut){Oe(ut,!0),c||_e.preventDefault()}var Te=(0,A.useRef)(null),qe=(0,A.useRef)(null);function U(_e){if(M){k.Z.cancel(qe.current),qe.current=(0,k.Z)(function(){Te.current=null},2);var ut=_e.deltaX,vt=_e.deltaY,rn=_e.shiftKey,Zt=ut,Nt=vt;(Te.current==="sx"||!Te.current&&rn&&vt&&!ut)&&(Zt=vt,Nt=0,Te.current="sx");var Dt=Math.abs(Zt),Xt=Math.abs(Nt);Te.current===null&&(Te.current=me&&Dt>Xt?"x":"y"),Te.current==="y"?Pe(_e,Nt):Fe(_e,Zt)}}function nt(_e){M&&(Je.current=_e.detail===ie.current)}return[U,nt]}function j(M,ve,te,X){var ue=A.useMemo(function(){return[new Map,[]]},[M,te.id,X]),me=(0,p.Z)(ue,2),Oe=me[0],ye=me[1],Ae=function(Je){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Je,Pe=Oe.get(Je),Fe=Oe.get(pe);if(Pe===void 0||Fe===void 0)for(var Te=M.length,qe=ye.length;qe<Te;qe+=1){var U,nt=M[qe],_e=ve(nt);Oe.set(_e,qe);var ut=(U=te.get(_e))!==null&&U!==void 0?U:X;if(ye[qe]=(ye[qe-1]||0)+ut,_e===Je&&(Pe=qe),_e===pe&&(Fe=qe),Pe!==void 0&&Fe!==void 0)break}return{top:ye[Pe-1]||0,bottom:ye[Fe]}};return Ae}var R=f(67732),we=f(83652),ke=function(){function M(){(0,R.Z)(this,M),(0,B.Z)(this,"maps",void 0),(0,B.Z)(this,"id",0),(0,B.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,we.Z)(M,[{key:"set",value:function(te,X){this.diffRecords.set(te,this.maps[te]),this.maps[te]=X,this.id+=1}},{key:"get",value:function(te){return this.maps[te]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),M}(),Ke=ke;function Ee(M){var ve=parseFloat(M);return isNaN(ve)?0:ve}function de(M,ve,te){var X=A.useState(0),ue=(0,p.Z)(X,2),me=ue[0],Oe=ue[1],ye=(0,A.useRef)(new Map),Ae=(0,A.useRef)(new Ke),ie=(0,A.useRef)(0);function Je(){ie.current+=1}function pe(){var Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Je();var Te=function(){var nt=!1;ye.current.forEach(function(_e,ut){if(_e&&_e.offsetParent){var vt=_e.offsetHeight,rn=getComputedStyle(_e),Zt=rn.marginTop,Nt=rn.marginBottom,Dt=Ee(Zt),Xt=Ee(Nt),Yt=vt+Dt+Xt;Ae.current.get(ut)!==Yt&&(Ae.current.set(ut,Yt),nt=!0)}}),nt&&Oe(function(_e){return _e+1})};if(Fe)Te();else{ie.current+=1;var qe=ie.current;Promise.resolve().then(function(){qe===ie.current&&Te()})}}function Pe(Fe,Te){var qe=M(Fe),U=ye.current.get(qe);Te?(ye.current.set(qe,Te),pe()):ye.current.delete(qe),!U!=!Te&&(Te?ve==null||ve(Fe):te==null||te(Fe))}return(0,A.useEffect)(function(){return Je},[]),[Pe,pe,Ae.current,me]}var G=14/15;function V(M,ve,te){var X=(0,A.useRef)(!1),ue=(0,A.useRef)(0),me=(0,A.useRef)(0),Oe=(0,A.useRef)(null),ye=(0,A.useRef)(null),Ae,ie=function(Fe){if(X.current){var Te=Math.ceil(Fe.touches[0].pageX),qe=Math.ceil(Fe.touches[0].pageY),U=ue.current-Te,nt=me.current-qe,_e=Math.abs(U)>Math.abs(nt);_e?ue.current=Te:me.current=qe;var ut=te(_e,_e?U:nt,!1,Fe);ut&&Fe.preventDefault(),clearInterval(ye.current),ut&&(ye.current=setInterval(function(){_e?U*=G:nt*=G;var vt=Math.floor(_e?U:nt);(!te(_e,vt,!0)||Math.abs(vt)<=.1)&&clearInterval(ye.current)},16))}},Je=function(){X.current=!1,Ae()},pe=function(Fe){Ae(),Fe.touches.length===1&&!X.current&&(X.current=!0,ue.current=Math.ceil(Fe.touches[0].pageX),me.current=Math.ceil(Fe.touches[0].pageY),Oe.current=Fe.target,Oe.current.addEventListener("touchmove",ie,{passive:!1}),Oe.current.addEventListener("touchend",Je,{passive:!0}))};Ae=function(){Oe.current&&(Oe.current.removeEventListener("touchmove",ie),Oe.current.removeEventListener("touchend",Je))},(0,Ie.Z)(function(){return M&&ve.current.addEventListener("touchstart",pe,{passive:!0}),function(){var Pe;(Pe=ve.current)===null||Pe===void 0||Pe.removeEventListener("touchstart",pe),Ae(),clearInterval(ye.current)}},[M])}function Z(M){return Math.floor(Math.pow(M,.5))}function _(M,ve){var te="touches"in M?M.touches[0]:M;return te[ve?"pageX":"pageY"]-window[ve?"scrollX":"scrollY"]}function ae(M,ve,te){A.useEffect(function(){var X=ve.current;if(M&&X){var ue=!1,me,Oe,ye=function(){k.Z.cancel(me)},Ae=function Pe(){ye(),me=(0,k.Z)(function(){te(Oe),Pe()})},ie=function(){ue=!1,ye()},Je=function(Fe){if(!(Fe.target.draggable||Fe.button!==0)){var Te=Fe;Te._virtualHandled||(Te._virtualHandled=!0,ue=!0)}},pe=function(Fe){if(ue){var Te=_(Fe,!1),qe=X.getBoundingClientRect(),U=qe.top,nt=qe.bottom;if(Te<=U){var _e=U-Te;Oe=-Z(_e),Ae()}else if(Te>=nt){var ut=Te-nt;Oe=Z(ut),Ae()}else ye()}};return X.addEventListener("mousedown",Je),X.ownerDocument.addEventListener("mouseup",ie),X.ownerDocument.addEventListener("mousemove",pe),X.ownerDocument.addEventListener("dragend",ie),function(){X.removeEventListener("mousedown",Je),X.ownerDocument.removeEventListener("mouseup",ie),X.ownerDocument.removeEventListener("mousemove",pe),X.ownerDocument.removeEventListener("dragend",ie),ye()}}},[M])}var Y=10;function J(M,ve,te,X,ue,me,Oe,ye){var Ae=A.useRef(),ie=A.useState(null),Je=(0,p.Z)(ie,2),pe=Je[0],Pe=Je[1];return(0,Ie.Z)(function(){if(pe&&pe.times<Y){if(!M.current){Pe(function(In){return(0,C.Z)({},In)});return}me();var Fe=pe.targetAlign,Te=pe.originAlign,qe=pe.index,U=pe.offset,nt=M.current.clientHeight,_e=!1,ut=Fe,vt=null;if(nt){for(var rn=Fe||Te,Zt=0,Nt=0,Dt=0,Xt=Math.min(ve.length-1,qe),Yt=0;Yt<=Xt;Yt+=1){var sn=ue(ve[Yt]);Nt=Zt;var Cn=te.get(sn);Dt=Nt+(Cn===void 0?X:Cn),Zt=Dt}for(var un=rn==="top"?U:nt-U,$n=Xt;$n>=0;$n-=1){var zn=ue(ve[$n]),pn=te.get(zn);if(pn===void 0){_e=!0;break}if(un-=pn,un<=0)break}switch(rn){case"top":vt=Nt-U;break;case"bottom":vt=Dt-nt+U;break;default:{var Ln=M.current.scrollTop,wn=Ln+nt;Nt<Ln?ut="top":Dt>wn&&(ut="bottom")}}vt!==null&&Oe(vt),vt!==pe.lastTop&&(_e=!0)}_e&&Pe((0,C.Z)((0,C.Z)({},pe),{},{times:pe.times+1,targetAlign:ut,lastTop:vt}))}},[pe,M.current]),function(Fe){if(Fe==null){ye();return}if(k.Z.cancel(Ae.current),typeof Fe=="number")Oe(Fe);else if(Fe&&(0,D.Z)(Fe)==="object"){var Te,qe=Fe.align;"index"in Fe?Te=Fe.index:Te=ve.findIndex(function(_e){return ue(_e)===Fe.key});var U=Fe.offset,nt=U===void 0?0:U;Pe({times:0,index:Te,offset:nt,originAlign:qe})}}}var Ce=A.forwardRef(function(M,ve){var te=M.prefixCls,X=M.rtl,ue=M.scrollOffset,me=M.scrollRange,Oe=M.onStartMove,ye=M.onStopMove,Ae=M.onScroll,ie=M.horizontal,Je=M.spinSize,pe=M.containerSize,Pe=M.style,Fe=M.thumbStyle,Te=M.showScrollBar,qe=A.useState(!1),U=(0,p.Z)(qe,2),nt=U[0],_e=U[1],ut=A.useState(null),vt=(0,p.Z)(ut,2),rn=vt[0],Zt=vt[1],Nt=A.useState(null),Dt=(0,p.Z)(Nt,2),Xt=Dt[0],Yt=Dt[1],sn=!X,Cn=A.useRef(),un=A.useRef(),$n=A.useState(Te),zn=(0,p.Z)($n,2),pn=zn[0],Ln=zn[1],wn=A.useRef(),In=function(){Te===!0||Te===!1||(clearTimeout(wn.current),Ln(!0),wn.current=setTimeout(function(){Ln(!1)},3e3))},xn=me-pe||0,dn=pe-Je||0,Bn=A.useMemo(function(){if(ue===0||xn===0)return 0;var g=ue/xn;return g*dn},[ue,xn,dn]),Qt=function(F){F.stopPropagation(),F.preventDefault()},Fn=A.useRef({top:Bn,dragging:nt,pageY:rn,startTop:Xt});Fn.current={top:Bn,dragging:nt,pageY:rn,startTop:Xt};var Wn=function(F){_e(!0),Zt(_(F,ie)),Yt(Fn.current.top),Oe(),F.stopPropagation(),F.preventDefault()};A.useEffect(function(){var g=function(h){h.preventDefault()},F=Cn.current,W=un.current;return F.addEventListener("touchstart",g,{passive:!1}),W.addEventListener("touchstart",Wn,{passive:!1}),function(){F.removeEventListener("touchstart",g),W.removeEventListener("touchstart",Wn)}},[]);var Sr=A.useRef();Sr.current=xn;var pr=A.useRef();pr.current=dn,A.useEffect(function(){if(nt){var g,F=function(h){var x=Fn.current,L=x.dragging,ne=x.pageY,H=x.startTop;k.Z.cancel(g);var $=Cn.current.getBoundingClientRect(),he=pe/(ie?$.width:$.height);if(L){var ce=(_(h,ie)-ne)*he,He=H;!sn&&ie?He-=ce:He+=ce;var O=Sr.current,K=pr.current,Ue=K?He/K:0,Se=Math.ceil(Ue*O);Se=Math.max(Se,0),Se=Math.min(Se,O),g=(0,k.Z)(function(){Ae(Se,ie)})}},W=function(){_e(!1),ye()};return window.addEventListener("mousemove",F,{passive:!0}),window.addEventListener("touchmove",F,{passive:!0}),window.addEventListener("mouseup",W,{passive:!0}),window.addEventListener("touchend",W,{passive:!0}),function(){window.removeEventListener("mousemove",F),window.removeEventListener("touchmove",F),window.removeEventListener("mouseup",W),window.removeEventListener("touchend",W),k.Z.cancel(g)}}},[nt]),A.useEffect(function(){return In(),function(){clearTimeout(wn.current)}},[ue]),A.useImperativeHandle(ve,function(){return{delayHidden:In}});var on="".concat(te,"-scrollbar"),rt={position:"absolute",visibility:pn?null:"hidden"},Bt={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return ie?(Object.assign(rt,{height:8,left:0,right:0,bottom:0}),Object.assign(Bt,(0,B.Z)({height:"100%",width:Je},sn?"left":"right",Bn))):(Object.assign(rt,(0,B.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(Bt,{width:"100%",height:Je,top:Bn})),A.createElement("div",{ref:Cn,className:be()(on,(0,B.Z)((0,B.Z)((0,B.Z)({},"".concat(on,"-horizontal"),ie),"".concat(on,"-vertical"),!ie),"".concat(on,"-visible"),pn)),style:(0,C.Z)((0,C.Z)({},rt),Pe),onMouseDown:Qt,onMouseMove:In},A.createElement("div",{ref:un,className:be()("".concat(on,"-thumb"),(0,B.Z)({},"".concat(on,"-thumb-moving"),nt)),style:(0,C.Z)((0,C.Z)({},Bt),Fe),onMouseDown:Wn}))}),Le=Ce,se=20;function Me(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,te=M/ve*M;return isNaN(te)&&(te=0),te=Math.max(te,se),Math.floor(te)}var re=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],ht=[],at={overflowY:"auto",overflowAnchor:"none"};function gt(M,ve){var te=M.prefixCls,X=te===void 0?"rc-virtual-list":te,ue=M.className,me=M.height,Oe=M.itemHeight,ye=M.fullHeight,Ae=ye===void 0?!0:ye,ie=M.style,Je=M.data,pe=M.children,Pe=M.itemKey,Fe=M.virtual,Te=M.direction,qe=M.scrollWidth,U=M.component,nt=U===void 0?"div":U,_e=M.onScroll,ut=M.onVirtualScroll,vt=M.onVisibleChange,rn=M.innerProps,Zt=M.extraRender,Nt=M.styles,Dt=M.showScrollBar,Xt=Dt===void 0?"optional":Dt,Yt=(0,P.Z)(M,re),sn=A.useCallback(function(Ve){return typeof Pe=="function"?Pe(Ve):Ve==null?void 0:Ve[Pe]},[Pe]),Cn=de(sn,null,null),un=(0,p.Z)(Cn,4),$n=un[0],zn=un[1],pn=un[2],Ln=un[3],wn=!!(Fe!==!1&&me&&Oe),In=A.useMemo(function(){return Object.values(pn.maps).reduce(function(Ve,Ze){return Ve+Ze},0)},[pn.id,pn.maps]),xn=wn&&Je&&(Math.max(Oe*Je.length,In)>me||!!qe),dn=Te==="rtl",Bn=be()(X,(0,B.Z)({},"".concat(X,"-rtl"),dn),ue),Qt=Je||ht,Fn=(0,A.useRef)(),Wn=(0,A.useRef)(),Sr=(0,A.useRef)(),pr=(0,A.useState)(0),on=(0,p.Z)(pr,2),rt=on[0],Bt=on[1],g=(0,A.useState)(0),F=(0,p.Z)(g,2),W=F[0],d=F[1],h=(0,A.useState)(!1),x=(0,p.Z)(h,2),L=x[0],ne=x[1],H=function(){ne(!0)},$=function(){ne(!1)},he={getKey:sn};function ce(Ve){Bt(function(Ze){var mt;typeof Ve=="function"?mt=Ve(Ze):mt=Ve;var bt=Ut(mt);return Fn.current.scrollTop=bt,bt})}var He=(0,A.useRef)({start:0,end:Qt.length}),O=(0,A.useRef)(),K=oe(Qt,sn),Ue=(0,p.Z)(K,1),Se=Ue[0];O.current=Se;var je=A.useMemo(function(){if(!wn)return{scrollHeight:void 0,start:0,end:Qt.length-1,offset:void 0};if(!xn){var Ve;return{scrollHeight:((Ve=Wn.current)===null||Ve===void 0?void 0:Ve.offsetHeight)||0,start:0,end:Qt.length-1,offset:void 0}}for(var Ze=0,mt,bt,vn,Cr=Qt.length,Kn=0;Kn<Cr;Kn+=1){var _n=Qt[Kn],Nn=sn(_n),kn=pn.get(Nn),Mn=Ze+(kn===void 0?Oe:kn);Mn>=rt&&mt===void 0&&(mt=Kn,bt=Ze),Mn>rt+me&&vn===void 0&&(vn=Kn),Ze=Mn}return mt===void 0&&(mt=0,bt=0,vn=Math.ceil(me/Oe)),vn===void 0&&(vn=Qt.length-1),vn=Math.min(vn+1,Qt.length-1),{scrollHeight:Ze,start:mt,end:vn,offset:bt}},[xn,wn,rt,Qt,Ln,me]),$e=je.scrollHeight,ct=je.start,ee=je.end,fe=je.offset;He.current.start=ct,He.current.end=ee,A.useLayoutEffect(function(){var Ve=pn.getRecord();if(Ve.size===1){var Ze=Array.from(Ve.keys())[0],mt=Ve.get(Ze),bt=Qt[ct];if(bt&&mt===void 0){var vn=sn(bt);if(vn===Ze){var Cr=pn.get(Ze),Kn=Cr-Oe;ce(function(_n){return _n+Kn})}}}pn.resetRecord()},[$e]);var ze=A.useState({width:0,height:me}),it=(0,p.Z)(ze,2),Ge=it[0],lt=it[1],_t=function(Ze){lt({width:Ze.offsetWidth,height:Ze.offsetHeight})},Rt=(0,A.useRef)(),At=(0,A.useRef)(),$t=A.useMemo(function(){return Me(Ge.width,qe)},[Ge.width,qe]),Ot=A.useMemo(function(){return Me(Ge.height,$e)},[Ge.height,$e]),qt=$e-me,jt=(0,A.useRef)(qt);jt.current=qt;function Ut(Ve){var Ze=Ve;return Number.isNaN(jt.current)||(Ze=Math.min(Ze,jt.current)),Ze=Math.max(Ze,0),Ze}var kt=rt<=0,Lt=rt>=qt,wt=W<=0,zt=W>=qe,It=b(kt,Lt,wt,zt),fn=function(){return{x:dn?-W:W,y:rt}},Pt=(0,A.useRef)(fn()),Wt=(0,y.useEvent)(function(Ve){if(ut){var Ze=(0,C.Z)((0,C.Z)({},fn()),Ve);(Pt.current.x!==Ze.x||Pt.current.y!==Ze.y)&&(ut(Ze),Pt.current=Ze)}});function an(Ve,Ze){var mt=Ve;Ze?((0,ge.flushSync)(function(){d(mt)}),Wt()):ce(mt)}function Gt(Ve){var Ze=Ve.currentTarget.scrollTop;Ze!==rt&&ce(Ze),_e==null||_e(Ve),Wt()}var En=function(Ze){var mt=Ze,bt=qe?qe-Ge.width:0;return mt=Math.max(mt,0),mt=Math.min(mt,bt),mt},Un=(0,y.useEvent)(function(Ve,Ze){Ze?((0,ge.flushSync)(function(){d(function(mt){var bt=mt+(dn?-Ve:Ve);return En(bt)})}),Wt()):ce(function(mt){var bt=mt+Ve;return bt})}),Mt=I(wn,kt,Lt,wt,zt,!!qe,Un),st=(0,p.Z)(Mt,2),ft=st[0],en=st[1];V(wn,Fn,function(Ve,Ze,mt,bt){var vn=bt;return It(Ve,Ze,mt)?!1:!vn||!vn._virtualHandled?(vn&&(vn._virtualHandled=!0),ft({preventDefault:function(){},deltaX:Ve?Ze:0,deltaY:Ve?0:Ze}),!0):!1}),ae(xn,Fn,function(Ve){ce(function(Ze){return Ze+Ve})}),(0,Ie.Z)(function(){function Ve(mt){var bt=kt&&mt.detail<0,vn=Lt&&mt.detail>0;wn&&!bt&&!vn&&mt.preventDefault()}var Ze=Fn.current;return Ze.addEventListener("wheel",ft,{passive:!1}),Ze.addEventListener("DOMMouseScroll",en,{passive:!0}),Ze.addEventListener("MozMousePixelScroll",Ve,{passive:!1}),function(){Ze.removeEventListener("wheel",ft),Ze.removeEventListener("DOMMouseScroll",en),Ze.removeEventListener("MozMousePixelScroll",Ve)}},[wn,kt,Lt]),(0,Ie.Z)(function(){if(qe){var Ve=En(W);d(Ve),Wt({x:Ve})}},[Ge.width,qe]);var tn=function(){var Ze,mt;(Ze=Rt.current)===null||Ze===void 0||Ze.delayHidden(),(mt=At.current)===null||mt===void 0||mt.delayHidden()},Vt=J(Fn,Qt,pn,Oe,sn,function(){return zn(!0)},ce,tn);A.useImperativeHandle(ve,function(){return{nativeElement:Sr.current,getScrollInfo:fn,scrollTo:function(Ze){function mt(bt){return bt&&(0,D.Z)(bt)==="object"&&("left"in bt||"top"in bt)}mt(Ze)?(Ze.left!==void 0&&d(En(Ze.left)),Vt(Ze.top)):Vt(Ze)}}}),(0,Ie.Z)(function(){if(vt){var Ve=Qt.slice(ct,ee+1);vt(Ve,Qt)}},[ct,ee,Qt]);var Ft=j(Qt,sn,pn,Oe),ln=Zt==null?void 0:Zt({start:ct,end:ee,virtual:xn,offsetX:W,offsetY:fe,rtl:dn,getSize:Ft}),gn=tt(Qt,ct,ee,qe,W,$n,pe,he),mn=null;me&&(mn=(0,C.Z)((0,B.Z)({},Ae?"height":"maxHeight",me),at),wn&&(mn.overflowY="hidden",qe&&(mn.overflowX="hidden"),L&&(mn.pointerEvents="none")));var Tn={};return dn&&(Tn.dir="rtl"),A.createElement("div",(0,T.Z)({ref:Sr,style:(0,C.Z)((0,C.Z)({},ie),{},{position:"relative"}),className:Bn},Tn,Yt),A.createElement(le.Z,{onResize:_t},A.createElement(nt,{className:"".concat(X,"-holder"),style:mn,ref:Fn,onScroll:Gt,onMouseEnter:tn},A.createElement(Q,{prefixCls:X,height:$e,offsetX:W,offsetY:fe,scrollWidth:qe,onInnerResize:zn,ref:Wn,innerProps:rn,rtl:dn,extra:ln},gn))),xn&&$e>me&&A.createElement(Le,{ref:Rt,prefixCls:X,scrollOffset:rt,scrollRange:$e,rtl:dn,onScroll:an,onStartMove:H,onStopMove:$,spinSize:Ot,containerSize:Ge.height,style:Nt==null?void 0:Nt.verticalScrollBar,thumbStyle:Nt==null?void 0:Nt.verticalScrollBarThumb,showScrollBar:Xt}),xn&&qe>Ge.width&&A.createElement(Le,{ref:At,prefixCls:X,scrollOffset:W,scrollRange:qe,rtl:dn,onScroll:an,onStartMove:H,onStopMove:$,spinSize:$t,containerSize:Ge.width,horizontal:!0,style:Nt==null?void 0:Nt.horizontalScrollBar,thumbStyle:Nt==null?void 0:Nt.horizontalScrollBarThumb,showScrollBar:Xt}))}var Ye=A.forwardRef(gt);Ye.displayName="List";var xt=Ye,Ne=xt},16722:function(nn,Re,f){"use strict";f.d(Re,{Z:function(){return be}});const T=le=>typeof le=="object"&&le!=null&&le.nodeType===1,D=(le,y)=>(!y||le!=="hidden")&&le!=="visible"&&le!=="clip",C=(le,y)=>{if(le.clientHeight<le.scrollHeight||le.clientWidth<le.scrollWidth){const Ie=getComputedStyle(le,null);return D(Ie.overflowY,y)||D(Ie.overflowX,y)||(A=>{const ge=(De=>{if(!De.ownerDocument||!De.ownerDocument.defaultView)return null;try{return De.ownerDocument.defaultView.frameElement}catch(Q){return null}})(A);return!!ge&&(ge.clientHeight<A.scrollHeight||ge.clientWidth<A.scrollWidth)})(le)}return!1},B=(le,y,Ie,A,ge,De,Q,Qe)=>De<le&&Q>y||De>le&&Q<y?0:De<=le&&Qe<=Ie||Q>=y&&Qe>=Ie?De-le-A:Q>y&&Qe<Ie||De<le&&Qe>Ie?Q-y+ge:0,p=le=>{const y=le.parentElement;return y==null?le.getRootNode().host||null:y},P=(le,y)=>{var Ie,A,ge,De;if(typeof document=="undefined")return[];const{scrollMode:Q,block:Qe,inline:tt,boundary:yt,skipOverflowHiddenElements:Et}=y,oe=typeof yt=="function"?yt:Le=>Le!==yt;if(!T(le))throw new TypeError("Invalid target");const k=document.scrollingElement||document.documentElement,S=[];let c=le;for(;T(c)&&oe(c);){if(c=p(c),c===k){S.push(c);break}c!=null&&c===document.body&&C(c)&&!C(document.documentElement)||c!=null&&C(c,Et)&&S.push(c)}const b=(A=(Ie=window.visualViewport)==null?void 0:Ie.width)!=null?A:innerWidth,I=(De=(ge=window.visualViewport)==null?void 0:ge.height)!=null?De:innerHeight,{scrollX:j,scrollY:R}=window,{height:we,width:ke,top:Ke,right:Ee,bottom:de,left:G}=le.getBoundingClientRect(),{top:V,right:Z,bottom:_,left:ae}=(Le=>{const se=window.getComputedStyle(Le);return{top:parseFloat(se.scrollMarginTop)||0,right:parseFloat(se.scrollMarginRight)||0,bottom:parseFloat(se.scrollMarginBottom)||0,left:parseFloat(se.scrollMarginLeft)||0}})(le);let Y=Qe==="start"||Qe==="nearest"?Ke-V:Qe==="end"?de+_:Ke+we/2-V+_,J=tt==="center"?G+ke/2-ae+Z:tt==="end"?Ee+Z:G-ae;const Ce=[];for(let Le=0;Le<S.length;Le++){const se=S[Le],{height:Me,width:re,top:ht,right:at,bottom:gt,left:Ye}=se.getBoundingClientRect();if(Q==="if-needed"&&Ke>=0&&G>=0&&de<=I&&Ee<=b&&(se===k&&!C(se)||Ke>=ht&&de<=gt&&G>=Ye&&Ee<=at))return Ce;const xt=getComputedStyle(se),Ne=parseInt(xt.borderLeftWidth,10),M=parseInt(xt.borderTopWidth,10),ve=parseInt(xt.borderRightWidth,10),te=parseInt(xt.borderBottomWidth,10);let X=0,ue=0;const me="offsetWidth"in se?se.offsetWidth-se.clientWidth-Ne-ve:0,Oe="offsetHeight"in se?se.offsetHeight-se.clientHeight-M-te:0,ye="offsetWidth"in se?se.offsetWidth===0?0:re/se.offsetWidth:0,Ae="offsetHeight"in se?se.offsetHeight===0?0:Me/se.offsetHeight:0;if(k===se)X=Qe==="start"?Y:Qe==="end"?Y-I:Qe==="nearest"?B(R,R+I,I,M,te,R+Y,R+Y+we,we):Y-I/2,ue=tt==="start"?J:tt==="center"?J-b/2:tt==="end"?J-b:B(j,j+b,b,Ne,ve,j+J,j+J+ke,ke),X=Math.max(0,X+R),ue=Math.max(0,ue+j);else{X=Qe==="start"?Y-ht-M:Qe==="end"?Y-gt+te+Oe:Qe==="nearest"?B(ht,gt,Me,M,te+Oe,Y,Y+we,we):Y-(ht+Me/2)+Oe/2,ue=tt==="start"?J-Ye-Ne:tt==="center"?J-(Ye+re/2)+me/2:tt==="end"?J-at+ve+me:B(Ye,at,re,Ne,ve+me,J,J+ke,ke);const{scrollLeft:ie,scrollTop:Je}=se;X=Ae===0?0:Math.max(0,Math.min(Je+X/Ae,se.scrollHeight-Me/Ae+Oe)),ue=ye===0?0:Math.max(0,Math.min(ie+ue/ye,se.scrollWidth-re/ye+me)),Y+=Je-X,J+=ie-ue}Ce.push({el:se,top:X,left:ue})}return Ce},N=le=>le===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(le)?le:{block:"start",inline:"nearest"};function be(le,y){if(!le.isConnected||!(ge=>{let De=ge;for(;De&&De.parentNode;){if(De.parentNode===document)return!0;De=De.parentNode instanceof ShadowRoot?De.parentNode.host:De.parentNode}return!1})(le))return;const Ie=(ge=>{const De=window.getComputedStyle(ge);return{top:parseFloat(De.scrollMarginTop)||0,right:parseFloat(De.scrollMarginRight)||0,bottom:parseFloat(De.scrollMarginBottom)||0,left:parseFloat(De.scrollMarginLeft)||0}})(le);if((ge=>typeof ge=="object"&&typeof ge.behavior=="function")(y))return y.behavior(P(le,y));const A=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:ge,top:De,left:Q}of P(le,N(y))){const Qe=De-Ie.top+Ie.bottom,tt=Q-Ie.left+Ie.right;ge.scroll({top:Qe,left:tt,behavior:A})}}}}]);