"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5122],{5122:function(e,O,t){t.r(O),t.d(O,{completeFromSchema:function(){return C},xml:function(){return w},xmlLanguage:function(){return W}});var n=t(53105),l=t(35524);let a=null,r=null,s=0;function o(e,O){var t;let n=e.pos+O;if(r==e&&s==n)return a;for(;9==(t=e.peek(O))||10==t||13==t||32==t;)O++;let l="";for(;;){let o=e.peek(O);if(!(45==o||46==o||58==o||o>=65&&o<=90||95==o||o>=97&&o<=122||o>=161))break;l+=String.fromCharCode(o),O++}return r=e,s=n,a=l||null}function y(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t1==O?new y(o(n,1)||"",e):e,reduce:(e,O)=>11==O&&e?e.parent:e,reuse(e,O,t,n){let l=O.type.id;return 1==l||13==l?new y(o(n,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),p=new n.Jq((e,O)=>{if(60==e.next){if(e.advance(),47==e.next){e.advance();let t=o(e,0);if(!t)return e.acceptToken(5);if(O.context&&t==O.context.name)return e.acceptToken(2);for(let n=O.context;n;n=n.parent)if(n.name==t)return e.acceptToken(3,-2);e.acceptToken(4)}else if(33!=e.next&&63!=e.next)return e.acceptToken(1)}},{contextual:!0});function $(e,O){return new n.Jq(t=>{for(let n=0,l=0;;l++){if(t.next<0){l&&t.acceptToken(e);break}if(t.next==O.charCodeAt(n)){if(++n==O.length){l>=O.length&&t.acceptToken(e,1-O.length);break}}else n=t.next==O.charCodeAt(0)?1:0;t.advance()}})}let c=$(35,"-->"),S=$(36,"?>"),u=$(37,"]]>"),m=(0,l.Gv)({Text:l.pJ.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":l.pJ.angleBracket,TagName:l.pJ.tagName,"MismatchedCloseTag/Tagname":[l.pJ.tagName,l.pJ.invalid],AttributeName:l.pJ.attributeName,AttributeValue:l.pJ.attributeValue,Is:l.pJ.definitionOperator,"EntityReference CharacterReference":l.pJ.character,Comment:l.pJ.blockComment,ProcessingInst:l.pJ.processingInstruction,DoctypeDecl:l.pJ.documentMeta,Cdata:l.pJ.special(l.pJ.string)}),f=n.WQ.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C{'#C{O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C|'#C|O$dOrO,59^OOOP,59^,59^OOOS'#C}'#C}O$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6y-E6yOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6z-E6zOOOP1G.x1G.xOOOS-E6{-E6{OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'jO!bO,59eOOOO-E6w-E6wO'xOpO1G.uO'xOpO1G.uOOOP1G.u1G.uO(QOpO7+$fOOOP7+$f7+$fO(YO!bO<`#X;'S%y;'S;=`&_<%lO%yX>eV{WOr%ysv%yw#T%y#T#U>z#U;'S%y;'S;=`&_<%lO%yX?PV{WOr%ysv%yw#h%y#h#i?f#i;'S%y;'S;=`&_<%lO%yX?kV{WOr%ysv%yw#T%y#T#U",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(e=>({label:e,type:"text"})):[]}}let v=/^[:\-\.\w\u00b7-\uffff]*$/;function T(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function b(e){return"string"==typeof e?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function C(e,O){let t=[],n=[],l=Object.create(null);for(let a of O){let r=T(a);t.push(r),a.global&&n.push(r),a.values&&(l[a.name]=a.values.map(b))}let s=[],o=[],y=Object.create(null);for(let i of e){let p=n,$=l;i.attributes&&(p=p.concat(i.attributes.map(e=>"string"==typeof e?t.find(O=>O.label==e)||{label:e,type:"property"}:(e.values&&($==l&&($=Object.create($)),$[e.name]=e.values.map(b)),T(e)))));let c=new h(i,p,$);y[c.name]=c,s.push(c),i.top&&o.push(c)}o.length||(o=s);for(let S=0;S{var O;let{doc:t}=e.state,a=function(e,O){var t;let n=(0,g.qz)(e).resolveInner(O,-1),l=null;for(let a=n;!l&&a.parent;a=a.parent)("OpenTag"==a.name||"CloseTag"==a.name||"SelfClosingTag"==a.name||"MismatchedCloseTag"==a.name)&&(l=a);if(l&&(l.to>O||l.lastChild.type.isError)){let r=l.parent;if("TagName"==n.name)return"CloseTag"==l.name||"MismatchedCloseTag"==l.name?{type:"closeTag",from:n.from,context:r}:{type:"openTag",from:n.from,context:_(r)};if("AttributeName"==n.name)return{type:"attrName",from:n.from,context:l};if("AttributeValue"==n.name)return{type:"attrValue",from:n.from,context:l};let s=n==l||"Attribute"==n.name?n.childBefore(O):n;return(null==s?void 0:s.name)=="StartTag"?{type:"openTag",from:O,context:_(r)}:(null==s?void 0:s.name)=="StartCloseTag"&&s.to<=O?{type:"closeTag",from:O,context:r}:(null==s?void 0:s.name)=="Is"?{type:"attrValue",from:O,context:l}:s?{type:"attrName",from:O,context:l}:null}if("StartCloseTag"==n.name)return{type:"closeTag",from:O,context:n.parent};for(;n.parent&&n.to==O&&!(null===(t=n.lastChild)||void 0===t?void 0:t.type.isError);)n=n.parent;return"Element"==n.name||"Text"==n.name||"Document"==n.name?{type:"tag",from:O,context:"Element"==n.name?n:_(n)}:null}(e.state,e.pos);if(!a||"tag"==a.type&&!e.explicit)return null;let{type:r,from:i,context:p}=a;if("openTag"==r){let $=o,c=P(t,p);if(c){let S=y[c];$=(null==S?void 0:S.children)||s}return{from:i,options:$.map(e=>e.completion),validFor:v}}if("closeTag"==r){let u=P(t,p);return u?{from:i,to:e.pos+(">"==t.sliceString(e.pos,e.pos+1)?1:0),options:[(null===(O=y[u])||void 0===O?void 0:O.closeNameCompletion)||{label:u+">",type:"type"}],validFor:v}:null}if("attrName"==r){let m=y[d(t,p)];return{from:i,options:(null==m?void 0:m.attrs)||n,validFor:v}}if("attrValue"==r){let f,h;let T=(h=(f=p&&p.getChildren("Attribute").find(e=>e.from<=i&&e.to>=i))&&f.getChild("AttributeName"))?t.sliceString(h.from,h.to):"";if(!T)return null;let b=y[d(t,p)],C=((null==b?void 0:b.attrValues)||l)[T];return C&&C.length?{from:i,to:e.pos+('"'==t.sliceString(e.pos,e.pos+1)?1:0),options:C,validFor:/^"[^"]*"?$/}:null}{if("tag"!=r)return null;let W=P(t,p),w=y[W],V=[],x=p&&p.lastChild;W&&(!x||"CloseTag"!=x.name||d(t,x)!=W)&&V.push(w?w.closeCompletion:{label:"",type:"type",boost:2});let X=V.concat(((null==w?void 0:w.children)||(p?s:o)).map(e=>e.openCompletion));if(p&&(null==w?void 0:w.text.length)){let Q=p.firstChild;Q.to>e.pos-20&&!/\S/.test(e.state.sliceDoc(Q.to,e.pos))&&(X=X.concat(w.text))}return{from:i,options:X,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}}}let W=g.qp.define({name:"xml",parser:f.configure({props:[g.uj.add({Element(e){let O=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(O?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit}),g.x0.add({Element(e){let O=e.firstChild,t=e.lastChild;return O&&"OpenTag"==O.name?{from:O.to,to:"CloseTag"==t.name?t.from:e.to}:null}}),g.a0.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function w(e={}){return new g.ri(W,W.data.of({autocomplete:C(e.elements||[],e.attributes||[])}))}}}]); //# sourceMappingURL=5122.9a7e588dde9e95c6.js.map