lone-format 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lone-format.css +1 -1
- package/dist/lone-format.js +5537 -4330
- package/dist/lone-format.umd.cjs +49 -19
- package/package.json +9 -1
package/dist/lone-format.umd.cjs
CHANGED
|
@@ -1,25 +1,55 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=l}else t+=l}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:O.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(O.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,O.isIdentifierPart(t));)this.index++;return{type:O.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){const r=[];let u=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let l=this.code;if(l===t){u=!0,this.index++,t===O.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(l===O.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===O.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===O.CBRACK_CODE)for(let p=r.length;p<i;p++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const p=this.gobbleExpression();(!p||p.type===O.COMPOUND)&&this.throwError("Expected comma"),r.push(p)}}return u||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(O.CPAREN_CODE);if(this.code===O.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:O.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:O.ARRAY_EXP,elements:this.gobbleArguments(O.CBRACK_CODE)}}}const or=new rr;Object.assign(O,{hooks:or,plugins:new nr(O),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),O.max_unop_len=O.getMaxKeyLen(O.unary_ops),O.max_binop_len=O.getMaxKeyLen(O.binary_ops);const We=n=>new O(n).parse(),sr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(O).filter(n=>!sr.includes(n)&&We[n]===void 0).forEach(n=>{We[n]=O[n]}),We.Jsep=O;const ir="ConditionalExpression";var ur={name:"ternary",init(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;const u=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;const l=this.gobbleExpression();if(l||this.throwError("Expected expression"),r.node={type:ir,test:u,consequent:i,alternate:l},u.operator&&n.binary_ops[u.operator]<=.9){let p=u;for(;p.right.operator&&n.binary_ops[p.right.operator]<=.9;)p=p.right;r.node.test=p.right,p.right=r.node,r.node=u}}else this.throwError("Expected :")}})}};We.plugins.register(ur);const Ot=47,ar=92;var lr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===Ot){const u=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===Ot&&!i){const l=this.expr.slice(u,this.index);let p="";for(;++this.index<this.expr.length;){const h=this.code;if(h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57)p+=this.char;else break}let v;try{v=new RegExp(l,p)}catch(h){this.throwError(h.message)}return r.node={type:n.LITERAL,value:v,raw:this.expr.slice(u-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?i=!0:i&&this.code===n.CBRACK_CODE&&(i=!1),this.index+=this.code===ar?2:1}this.throwError("Unclosed Regex")}})}};const Nt=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Nt,45],assignmentPrecedence:.9,init(n){const t=[n.IDENTIFIER,n.MEMBER_EXP];ct.assignmentOperators.forEach(u=>n.addBinaryOp(u,ct.assignmentPrecedence,!0)),n.hooks.add("gobble-token",function(i){const l=this.code;ct.updateOperators.some(p=>p===l&&p===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:l===Nt?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),n.hooks.add("after-token",function(i){if(i.node){const l=this.code;ct.updateOperators.some(p=>p===l&&p===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:l===Nt?"++":"--",argument:i.node,prefix:!1})}}),n.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(u){ct.assignmentOperators.has(u.operator)?(u.type="AssignmentExpression",r(u.left),r(u.right)):u.operator||Object.values(u).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};We.plugins.register(lr,ct),We.addUnaryOp("typeof"),We.addLiteral("null",null),We.addLiteral("undefined",void 0);const cr=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),Te={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return Te.evalBinaryExpression(n,t);case"Compound":return Te.evalCompound(n,t);case"ConditionalExpression":return Te.evalConditionalExpression(n,t);case"Identifier":return Te.evalIdentifier(n,t);case"Literal":return Te.evalLiteral(n,t);case"MemberExpression":return Te.evalMemberExpression(n,t);case"UnaryExpression":return Te.evalUnaryExpression(n,t);case"ArrayExpression":return Te.evalArrayExpression(n,t);case"CallExpression":return Te.evalCallExpression(n,t);case"AssignmentExpression":return Te.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression(n,t){return{"||":(u,i)=>u||i(),"&&":(u,i)=>u&&i(),"|":(u,i)=>u|i(),"^":(u,i)=>u^i(),"&":(u,i)=>u&i(),"==":(u,i)=>u==i(),"!=":(u,i)=>u!=i(),"===":(u,i)=>u===i(),"!==":(u,i)=>u!==i(),"<":(u,i)=>u<i(),">":(u,i)=>u>i(),"<=":(u,i)=>u<=i(),">=":(u,i)=>u>=i(),"<<":(u,i)=>u<<i(),">>":(u,i)=>u>>i(),">>>":(u,i)=>u>>>i(),"+":(u,i)=>u+i(),"-":(u,i)=>u-i(),"*":(u,i)=>u*i(),"/":(u,i)=>u/i(),"%":(u,i)=>u%i()}[n.operator](Te.evalAst(n.left,t),()=>Te.evalAst(n.right,t))},evalCompound(n,t){let r;for(let u=0;u<n.body.length;u++){n.body[u].type==="Identifier"&&["var","let","const"].includes(n.body[u].name)&&n.body[u+1]&&n.body[u+1].type==="AssignmentExpression"&&(u+=1);const i=n.body[u];r=Te.evalAst(i,t)}return r},evalConditionalExpression(n,t){return Te.evalAst(n.test,t)?Te.evalAst(n.consequent,t):Te.evalAst(n.alternate,t)},evalIdentifier(n,t){if(Object.hasOwn(t,n.name))return t[n.name];throw ReferenceError(`${n.name} is not defined`)},evalLiteral(n){return n.value},evalMemberExpression(n,t){const r=String(n.computed?Te.evalAst(n.property):n.property.name),u=Te.evalAst(n.object,t);if(u==null)throw TypeError(`Cannot read properties of ${u} (reading '${r}')`);if(!Object.hasOwn(u,r)&&cr.has(r))throw TypeError(`Cannot read properties of ${u} (reading '${r}')`);const i=u[r];return typeof i=="function"?i.bind(u):i},evalUnaryExpression(n,t){return{"-":u=>-Te.evalAst(u,t),"!":u=>!Te.evalAst(u,t),"~":u=>~Te.evalAst(u,t),"+":u=>+Te.evalAst(u,t),typeof:u=>typeof Te.evalAst(u,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>Te.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>Te.evalAst(i,t));return Te.evalAst(n.callee,t)(...r)},evalAssignmentExpression(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const r=n.left.name,u=Te.evalAst(n.right,t);return t[r]=u,t[r]}};class fr{constructor(t){this.code=t,this.ast=We(this.code)}runInNewContext(t){const r=Object.assign(Object.create(null),t);return Te.evalAst(this.ast,r)}}function et(n,t){return n=n.slice(),n.push(t),n}function Dt(n,t){return t=t.slice(),t.unshift(n),t}class pr extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function Ne(n,t,r,u,i){if(!(this instanceof Ne))try{return new Ne(n,t,r,u,i)}catch(p){if(!p.avoidNew)throw p;return p.value}typeof n=="string"&&(i=u,u=r,r=t,t=n,n=null);const l=n&&typeof n=="object";if(n=n||{},this.json=n.json||r,this.path=n.path||t,this.resultType=n.resultType||"value",this.flatten=n.flatten||!1,this.wrap=Object.hasOwn(n,"wrap")?n.wrap:!0,this.sandbox=n.sandbox||{},this.eval=n.eval===void 0?"safe":n.eval,this.ignoreEvalErrors=typeof n.ignoreEvalErrors>"u"?!1:n.ignoreEvalErrors,this.parent=n.parent||null,this.parentProperty=n.parentProperty||null,this.callback=n.callback||u||null,this.otherTypeCallback=n.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},n.autostart!==!1){const p={path:l?n.path:t};l?"json"in n&&(p.json=n.json):p.json=r;const v=this.evaluate(p);if(!v||typeof v!="object")throw new pr(v);return v}}Ne.prototype.evaluate=function(n,t,r,u){let i=this.parent,l=this.parentProperty,{flatten:p,wrap:v}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=u||this.otherTypeCallback,t=t||this.json,n=n||this.path,n&&typeof n=="object"&&!Array.isArray(n)){if(!n.path&&n.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(n,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=n),p=Object.hasOwn(n,"flatten")?n.flatten:p,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,v=Object.hasOwn(n,"wrap")?n.wrap:v,this.currEval=Object.hasOwn(n,"eval")?n.eval:this.currEval,r=Object.hasOwn(n,"callback")?n.callback:r,this.currOtherTypeCallback=Object.hasOwn(n,"otherTypeCallback")?n.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(n,"parent")?n.parent:i,l=Object.hasOwn(n,"parentProperty")?n.parentProperty:l,n=n.path}if(i=i||null,l=l||null,Array.isArray(n)&&(n=Ne.toPathString(n)),!n&&n!==""||!t)return;const h=Ne.toPathArray(n);h[0]==="$"&&h.length>1&&h.shift(),this._hasParentSelector=null;const m=this._trace(h,t,["$"],i,l,r).filter(function(B){return B&&!B.isParentSelector});return m.length?!v&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((B,T)=>{const q=this._getPreferredOutput(T);return p&&Array.isArray(q)?B=B.concat(q):B.push(q),B},[]):v?[]:void 0},Ne.prototype._getPreferredOutput=function(n){const t=this.currResultType;switch(t){case"all":{const r=Array.isArray(n.path)?n.path:Ne.toPathArray(n.path);return n.pointer=Ne.toPointer(r),n.path=typeof n.path=="string"?n.path:Ne.toPathString(n.path),n}case"value":case"parent":case"parentProperty":return n[t];case"path":return Ne.toPathString(n[t]);case"pointer":return Ne.toPointer(n.path);default:throw new TypeError("Unknown result type")}},Ne.prototype._handleCallback=function(n,t,r){if(t){const u=this._getPreferredOutput(n);n.path=typeof n.path=="string"?n.path:Ne.toPathString(n.path),t(u,r,n)}},Ne.prototype._trace=function(n,t,r,u,i,l,p,v){let h;if(!n.length)return h={path:r,value:t,parent:u,parentProperty:i,hasArrExpr:p},this._handleCallback(h,l,"value"),h;const m=n[0],B=n.slice(1),T=[];function q(L){Array.isArray(L)?L.forEach(ie=>{T.push(ie)}):T.push(L)}if((typeof m!="string"||v)&&t&&Object.hasOwn(t,m))q(this._trace(B,t[m],et(r,m),t,m,l,p));else if(m==="*")this._walk(t,L=>{q(this._trace(B,t[L],et(r,L),t,L,l,!0,!0))});else if(m==="..")q(this._trace(B,t,r,u,i,l,p)),this._walk(t,L=>{typeof t[L]=="object"&&q(this._trace(n.slice(),t[L],et(r,L),t,L,l,!0))});else{if(m==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:B,isParentSelector:!0};if(m==="~")return h={path:et(r,m),value:i,parent:u,parentProperty:null},this._handleCallback(h,l,"property"),h;if(m==="$")q(this._trace(B,t,r,null,null,l,p));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))q(this._slice(m,B,t,r,u,i,l));else if(m.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const L=m.replace(/^\?\((.*?)\)$/u,"$1"),ie=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(L);ie?this._walk(t,ce=>{const S=[ie[2]],te=ie[1]?t[ce][ie[1]]:t[ce];this._trace(S,te,r,u,i,l,!0).length>0&&q(this._trace(B,t[ce],et(r,ce),t,ce,l,!0))}):this._walk(t,ce=>{this._eval(L,t[ce],ce,r,u,i)&&q(this._trace(B,t[ce],et(r,ce),t,ce,l,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");q(this._trace(Dt(this._eval(m,t,r.at(-1),r.slice(0,-1),u,i),B),t,r,u,i,l,p))}else if(m[0]==="@"){let L=!1;const ie=m.slice(1,-2);switch(ie){case"scalar":(!t||!["object","function"].includes(typeof t))&&(L=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===ie&&(L=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(L=!0);break;case"number":Number.isFinite(t)&&(L=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(L=!0);break;case"object":t&&typeof t===ie&&(L=!0);break;case"array":Array.isArray(t)&&(L=!0);break;case"other":L=this.currOtherTypeCallback(t,r,u,i);break;case"null":t===null&&(L=!0);break;default:throw new TypeError("Unknown value type "+ie)}if(L)return h={path:r,value:t,parent:u,parentProperty:i},this._handleCallback(h,l,"value"),h}else if(m[0]==="`"&&t&&Object.hasOwn(t,m.slice(1))){const L=m.slice(1);q(this._trace(B,t[L],et(r,L),t,L,l,p,!0))}else if(m.includes(",")){const L=m.split(",");for(const ie of L)q(this._trace(Dt(ie,B),t,r,u,i,l,!0))}else!v&&t&&Object.hasOwn(t,m)&&q(this._trace(B,t[m],et(r,m),t,m,l,p,!0))}if(this._hasParentSelector)for(let L=0;L<T.length;L++){const ie=T[L];if(ie&&ie.isParentSelector){const ce=this._trace(ie.expr,t,ie.path,u,i,l,p);if(Array.isArray(ce)){T[L]=ce[0];const S=ce.length;for(let te=1;te<S;te++)L++,T.splice(L,0,ce[te])}else T[L]=ce}}return T},Ne.prototype._walk=function(n,t){if(Array.isArray(n)){const r=n.length;for(let u=0;u<r;u++)t(u)}else n&&typeof n=="object"&&Object.keys(n).forEach(r=>{t(r)})},Ne.prototype._slice=function(n,t,r,u,i,l,p){if(!Array.isArray(r))return;const v=r.length,h=n.split(":"),m=h[2]&&Number.parseInt(h[2])||1;let B=h[0]&&Number.parseInt(h[0])||0,T=h[1]&&Number.parseInt(h[1])||v;B=B<0?Math.max(0,B+v):Math.min(v,B),T=T<0?Math.max(0,T+v):Math.min(v,T);const q=[];for(let L=B;L<T;L+=m)this._trace(Dt(L,t),r,u,i,l,p,!0).forEach(ce=>{q.push(ce)});return q},Ne.prototype._eval=function(n,t,r,u,i,l){this.currSandbox._$_parentProperty=l,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const p=n.includes("@path");p&&(this.currSandbox._$_path=Ne.toPathString(u.concat([r])));const v=this.currEval+"Script:"+n;if(!Ne.cache[v]){let h=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(p&&(h=h.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)Ne.cache[v]=new this.safeVm.Script(h);else if(this.currEval==="native")Ne.cache[v]=new this.vm.Script(h);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const m=this.currEval;Ne.cache[v]=new m(h)}else if(typeof this.currEval=="function")Ne.cache[v]={runInNewContext:m=>this.currEval(h,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return Ne.cache[v].runInNewContext(this.currSandbox)}catch(h){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+h.message+": "+n)}},Ne.cache={},Ne.toPathString=function(n){const t=n,r=t.length;let u="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(u+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return u},Ne.toPointer=function(n){const t=n,r=t.length;let u="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(u+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return u},Ne.toPathArray=function(n){const{cache:t}=Ne;if(t[n])return t[n].concat();const r=[],i=n.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(l,p){return"[#"+(r.push(p)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(l,p){return"['"+p.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(l,p){return";"+p.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(l){const p=l.match(/#(\d+)/u);return!p||!p[1]?l:r[p[1]]});return t[n]=i,t[n].concat()},Ne.prototype.safeVm={Script:fr};const dr=function(n,t,r){const u=n.length;for(let i=0;i<u;i++){const l=n[i];r(l)&&t.push(n.splice(i--,1)[0])}};class hr{constructor(t){this.code=t}runInNewContext(t){let r=this.code;const u=Object.keys(t),i=[];dr(u,i,m=>typeof t[m]=="function");const l=u.map(m=>t[m]);r=i.reduce((m,B)=>{let T=t[B].toString();return/function/u.test(T)||(T="function "+T),"var "+B+"="+T+";"+m},"")+r,!/(['"])use strict\1/u.test(r)&&!u.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;\s*$/u,"");const v=r.lastIndexOf(";"),h=v!==-1?r.slice(0,v+1)+" return "+r.slice(v+1):" return "+r;return new Function(...u,h)(...l)}}Ne.prototype.vm={Script:hr};const mr={class:"json-node"},gr={key:0,class:"json-node__container"},Er={class:"json-node__line"},yr=["contenteditable","onKeydown"],Ar={key:1,class:"json-node__colon"},br=["title"],xr=["title"],Nr={key:4,class:"json-node__comma"},Dr={key:0,class:"json-node__children"},vr={class:"json-node__children-content"},Cr={class:"json-node__line json-node__closing-bracket"},wr={class:"json-node__bracket"},Tr={key:0,class:"json-node__comma"},_r={key:1,class:"json-node__primitive"},Br=["contenteditable","onKeydown"],Sr={key:1,class:"json-node__colon"},Or=["title"],kr=["contenteditable","onKeydown"],Rr={key:0,class:"json-node__comma"},Fr=s.defineComponent({name:"JsonNode",__name:"JsonNode",props:{value:{},keyName:{},level:{},path:{default:""},expanded:{},isLast:{type:Boolean,default:!1},theme:{}},emits:["update:value","toggle-expand","copy","update:key"],setup(n,{emit:t}){s.useCssVars(D=>({"2a18b018":D.level,"58a14b93":D.theme.colors.syntaxKey,"46fe1b3e":D.theme.colors.hoverBackground,fbe2c048:D.theme.colors.syntaxBracket,"4bd524bb":D.theme.colors.collapsedText,"3308d23c":D.theme.colors.collapsedBackground,"36380c60":D.theme.colors.collapsedBackgroundHover,"0892365d":D.theme.colors.syntaxString,"0015b195":D.theme.colors.syntaxNumber,"7db95f5c":D.theme.colors.syntaxBoolean,"88ec825a":D.theme.colors.syntaxNull,"537157f7":D.theme.colors.background,"3cee3331":D.theme.colors.selectionBackground,"81323cee":D.theme.colors.indentLine}));const r=n,u=t,i=s.ref(!1),l=s.ref(!1),p=s.ref(""),v=s.ref(""),h=s.ref("string"),m=s.ref(null),B=s.ref(null),T=D=>D!==null&&typeof D=="object"&&!Array.isArray(D)&&"__protected_number__"in D&&Object.keys(D).length===1,q=D=>T(D)?D.__protected_number__:"",L=s.computed(()=>T(r.value)?!1:r.value!==null&&typeof r.value=="object"),ie=s.computed(()=>Array.isArray(r.value)),ce=s.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),S=s.computed(()=>r.expanded.has(ce.value)),te=s.computed(()=>r.keyName),de=s.computed(()=>ie.value?"[":"{"),ee=s.computed(()=>ie.value?"]":"}"),Ae=s.computed(()=>{if(!r.value)return"";const g=Object.keys(r.value).length;return ie.value?g>0?` ${g} items `:" ":g>0?` ${g} keys `:" "}),be=s.computed(()=>{const D=typeof r.value;return r.value===null?"json-node__value--null":D==="boolean"?"json-node__value--boolean":D==="number"||T(r.value)?"json-node__value--number":D==="string"?"json-node__value--string":""}),X=s.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):T(r.value)?q(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),x=s.computed(()=>"Double-click to edit"),fe=D=>r.level===0?D:ce.value?`${ce.value}.${D}`:D,k=D=>{const g=Object.keys(r.value);return g.indexOf(D)===g.length-1},P=()=>{u("toggle-expand",ce.value)},Z=()=>{r.level!==0&&(i.value=!0,p.value=r.keyName,s.nextTick(()=>{if(m.value){m.value.focus();const D=document.createRange();D.selectNodeContents(m.value);const g=window.getSelection();g?.removeAllRanges(),g?.addRange(D)}}))},Y=()=>{L.value||(l.value=!0,r.value===null?h.value="null":T(r.value)?h.value="protected-number":typeof r.value=="string"?h.value="string":typeof r.value=="number"?h.value="number":typeof r.value=="boolean"&&(h.value="boolean"),T(r.value)?v.value=q(r.value):typeof r.value=="string"?v.value=r.value:v.value=String(r.value),s.nextTick(()=>{if(B.value){B.value.focus();const D=document.createRange();D.selectNodeContents(B.value);const g=window.getSelection();g?.removeAllRanges(),g?.addRange(D)}}))},M=()=>{if(r.level===0||!i.value)return;const D=m.value?.innerText.trim()||"";if(!D){pe();return}if(D===r.keyName){i.value=!1;return}i.value=!1,u("update:key",ce.value,D)},ae=()=>{if(l.value)try{let D;const g=B.value?.innerText.trim()||"";if(h.value==="string")g==="null"?D=null:g==="true"||g==="false"?D=g==="true":D=g;else if(h.value==="protected-number")D={__protected_number__:g};else if(g==="null")D=null;else if(g==="true"||g==="false")D=g==="true";else if(!isNaN(Number(g))&&g!==""){const b=Number(g);!Number.isSafeInteger(b)||g.length>15?D={__protected_number__:g}:D=b}else D=g;u("update:value",ce.value,D),l.value=!1}catch(D){console.error("Failed to parse value:",D),l.value=!1}},pe=()=>{i.value=!1,p.value=r.keyName},I=()=>{l.value=!1,T(r.value)?v.value=q(r.value):typeof r.value=="string"?v.value=r.value:v.value=String(r.value)};return(D,g)=>{const b=s.resolveComponent("JsonNode",!0);return s.openBlock(),s.createElementBlock("div",mr,[L.value?(s.openBlock(),s.createElementBlock("div",gr,[s.createElementVNode("div",Er,[D.keyName?(s.openBlock(),s.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:Z,onKeydown:[s.withKeys(s.withModifiers(M,["prevent"]),["enter"]),s.withKeys(pe,["escape"])],onBlur:M,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},s.toDisplayString(i.value?p.value:`"${te.value}"`),41,yr)):s.createCommentVNode("",!0),D.keyName?(s.openBlock(),s.createElementBlock("span",Ar,": ")):s.createCommentVNode("",!0),s.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:P,title:S.value?"Click to collapse":"Click to expand"},s.toDisplayString(de.value),9,br),S.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:P,title:`Click to expand ${Ae.value.trim()}`},s.toDisplayString(Ae.value),9,xr)),S.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:P,title:"Click to expand"},s.toDisplayString(ee.value),1)),!S.value&&!D.isLast?(s.openBlock(),s.createElementBlock("span",Nr,",")):s.createCommentVNode("",!0)]),S.value?(s.openBlock(),s.createElementBlock("div",Dr,[s.createElementVNode("div",vr,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(D.value,(_,C)=>(s.openBlock(),s.createElementBlock("div",{key:C,class:"json-node__child"},[s.createVNode(b,{value:_,"key-name":ie.value?"":String(C),level:D.level+1,path:fe(String(C)),expanded:D.expanded,theme:D.theme,"onUpdate:value":g[0]||(g[0]=(F,R)=>D.$emit("update:value",F,R)),onToggleExpand:g[1]||(g[1]=F=>D.$emit("toggle-expand",F)),onCopy:g[2]||(g[2]=F=>D.$emit("copy",F)),"onUpdate:key":g[3]||(g[3]=(F,R)=>D.$emit("update:key",F,R)),"is-last":k(String(C))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),s.createElementVNode("div",Cr,[s.createElementVNode("span",wr,s.toDisplayString(ee.value),1),D.isLast?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",Tr,","))])])):s.createCommentVNode("",!0)])):(s.openBlock(),s.createElementBlock("div",_r,[D.keyName?(s.openBlock(),s.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:Z,onKeydown:[s.withKeys(s.withModifiers(M,["prevent"]),["enter"]),s.withKeys(pe,["escape"])],onBlur:M,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},s.toDisplayString(i.value?p.value:`"${te.value}"`),41,Br)):s.createCommentVNode("",!0),D.keyName?(s.openBlock(),s.createElementBlock("span",Sr,": ")):s.createCommentVNode("",!0),s.createElementVNode("span",{class:s.normalizeClass(["json-node__value-wrapper",be.value]),onDblclick:Y,title:x.value},[s.createElementVNode("span",{class:"json-node__value",contenteditable:l.value,onKeydown:[s.withKeys(s.withModifiers(ae,["prevent"]),["enter"]),s.withKeys(I,["escape"])],onBlur:ae,ref_key:"valueRef",ref:B},s.toDisplayString(l.value?v.value:X.value),41,kr),D.isLast?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",Rr,","))],42,Or)]))])}}}),Et=(n,t)=>{const r=n.__vccOpts||n;for(const[u,i]of t)r[u]=i;return r},Ir=Et(Fr,[["__scopeId","data-v-1472a8af"]]),kt={name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#656d76",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#2da44e",buttonPrimaryHover:"#2c974b",success:"#1a7f37",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",syntaxString:"#0a3069",syntaxNumber:"#0969da",syntaxBoolean:"#8250df",syntaxNull:"#656d76",syntaxKey:"#0969da",syntaxBracket:"#24292f",hoverBackground:"#f6f8fa",selectionBackground:"rgba(9, 105, 218, 0.2)",collapsedBackground:"#ddf4ff",collapsedBackgroundHover:"#b6e3ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},Pr={"github-light":kt,"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#e6edf3",textSecondary:"#7d8590",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#e6edf3",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2419",error:"#f85149",errorBackground:"#381921",syntaxString:"#a5d6ff",syntaxNumber:"#79c0ff",syntaxBoolean:"#d2a8ff",syntaxNull:"#7d8590",syntaxKey:"#79c0ff",syntaxBracket:"#e6edf3",hoverBackground:"#161b22",selectionBackground:"rgba(121, 192, 255, 0.2)",collapsedBackground:"#1c2128",collapsedBackgroundHover:"#2d333b",collapsedText:"#79c0ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#333333",textSecondary:"#888888",buttonBackground:"#f8f8f8",buttonBackgroundHover:"#eeeeee",buttonBorder:"#e0e0e0",buttonText:"#333333",buttonPrimary:"#007acc",buttonPrimaryHover:"#005a9e",success:"#22c55e",successBackground:"#f0fdf4",error:"#ef4444",errorBackground:"#fef2f2",syntaxString:"#22c55e",syntaxNumber:"#3b82f6",syntaxBoolean:"#8b5cf6",syntaxNull:"#6b7280",syntaxKey:"#1f2937",syntaxBracket:"#374151",hoverBackground:"#f9f9f9",selectionBackground:"rgba(59, 130, 246, 0.2)",collapsedBackground:"#e0f2fe",collapsedBackgroundHover:"#bae6fd",collapsedText:"#0284c7",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fefbf6",surfaceBackground:"#faf6f0",border:"#e8d5b7",text:"#4a3b2a",textSecondary:"#8b7355",buttonBackground:"#f4ede4",buttonBackgroundHover:"#efe5d8",buttonBorder:"#e8d5b7",buttonText:"#4a3b2a",buttonPrimary:"#ff6b35",buttonPrimaryHover:"#e55a2b",success:"#ff9500",successBackground:"#fff8f0",error:"#d73502",errorBackground:"#ffeee8",syntaxString:"#d73502",syntaxNumber:"#ff6b35",syntaxBoolean:"#b7472a",syntaxNull:"#8b7355",syntaxKey:"#4a3b2a",syntaxBracket:"#6b5444",hoverBackground:"#f8f2eb",selectionBackground:"rgba(255, 107, 53, 0.2)",collapsedBackground:"#ffe8d6",collapsedBackgroundHover:"#ffd4b0",collapsedText:"#d73502",indentLine:"#e8d5b7"}}};function Lr(n="github-light"){return Pr[n]||kt}const Vr={key:0,class:"json-format__toolbar"},Mr={class:"json-format__actions"},Ur=["disabled"],qr=["disabled"],$r=["disabled"],jr=["disabled"],Xr={class:"json-format__info"},Hr={key:0,class:"json-format__status json-format__status--success"},Gr={key:1,class:"json-format__status json-format__status--error"},Kr={class:"json-format__content"},zr={key:0,class:"json-format__error"},Yr={key:1,class:"json-format__error"},Wr={key:2,class:"json-format__viewer"},Rt=Et(s.defineComponent({name:"JsonFormat",__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress"],setup(n,{expose:t,emit:r}){s.useCssVars(g=>({"820119d0":T.value.colors.border,"7d4c03cc":T.value.colors.background,ec17e1ce:T.value.colors.text,"3b9ec162":T.value.colors.surfaceBackground,"024cf7ea":T.value.colors.buttonBorder,"34566c28":T.value.colors.buttonBackground,"2620a06b":T.value.colors.buttonText,"33a362b0":T.value.colors.buttonBackgroundHover,"308d0204":T.value.colors.buttonPrimary,d77b0cd0:T.value.colors.buttonPrimaryHover,"52643f25":T.value.colors.successBackground,a4bbc2d2:T.value.colors.success,ea95b82c:T.value.colors.errorBackground,"987f74c8":T.value.colors.error}));const u=n,i=r,l=s.ref(null),p=s.ref(""),v=s.ref(new Set),h=s.ref(null),m=s.ref(""),B=s.computed(()=>p.value===""),T=s.computed(()=>Lr(u.theme)),q=s.computed(()=>m.value?null:h.value!==null?h.value:l.value),L=g=>{if(!g.trim()){l.value=null,p.value="",h.value=null,m.value="";return}try{let b=g;const _=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(b),C=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(b);if(!_&&!C)try{l.value=JSON.parse(b),p.value="",h.value=null,m.value="",s.nextTick(()=>{q.value!==null&&x()});return}catch{}b=(R=>{let V="",z=!1,re=!1,me=0;for(;me<R.length;){const j=R[me];if(z)re?re=!1:j==="\\"?re=!0:j==='"'&&(z=!1),V+=j,me++;else if(j==='"')z=!0,V+=j,me++;else{const De=R.slice(me);let Ce=De.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(Ce){V+=Ce[1]+'{"__protected_number__":"'+Ce[2]+'"}'+Ce[3],me+=Ce[0].length;continue}if(Ce=De.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),Ce){V+=Ce[1]+'{"__protected_number__":"'+Ce[2]+'"}'+Ce[3],me+=Ce[0].length;continue}V+=j,me++}}return V})(b),l.value=JSON.parse(b),p.value="",h.value=null,m.value="",s.nextTick(()=>{q.value!==null&&x()})}catch(b){p.value=b instanceof Error?b.message:"Unknown parsing error",l.value=null,h.value=null,m.value=""}},ie=g=>{if(!g||!g.expression.trim()){de();return}if(!l.value){m.value="No valid JSON data to filter";return}try{let b;if(g.type==="jsonpath")b=Ne({path:g.expression,json:l.value}),b.length===1&&g.expression.includes("$[")===!1&&!g.expression.endsWith("[*]")?h.value=b[0]:h.value=b;else if(g.type==="js"){const{proxyData:_,indexMap:C}=ce(l.value),R=new Function("$",`
|
|
1
|
+
(function(ze,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(ze=typeof globalThis<"u"?globalThis:ze||self,o(ze.LoneFormat={},ze.Vue))})(this,function(ze,o){"use strict";class ir{add(t,r,a){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],r&&this[i][a?"unshift":"push"](r)},this)}run(t,r){this[t]=this[t]||[],this[t].forEach(function(a){a.call(r&&r.context?r.context:r,r)})}}class ar{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];r.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class I{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+I.version}static addUnaryOp(t){return I.max_unop_len=Math.max(t.length,I.max_unop_len),I.unary_ops[t]=1,I}static addBinaryOp(t,r,a){return I.max_binop_len=Math.max(t.length,I.max_binop_len),I.binary_ops[t]=r,a?I.right_associative.add(t):I.right_associative.delete(t),I}static addIdentifierChar(t){return I.additional_identifier_chars.add(t),I}static addLiteral(t,r){return I.literals[t]=r,I}static removeUnaryOp(t){return delete I.unary_ops[t],t.length===I.max_unop_len&&(I.max_unop_len=I.getMaxKeyLen(I.unary_ops)),I}static removeAllUnaryOps(){return I.unary_ops={},I.max_unop_len=0,I}static removeIdentifierChar(t){return I.additional_identifier_chars.delete(t),I}static removeBinaryOp(t){return delete I.binary_ops[t],t.length===I.max_binop_len&&(I.max_binop_len=I.getMaxKeyLen(I.binary_ops)),I.right_associative.delete(t),I}static removeAllBinaryOps(){return I.binary_ops={},I.max_binop_len=0,I}static removeLiteral(t){return delete I.literals[t],I}static removeAllLiterals(){return I.literals={},I}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new I(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(r=>r.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return I.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!I.binary_ops[String.fromCharCode(t)]||I.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return I.isIdentifierStart(t)||I.isDecimalDigit(t)}throwError(t){const r=new Error(t+" at character "+this.index);throw r.index=this.index,r.description=t,r}runHook(t,r){if(I.hooks[t]){const a={context:this,node:r};return I.hooks.run(t,a),a.node}return r}searchHook(t){if(I.hooks[t]){const r={context:this};return I.hooks[t].find(function(a){return a.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let t=this.code;for(;t===I.SPACE_CODE||t===I.TAB_CODE||t===I.LF_CODE||t===I.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),r=t.length===1?t[0]:{type:I.COMPOUND,body:t};return this.runHook("after-all",r)}gobbleExpressions(t){let r=[],a,i;for(;this.index<this.expr.length;)if(a=this.code,a===I.SEMCOL_CODE||a===I.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(a===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,I.max_binop_len),r=t.length;for(;r>0;){if(I.binary_ops.hasOwnProperty(t)&&(!I.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!I.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=r,t;t=t.substr(0,--r)}return!1}gobbleBinaryExpression(){let t,r,a,i,u,c,b,p,m;if(c=this.gobbleToken(),!c||(r=this.gobbleBinaryOp(),!r))return c;for(u={value:r,prec:I.binaryPrecedence(r),right_a:I.right_associative.has(r)},b=this.gobbleToken(),b||this.throwError("Expected expression after "+r),i=[c,u,b];r=this.gobbleBinaryOp();){if(a=I.binaryPrecedence(r),a===0){this.index-=r.length;break}u={value:r,prec:a,right_a:I.right_associative.has(r)},m=r;const _=D=>u.right_a&&D.right_a?a>D.prec:a<=D.prec;for(;i.length>2&&_(i[i.length-2]);)b=i.pop(),r=i.pop().value,c=i.pop(),t={type:I.BINARY_EXP,operator:r,left:c,right:b},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+m),i.push(u,t)}for(p=i.length-1,t=i[p];p>1;)t={type:I.BINARY_EXP,operator:i[p-1].value,left:i[p-2],right:t},p-=2;return t}gobbleToken(){let t,r,a,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,I.isDecimalDigit(t)||t===I.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===I.SQUOTE_CODE||t===I.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===I.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,I.max_unop_len),a=r.length;a>0;){if(I.unary_ops.hasOwnProperty(r)&&(!I.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!I.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=a;const u=this.gobbleToken();return u||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:I.UNARY_EXP,operator:r,argument:u,prefix:!0})}r=r.substr(0,--a)}I.isIdentifierStart(t)?(i=this.gobbleIdentifier(),I.literals.hasOwnProperty(i.name)?i={type:I.LITERAL,value:I.literals[i.name],raw:i.name}:i.name===I.this_str&&(i={type:I.THIS_EXP})):t===I.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let r=this.code;for(;r===I.PERIOD_CODE||r===I.OBRACK_CODE||r===I.OPAREN_CODE||r===I.QUMARK_CODE;){let a;if(r===I.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==I.PERIOD_CODE)break;a=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===I.OBRACK_CODE?(t={type:I.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==I.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===I.OPAREN_CODE?t={type:I.CALL_EXP,arguments:this.gobbleArguments(I.CPAREN_CODE),callee:t}:(r===I.PERIOD_CODE||a)&&(a&&this.index--,this.gobbleSpaces(),t={type:I.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),a&&(t.optional=!0),this.gobbleSpaces(),r=this.code}return t}gobbleNumericLiteral(){let t="",r,a;for(;I.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===I.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);I.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(t+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(t+=this.expr.charAt(this.index++));I.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);I.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return a=this.code,I.isIdentifierStart(a)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(a===I.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===I.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:I.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const r=this.index,a=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let u=this.expr.charAt(this.index++);if(u===a){i=!0;break}else if(u==="\\")switch(u=this.expr.charAt(this.index++),u){case"n":t+=`
|
|
2
|
+
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=u}else t+=u}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:I.LITERAL,value:t,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let t=this.code,r=this.index;for(I.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,I.isIdentifierPart(t));)this.index++;return{type:I.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(t){const r=[];let a=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let u=this.code;if(u===t){a=!0,this.index++,t===I.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(u===I.COMMA_CODE){if(this.index++,i++,i!==r.length){if(t===I.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===I.CBRACK_CODE)for(let c=r.length;c<i;c++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{const c=this.gobbleExpression();(!c||c.type===I.COMPOUND)&&this.throwError("Expected comma"),r.push(c)}}return a||this.throwError("Expected "+String.fromCharCode(t)),r}gobbleGroup(){this.index++;let t=this.gobbleExpressions(I.CPAREN_CODE);if(this.code===I.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:I.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:I.ARRAY_EXP,elements:this.gobbleArguments(I.CBRACK_CODE)}}}const ur=new ir;Object.assign(I,{hooks:ur,plugins:new ar(I),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),I.max_unop_len=I.getMaxKeyLen(I.unary_ops),I.max_binop_len=I.getMaxKeyLen(I.binary_ops);const Ze=n=>new I(n).parse(),lr=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(I).filter(n=>!lr.includes(n)&&Ze[n]===void 0).forEach(n=>{Ze[n]=I[n]}),Ze.Jsep=I;const cr="ConditionalExpression";var fr={name:"ternary",init(n){n.hooks.add("after-expression",function(r){if(r.node&&this.code===n.QUMARK_CODE){this.index++;const a=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===n.COLON_CODE){this.index++;const u=this.gobbleExpression();if(u||this.throwError("Expected expression"),r.node={type:cr,test:a,consequent:i,alternate:u},a.operator&&n.binary_ops[a.operator]<=.9){let c=a;for(;c.right.operator&&n.binary_ops[c.right.operator]<=.9;)c=c.right;r.node.test=c.right,c.right=r.node,r.node=a}}else this.throwError("Expected :")}})}};Ze.plugins.register(fr);const kt=47,dr=92;var pr={name:"regex",init(n){n.hooks.add("gobble-token",function(r){if(this.code===kt){const a=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===kt&&!i){const u=this.expr.slice(a,this.index);let c="";for(;++this.index<this.expr.length;){const p=this.code;if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57)c+=this.char;else break}let b;try{b=new RegExp(u,c)}catch(p){this.throwError(p.message)}return r.node={type:n.LITERAL,value:b,raw:this.expr.slice(a-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===n.OBRACK_CODE?i=!0:i&&this.code===n.CBRACK_CODE&&(i=!1),this.index+=this.code===dr?2:1}this.throwError("Unclosed Regex")}})}};const Ct=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Ct,45],assignmentPrecedence:.9,init(n){const t=[n.IDENTIFIER,n.MEMBER_EXP];ct.assignmentOperators.forEach(a=>n.addBinaryOp(a,ct.assignmentPrecedence,!0)),n.hooks.add("gobble-token",function(i){const u=this.code;ct.updateOperators.some(c=>c===u&&c===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),n.hooks.add("after-token",function(i){if(i.node){const u=this.code;ct.updateOperators.some(c=>c===u&&c===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:u===Ct?"++":"--",argument:i.node,prefix:!1})}}),n.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(a){ct.assignmentOperators.has(a.operator)?(a.type="AssignmentExpression",r(a.left),r(a.right)):a.operator||Object.values(a).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};Ze.plugins.register(pr,ct),Ze.addUnaryOp("typeof"),Ze.addLiteral("null",null),Ze.addLiteral("undefined",void 0);const hr=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),Te={evalAst(n,t){switch(n.type){case"BinaryExpression":case"LogicalExpression":return Te.evalBinaryExpression(n,t);case"Compound":return Te.evalCompound(n,t);case"ConditionalExpression":return Te.evalConditionalExpression(n,t);case"Identifier":return Te.evalIdentifier(n,t);case"Literal":return Te.evalLiteral(n,t);case"MemberExpression":return Te.evalMemberExpression(n,t);case"UnaryExpression":return Te.evalUnaryExpression(n,t);case"ArrayExpression":return Te.evalArrayExpression(n,t);case"CallExpression":return Te.evalCallExpression(n,t);case"AssignmentExpression":return Te.evalAssignmentExpression(n,t);default:throw SyntaxError("Unexpected expression",n)}},evalBinaryExpression(n,t){return{"||":(a,i)=>a||i(),"&&":(a,i)=>a&&i(),"|":(a,i)=>a|i(),"^":(a,i)=>a^i(),"&":(a,i)=>a&i(),"==":(a,i)=>a==i(),"!=":(a,i)=>a!=i(),"===":(a,i)=>a===i(),"!==":(a,i)=>a!==i(),"<":(a,i)=>a<i(),">":(a,i)=>a>i(),"<=":(a,i)=>a<=i(),">=":(a,i)=>a>=i(),"<<":(a,i)=>a<<i(),">>":(a,i)=>a>>i(),">>>":(a,i)=>a>>>i(),"+":(a,i)=>a+i(),"-":(a,i)=>a-i(),"*":(a,i)=>a*i(),"/":(a,i)=>a/i(),"%":(a,i)=>a%i()}[n.operator](Te.evalAst(n.left,t),()=>Te.evalAst(n.right,t))},evalCompound(n,t){let r;for(let a=0;a<n.body.length;a++){n.body[a].type==="Identifier"&&["var","let","const"].includes(n.body[a].name)&&n.body[a+1]&&n.body[a+1].type==="AssignmentExpression"&&(a+=1);const i=n.body[a];r=Te.evalAst(i,t)}return r},evalConditionalExpression(n,t){return Te.evalAst(n.test,t)?Te.evalAst(n.consequent,t):Te.evalAst(n.alternate,t)},evalIdentifier(n,t){if(Object.hasOwn(t,n.name))return t[n.name];throw ReferenceError(`${n.name} is not defined`)},evalLiteral(n){return n.value},evalMemberExpression(n,t){const r=String(n.computed?Te.evalAst(n.property):n.property.name),a=Te.evalAst(n.object,t);if(a==null)throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);if(!Object.hasOwn(a,r)&&hr.has(r))throw TypeError(`Cannot read properties of ${a} (reading '${r}')`);const i=a[r];return typeof i=="function"?i.bind(a):i},evalUnaryExpression(n,t){return{"-":a=>-Te.evalAst(a,t),"!":a=>!Te.evalAst(a,t),"~":a=>~Te.evalAst(a,t),"+":a=>+Te.evalAst(a,t),typeof:a=>typeof Te.evalAst(a,t)}[n.operator](n.argument)},evalArrayExpression(n,t){return n.elements.map(r=>Te.evalAst(r,t))},evalCallExpression(n,t){const r=n.arguments.map(i=>Te.evalAst(i,t));return Te.evalAst(n.callee,t)(...r)},evalAssignmentExpression(n,t){if(n.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const r=n.left.name,a=Te.evalAst(n.right,t);return t[r]=a,t[r]}};class mr{constructor(t){this.code=t,this.ast=Ze(this.code)}runInNewContext(t){const r=Object.assign(Object.create(null),t);return Te.evalAst(this.ast,r)}}function rt(n,t){return n=n.slice(),n.push(t),n}function Dt(n,t){return t=t.slice(),t.unshift(n),t}class gr extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function we(n,t,r,a,i){if(!(this instanceof we))try{return new we(n,t,r,a,i)}catch(c){if(!c.avoidNew)throw c;return c.value}typeof n=="string"&&(i=a,a=r,r=t,t=n,n=null);const u=n&&typeof n=="object";if(n=n||{},this.json=n.json||r,this.path=n.path||t,this.resultType=n.resultType||"value",this.flatten=n.flatten||!1,this.wrap=Object.hasOwn(n,"wrap")?n.wrap:!0,this.sandbox=n.sandbox||{},this.eval=n.eval===void 0?"safe":n.eval,this.ignoreEvalErrors=typeof n.ignoreEvalErrors>"u"?!1:n.ignoreEvalErrors,this.parent=n.parent||null,this.parentProperty=n.parentProperty||null,this.callback=n.callback||a||null,this.otherTypeCallback=n.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},n.autostart!==!1){const c={path:u?n.path:t};u?"json"in n&&(c.json=n.json):c.json=r;const b=this.evaluate(c);if(!b||typeof b!="object")throw new gr(b);return b}}we.prototype.evaluate=function(n,t,r,a){let i=this.parent,u=this.parentProperty,{flatten:c,wrap:b}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=a||this.otherTypeCallback,t=t||this.json,n=n||this.path,n&&typeof n=="object"&&!Array.isArray(n)){if(!n.path&&n.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(n,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=n),c=Object.hasOwn(n,"flatten")?n.flatten:c,this.currResultType=Object.hasOwn(n,"resultType")?n.resultType:this.currResultType,this.currSandbox=Object.hasOwn(n,"sandbox")?n.sandbox:this.currSandbox,b=Object.hasOwn(n,"wrap")?n.wrap:b,this.currEval=Object.hasOwn(n,"eval")?n.eval:this.currEval,r=Object.hasOwn(n,"callback")?n.callback:r,this.currOtherTypeCallback=Object.hasOwn(n,"otherTypeCallback")?n.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(n,"parent")?n.parent:i,u=Object.hasOwn(n,"parentProperty")?n.parentProperty:u,n=n.path}if(i=i||null,u=u||null,Array.isArray(n)&&(n=we.toPathString(n)),!n&&n!==""||!t)return;const p=we.toPathArray(n);p[0]==="$"&&p.length>1&&p.shift(),this._hasParentSelector=null;const m=this._trace(p,t,["$"],i,u,r).filter(function(_){return _&&!_.isParentSelector});return m.length?!b&&m.length===1&&!m[0].hasArrExpr?this._getPreferredOutput(m[0]):m.reduce((_,D)=>{const V=this._getPreferredOutput(D);return c&&Array.isArray(V)?_=_.concat(V):_.push(V),_},[]):b?[]:void 0},we.prototype._getPreferredOutput=function(n){const t=this.currResultType;switch(t){case"all":{const r=Array.isArray(n.path)?n.path:we.toPathArray(n.path);return n.pointer=we.toPointer(r),n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),n}case"value":case"parent":case"parentProperty":return n[t];case"path":return we.toPathString(n[t]);case"pointer":return we.toPointer(n.path);default:throw new TypeError("Unknown result type")}},we.prototype._handleCallback=function(n,t,r){if(t){const a=this._getPreferredOutput(n);n.path=typeof n.path=="string"?n.path:we.toPathString(n.path),t(a,r,n)}},we.prototype._trace=function(n,t,r,a,i,u,c,b){let p;if(!n.length)return p={path:r,value:t,parent:a,parentProperty:i,hasArrExpr:c},this._handleCallback(p,u,"value"),p;const m=n[0],_=n.slice(1),D=[];function V(j){Array.isArray(j)?j.forEach(Y=>{D.push(Y)}):D.push(j)}if((typeof m!="string"||b)&&t&&Object.hasOwn(t,m))V(this._trace(_,t[m],rt(r,m),t,m,u,c));else if(m==="*")this._walk(t,j=>{V(this._trace(_,t[j],rt(r,j),t,j,u,!0,!0))});else if(m==="..")V(this._trace(_,t,r,a,i,u,c)),this._walk(t,j=>{typeof t[j]=="object"&&V(this._trace(n.slice(),t[j],rt(r,j),t,j,u,!0))});else{if(m==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:_,isParentSelector:!0};if(m==="~")return p={path:rt(r,m),value:i,parent:a,parentProperty:null},this._handleCallback(p,u,"property"),p;if(m==="$")V(this._trace(_,t,r,null,null,u,c));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(m))V(this._slice(m,_,t,r,a,i,u));else if(m.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const j=m.replace(/^\?\((.*?)\)$/u,"$1"),Y=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(j);Y?this._walk(t,ie=>{const v=[Y[2]],H=Y[1]?t[ie][Y[1]]:t[ie];this._trace(v,H,r,a,i,u,!0).length>0&&V(this._trace(_,t[ie],rt(r,ie),t,ie,u,!0))}):this._walk(t,ie=>{this._eval(j,t[ie],ie,r,a,i)&&V(this._trace(_,t[ie],rt(r,ie),t,ie,u,!0))})}else if(m[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");V(this._trace(Dt(this._eval(m,t,r.at(-1),r.slice(0,-1),a,i),_),t,r,a,i,u,c))}else if(m[0]==="@"){let j=!1;const Y=m.slice(1,-2);switch(Y){case"scalar":(!t||!["object","function"].includes(typeof t))&&(j=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===Y&&(j=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(j=!0);break;case"number":Number.isFinite(t)&&(j=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(j=!0);break;case"object":t&&typeof t===Y&&(j=!0);break;case"array":Array.isArray(t)&&(j=!0);break;case"other":j=this.currOtherTypeCallback(t,r,a,i);break;case"null":t===null&&(j=!0);break;default:throw new TypeError("Unknown value type "+Y)}if(j)return p={path:r,value:t,parent:a,parentProperty:i},this._handleCallback(p,u,"value"),p}else if(m[0]==="`"&&t&&Object.hasOwn(t,m.slice(1))){const j=m.slice(1);V(this._trace(_,t[j],rt(r,j),t,j,u,c,!0))}else if(m.includes(",")){const j=m.split(",");for(const Y of j)V(this._trace(Dt(Y,_),t,r,a,i,u,!0))}else!b&&t&&Object.hasOwn(t,m)&&V(this._trace(_,t[m],rt(r,m),t,m,u,c,!0))}if(this._hasParentSelector)for(let j=0;j<D.length;j++){const Y=D[j];if(Y&&Y.isParentSelector){const ie=this._trace(Y.expr,t,Y.path,a,i,u,c);if(Array.isArray(ie)){D[j]=ie[0];const v=ie.length;for(let H=1;H<v;H++)j++,D.splice(j,0,ie[H])}else D[j]=ie}}return D},we.prototype._walk=function(n,t){if(Array.isArray(n)){const r=n.length;for(let a=0;a<r;a++)t(a)}else n&&typeof n=="object"&&Object.keys(n).forEach(r=>{t(r)})},we.prototype._slice=function(n,t,r,a,i,u,c){if(!Array.isArray(r))return;const b=r.length,p=n.split(":"),m=p[2]&&Number.parseInt(p[2])||1;let _=p[0]&&Number.parseInt(p[0])||0,D=p[1]&&Number.parseInt(p[1])||b;_=_<0?Math.max(0,_+b):Math.min(b,_),D=D<0?Math.max(0,D+b):Math.min(b,D);const V=[];for(let j=_;j<D;j+=m)this._trace(Dt(j,t),r,a,i,u,c,!0).forEach(ie=>{V.push(ie)});return V},we.prototype._eval=function(n,t,r,a,i,u){this.currSandbox._$_parentProperty=u,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const c=n.includes("@path");c&&(this.currSandbox._$_path=we.toPathString(a.concat([r])));const b=this.currEval+"Script:"+n;if(!we.cache[b]){let p=n.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(c&&(p=p.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)we.cache[b]=new this.safeVm.Script(p);else if(this.currEval==="native")we.cache[b]=new this.vm.Script(p);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const m=this.currEval;we.cache[b]=new m(p)}else if(typeof this.currEval=="function")we.cache[b]={runInNewContext:m=>this.currEval(p,m)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return we.cache[b].runInNewContext(this.currSandbox)}catch(p){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+p.message+": "+n)}},we.cache={},we.toPathString=function(n){const t=n,r=t.length;let a="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return a},we.toPointer=function(n){const t=n,r=t.length;let a="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(a+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return a},we.toPathArray=function(n){const{cache:t}=we;if(t[n])return t[n].concat();const r=[],i=n.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(u,c){return"[#"+(r.push(c)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(u,c){return"['"+c.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(u,c){return";"+c.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(u){const c=u.match(/#(\d+)/u);return!c||!c[1]?u:r[c[1]]});return t[n]=i,t[n].concat()},we.prototype.safeVm={Script:mr};const Er=function(n,t,r){const a=n.length;for(let i=0;i<a;i++){const u=n[i];r(u)&&t.push(n.splice(i--,1)[0])}};class yr{constructor(t){this.code=t}runInNewContext(t){let r=this.code;const a=Object.keys(t),i=[];Er(a,i,m=>typeof t[m]=="function");const u=a.map(m=>t[m]);r=i.reduce((m,_)=>{let D=t[_].toString();return/function/u.test(D)||(D="function "+D),"var "+_+"="+D+";"+m},"")+r,!/(['"])use strict\1/u.test(r)&&!a.includes("arguments")&&(r="var arguments = undefined;"+r),r=r.replace(/;\s*$/u,"");const b=r.lastIndexOf(";"),p=b!==-1?r.slice(0,b+1)+" return "+r.slice(b+1):" return "+r;return new Function(...a,p)(...u)}}we.prototype.vm={Script:yr};const br={class:"json-node"},Ar={key:0,class:"json-node__container"},xr={class:"json-node__line"},Nr=["contenteditable","onKeydown"],Cr={key:1,class:"json-node__colon"},Dr=["title"],vr=["title"],wr={key:4,class:"json-node__comma"},_r={key:0,class:"json-node__children"},Tr={class:"json-node__children-content"},Br={class:"json-node__line json-node__closing-bracket"},Sr={class:"json-node__bracket"},Or={key:0,class:"json-node__comma"},kr={key:1,class:"json-node__primitive"},Rr=["contenteditable","onKeydown"],Ir={key:1,class:"json-node__colon"},Fr=["title"],Pr=["contenteditable","onKeydown"],Lr={key:0,class:"json-node__comma"},Vr=o.defineComponent({name:"JsonNode",__name:"JsonNode",props:{value:{},keyName:{},level:{},path:{default:""},expanded:{},isLast:{type:Boolean,default:!1},theme:{}},emits:["update:value","toggle-expand","copy","update:key"],setup(n,{emit:t}){o.useCssVars(x=>({"2a18b018":x.level,"58a14b93":x.theme.colors.syntaxKey,"46fe1b3e":x.theme.colors.hoverBackground,fbe2c048:x.theme.colors.syntaxBracket,"4bd524bb":x.theme.colors.collapsedText,"3308d23c":x.theme.colors.collapsedBackground,"36380c60":x.theme.colors.collapsedBackgroundHover,"0892365d":x.theme.colors.syntaxString,"0015b195":x.theme.colors.syntaxNumber,"7db95f5c":x.theme.colors.syntaxBoolean,"88ec825a":x.theme.colors.syntaxNull,"537157f7":x.theme.colors.background,"3cee3331":x.theme.colors.selectionBackground,"81323cee":x.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(!1),c=o.ref(""),b=o.ref(""),p=o.ref("string"),m=o.ref(null),_=o.ref(null),D=x=>x!==null&&typeof x=="object"&&!Array.isArray(x)&&"__protected_number__"in x&&Object.keys(x).length===1,V=x=>D(x)?x.__protected_number__:"",j=o.computed(()=>D(r.value)?!1:r.value!==null&&typeof r.value=="object"),Y=o.computed(()=>Array.isArray(r.value)),ie=o.computed(()=>r.path?r.path:r.keyName?r.keyName:"root"),v=o.computed(()=>r.expanded.has(ie.value)),H=o.computed(()=>r.keyName),K=o.computed(()=>Y.value?"[":"{"),$=o.computed(()=>Y.value?"]":"}"),ae=o.computed(()=>{if(!r.value)return"";const B=Object.keys(r.value).length;return Y.value?B>0?` ${B} items `:" ":B>0?` ${B} keys `:" "}),ee=o.computed(()=>{const x=typeof r.value;return r.value===null?"json-node__value--null":x==="boolean"?"json-node__value--boolean":x==="number"||D(r.value)?"json-node__value--number":x==="string"?"json-node__value--string":""}),U=o.computed(()=>r.value===null?"null":typeof r.value=="boolean"||typeof r.value=="number"?String(r.value):D(r.value)?V(r.value):typeof r.value=="string"?`"${r.value}"`:String(r.value)),A=o.computed(()=>"Double-click to edit"),te=x=>r.level===0?x:ie.value?`${ie.value}.${x}`:x,N=x=>{const B=Object.keys(r.value);return B.indexOf(x)===B.length-1},T=()=>{a("toggle-expand",ie.value)},q=()=>{r.level!==0&&(i.value=!0,c.value=r.keyName,o.nextTick(()=>{if(m.value){m.value.focus();const x=document.createRange();x.selectNodeContents(m.value);const B=window.getSelection();B?.removeAllRanges(),B?.addRange(x)}}))},W=()=>{j.value||(u.value=!0,r.value===null?p.value="null":D(r.value)?p.value="protected-number":typeof r.value=="string"?p.value="string":typeof r.value=="number"?p.value="number":typeof r.value=="boolean"&&(p.value="boolean"),D(r.value)?b.value=V(r.value):typeof r.value=="string"?b.value=r.value:b.value=String(r.value),o.nextTick(()=>{if(_.value){_.value.focus();const x=document.createRange();x.selectNodeContents(_.value);const B=window.getSelection();B?.removeAllRanges(),B?.addRange(x)}}))},M=()=>{if(r.level===0||!i.value)return;const x=m.value?.innerText.trim()||"";if(!x){he();return}if(x===r.keyName){i.value=!1;return}i.value=!1,a("update:key",ie.value,x)},de=()=>{if(u.value)try{let x;const B=_.value?.innerText.trim()||"";if(p.value==="string")B==="null"?x=null:B==="true"||B==="false"?x=B==="true":x=B;else if(p.value==="protected-number")x={__protected_number__:B};else if(B==="null")x=null;else if(B==="true"||B==="false")x=B==="true";else if(!isNaN(Number(B))&&B!==""){const X=Number(B);!Number.isSafeInteger(X)||B.length>15?x={__protected_number__:B}:x=X}else x=B;a("update:value",ie.value,x),u.value=!1}catch(x){console.error("Failed to parse value:",x),u.value=!1}},he=()=>{i.value=!1,c.value=r.keyName},ye=()=>{u.value=!1,D(r.value)?b.value=V(r.value):typeof r.value=="string"?b.value=r.value:b.value=String(r.value)};return(x,B)=>{const X=o.resolveComponent("JsonNode",!0);return o.openBlock(),o.createElementBlock("div",br,[j.value?(o.openBlock(),o.createElementBlock("div",Ar,[o.createElementVNode("div",xr,[x.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:q,onKeydown:[o.withKeys(o.withModifiers(M,["prevent"]),["enter"]),o.withKeys(he,["escape"])],onBlur:M,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?c.value:`"${H.value}"`),41,Nr)):o.createCommentVNode("",!0),x.keyName?(o.openBlock(),o.createElementBlock("span",Cr,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:T,title:v.value?"Click to collapse":"Click to expand"},o.toDisplayString(K.value),9,Dr),v.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:2,class:"json-node__collapsed-info",onClick:T,title:`Click to expand ${ae.value.trim()}`},o.toDisplayString(ae.value),9,vr)),v.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:3,class:"json-node__bracket json-node__bracket--clickable",onClick:T,title:"Click to expand"},o.toDisplayString($.value),1)),!v.value&&!x.isLast?(o.openBlock(),o.createElementBlock("span",wr,",")):o.createCommentVNode("",!0)]),v.value?(o.openBlock(),o.createElementBlock("div",_r,[o.createElementVNode("div",Tr,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x.value,(Z,F)=>(o.openBlock(),o.createElementBlock("div",{key:F,class:"json-node__child"},[o.createVNode(X,{value:Z,"key-name":Y.value?"":String(F),level:x.level+1,path:te(String(F)),expanded:x.expanded,theme:x.theme,"onUpdate:value":B[0]||(B[0]=(le,w)=>x.$emit("update:value",le,w)),onToggleExpand:B[1]||(B[1]=le=>x.$emit("toggle-expand",le)),onCopy:B[2]||(B[2]=le=>x.$emit("copy",le)),"onUpdate:key":B[3]||(B[3]=(le,w)=>x.$emit("update:key",le,w)),"is-last":N(String(F))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),o.createElementVNode("div",Br,[o.createElementVNode("span",Sr,o.toDisplayString($.value),1),x.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Or,","))])])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",kr,[x.keyName?(o.openBlock(),o.createElementBlock("span",{key:0,class:"json-node__key",contenteditable:i.value,onDblclick:q,onKeydown:[o.withKeys(o.withModifiers(M,["prevent"]),["enter"]),o.withKeys(he,["escape"])],onBlur:M,ref_key:"keyRef",ref:m,title:"Double-click to edit key"},o.toDisplayString(i.value?c.value:`"${H.value}"`),41,Rr)):o.createCommentVNode("",!0),x.keyName?(o.openBlock(),o.createElementBlock("span",Ir,": ")):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(["json-node__value-wrapper",ee.value]),onDblclick:W,title:A.value},[o.createElementVNode("span",{class:"json-node__value",contenteditable:u.value,onKeydown:[o.withKeys(o.withModifiers(de,["prevent"]),["enter"]),o.withKeys(ye,["escape"])],onBlur:de,ref_key:"valueRef",ref:_},o.toDisplayString(u.value?b.value:U.value),41,Pr),x.isLast?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Lr,","))],42,Fr)]))])}}}),ft=(n,t)=>{const r=n.__vccOpts||n;for(const[a,i]of t)r[a]=i;return r},$r=ft(Vr,[["__scopeId","data-v-1472a8af"]]),Rt={name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#656d76",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#2da44e",buttonPrimaryHover:"#2c974b",success:"#1a7f37",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",syntaxString:"#0a3069",syntaxNumber:"#0969da",syntaxBoolean:"#8250df",syntaxNull:"#656d76",syntaxKey:"#0969da",syntaxBracket:"#24292f",hoverBackground:"#f6f8fa",selectionBackground:"rgba(9, 105, 218, 0.2)",collapsedBackground:"#ddf4ff",collapsedBackgroundHover:"#b6e3ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},Mr={"github-light":Rt,"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#e6edf3",textSecondary:"#7d8590",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#e6edf3",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2419",error:"#f85149",errorBackground:"#381921",syntaxString:"#a5d6ff",syntaxNumber:"#79c0ff",syntaxBoolean:"#d2a8ff",syntaxNull:"#7d8590",syntaxKey:"#79c0ff",syntaxBracket:"#e6edf3",hoverBackground:"#161b22",selectionBackground:"rgba(121, 192, 255, 0.2)",collapsedBackground:"#1c2128",collapsedBackgroundHover:"#2d333b",collapsedText:"#79c0ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#333333",textSecondary:"#888888",buttonBackground:"#f8f8f8",buttonBackgroundHover:"#eeeeee",buttonBorder:"#e0e0e0",buttonText:"#333333",buttonPrimary:"#007acc",buttonPrimaryHover:"#005a9e",success:"#22c55e",successBackground:"#f0fdf4",error:"#ef4444",errorBackground:"#fef2f2",syntaxString:"#22c55e",syntaxNumber:"#3b82f6",syntaxBoolean:"#8b5cf6",syntaxNull:"#6b7280",syntaxKey:"#1f2937",syntaxBracket:"#374151",hoverBackground:"#f9f9f9",selectionBackground:"rgba(59, 130, 246, 0.2)",collapsedBackground:"#e0f2fe",collapsedBackgroundHover:"#bae6fd",collapsedText:"#0284c7",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fefbf6",surfaceBackground:"#faf6f0",border:"#e8d5b7",text:"#4a3b2a",textSecondary:"#8b7355",buttonBackground:"#f4ede4",buttonBackgroundHover:"#efe5d8",buttonBorder:"#e8d5b7",buttonText:"#4a3b2a",buttonPrimary:"#ff6b35",buttonPrimaryHover:"#e55a2b",success:"#ff9500",successBackground:"#fff8f0",error:"#d73502",errorBackground:"#ffeee8",syntaxString:"#d73502",syntaxNumber:"#ff6b35",syntaxBoolean:"#b7472a",syntaxNull:"#8b7355",syntaxKey:"#4a3b2a",syntaxBracket:"#6b5444",hoverBackground:"#f8f2eb",selectionBackground:"rgba(255, 107, 53, 0.2)",collapsedBackground:"#ffe8d6",collapsedBackgroundHover:"#ffd4b0",collapsedText:"#d73502",indentLine:"#e8d5b7"}}};function Ur(n="github-light"){return Mr[n]||Rt}const qr={key:0,class:"json-format__toolbar"},Hr={class:"json-format__actions"},jr=["disabled"],Kr=["disabled"],Gr=["disabled"],Xr=["disabled"],zr={class:"json-format__info"},Wr={key:0,class:"json-format__status json-format__status--success"},Yr={key:1,class:"json-format__status json-format__status--error"},Qr={class:"json-format__content"},Zr={key:0,class:"json-format__error"},Jr={key:1,class:"json-format__error"},en={key:2,class:"json-format__viewer"},It=ft(o.defineComponent({name:"JsonFormat",__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress"],setup(n,{expose:t,emit:r}){o.useCssVars(w=>({"0e2b28fa":V.value.colors.border,f3d81a08:V.value.colors.background,"0af7d57b":V.value.colors.text,"5ee5c82d":V.value.colors.surfaceBackground,ff458768:V.value.colors.buttonBorder,c0efe564:V.value.colors.buttonBackground,"2a4ad566":V.value.colors.buttonText,e48626e4:V.value.colors.buttonBackgroundHover,"748549e2":V.value.colors.buttonPrimary,a39b270c:V.value.colors.buttonPrimaryHover,"61cd2ffa":V.value.colors.successBackground,"43ed24f5":V.value.colors.success,"9c8a2770":V.value.colors.errorBackground,"53354b7a":V.value.colors.error}));const a=n,i=r,u=o.ref(null),c=o.ref(""),b=o.ref(new Set),p=o.ref(null),m=o.ref(""),_=o.ref(!1),D=o.computed(()=>c.value===""),V=o.computed(()=>Ur(a.theme)),j=w=>{if(w==null)return w;if(Array.isArray(w))return w.map(k=>j(k));if(typeof w=="object"){const k={},L=Object.keys(w).sort();for(const G of L)k[G]=j(w[G]);return k}return w},Y=o.computed(()=>{const w=p.value!==null?p.value:u.value;return!w||!_.value?w:j(w)}),ie=o.computed(()=>m.value?null:Y.value),v=w=>{if(!w.trim()){u.value=null,c.value="",p.value=null,m.value="";return}try{let k=w;const L=/(:\s*|,\s*|\[\s*)-?\d{16,}/.test(k),G=/(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(k);if(!L&&!G)try{u.value=JSON.parse(k),c.value="",p.value=null,m.value="",o.nextTick(()=>{ie.value!==null&&W()});return}catch{}k=(R=>{let J="",ge=!1,Ee=!1,_e=0;for(;_e<R.length;){const ke=R[_e];if(ge)Ee?Ee=!1:ke==="\\"?Ee=!0:ke==='"'&&(ge=!1),J+=ke,_e++;else if(ke==='"')ge=!0,J+=ke,_e++;else{const De=R.slice(_e);let z=De.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);if(z){J+=z[1]+'{"__protected_number__":"'+z[2]+'"}'+z[3],_e+=z[0].length;continue}if(z=De.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/),z){J+=z[1]+'{"__protected_number__":"'+z[2]+'"}'+z[3],_e+=z[0].length;continue}J+=ke,_e++}}return J})(k),u.value=JSON.parse(k),c.value="",p.value=null,m.value="",o.nextTick(()=>{ie.value!==null&&W()})}catch(k){c.value=k instanceof Error?k.message:"Unknown parsing error",u.value=null,p.value=null,m.value=""}},H=w=>{if(!w||!w.expression.trim()){ee();return}if(!u.value){m.value="No valid JSON data to filter";return}try{let k;if(w.type==="jsonpath")k=we({path:w.expression,json:u.value}),k.length===1&&w.expression.includes("$[")===!1&&!w.expression.endsWith("[*]")?p.value=k[0]:p.value=k;else if(w.type==="js"){const{proxyData:L,indexMap:G}=K(u.value),R=new Function("$",`
|
|
3
3
|
try {
|
|
4
|
-
return ${
|
|
4
|
+
return ${w.expression};
|
|
5
5
|
} catch (error) {
|
|
6
6
|
throw new Error('JavaScript expression error: ' + error.message);
|
|
7
7
|
}
|
|
8
|
-
`)(_);b=S(l.value,R,C),h.value=b}else throw new Error(`Unsupported filter type: ${g.type}`);m.value="",s.nextTick(()=>{x()})}catch(b){m.value=b instanceof Error?b.message:"Filter execution error",h.value=null}},ce=(g,b="root")=>{const _=new Map,C=(R,V)=>{if(R==null)return R;if(typeof R=="object"&&R.__protected_number__!==void 0){const z=parseFloat(R.__protected_number__);return _.set(z,V),z}if(Array.isArray(R)){const z=R.map((re,me)=>{const j=`${V}[${me}]`,De=C(re,j);return _.set(De,j),De});return _.set(z,V),z}if(typeof R=="object"){const z={};for(const re in R)if(Object.prototype.hasOwnProperty.call(R,re)){const me=V==="root"?re:`${V}.${re}`;z[re]=C(R[re],me)}return _.set(z,V),z}return R};return{proxyData:C(g,b),indexMap:_}},S=(g,b,_)=>{if(b===null||typeof b!="object")return b;if(Array.isArray(b))return b.map(R=>{const V=_.get(R);if(V){const z=te(g,V);if(z!==void 0)return z}return S(g,R,_)});const C=_.get(b);if(C){const R=te(g,C);if(R!==void 0)return R}const F={};for(const R in b)Object.prototype.hasOwnProperty.call(b,R)&&(F[R]=S(g,b[R],_));return F},te=(g,b)=>{if(b==="root")return g;const _=[];let C=b.replace(/^root\.?/,"");const F=/([^\[\].]+)|\[(\d+)\]/g;let R;for(;(R=F.exec(C))!==null;)R[1]?_.push(R[1]):R[2]!==void 0&&_.push(parseInt(R[2]));let V=g;for(const z of _){if(V==null)return;V=V[z]}return V},de=()=>{h.value=null,m.value=""};s.watch(()=>u.modelValue,g=>{L(g)},{immediate:!0});const ee=(g,b,_)=>{const C=V=>{if(V===null||typeof V!="object")return V;if(!Array.isArray(V)&&"__protected_number__"in V&&Object.keys(V).length===1)return`__PROTECTED_NUMBER_${V.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(V))return V.map(re=>C(re));const z={};for(const[re,me]of Object.entries(V))z[re]=C(me);return z},F=C(g);return JSON.stringify(F,b,_).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},Ae=(g,b)=>{if(!u.readonly)try{const _=be(l.value,g,b),C=ee(_,null,2);i("update:modelValue",C)}catch(_){console.error("Failed to update JSON:",_)}},be=(g,b,_)=>{if(!b||b==="root")return _;const C=b.split("."),F=ae(g,C.slice(0,-1));let R=F;for(let z=0;z<C.length-1;z++){const re=C[z];re!=="root"&&(Array.isArray(R)?R=R[parseInt(re)]:R=R[re])}const V=C[C.length-1];return V==="root"?_:(Array.isArray(R)?R[parseInt(V)]=_:R[V]=_,F)},X=g=>{v.value.has(g)?v.value.delete(g):v.value.add(g)},x=()=>{const g=new Set,b=(_,C="")=>{_!==null&&typeof _=="object"&&(g.add(C||"root"),Array.isArray(_)?_.forEach((F,R)=>{const V=C?`${C}.${R}`:`${R}`;b(F,V)}):Object.keys(_).forEach(F=>{const R=C?`${C}.${F}`:F;b(_[F],R)}))};b(q.value),v.value=g,i("expand-all")},fe=()=>{v.value=new Set(["root"]),i("collapse-all")},k=async()=>{if(B.value)try{const g=q.value,b=ee(g,null,2);await navigator.clipboard.writeText(b),i("copy-success",b)}catch(g){console.error("Failed to copy JSON:",g),i("copy-error",g instanceof Error?g:new Error("Failed to copy JSON"))}},P=()=>{if(B.value)try{const g=q.value,b=ee(g);i("update:modelValue",b),i("compress",b)}catch(g){console.error("Failed to compress JSON:",g)}},Z=async g=>{try{let b;typeof g=="object"&&g!==null&&!Array.isArray(g)&&"__protected_number__"in g&&Object.keys(g).length===1?b=g.__protected_number__:typeof g=="string"?b=`"${g}"`:b=JSON.stringify(g),await navigator.clipboard.writeText(b)}catch(b){console.error("Failed to copy value:",b)}},Y=(g,b)=>{if(!u.readonly)try{const _=M(l.value,g,b),C=ee(_,null,2);i("update:modelValue",C),D(g,b)}catch(_){console.error("Failed to rename key:",_)}},M=(g,b,_)=>{if(!b||b==="root")return g;const C=b.split("."),F=ae(g,C.slice(0,-1));if(C.length===1){const z=C[0];return F&&typeof F=="object"&&!Array.isArray(F)?pe(F,z,_):F}let R=F;for(let z=0;z<C.length-1;z++){const re=C[z];Array.isArray(R)?R=R[parseInt(re)]:R=R[re]}const V=C[C.length-1];if(!Array.isArray(R)&&R&&typeof R=="object"){const z=pe(R,V,_),re=C.slice(0,-1);re.length>0&&I(F,re,z)}return F},ae=(g,b)=>{if(b.length===0)return g;if(Array.isArray(g)){const _=[...g],C=b[0],F=parseInt(C);return b.length===1||(_[F]=ae(g[F],b.slice(1))),_}else if(g&&typeof g=="object"){const _={...g},C=b[0];return b.length===1||(_[C]=ae(g[C],b.slice(1))),_}return g},pe=(g,b,_)=>{if(!g||typeof g!="object"||Array.isArray(g))return g;const C=Object.keys(g),F={};for(const R of C)R===b?F[_]=g[R]:F[R]=g[R];return F},I=(g,b,_)=>{let C=g;for(let R=0;R<b.length-1;R++){const V=b[R];Array.isArray(C)?C=C[parseInt(V)]:C=C[V]}const F=b[b.length-1];Array.isArray(C)?C[parseInt(F)]=_:C[F]=_},D=(g,b)=>{const _=new Set;v.value.forEach(C=>{if(C===g){const F=g.split(".");F[F.length-1]=b,_.add(F.join("."))}else if(C.startsWith(g+".")){const F=g.split(".");F[F.length-1]=b;const R=F.join("."),V=C.substring(g.length);_.add(R+V)}else _.add(C)}),v.value=_};return t({copyJson:k,compressSource:P,expandAll:x,collapseAll:fe,toggleExpand:X,updateValue:Ae,updateKey:Y,filter:ie,clearFilter:de,isValidJson:()=>B.value,getParsedJson:()=>l.value,getFilteredJson:()=>h.value,getExpandedNodes:()=>v.value,getParseError:()=>p.value,getFilterError:()=>m.value,parseJson:g=>L(g),copyValue:g=>Z(g)}),(g,b)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["json-format",`json-format--${T.value.name}`])},[g.showToolbar?(s.openBlock(),s.createElementBlock("div",Vr,[s.createElementVNode("div",Mr,[s.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:k,disabled:!B.value,title:"Copy JSON"}," 📋 Copy ",8,Ur),s.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:x,disabled:!B.value,title:"Expand All"}," ⬇️ Expand All ",8,qr),s.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:fe,disabled:!B.value,title:"Collapse All"}," ➡️ Collapse All ",8,$r),s.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:P,disabled:!B.value,title:"Compress JSON"}," 📦 Compress ",8,jr)]),s.createElementVNode("div",Xr,[B.value?(s.openBlock(),s.createElementBlock("span",Hr," ✅ Valid JSON ")):(s.openBlock(),s.createElementBlock("span",Gr," ❌ Invalid JSON "))])])):s.createCommentVNode("",!0),s.createElementVNode("div",Kr,[B.value?m.value?(s.openBlock(),s.createElementBlock("div",Yr,[b[1]||(b[1]=s.createElementVNode("h4",null,"Filter Error:",-1)),s.createElementVNode("pre",null,s.toDisplayString(m.value),1)])):(s.openBlock(),s.createElementBlock("div",Wr,[s.createVNode(Ir,{value:q.value,"key-name":"",level:0,expanded:v.value,"is-last":!0,theme:T.value,"onUpdate:value":Ae,onToggleExpand:X,onCopy:Z,"onUpdate:key":Y},null,8,["value","expanded","theme"])])):(s.openBlock(),s.createElementBlock("div",zr,[b[0]||(b[0]=s.createElementVNode("h4",null,"JSON Parse Error:",-1)),s.createElementVNode("pre",null,s.toDisplayString(p.value),1)]))])],2))}}),[["__scopeId","data-v-d3aaf91e"]]);function Qr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vt={},Ft;function Zr(){return Ft||(Ft=1,function(n){var t=n;(function(r){var u="__namespace",i=function(e){return e==null},l=function(e){return e===u||Number.isInteger(e)&&e>=1&&e<=11},p=function(e){return e&&l(e.nodeType)&&typeof e.nodeName=="string"};function v(e){var o=Array.prototype.slice,f=e.length,y=function(N,W){return function(){return W.apply(this,N.concat(o.call(arguments)))}},d=function(){var N=o.call(arguments);return N.length<f?y(N,d):e.apply(this,o.apply(arguments,[0,f]))};return d}var h=function(e,o){for(var f=0;f<o.length;f+=1)e(o[f],f,o)},m=function(e,o,f){var y=o;return h(function(d,N){y=e(y,d,N)},f),y},B=function(e,o){var f=new Array(o.length);return h(function(y,d){f[d]=e(y)},o),f},T=function(e,o){var f=[];return h(function(y,d){e(y,d)&&f.push(y)},o),f},q=function(e,o){for(var f=0;f<e.length;f+=1)if(e[f]===o)return!0;return!1};function L(e){return function(){return e}}function ie(e){return e.toString()}var ce=function(e,o){return o.join(e)},S=function(e,o,f){return e+f+o},te=Array.prototype.concat,de=function(e,o){var f=new J;f.addArray(e);var y=f.toArray();return o?y.reverse():y},ee=32767;function Ae(e){for(var o=[],f=0;f<e.length;f+=ee){var y=e.slice(f,f+ee);o=te.apply(o,y)}return o}function be(e,o){for(var f=Object(e),y=1;y<arguments.length;y++){var d=arguments[y];if(d!=null)for(var N in d)Object.prototype.hasOwnProperty.call(d,N)&&(f[N]=d[N])}return f}var X={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:u};x.prototype=new Object,x.prototype.constructor=x,x.superclass=Object.prototype;function x(){this.init()}x.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new ae(e[0],e[2])},this.reduceActions[5]=function(e){return new pe(e[0],e[2])},this.reduceActions[7]=function(e){return new I(e[0],e[2])},this.reduceActions[8]=function(e){return new D(e[0],e[2])},this.reduceActions[10]=function(e){return new g(e[0],e[2])},this.reduceActions[11]=function(e){return new b(e[0],e[2])},this.reduceActions[12]=function(e){return new _(e[0],e[2])},this.reduceActions[13]=function(e){return new C(e[0],e[2])},this.reduceActions[15]=function(e){return new F(e[0],e[2])},this.reduceActions[16]=function(e){return new R(e[0],e[2])},this.reduceActions[18]=function(e){return new V(e[0],e[2])},this.reduceActions[19]=function(e){return new z(e[0],e[2])},this.reduceActions[20]=function(e){return new re(e[0],e[2])},this.reduceActions[22]=function(e){return new Y(e[1])},this.reduceActions[24]=function(e){return new me(e[0],e[2])},this.reduceActions[25]=function(e){return new j(void 0,void 0,e[0])},this.reduceActions[27]=function(e){return e[0].locationPath=e[2],e[0]},this.reduceActions[28]=function(e){return e[0].locationPath=e[2],e[0].locationPath.steps.unshift(new A(A.DESCENDANTORSELF,U.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new j(e[0],[],void 0)},this.reduceActions[30]=function(e){return se.instance_of(e[0],j)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new j(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new $(e[0])},this.reduceActions[34]=function(e){return new G(e[0])},this.reduceActions[36]=function(e){return new ue(e[0],[])},this.reduceActions[37]=function(e){return new ue(e[0],e[2])},this.reduceActions[38]=function(e){return[e[0]]},this.reduceActions[39]=function(e){return e[2].unshift(e[0]),e[2]},this.reduceActions[43]=function(e){return new we(!0,[])},this.reduceActions[44]=function(e){return e[1].absolute=!0,e[1]},this.reduceActions[46]=function(e){return new we(!1,[e[0]])},this.reduceActions[47]=function(e){return e[0].steps.push(e[2]),e[0]},this.reduceActions[49]=function(e){return new A(e[0],e[1],[])},this.reduceActions[50]=function(e){return new A(A.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new A(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new A(A.CHILD,e[0],e[1])},this.reduceActions[54]=function(e){return[e[0]]},this.reduceActions[55]=function(e){return e[1].unshift(e[0]),e[1]},this.reduceActions[56]=function(e){return e[0]=="ancestor"?A.ANCESTOR:e[0]=="ancestor-or-self"?A.ANCESTORORSELF:e[0]=="attribute"?A.ATTRIBUTE:e[0]=="child"?A.CHILD:e[0]=="descendant"?A.DESCENDANT:e[0]=="descendant-or-self"?A.DESCENDANTORSELF:e[0]=="following"?A.FOLLOWING:e[0]=="following-sibling"?A.FOLLOWINGSIBLING:e[0]=="namespace"?A.NAMESPACE:e[0]=="parent"?A.PARENT:e[0]=="preceding"?A.PRECEDING:e[0]=="preceding-sibling"?A.PRECEDINGSIBLING:e[0]=="self"?A.SELF:-1},this.reduceActions[57]=function(e){return A.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?U.commentTest:e[0]=="text"?U.textTest:e[0]=="processing-instruction"?U.anyPiTest:e[0]=="node"?U.nodeTest:new U(-1,void 0)},this.reduceActions[60]=function(e){return new U.PITest(e[2])},this.reduceActions[61]=function(e){return e[1]},this.reduceActions[63]=function(e){return e[1].absolute=!0,e[1].steps.unshift(new A(A.DESCENDANTORSELF,U.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new A(A.DESCENDANTORSELF,U.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new A(A.SELF,U.nodeTest,[])},this.reduceActions[66]=function(e){return new A(A.PARENT,U.nodeTest,[])},this.reduceActions[67]=function(e){return new ve(e[1])},this.reduceActions[68]=function(e){return U.nameTestAny},this.reduceActions[69]=function(e){return new U.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new U.NameTestQName(e[0])}},x.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],x.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," "," F ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],x.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","456789:;<=>?@ AB CDEFGH IJ"," EFGH IJ "," EFGH IJ "," "," GH IJ ","
GH IJ "," i "," i "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABqCDEFGH IJ "," "," "],x.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],x.DOUBLEDOT=2,x.DOUBLECOLON=3,x.DOUBLESLASH=4,x.NOTEQUAL=5,x.LESSTHANOREQUAL=6,x.GREATERTHANOREQUAL=7,x.AND=8,x.OR=9,x.MOD=10,x.DIV=11,x.MULTIPLYOPERATOR=12,x.FUNCTIONNAME=13,x.AXISNAME=14,x.LITERAL=15,x.NUMBER=16,x.ASTERISKNAMETEST=17,x.QNAME=18,x.NCNAMECOLONASTERISK=19,x.NODETYPE=20,x.PROCESSINGINSTRUCTIONWITHLITERAL=21,x.EQUALS=22,x.LESSTHAN=23,x.GREATERTHAN=24,x.PLUS=25,x.MINUS=26,x.BAR=27,x.SLASH=28,x.LEFTPARENTHESIS=29,x.RIGHTPARENTHESIS=30,x.COMMA=31,x.AT=32,x.LEFTBRACKET=33,x.RIGHTBRACKET=34,x.DOT=35,x.DOLLAR=36,x.prototype.tokenize=function(e){for(var o=[],f=[],y=e+"\0",d=0,N=y.charAt(d++);;){for(;N==" "||N==" "||N=="\r"||N==`
|
|
9
|
-
`;)N=y.charAt(d++);if(N=="\0"||d>=y.length)break;if(N=="("){o.push(x.LEFTPARENTHESIS),f.push(N),N=y.charAt(d++);continue}if(N==")"){o.push(x.RIGHTPARENTHESIS),f.push(N),N=y.charAt(d++);continue}if(N=="["){o.push(x.LEFTBRACKET),f.push(N),N=y.charAt(d++);continue}if(N=="]"){o.push(x.RIGHTBRACKET),f.push(N),N=y.charAt(d++);continue}if(N=="@"){o.push(x.AT),f.push(N),N=y.charAt(d++);continue}if(N==","){o.push(x.COMMA),f.push(N),N=y.charAt(d++);continue}if(N=="|"){o.push(x.BAR),f.push(N),N=y.charAt(d++);continue}if(N=="+"){o.push(x.PLUS),f.push(N),N=y.charAt(d++);continue}if(N=="-"){o.push(x.MINUS),f.push(N),N=y.charAt(d++);continue}if(N=="="){o.push(x.EQUALS),f.push(N),N=y.charAt(d++);continue}if(N=="$"){o.push(x.DOLLAR),f.push(N),N=y.charAt(d++);continue}if(N=="."){if(N=y.charAt(d++),N=="."){o.push(x.DOUBLEDOT),f.push(".."),N=y.charAt(d++);continue}if(N>="0"&&N<="9"){var W="."+N;for(N=y.charAt(d++);N>="0"&&N<="9";)W+=N,N=y.charAt(d++);o.push(x.NUMBER),f.push(W);continue}o.push(x.DOT),f.push(".");continue}if(N=="'"||N=='"'){for(var Ee=N,ye="";d<y.length&&(N=y.charAt(d))!==Ee;)ye+=N,d+=1;if(N!==Ee)throw Ve.fromMessage("Unterminated string literal: "+Ee+ye);d+=1,o.push(x.LITERAL),f.push(ye),N=y.charAt(d++);continue}if(N>="0"&&N<="9"){var W=N;for(N=y.charAt(d++);N>="0"&&N<="9";)W+=N,N=y.charAt(d++);if(N=="."&&y.charAt(d)>="0"&&y.charAt(d)<="9")for(W+=N,W+=y.charAt(d++),N=y.charAt(d++);N>="0"&&N<="9";)W+=N,N=y.charAt(d++);o.push(x.NUMBER),f.push(W);continue}if(N=="*"){if(o.length>0){var Q=o[o.length-1];if(Q!=x.AT&&Q!=x.DOUBLECOLON&&Q!=x.LEFTPARENTHESIS&&Q!=x.LEFTBRACKET&&Q!=x.AND&&Q!=x.OR&&Q!=x.MOD&&Q!=x.DIV&&Q!=x.MULTIPLYOPERATOR&&Q!=x.SLASH&&Q!=x.DOUBLESLASH&&Q!=x.BAR&&Q!=x.PLUS&&Q!=x.MINUS&&Q!=x.EQUALS&&Q!=x.NOTEQUAL&&Q!=x.LESSTHAN&&Q!=x.LESSTHANOREQUAL&&Q!=x.GREATERTHAN&&Q!=x.GREATERTHANOREQUAL){o.push(x.MULTIPLYOPERATOR),f.push(N),N=y.charAt(d++);continue}}o.push(x.ASTERISKNAMETEST),f.push(N),N=y.charAt(d++);continue}if(N==":"&&y.charAt(d)==":"){o.push(x.DOUBLECOLON),f.push("::"),d++,N=y.charAt(d++);continue}if(N=="/"){if(N=y.charAt(d++),N=="/"){o.push(x.DOUBLESLASH),f.push("//"),N=y.charAt(d++);continue}o.push(x.SLASH),f.push("/");continue}if(N=="!"&&y.charAt(d)=="="){o.push(x.NOTEQUAL),f.push("!="),d++,N=y.charAt(d++);continue}if(N=="<"){if(y.charAt(d)=="="){o.push(x.LESSTHANOREQUAL),f.push("<="),d++,N=y.charAt(d++);continue}o.push(x.LESSTHAN),f.push("<"),N=y.charAt(d++);continue}if(N==">"){if(y.charAt(d)=="="){o.push(x.GREATERTHANOREQUAL),f.push(">="),d++,N=y.charAt(d++);continue}o.push(x.GREATERTHAN),f.push(">"),N=y.charAt(d++);continue}if(N=="_"||se.isLetter(N.charCodeAt(0))){var oe=N;for(N=y.charAt(d++);se.isNCNameChar(N.charCodeAt(0));)oe+=N,N=y.charAt(d++);if(o.length>0){var Q=o[o.length-1];if(Q!=x.AT&&Q!=x.DOUBLECOLON&&Q!=x.LEFTPARENTHESIS&&Q!=x.LEFTBRACKET&&Q!=x.AND&&Q!=x.OR&&Q!=x.MOD&&Q!=x.DIV&&Q!=x.MULTIPLYOPERATOR&&Q!=x.SLASH&&Q!=x.DOUBLESLASH&&Q!=x.BAR&&Q!=x.PLUS&&Q!=x.MINUS&&Q!=x.EQUALS&&Q!=x.NOTEQUAL&&Q!=x.LESSTHAN&&Q!=x.LESSTHANOREQUAL&&Q!=x.GREATERTHAN&&Q!=x.GREATERTHANOREQUAL){if(oe=="and"){o.push(x.AND),f.push(oe);continue}if(oe=="or"){o.push(x.OR),f.push(oe);continue}if(oe=="mod"){o.push(x.MOD),f.push(oe);continue}if(oe=="div"){o.push(x.DIV),f.push(oe);continue}}}if(N==":"){if(y.charAt(d)=="*"){o.push(x.NCNAMECOLONASTERISK),f.push(oe+":*"),d++,N=y.charAt(d++);continue}if(y.charAt(d)=="_"||se.isLetter(y.charCodeAt(d))){for(oe+=":",N=y.charAt(d++);se.isNCNameChar(N.charCodeAt(0));)oe+=N,N=y.charAt(d++);if(N=="("){o.push(x.FUNCTIONNAME),f.push(oe);continue}o.push(x.QNAME),f.push(oe);continue}if(y.charAt(d)==":"){o.push(x.AXISNAME),f.push(oe);continue}}if(N=="("){if(oe=="comment"||oe=="text"||oe=="node"){o.push(x.NODETYPE),f.push(oe);continue}if(oe=="processing-instruction"){y.charAt(d)==")"?o.push(x.NODETYPE):o.push(x.PROCESSINGINSTRUCTIONWITHLITERAL),f.push(oe);continue}o.push(x.FUNCTIONNAME),f.push(oe);continue}o.push(x.QNAME),f.push(oe);continue}throw new Error("Unexpected character "+N)}return o.push(1),f.push("[EOF]"),[o,f]},x.SHIFT="s",x.REDUCE="r",x.ACCEPT="a",x.prototype.parse=function(ye){if(!ye)throw new Error("XPath expression unspecified.");if(typeof ye!="string")throw new Error("XPath expression must be a string.");var o,f,y=this.tokenize(ye);if(y!=null){o=y[0],f=y[1];var d=0,N=[],W=[],Ee=[],ye,Q,oe;for(N.push(0),W.push(1),Ee.push("_S"),Q=o[d],oe=f[d++];;)switch(ye=N[N.length-1],x.actionTable[ye].charAt(Q-1)){case x.SHIFT:W.push(-Q),Ee.push(oe),N.push(x.actionTableNumber[ye].charCodeAt(Q-1)-32),Q=o[d],oe=f[d++];break;case x.REDUCE:for(var Fe=x.productions[x.actionTableNumber[ye].charCodeAt(Q-1)-32][1],$e=[],_e=0;_e<Fe;_e++)W.pop(),$e.unshift(Ee.pop()),N.pop();var ze=N[N.length-1];W.push(x.productions[x.actionTableNumber[ye].charCodeAt(Q-1)-32][0]),this.reduceActions[x.actionTableNumber[ye].charCodeAt(Q-1)-32]==null?Ee.push($e[0]):Ee.push(this.reduceActions[x.actionTableNumber[ye].charCodeAt(Q-1)-32]($e)),N.push(x.gotoTable[ze].charCodeAt(x.productions[x.actionTableNumber[ye].charCodeAt(Q-1)-32][0]-2)-33);break;case x.ACCEPT:return new fe(Ee.pop());default:throw new Error("XPath parse error")}}},fe.prototype=new Object,fe.prototype.constructor=fe,fe.superclass=Object.prototype;function fe(e){this.expression=e}fe.prototype.toString=function(){return this.expression.toString()};function k(e,o,f){o in e||(e[o]=f)}fe.prototype.evaluate=function(e){var o=e.expressionContextNode;if(!(i(o)||p(o)))throw new Error("Context node does not appear to be a valid DOM node.");return e.contextNode=e.expressionContextNode,e.contextSize=1,e.contextPosition=1,e.isHtml&&(k(e,"caseInsensitive",!0),k(e,"allowAnyNamespaceForNoPrefix",!0)),k(e,"caseInsensitive",!1),this.expression.evaluate(e)},fe.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",fe.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",P.prototype=new Object,P.prototype.constructor=P,P.superclass=Object.prototype;function P(){}P.prototype.init=function(){},P.prototype.toString=function(){return"<Expression>"},P.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},Z.prototype=new P,Z.prototype.constructor=Z,Z.superclass=P.prototype;function Z(e){arguments.length>0&&this.init(e)}Z.prototype.init=function(e){this.rhs=e},Y.prototype=new Z,Y.prototype.constructor=Y,Y.superclass=Z.prototype;function Y(e){arguments.length>0&&this.init(e)}Y.prototype.init=function(e){Y.superclass.init.call(this,e)},Y.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},Y.prototype.toString=function(){return"-"+this.rhs.toString()},M.prototype=new P,M.prototype.constructor=M,M.superclass=P.prototype;function M(e,o){arguments.length>0&&this.init(e,o)}M.prototype.init=function(e,o){this.lhs=e,this.rhs=o},ae.prototype=new M,ae.prototype.constructor=ae,ae.superclass=M.prototype;function ae(e,o){arguments.length>0&&this.init(e,o)}ae.prototype.init=function(e,o){ae.superclass.init.call(this,e,o)},ae.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},ae.prototype.evaluate=function(e){var o=this.lhs.evaluate(e).bool();return o.booleanValue()?o:this.rhs.evaluate(e).bool()},pe.prototype=new M,pe.prototype.constructor=pe,pe.superclass=M.prototype;function pe(e,o){arguments.length>0&&this.init(e,o)}pe.prototype.init=function(e,o){pe.superclass.init.call(this,e,o)},pe.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},pe.prototype.evaluate=function(e){var o=this.lhs.evaluate(e).bool();return o.booleanValue()?this.rhs.evaluate(e).bool():o},I.prototype=new M,I.prototype.constructor=I,I.superclass=M.prototype;function I(e,o){arguments.length>0&&this.init(e,o)}I.prototype.init=function(e,o){I.superclass.init.call(this,e,o)},I.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},I.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},D.prototype=new M,D.prototype.constructor=D,D.superclass=M.prototype;function D(e,o){arguments.length>0&&this.init(e,o)}D.prototype.init=function(e,o){D.superclass.init.call(this,e,o)},D.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},D.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},g.prototype=new M,g.prototype.constructor=g,g.superclass=M.prototype;function g(e,o){arguments.length>0&&this.init(e,o)}g.prototype.init=function(e,o){g.superclass.init.call(this,e,o)},g.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e))},g.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},b.prototype=new M,b.prototype.constructor=b,b.superclass=M.prototype;function b(e,o){arguments.length>0&&this.init(e,o)}b.prototype.init=function(e,o){b.superclass.init.call(this,e,o)},b.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e))},b.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},_.prototype=new M,_.prototype.constructor=_,_.superclass=M.prototype;function _(e,o){arguments.length>0&&this.init(e,o)}_.prototype.init=function(e,o){_.superclass.init.call(this,e,o)},_.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e))},_.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},C.prototype=new M,C.prototype.constructor=C,C.superclass=M.prototype;function C(e,o){arguments.length>0&&this.init(e,o)}C.prototype.init=function(e,o){C.superclass.init.call(this,e,o)},C.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e))},C.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},F.prototype=new M,F.prototype.constructor=F,F.superclass=M.prototype;function F(e,o){arguments.length>0&&this.init(e,o)}F.prototype.init=function(e,o){F.superclass.init.call(this,e,o)},F.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},F.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},R.prototype=new M,R.prototype.constructor=R,R.superclass=M.prototype;function R(e,o){arguments.length>0&&this.init(e,o)}R.prototype.init=function(e,o){R.superclass.init.call(this,e,o)},R.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},R.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},V.prototype=new M,V.prototype.constructor=V,V.superclass=M.prototype;function V(e,o){arguments.length>0&&this.init(e,o)}V.prototype.init=function(e,o){V.superclass.init.call(this,e,o)},V.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},V.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},z.prototype=new M,z.prototype.constructor=z,z.superclass=M.prototype;function z(e,o){arguments.length>0&&this.init(e,o)}z.prototype.init=function(e,o){z.superclass.init.call(this,e,o)},z.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number())},z.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},re.prototype=new M,re.prototype.constructor=re,re.superclass=M.prototype;function re(e,o){arguments.length>0&&this.init(e,o)}re.prototype.init=function(e,o){re.superclass.init.call(this,e,o)},re.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number())},re.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},me.prototype=new M,me.prototype.constructor=me,me.superclass=M.prototype;function me(e,o){arguments.length>0&&this.init(e,o)}me.prototype.init=function(e,o){me.superclass.init.call(this,e,o)},me.prototype.evaluate=function(e){return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset())},me.prototype.toString=function(){return B(ie,[this.lhs,this.rhs]).join(" | ")},j.prototype=new P,j.prototype.constructor=j,j.superclass=P.prototype;function j(e,o,f){arguments.length>0&&this.init(e,o,f)}j.prototype.init=function(e,o,f){j.superclass.init.call(this),this.filter=e,this.filterPredicates=o,this.locationPath=f};function De(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var Ce=function(e,o,f,y){if(e.length===0)return f;var d=o.extend({});return m(function(N,W){return d.contextSize=N.length,T(function(Ee,ye){return d.contextNode=Ee,d.contextPosition=ye+1,j.predicateMatches(W,d)},N)},de(f,y),e)};j.getRoot=function(e,o){var f=o[0];if(f&&f.nodeType===X.DOCUMENT_NODE)return f;if(e.virtualRoot)return e.virtualRoot;if(!f)throw new Error("Context node not found when determining document root.");var y=f.ownerDocument;if(y)return y;for(var d=f;d.parentNode!=null;)d=d.parentNode;return d};var Ie=function(e){var o=String(e.name);return o==="xmlns"?"":o.substring(0,6)==="xmlns:"?o.substring(6,o.length):null};j.applyStep=function(e,o,f){if(!f)throw new Error("Context node not found when evaluating XPath step: "+e);var y=[];switch(o.contextNode=f,e.axis){case A.ANCESTOR:if(o.contextNode===o.virtualRoot)break;var d;for(o.contextNode.nodeType==X.ATTRIBUTE_NODE?d=j.getOwnerElement(o.contextNode):d=o.contextNode.parentNode;d!=null&&(e.nodeTest.matches(d,o)&&y.push(d),d!==o.virtualRoot);)d=d.parentNode;break;case A.ANCESTORORSELF:for(var d=o.contextNode;d!=null&&(e.nodeTest.matches(d,o)&&y.push(d),d!==o.virtualRoot);d=d.nodeType==X.ATTRIBUTE_NODE?j.getOwnerElement(d):d.parentNode);break;case A.ATTRIBUTE:var N=o.contextNode.attributes;if(N!=null)for(var W=0;W<N.length;W++){var d=N.item(W);e.nodeTest.matches(d,o)&&y.push(d)}break;case A.CHILD:for(var d=o.contextNode.firstChild;d!=null;d=d.nextSibling)e.nodeTest.matches(d,o)&&y.push(d);break;case A.DESCENDANT:for(var oe=[o.contextNode.firstChild];oe.length>0;)for(var d=oe.pop();d!=null;)e.nodeTest.matches(d,o)&&y.push(d),d.firstChild!=null?(oe.push(d.nextSibling),d=d.firstChild):d=d.nextSibling;break;case A.DESCENDANTORSELF:e.nodeTest.matches(o.contextNode,o)&&y.push(o.contextNode);for(var oe=[o.contextNode.firstChild];oe.length>0;)for(var d=oe.pop();d!=null;)e.nodeTest.matches(d,o)&&y.push(d),d.firstChild!=null?(oe.push(d.nextSibling),d=d.firstChild):d=d.nextSibling;break;case A.FOLLOWING:if(o.contextNode===o.virtualRoot)break;var oe=[];o.contextNode.firstChild!=null?oe.unshift(o.contextNode.firstChild):oe.unshift(o.contextNode.nextSibling);for(var d=o.contextNode.parentNode;d!=null&&d.nodeType!=X.DOCUMENT_NODE&&d!==o.virtualRoot;d=d.parentNode)oe.unshift(d.nextSibling);do for(var d=oe.pop();d!=null;)e.nodeTest.matches(d,o)&&y.push(d),d.firstChild!=null?(oe.push(d.nextSibling),d=d.firstChild):d=d.nextSibling;while(oe.length>0);break;case A.FOLLOWINGSIBLING:if(o.contextNode===o.virtualRoot)break;for(var d=o.contextNode.nextSibling;d!=null;d=d.nextSibling)e.nodeTest.matches(d,o)&&y.push(d);break;case A.NAMESPACE:var Ee={};if(o.contextNode.nodeType==X.ELEMENT_NODE){Ee.xml=new Ge("xml",null,fe.XML_NAMESPACE_URI,o.contextNode);for(var d=o.contextNode;d!=null&&d.nodeType==X.ELEMENT_NODE;d=d.parentNode)for(var W=0;W<d.attributes.length;W++){var ye=d.attributes.item(W),Q=Ie(ye);Q!=null&&Ee[Q]==null&&(Ee[Q]=new Ge(Q,ye,ye.value,o.contextNode))}for(var Q in Ee){var f=Ee[Q];e.nodeTest.matches(f,o)&&y.push(f)}}break;case A.PARENT:d=null,o.contextNode!==o.virtualRoot&&(o.contextNode.nodeType==X.ATTRIBUTE_NODE?d=j.getOwnerElement(o.contextNode):d=o.contextNode.parentNode),d!=null&&e.nodeTest.matches(d,o)&&y.push(d);break;case A.PRECEDING:var oe;o.virtualRoot!=null?oe=[o.virtualRoot]:oe=[De(o.contextNode)];e:for(;oe.length>0;)for(var d=oe.pop();d!=null;){if(d==o.contextNode)break e;e.nodeTest.matches(d,o)&&y.unshift(d),d.firstChild!=null?(oe.push(d.nextSibling),d=d.firstChild):d=d.nextSibling}break;case A.PRECEDINGSIBLING:if(o.contextNode===o.virtualRoot)break;for(var d=o.contextNode.previousSibling;d!=null;d=d.previousSibling)e.nodeTest.matches(d,o)&&y.push(d);break;case A.SELF:e.nodeTest.matches(o.contextNode,o)&&y.push(o.contextNode);break}return y};function ke(e,o,f){return Ce(e.predicates,o,j.applyStep(e,o,f),q(H,e.axis))}function He(e,o,f){return Ae(B(ke.bind(null,f,e),o))}j.applySteps=function(e,o,f){return m(He.bind(null,o),f,e)},j.prototype.applyFilter=function(e,o){if(!this.filter)return{nodes:[e.contextNode]};var f=this.filter.evaluate(e);if(!se.instance_of(f,J)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:f}}return{nodes:Ce(this.filterPredicates||[],o,f.toUnsortedArray(),!1)}},j.applyLocationPath=function(e,o,f){if(!e)return f;var y=e.absolute?[j.getRoot(o,f)]:f;return j.applySteps(e.steps,o,y)},j.prototype.evaluate=function(e){var o=be(new Ue,e),f=this.applyFilter(e,o);if("nonNodes"in f)return f.nonNodes;var y=new J;return y.addArray(j.applyLocationPath(this.locationPath,o,f.nodes)),y},j.predicateMatches=function(e,o){var f=e.evaluate(o);return se.instance_of(f,G)?o.contextPosition===f.numberValue():f.booleanValue()},j.predicateString=function(e){return S("[","]",e.toString())},j.predicatesString=function(e){return ce("",B(j.predicateString,e))},j.prototype.toString=function(){if(this.filter!=null){var e=ie(this.filter);return se.instance_of(this.filter,$)?S("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?S("(",")",e)+j.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+ie(this.locationPath):e}return ie(this.locationPath)},j.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var o=e.nodeType==X.DOCUMENT_NODE?e:e.ownerDocument,f=o.getElementsByTagName("*"),y=0;y<f.length;y++)for(var d=f.item(y),N=d.attributes,W=0;W<N.length;W++){var Ee=N.item(W);if(Ee===e)return d}return null},we.prototype=new Object,we.prototype.constructor=we,we.superclass=Object.prototype;function we(e,o){arguments.length>0&&this.init(e,o)}we.prototype.init=function(e,o){this.absolute=e,this.steps=o},we.prototype.toString=function(){return(this.absolute?"/":"")+B(ie,this.steps).join("/")},A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(e,o,f){arguments.length>0&&this.init(e,o,f)}A.prototype.init=function(e,o,f){this.axis=e,this.nodeTest=o,this.predicates=f},A.prototype.toString=function(){return A.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+j.predicatesString(this.predicates)},A.ANCESTOR=0,A.ANCESTORORSELF=1,A.ATTRIBUTE=2,A.CHILD=3,A.DESCENDANT=4,A.DESCENDANTORSELF=5,A.FOLLOWING=6,A.FOLLOWINGSIBLING=7,A.NAMESPACE=8,A.PARENT=9,A.PRECEDING=10,A.PRECEDINGSIBLING=11,A.SELF=12,A.STEPNAMES=m(function(e,o){return e[o[0]]=o[1],e},{},[[A.ANCESTOR,"ancestor"],[A.ANCESTORORSELF,"ancestor-or-self"],[A.ATTRIBUTE,"attribute"],[A.CHILD,"child"],[A.DESCENDANT,"descendant"],[A.DESCENDANTORSELF,"descendant-or-self"],[A.FOLLOWING,"following"],[A.FOLLOWINGSIBLING,"following-sibling"],[A.NAMESPACE,"namespace"],[A.PARENT,"parent"],[A.PRECEDING,"preceding"],[A.PRECEDINGSIBLING,"preceding-sibling"],[A.SELF,"self"]]);var H=[A.ANCESTOR,A.ANCESTORORSELF,A.PARENT,A.PRECEDING,A.PRECEDINGSIBLING];U.prototype=new Object,U.prototype.constructor=U,U.superclass=Object.prototype;function U(e,o){arguments.length>0&&this.init(e,o)}U.prototype.init=function(e,o){this.type=e,this.value=o},U.prototype.toString=function(){return"<unknown nodetest type>"},U.prototype.matches=function(e,o){console.warn("unknown node test type")},U.NAMETESTANY=0,U.NAMETESTPREFIXANY=1,U.NAMETESTQNAME=2,U.COMMENT=3,U.TEXT=4,U.PI=5,U.NODE=6,U.isNodeType=function(e){return function(o){return q(e,o.nodeType)}},U.makeNodeTestType=function(e,o,f){var y=f||function(){};return y.prototype=new U(e),y.prototype.constructor=y,be(y.prototype,o),y},U.makeNodeTypeTest=function(e,o,f){return new(U.makeNodeTestType(e,{matches:U.isNodeType(o),toString:L(f)}))},U.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},U.isElementOrAttribute=U.isNodeType([1,2]),U.nameSpaceMatches=function(e,o,f){var y=f.namespaceURI||"";if(!e)return!y||o.allowAnyNamespaceForNoPrefix&&!U.hasPrefix(f);var d=o.namespaceResolver.getNamespace(e,o.expressionContextNode);if(d==null)throw new Error("Cannot resolve QName "+e);return d===y},U.localNameMatches=function(e,o,f){var y=f.localName||f.nodeName;return o.caseInsensitive?e.toLowerCase()===y.toLowerCase():e===y},U.NameTestPrefixAny=U.makeNodeTestType(U.NAMETESTPREFIXANY,{matches:function(e,o){return U.isElementOrAttribute(e)&&U.nameSpaceMatches(this.prefix,o,e)},toString:function(){return this.prefix+":*"}},function(o){this.prefix=o}),U.NameTestQName=U.makeNodeTestType(U.NAMETESTQNAME,{matches:function(e,o){return U.isNodeType([X.ELEMENT_NODE,X.ATTRIBUTE_NODE,X.NAMESPACE_NODE])(e)&&U.nameSpaceMatches(this.prefix,o,e)&&U.localNameMatches(this.localName,o,e)},toString:function(){return this.name}},function(o){var f=o.split(":");this.name=o,this.prefix=f.length>1?f[0]:null,this.localName=f[f.length>1?1:0]}),U.PITest=U.makeNodeTestType(U.PI,{matches:function(e,o){return U.isNodeType([X.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return S('processing-instruction("','")',this.name)}},function(e){this.name=e}),U.nameTestAny=U.makeNodeTypeTest(U.NAMETESTANY,[X.ELEMENT_NODE,X.ATTRIBUTE_NODE,X.NAMESPACE_NODE],"*"),U.textTest=U.makeNodeTypeTest(U.TEXT,[X.TEXT_NODE,X.CDATA_SECTION_NODE],"text()"),U.commentTest=U.makeNodeTypeTest(U.COMMENT,[X.COMMENT_NODE],"comment()"),U.nodeTest=U.makeNodeTypeTest(U.NODE,[X.ELEMENT_NODE,X.ATTRIBUTE_NODE,X.TEXT_NODE,X.CDATA_SECTION_NODE,X.PROCESSING_INSTRUCTION_NODE,X.COMMENT_NODE,X.DOCUMENT_NODE],"node()"),U.anyPiTest=U.makeNodeTypeTest(U.PI,[X.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),ve.prototype=new P,ve.prototype.constructor=ve,ve.superclass=P.prototype;function ve(e){arguments.length>0&&this.init(e)}ve.prototype.init=function(e){this.variable=e},ve.prototype.toString=function(){return"$"+this.variable},ve.prototype.evaluate=function(e){var o=se.resolveQName(this.variable,e.namespaceResolver,e.contextNode,!1);if(o[0]==null)throw new Error("Cannot resolve QName "+fn);var f=e.variableResolver.getVariable(o[1],o[0]);if(!f)throw Ve.fromMessage("Undeclared variable: "+this.toString());return f},ue.prototype=new P,ue.prototype.constructor=ue,ue.superclass=P.prototype;function ue(e,o){arguments.length>0&&this.init(e,o)}ue.prototype.init=function(e,o){this.functionName=e,this.arguments=o},ue.prototype.toString=function(){for(var e=this.functionName+"(",o=0;o<this.arguments.length;o++)o>0&&(e+=", "),e+=this.arguments[o].toString();return e+")"},ue.prototype.evaluate=function(e){var o=Re.getFunctionFromContext(this.functionName,e);if(!o)throw new Error("Unknown function "+this.functionName);var f=[e].concat(this.arguments);return o.apply(e.functionResolver.thisArg,f)};var ne=new Object;ne.equals=function(e,o){return e.equals(o)},ne.notequal=function(e,o){return e.notequal(o)},ne.lessthan=function(e,o){return e.lessthan(o)},ne.greaterthan=function(e,o){return e.greaterthan(o)},ne.lessthanorequal=function(e,o){return e.lessthanorequal(o)},ne.greaterthanorequal=function(e,o){return e.greaterthanorequal(o)},$.prototype=new P,$.prototype.constructor=$,$.superclass=P.prototype;function $(e){arguments.length>0&&this.init(e)}$.prototype.init=function(e){this.str=String(e)},$.prototype.toString=function(){return this.str},$.prototype.evaluate=function(e){return this},$.prototype.string=function(){return this},$.prototype.number=function(){return new G(this.str)},$.prototype.bool=function(){return new le(this.str)},$.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},$.prototype.stringValue=function(){return this.str},$.prototype.numberValue=function(){return this.number().numberValue()},$.prototype.booleanValue=function(){return this.bool().booleanValue()},$.prototype.equals=function(e){return se.instance_of(e,le)?this.bool().equals(e):se.instance_of(e,G)?this.number().equals(e):se.instance_of(e,J)?e.compareWithString(this,ne.equals):new le(this.str==e.str)},$.prototype.notequal=function(e){return se.instance_of(e,le)?this.bool().notequal(e):se.instance_of(e,G)?this.number().notequal(e):se.instance_of(e,J)?e.compareWithString(this,ne.notequal):new le(this.str!=e.str)},$.prototype.lessthan=function(e){return this.number().lessthan(e)},$.prototype.greaterthan=function(e){return this.number().greaterthan(e)},$.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},$.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},G.prototype=new P,G.prototype.constructor=G,G.superclass=P.prototype;function G(e){arguments.length>0&&this.init(e)}G.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},G.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,G.prototype.parse=function(e){return this.numberFormat.test(e)?parseFloat(e):Number.NaN};function rt(e){for(var o=e.split("e-"),f=o[0].replace(".",""),y=Number(o[1]),d=0;d<y-1;d+=1)f="0"+f;return"0."+f}function lt(e){for(var o=e.split("e"),f=o[0].replace(".",""),y=Number(o[1]),d=y+1-f.length,N=0;N<d;N+=1)f+="0";return f}G.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?rt(e):e.indexOf("e")!==-1?lt(e):e},G.prototype.evaluate=function(e){return this},G.prototype.string=function(){return new $(this.toString())},G.prototype.number=function(){return this},G.prototype.bool=function(){return new le(this.num)},G.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},G.prototype.stringValue=function(){return this.string().stringValue()},G.prototype.numberValue=function(){return this.num},G.prototype.booleanValue=function(){return this.bool().booleanValue()},G.prototype.negate=function(){return new G(-this.num)},G.prototype.equals=function(e){return se.instance_of(e,le)?this.bool().equals(e):se.instance_of(e,$)?this.equals(e.number()):se.instance_of(e,J)?e.compareWithNumber(this,ne.equals):new le(this.num==e.num)},G.prototype.notequal=function(e){return se.instance_of(e,le)?this.bool().notequal(e):se.instance_of(e,$)?this.notequal(e.number()):se.instance_of(e,J)?e.compareWithNumber(this,ne.notequal):new le(this.num!=e.num)},G.prototype.lessthan=function(e){return se.instance_of(e,J)?e.compareWithNumber(this,ne.greaterthan):se.instance_of(e,le)||se.instance_of(e,$)?this.lessthan(e.number()):new le(this.num<e.num)},G.prototype.greaterthan=function(e){return se.instance_of(e,J)?e.compareWithNumber(this,ne.lessthan):se.instance_of(e,le)||se.instance_of(e,$)?this.greaterthan(e.number()):new le(this.num>e.num)},G.prototype.lessthanorequal=function(e){return se.instance_of(e,J)?e.compareWithNumber(this,ne.greaterthanorequal):se.instance_of(e,le)||se.instance_of(e,$)?this.lessthanorequal(e.number()):new le(this.num<=e.num)},G.prototype.greaterthanorequal=function(e){return se.instance_of(e,J)?e.compareWithNumber(this,ne.lessthanorequal):se.instance_of(e,le)||se.instance_of(e,$)?this.greaterthanorequal(e.number()):new le(this.num>=e.num)},G.prototype.plus=function(e){return new G(this.num+e.num)},G.prototype.minus=function(e){return new G(this.num-e.num)},G.prototype.multiply=function(e){return new G(this.num*e.num)},G.prototype.div=function(e){return new G(this.num/e.num)},G.prototype.mod=function(e){return new G(this.num%e.num)},le.prototype=new P,le.prototype.constructor=le,le.superclass=P.prototype;function le(e){arguments.length>0&&this.init(e)}le.prototype.init=function(e){this.b=!!e},le.prototype.toString=function(){return this.b.toString()},le.prototype.evaluate=function(e){return this},le.prototype.string=function(){return new $(this.b)},le.prototype.number=function(){return new G(this.b)},le.prototype.bool=function(){return this},le.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},le.prototype.stringValue=function(){return this.string().stringValue()},le.prototype.numberValue=function(){return this.number().numberValue()},le.prototype.booleanValue=function(){return this.b},le.prototype.not=function(){return new le(!this.b)},le.prototype.equals=function(e){return se.instance_of(e,$)||se.instance_of(e,G)?this.equals(e.bool()):se.instance_of(e,J)?e.compareWithBoolean(this,ne.equals):new le(this.b==e.b)},le.prototype.notequal=function(e){return se.instance_of(e,$)||se.instance_of(e,G)?this.notequal(e.bool()):se.instance_of(e,J)?e.compareWithBoolean(this,ne.notequal):new le(this.b!=e.b)},le.prototype.lessthan=function(e){return this.number().lessthan(e)},le.prototype.greaterthan=function(e){return this.number().greaterthan(e)},le.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},le.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},le.true_=new le(!0),le.false_=new le(!1),Se.prototype=new Object,Se.prototype.constructor=Se,Se.superclass=Object.prototype;function Se(e){this.init(e)}Se.prototype.init=function(e){this.left=null,this.right=null,this.node=e,this.depth=1},Se.prototype.balance=function(){var e=this.left==null?0:this.left.depth,o=this.right==null?0:this.right.depth;if(e>o+1){var f=this.left.left==null?0:this.left.left.depth,y=this.left.right==null?0:this.left.right.depth;f<y&&this.left.rotateRR(),this.rotateLL()}else if(e+1<o){var d=this.right.right==null?0:this.right.right.depth,N=this.right.left==null?0:this.right.left.depth;N>d&&this.right.rotateLL(),this.rotateRR()}},Se.prototype.rotateLL=function(){var e=this.node,o=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=o,this.right.node=e,this.right.updateInNewLocation(),this.updateInNewLocation()},Se.prototype.rotateRR=function(){var e=this.node,o=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=o,this.left.node=e,this.left.updateInNewLocation(),this.updateInNewLocation()},Se.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Se.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function mt(e,o){if(e===o)return 0;if(e.compareDocumentPosition){var f=e.compareDocumentPosition(o);return f&1||f&10?1:f&20?-1:0}for(var y=0,d=0,N=e;N!=null;N=N.parentNode||N.ownerElement)y++;for(var W=o;W!=null;W=W.parentNode||W.ownerElement)d++;if(y>d){for(;y>d;)e=e.parentNode||e.ownerElement,y--;if(e===o)return 1}else if(d>y){for(;d>y;)o=o.parentNode||o.ownerElement,d--;if(e===o)return-1}for(var Ee=e.parentNode||e.ownerElement,ye=o.parentNode||o.ownerElement;Ee!==ye;)e=Ee,o=ye,Ee=e.parentNode||e.ownerElement,ye=o.parentNode||o.ownerElement;var Q=gt(e),oe=gt(o);if(Q&&!oe)return-1;if(!Q&&oe)return 1;if(e.isXPathNamespace){if(e.nodeValue===fe.XML_NAMESPACE_URI||!o.isXPathNamespace)return-1;if(o.nodeValue===fe.XML_NAMESPACE_URI)return 1}else if(o.isXPathNamespace)return 1;if(Ee)for(var Fe=Q?Ee.attributes:Ee.childNodes,$e=Fe.length,_e=e.baseNode||e,ze=o.baseNode||o,Xe=0;Xe<$e;Xe+=1){var nt=Fe[Xe];if(nt===_e)return-1;if(nt===ze)return 1}throw new Error("Unexpected: could not determine node order")}Se.prototype.add=function(e){if(e===this.node)return!1;var o=mt(e,this.node),f=!1;return o==-1?this.left==null?(this.left=new Se(e),f=!0):(f=this.left.add(e),f&&this.balance()):o==1&&(this.right==null?(this.right=new Se(e),f=!0):(f=this.right.add(e),f&&this.balance())),f&&this.getDepthFromChildren(),f},J.prototype=new P,J.prototype.constructor=J,J.superclass=P.prototype;function J(){this.init()}J.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},J.prototype.toString=function(){var e=this.first();return e==null?"":this.stringForNode(e)},J.prototype.evaluate=function(e){return this},J.prototype.string=function(){return new $(this.toString())},J.prototype.stringValue=function(){return this.toString()},J.prototype.number=function(){return new G(this.string())},J.prototype.numberValue=function(){return Number(this.string())},J.prototype.bool=function(){return new le(this.booleanValue())},J.prototype.booleanValue=function(){return!!this.size},J.prototype.nodeset=function(){return this},J.prototype.stringForNode=function(e){return e.nodeType==X.DOCUMENT_NODE||e.nodeType==X.ELEMENT_NODE||e.nodeType===X.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===X.ATTRIBUTE_NODE?e.value||e.nodeValue:e.isNamespaceNode?e.namespace:e.nodeValue},J.prototype.stringForContainerNode=function(e){for(var o="",f=e.firstChild;f!=null;f=f.nextSibling){var y=f.nodeType;(y===1||y===3||y===4||y===9||y===11)&&(o+=this.stringForNode(f))}return o},J.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new Se(this.nodes[0]);for(var e=1;e<this.nodes.length;e+=1)this.tree.add(this.nodes[e])}return this.tree},J.prototype.first=function(){var e=this.buildTree();if(e==null)return null;for(;e.left!=null;)e=e.left;return e.node},J.prototype.add=function(e){for(var o=0;o<this.nodes.length;o+=1)if(e===this.nodes[o])return;this.tree=null,this.nodes.push(e),this.size+=1},J.prototype.addArray=function(e){var o=this;h(function(f){o.add(f)},e)},J.prototype.toArray=function(){var e=[];return this.toArrayRec(this.buildTree(),e),e},J.prototype.toArrayRec=function(e,o){e!=null&&(this.toArrayRec(e.left,o),o.push(e.node),this.toArrayRec(e.right,o))},J.prototype.toUnsortedArray=function(){return this.nodes.slice()},J.prototype.compareWithString=function(e,o){for(var f=this.toUnsortedArray(),y=0;y<f.length;y++){var d=f[y],N=new $(this.stringForNode(d)),W=o(N,e);if(W.booleanValue())return W}return new le(!1)},J.prototype.compareWithNumber=function(e,o){for(var f=this.toUnsortedArray(),y=0;y<f.length;y++){var d=f[y],N=new G(this.stringForNode(d)),W=o(N,e);if(W.booleanValue())return W}return new le(!1)},J.prototype.compareWithBoolean=function(e,o){return o(this.bool(),e)},J.prototype.compareWithNodeSet=function(e,o){for(var f=this.toUnsortedArray(),y=function(Ee,ye){return o(ye,Ee)},d=0;d<f.length;d++){var N=new $(this.stringForNode(f[d])),W=e.compareWithString(N,y);if(W.booleanValue())return W}return new le(!1)},J.compareWith=v(function(e,o){return se.instance_of(o,$)?this.compareWithString(o,e):se.instance_of(o,G)?this.compareWithNumber(o,e):se.instance_of(o,le)?this.compareWithBoolean(o,e):this.compareWithNodeSet(o,e)}),J.prototype.equals=J.compareWith(ne.equals),J.prototype.notequal=J.compareWith(ne.notequal),J.prototype.lessthan=J.compareWith(ne.lessthan),J.prototype.greaterthan=J.compareWith(ne.greaterthan),J.prototype.lessthanorequal=J.compareWith(ne.lessthanorequal),J.prototype.greaterthanorequal=J.compareWith(ne.greaterthanorequal),J.prototype.union=function(e){var o=new J;return o.addArray(this.toUnsortedArray()),o.addArray(e.toUnsortedArray()),o},Ge.prototype=new Object,Ge.prototype.constructor=Ge,Ge.superclass=Object.prototype;function Ge(e,o,f,y){this.isXPathNamespace=!0,this.baseNode=o,this.ownerDocument=y.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=f,this.ownerElement=y,this.nodeType=X.NAMESPACE_NODE}Ge.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},Ue.prototype=new Object,Ue.prototype.constructor=Ue,Ue.superclass=Object.prototype;function Ue(e,o,f){this.variableResolver=e??new je,this.namespaceResolver=o??new qe,this.functionResolver=f??new Re}Ue.prototype.extend=function(e){return be(new Ue,this,e)},je.prototype=new Object,je.prototype.constructor=je,je.superclass=Object.prototype;function je(){}je.prototype.getVariable=function(e,o){return null},Re.prototype=new Object,Re.prototype.constructor=Re,Re.superclass=Object.prototype;function Re(e){this.thisArg=e??he,this.functions=new Object,this.addStandardFunctions()}Re.prototype.addStandardFunctions=function(){this.functions["{}last"]=he.last,this.functions["{}position"]=he.position,this.functions["{}count"]=he.count,this.functions["{}id"]=he.id,this.functions["{}local-name"]=he.localName,this.functions["{}namespace-uri"]=he.namespaceURI,this.functions["{}name"]=he.name,this.functions["{}string"]=he.string,this.functions["{}concat"]=he.concat,this.functions["{}starts-with"]=he.startsWith,this.functions["{}contains"]=he.contains,this.functions["{}substring-before"]=he.substringBefore,this.functions["{}substring-after"]=he.substringAfter,this.functions["{}substring"]=he.substring,this.functions["{}string-length"]=he.stringLength,this.functions["{}normalize-space"]=he.normalizeSpace,this.functions["{}translate"]=he.translate,this.functions["{}boolean"]=he.boolean_,this.functions["{}not"]=he.not,this.functions["{}true"]=he.true_,this.functions["{}false"]=he.false_,this.functions["{}lang"]=he.lang,this.functions["{}number"]=he.number,this.functions["{}sum"]=he.sum,this.functions["{}floor"]=he.floor,this.functions["{}ceiling"]=he.ceiling,this.functions["{}round"]=he.round},Re.prototype.addFunction=function(e,o,f){this.functions["{"+e+"}"+o]=f},Re.getFunctionFromContext=function(e,o){var f=se.resolveQName(e,o.namespaceResolver,o.contextNode,!1);if(f[0]===null)throw new Error("Cannot resolve QName "+name);return o.functionResolver.getFunction(f[1],f[0])},Re.prototype.getFunction=function(e,o){return this.functions["{"+o+"}"+e]},qe.prototype=new Object,qe.prototype.constructor=qe,qe.superclass=Object.prototype;function qe(){}qe.prototype.getNamespace=function(e,o){if(e=="xml")return fe.XML_NAMESPACE_URI;if(e=="xmlns")return fe.XMLNS_NAMESPACE_URI;for(o.nodeType==X.DOCUMENT_NODE?o=o.documentElement:o.nodeType==X.ATTRIBUTE_NODE?o=j.getOwnerElement(o):o.nodeType!=X.ELEMENT_NODE&&(o=o.parentNode);o!=null&&o.nodeType==X.ELEMENT_NODE;){for(var f=o.attributes,y=0;y<f.length;y++){var d=f.item(y),N=d.name||d.nodeName;if(N==="xmlns"&&e===""||N==="xmlns:"+e)return String(d.value||d.nodeValue)}o=o.parentNode}return null};var he=new Object;he.last=function(e){if(arguments.length!=1)throw new Error("Function last expects ()");return new G(e.contextSize)},he.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new G(e.contextPosition)},he.count=function(){var e=arguments[0],o;if(arguments.length!=2||!se.instance_of(o=arguments[1].evaluate(e),J))throw new Error("Function count expects (node-set)");return new G(o.size)},he.id=function(){var e=arguments[0],o;if(arguments.length!=2)throw new Error("Function id expects (object)");o=arguments[1].evaluate(e),se.instance_of(o,J)?o=o.toArray().join(" "):o=o.stringValue();for(var f=o.split(/[\x0d\x0a\x09\x20]+/),y=new J,d=e.contextNode.nodeType==X.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,N=0;N<f.length;N++){var W;d.getElementById?W=d.getElementById(f[N]):W=se.getElementById(d,f[N]),W!=null&&y.add(W)}return y},he.localName=function(e,o){var f;if(arguments.length==1)f=e.contextNode;else if(arguments.length==2)f=o.evaluate(e).first();else throw new Error("Function local-name expects (node-set?)");return f==null?new $(""):new $(f.localName||f.baseName||f.target||f.nodeName||"")},he.namespaceURI=function(){var e=arguments[0],o;if(arguments.length==1)o=e.contextNode;else if(arguments.length==2)o=arguments[1].evaluate(e).first();else throw new Error("Function namespace-uri expects (node-set?)");return o==null?new $(""):new $(o.namespaceURI||"")},he.name=function(){var e=arguments[0],o;if(arguments.length==1)o=e.contextNode;else if(arguments.length==2)o=arguments[1].evaluate(e).first();else throw new Error("Function name expects (node-set?)");return o==null?new $(""):o.nodeType==X.ELEMENT_NODE?new $(o.nodeName):o.nodeType==X.ATTRIBUTE_NODE?new $(o.name||o.nodeName):o.nodeType===X.PROCESSING_INSTRUCTION_NODE?new $(o.target||o.nodeName):o.localName==null?new $(""):new $(o.localName)},he.string=function(){var e=arguments[0];if(arguments.length==1)return new $(J.prototype.stringForNode(e.contextNode));if(arguments.length==2)return arguments[1].evaluate(e).string();throw new Error("Function string expects (object?)")},he.concat=function(e){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var o="",f=1;f<arguments.length;f++)o+=arguments[f].evaluate(e).stringValue();return new $(o)},he.startsWith=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var o=arguments[1].evaluate(e).stringValue(),f=arguments[2].evaluate(e).stringValue();return new le(o.substring(0,f.length)==f)},he.contains=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var o=arguments[1].evaluate(e).stringValue(),f=arguments[2].evaluate(e).stringValue();return new le(o.indexOf(f)!==-1)},he.substringBefore=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var o=arguments[1].evaluate(e).stringValue(),f=arguments[2].evaluate(e).stringValue();return new $(o.substring(0,o.indexOf(f)))},he.substringAfter=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var o=arguments[1].evaluate(e).stringValue(),f=arguments[2].evaluate(e).stringValue();if(f.length==0)return new $(o);var y=o.indexOf(f);return y==-1?new $(""):new $(o.substring(y+f.length))},he.substring=function(){var e=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var o=arguments[1].evaluate(e).stringValue(),f=Math.round(arguments[2].evaluate(e).numberValue())-1,y=arguments.length==4?f+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new $(o.substring(f,y))},he.stringLength=function(){var e=arguments[0],o;if(arguments.length==1)o=J.prototype.stringForNode(e.contextNode);else if(arguments.length==2)o=arguments[1].evaluate(e).stringValue();else throw new Error("Function string-length expects (string?)");return new G(o.length)},he.normalizeSpace=function(){var e=arguments[0],o;if(arguments.length==1)o=J.prototype.stringForNode(e.contextNode);else if(arguments.length==2)o=arguments[1].evaluate(e).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var f=0,y=o.length-1;se.isSpace(o.charCodeAt(y));)y--;for(var d="";f<=y&&se.isSpace(o.charCodeAt(f));)f++;for(;f<=y;)if(se.isSpace(o.charCodeAt(f)))for(d+=" ";f<=y&&se.isSpace(o.charCodeAt(f));)f++;else d+=o.charAt(f),f++;return new $(d)},he.translate=function(e,o,f,y){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var d=o.evaluate(e).stringValue(),N=f.evaluate(e).stringValue(),W=y.evaluate(e).stringValue(),Ee=m(function(Q,oe,Fe){return oe in Q||(Q[oe]=Fe>W.length?"":W[Fe]),Q},{},N),ye=ce("",B(function(Q){return Q in Ee?Ee[Q]:Q},d));return new $(ye)},he.boolean_=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(e).bool()},he.not=function(e,o){if(arguments.length!=2)throw new Error("Function not expects (object)");return o.evaluate(e).bool().not()},he.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return le.true_},he.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return le.false_},he.lang=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var o,f=e.contextNode;f!=null&&f.nodeType!=X.DOCUMENT_NODE;f=f.parentNode){var y=f.getAttributeNS(fe.XML_NAMESPACE_URI,"lang");if(y!=null){o=String(y);break}}if(o==null)return le.false_;var d=arguments[1].evaluate(e).stringValue();return new le(o.substring(0,d.length)==d&&(o.length==d.length||o.charAt(d.length)=="-"))},he.number=function(){var e=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new G(J.prototype.stringForNode(e.contextNode)):arguments[1].evaluate(e).number()},he.sum=function(){var e=arguments[0],o;if(arguments.length!=2||!se.instance_of(o=arguments[1].evaluate(e),J))throw new Error("Function sum expects (node-set)");o=o.toUnsortedArray();for(var f=0,y=0;y<o.length;y++)f+=new G(J.prototype.stringForNode(o[y])).numberValue();return new G(f)},he.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new G(Math.floor(arguments[1].evaluate(e).numberValue()))},he.ceiling=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new G(Math.ceil(arguments[1].evaluate(e).numberValue()))},he.round=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new G(Math.round(arguments[1].evaluate(e).numberValue()))};var se=new Object,gt=function(e){return e&&(e.nodeType===X.ATTRIBUTE_NODE||e.ownerElement||e.isXPathNamespace)};se.splitQName=function(e){var o=e.indexOf(":");return o==-1?[null,e]:[e.substring(0,o),e.substring(o+1)]},se.resolveQName=function(e,o,f,y){var d=se.splitQName(e);return d[0]!=null?d[0]=o.getNamespace(d[0],f):y?(d[0]=o.getNamespace("",f),d[0]==null&&(d[0]="")):d[0]="",d},se.isSpace=function(e){return e==9||e==13||e==10||e==32},se.isLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=255||e>=256&&e<=305||e>=308&&e<=318||e>=321&&e<=328||e>=330&&e<=382||e>=384&&e<=451||e>=461&&e<=496||e>=500&&e<=501||e>=506&&e<=535||e>=592&&e<=680||e>=699&&e<=705||e==902||e>=904&&e<=906||e==908||e>=910&&e<=929||e>=931&&e<=974||e>=976&&e<=982||e==986||e==988||e==990||e==992||e>=994&&e<=1011||e>=1025&&e<=1036||e>=1038&&e<=1103||e>=1105&&e<=1116||e>=1118&&e<=1153||e>=1168&&e<=1220||e>=1223&&e<=1224||e>=1227&&e<=1228||e>=1232&&e<=1259||e>=1262&&e<=1269||e>=1272&&e<=1273||e>=1329&&e<=1366||e==1369||e>=1377&&e<=1414||e>=1488&&e<=1514||e>=1520&&e<=1522||e>=1569&&e<=1594||e>=1601&&e<=1610||e>=1649&&e<=1719||e>=1722&&e<=1726||e>=1728&&e<=1742||e>=1744&&e<=1747||e==1749||e>=1765&&e<=1766||e>=2309&&e<=2361||e==2365||e>=2392&&e<=2401||e>=2437&&e<=2444||e>=2447&&e<=2448||e>=2451&&e<=2472||e>=2474&&e<=2480||e==2482||e>=2486&&e<=2489||e>=2524&&e<=2525||e>=2527&&e<=2529||e>=2544&&e<=2545||e>=2565&&e<=2570||e>=2575&&e<=2576||e>=2579&&e<=2600||e>=2602&&e<=2608||e>=2610&&e<=2611||e>=2613&&e<=2614||e>=2616&&e<=2617||e>=2649&&e<=2652||e==2654||e>=2674&&e<=2676||e>=2693&&e<=2699||e==2701||e>=2703&&e<=2705||e>=2707&&e<=2728||e>=2730&&e<=2736||e>=2738&&e<=2739||e>=2741&&e<=2745||e==2749||e==2784||e>=2821&&e<=2828||e>=2831&&e<=2832||e>=2835&&e<=2856||e>=2858&&e<=2864||e>=2866&&e<=2867||e>=2870&&e<=2873||e==2877||e>=2908&&e<=2909||e>=2911&&e<=2913||e>=2949&&e<=2954||e>=2958&&e<=2960||e>=2962&&e<=2965||e>=2969&&e<=2970||e==2972||e>=2974&&e<=2975||e>=2979&&e<=2980||e>=2984&&e<=2986||e>=2990&&e<=2997||e>=2999&&e<=3001||e>=3077&&e<=3084||e>=3086&&e<=3088||e>=3090&&e<=3112||e>=3114&&e<=3123||e>=3125&&e<=3129||e>=3168&&e<=3169||e>=3205&&e<=3212||e>=3214&&e<=3216||e>=3218&&e<=3240||e>=3242&&e<=3251||e>=3253&&e<=3257||e==3294||e>=3296&&e<=3297||e>=3333&&e<=3340||e>=3342&&e<=3344||e>=3346&&e<=3368||e>=3370&&e<=3385||e>=3424&&e<=3425||e>=3585&&e<=3630||e==3632||e>=3634&&e<=3635||e>=3648&&e<=3653||e>=3713&&e<=3714||e==3716||e>=3719&&e<=3720||e==3722||e==3725||e>=3732&&e<=3735||e>=3737&&e<=3743||e>=3745&&e<=3747||e==3749||e==3751||e>=3754&&e<=3755||e>=3757&&e<=3758||e==3760||e>=3762&&e<=3763||e==3773||e>=3776&&e<=3780||e>=3904&&e<=3911||e>=3913&&e<=3945||e>=4256&&e<=4293||e>=4304&&e<=4342||e==4352||e>=4354&&e<=4355||e>=4357&&e<=4359||e==4361||e>=4363&&e<=4364||e>=4366&&e<=4370||e==4412||e==4414||e==4416||e==4428||e==4430||e==4432||e>=4436&&e<=4437||e==4441||e>=4447&&e<=4449||e==4451||e==4453||e==4455||e==4457||e>=4461&&e<=4462||e>=4466&&e<=4467||e==4469||e==4510||e==4520||e==4523||e>=4526&&e<=4527||e>=4535&&e<=4536||e==4538||e>=4540&&e<=4546||e==4587||e==4592||e==4601||e>=7680&&e<=7835||e>=7840&&e<=7929||e>=7936&&e<=7957||e>=7960&&e<=7965||e>=7968&&e<=8005||e>=8008&&e<=8013||e>=8016&&e<=8023||e==8025||e==8027||e==8029||e>=8031&&e<=8061||e>=8064&&e<=8116||e>=8118&&e<=8124||e==8126||e>=8130&&e<=8132||e>=8134&&e<=8140||e>=8144&&e<=8147||e>=8150&&e<=8155||e>=8160&&e<=8172||e>=8178&&e<=8180||e>=8182&&e<=8188||e==8486||e>=8490&&e<=8491||e==8494||e>=8576&&e<=8578||e>=12353&&e<=12436||e>=12449&&e<=12538||e>=12549&&e<=12588||e>=44032&&e<=55203||e>=19968&&e<=40869||e==12295||e>=12321&&e<=12329},se.isNCNameChar=function(e){return e>=48&&e<=57||e>=1632&&e<=1641||e>=1776&&e<=1785||e>=2406&&e<=2415||e>=2534&&e<=2543||e>=2662&&e<=2671||e>=2790&&e<=2799||e>=2918&&e<=2927||e>=3047&&e<=3055||e>=3174&&e<=3183||e>=3302&&e<=3311||e>=3430&&e<=3439||e>=3664&&e<=3673||e>=3792&&e<=3801||e>=3872&&e<=3881||e==46||e==45||e==95||se.isLetter(e)||e>=768&&e<=837||e>=864&&e<=865||e>=1155&&e<=1158||e>=1425&&e<=1441||e>=1443&&e<=1465||e>=1467&&e<=1469||e==1471||e>=1473&&e<=1474||e==1476||e>=1611&&e<=1618||e==1648||e>=1750&&e<=1756||e>=1757&&e<=1759||e>=1760&&e<=1764||e>=1767&&e<=1768||e>=1770&&e<=1773||e>=2305&&e<=2307||e==2364||e>=2366&&e<=2380||e==2381||e>=2385&&e<=2388||e>=2402&&e<=2403||e>=2433&&e<=2435||e==2492||e==2494||e==2495||e>=2496&&e<=2500||e>=2503&&e<=2504||e>=2507&&e<=2509||e==2519||e>=2530&&e<=2531||e==2562||e==2620||e==2622||e==2623||e>=2624&&e<=2626||e>=2631&&e<=2632||e>=2635&&e<=2637||e>=2672&&e<=2673||e>=2689&&e<=2691||e==2748||e>=2750&&e<=2757||e>=2759&&e<=2761||e>=2763&&e<=2765||e>=2817&&e<=2819||e==2876||e>=2878&&e<=2883||e>=2887&&e<=2888||e>=2891&&e<=2893||e>=2902&&e<=2903||e>=2946&&e<=2947||e>=3006&&e<=3010||e>=3014&&e<=3016||e>=3018&&e<=3021||e==3031||e>=3073&&e<=3075||e>=3134&&e<=3140||e>=3142&&e<=3144||e>=3146&&e<=3149||e>=3157&&e<=3158||e>=3202&&e<=3203||e>=3262&&e<=3268||e>=3270&&e<=3272||e>=3274&&e<=3277||e>=3285&&e<=3286||e>=3330&&e<=3331||e>=3390&&e<=3395||e>=3398&&e<=3400||e>=3402&&e<=3405||e==3415||e==3633||e>=3636&&e<=3642||e>=3655&&e<=3662||e==3761||e>=3764&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=3864&&e<=3865||e==3893||e==3895||e==3897||e==3902||e==3903||e>=3953&&e<=3972||e>=3974&&e<=3979||e>=3984&&e<=3989||e==3991||e>=3993&&e<=4013||e>=4017&&e<=4023||e==4025||e>=8400&&e<=8412||e==8417||e>=12330&&e<=12335||e==12441||e==12442||e==183||e==720||e==721||e==903||e==1600||e==3654||e==3782||e==12293||e>=12337&&e<=12341||e>=12445&&e<=12446||e>=12540&&e<=12542},se.coalesceText=function(e){for(var o=e.firstChild;o!=null;o=o.nextSibling)if(o.nodeType==X.TEXT_NODE||o.nodeType==X.CDATA_SECTION_NODE){var f=o.nodeValue,y=o;for(o=o.nextSibling;o!=null&&(o.nodeType==X.TEXT_NODE||o.nodeType==X.CDATA_SECTION_NODE);){f+=o.nodeValue;var d=o;o=o.nextSibling,d.parentNode.removeChild(d)}if(y.nodeType==X.CDATA_SECTION_NODE){var N=y.parentNode;if(y.nextSibling==null)N.removeChild(y),N.appendChild(N.ownerDocument.createTextNode(f));else{var W=y.nextSibling;N.removeChild(y),N.insertBefore(N.ownerDocument.createTextNode(f),W)}}else y.nodeValue=f;if(o==null)break}else o.nodeType==X.ELEMENT_NODE&&se.coalesceText(o)},se.instance_of=function(e,o){for(;e!=null;){if(e.constructor===o)return!0;if(e===Object)return!1;e=e.constructor.superclass}return!1},se.getElementById=function(e,o){if(e.nodeType==X.ELEMENT_NODE&&(e.getAttribute("id")==o||e.getAttributeNS(null,"id")==o))return e;for(var f=e.firstChild;f!=null;f=f.nextSibling){var y=se.getElementById(f,o);if(y!=null)return y}return null};var Ve=function(){function e(f,y){var d=y?": "+y.toString():"";switch(f){case o.INVALID_EXPRESSION_ERR:return"Invalid expression"+d;case o.TYPE_ERR:return"Type error"+d}return null}function o(f,y,d){var N=Error.call(this,e(f,y)||d);return N.code=f,N.exception=y,N}return o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.superclass=Error,o.prototype.toString=function(){return this.message},o.fromMessage=function(f,y){return new o(null,y,f)},o.INVALID_EXPRESSION_ERR=51,o.TYPE_ERR=52,o}();Oe.prototype={},Oe.prototype.constructor=Oe,Oe.superclass=Object.prototype;function Oe(e,o,f){this.xpath=f.parse(e),this.context=new Ue,this.context.namespaceResolver=new Je(o)}Oe.getOwnerDocument=function(e){return e.nodeType===X.DOCUMENT_NODE?e:e.ownerDocument},Oe.detectHtmlDom=function(e){if(!e)return!1;var o=Oe.getOwnerDocument(e);try{return o.implementation.hasFeature("HTML","2.0")}catch{return!0}},Oe.prototype.evaluate=function(e,o,f){this.context.expressionContextNode=e,this.context.caseInsensitive=Oe.detectHtmlDom(e);var y=this.xpath.evaluate(this.context);return new ge(y,o)},Je.prototype={},Je.prototype.constructor=Je,Je.superclass=Object.prototype;function Je(e){this.xpathNSResolver=e}Je.prototype.getNamespace=function(e,o){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(e)},Ke.prototype={},Ke.prototype.constructor=Ke,Ke.superclass=Object.prototype;function Ke(e){this.node=e,this.namespaceResolver=new qe}Ke.prototype.lookupNamespaceURI=function(e){return this.namespaceResolver.getNamespace(e,this.node)},ge.prototype={},ge.prototype.constructor=ge,ge.superclass=Object.prototype;function ge(e,o){switch(o==ge.ANY_TYPE&&(e.constructor===$?o=ge.STRING_TYPE:e.constructor===G?o=ge.NUMBER_TYPE:e.constructor===le?o=ge.BOOLEAN_TYPE:e.constructor===J&&(o=ge.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=o,o){case ge.NUMBER_TYPE:this.numberValue=e.numberValue();return;case ge.STRING_TYPE:this.stringValue=e.stringValue();return;case ge.BOOLEAN_TYPE:this.booleanValue=e.booleanValue();return;case ge.ANY_UNORDERED_NODE_TYPE:case ge.FIRST_ORDERED_NODE_TYPE:if(e.constructor===J){this.singleNodeValue=e.first();return}break;case ge.UNORDERED_NODE_ITERATOR_TYPE:case ge.ORDERED_NODE_ITERATOR_TYPE:if(e.constructor===J){this.invalidIteratorState=!1,this.nodes=e.toArray(),this.iteratorIndex=0;return}break;case ge.UNORDERED_NODE_SNAPSHOT_TYPE:case ge.ORDERED_NODE_SNAPSHOT_TYPE:if(e.constructor===J){this.nodes=e.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Ve(Ve.TYPE_ERR)}ge.prototype.iterateNext=function(){if(this.resultType!=ge.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=ge.ORDERED_NODE_ITERATOR_TYPE)throw new Ve(Ve.TYPE_ERR);return this.nodes[this.iteratorIndex++]},ge.prototype.snapshotItem=function(e){if(this.resultType!=ge.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=ge.ORDERED_NODE_SNAPSHOT_TYPE)throw new Ve(Ve.TYPE_ERR);return this.nodes[e]},ge.ANY_TYPE=0,ge.NUMBER_TYPE=1,ge.STRING_TYPE=2,ge.BOOLEAN_TYPE=3,ge.UNORDERED_NODE_ITERATOR_TYPE=4,ge.ORDERED_NODE_ITERATOR_TYPE=5,ge.UNORDERED_NODE_SNAPSHOT_TYPE=6,ge.ORDERED_NODE_SNAPSHOT_TYPE=7,ge.ANY_UNORDERED_NODE_TYPE=8,ge.FIRST_ORDERED_NODE_TYPE=9;function a(e,o){e.createExpression=function(f,y){try{return new Oe(f,y,o)}catch(d){throw new Ve(Ve.INVALID_EXPRESSION_ERR,d)}},e.createNSResolver=function(f){return new Ke(f)},e.evaluate=function(f,y,d,N,W){if(N<0||N>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(f,d,o).evaluate(y,N,W)}}try{var c=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(c=!1)}catch{}c&&a(document,new x)}catch{}a(r,new x),function(){var e=new x,o=new qe,f=new Re,y=new je;function d(K){return{getNamespace:function(xe,Me){var ot=K(xe,Me);return ot||o.getNamespace(xe,Me)}}}function N(K){return d(K.getNamespace.bind(K))}function W(K){return d(function(xe){return K[xe]})}function Ee(K){return K&&typeof K.getNamespace=="function"?N(K):typeof K=="function"?d(K):typeof K=="object"?W(K):o}function ye(K){if(K===null||typeof K>"u"||K instanceof $||K instanceof le||K instanceof G||K instanceof J)return K;switch(typeof K){case"string":return new $(K);case"boolean":return new le(K);case"number":return new G(K)}var xe=new J;return xe.addArray([].concat(K)),xe}function Q(K){return function(xe){var Me=Array.prototype.slice.call(arguments,1).map(function(cs){return cs.evaluate(xe)}),ot=K.apply(this,[].concat(xe,Me));return ye(ot)}}function oe(K){return{getFunction:function(xe,Me){var ot=K(xe,Me);return ot?Q(ot):f.getFunction(xe,Me)}}}function Fe(K){return oe(K.getFunction.bind(K))}function $e(K){return oe(function(xe){return K[xe]})}function _e(K){return K&&typeof K.getFunction=="function"?Fe(K):typeof K=="function"?oe(K):typeof K=="object"?$e(K):f}function ze(K){return{getVariable:function(xe,Me){var ot=K(xe,Me);return ye(ot)}}}function Xe(K){if(K){if(typeof K.getVariable=="function")return ze(K.getVariable.bind(K));if(typeof K=="function")return ze(K);if(typeof K=="object")return ze(function(xe){return K[xe]})}return y}function nt(K,xe,Me){K in Me&&(xe[K]=Me[K])}function is(K){var xe=new Ue;return K?(xe.namespaceResolver=Ee(K.namespaces),xe.functionResolver=_e(K.functions),xe.variableResolver=Xe(K.variables),xe.expressionContextNode=K.node,nt("allowAnyNamespaceForNoPrefix",xe,K),nt("isHtml",xe,K)):xe.namespaceResolver=o,xe}function us(K,xe){var Me=is(xe);return K.evaluate(Me)}var as={evaluate:function(K){return us(this.expression,K)},evaluateNumber:function(K){return this.evaluate(K).numberValue()},evaluateString:function(K){return this.evaluate(K).stringValue()},evaluateBoolean:function(K){return this.evaluate(K).booleanValue()},evaluateNodeSet:function(K){return this.evaluate(K).nodeset()},select:function(K){return this.evaluateNodeSet(K).toArray()},select1:function(K){return this.select(K)[0]}};function ls(K){var xe=e.parse(K);return Object.create(as,{expression:{value:xe}})}r.parse=ls}(),be(r,{XPath:fe,XPathParser:x,XPathResult:ge,Step:A,PathExpr:j,NodeTest:U,LocationPath:we,OrOperation:ae,AndOperation:pe,BarOperation:me,EqualsOperation:I,NotEqualOperation:D,LessThanOperation:g,GreaterThanOperation:b,LessThanOrEqualOperation:_,GreaterThanOrEqualOperation:C,PlusOperation:F,MinusOperation:R,MultiplyOperation:V,DivOperation:z,ModOperation:re,UnaryMinusOperation:Y,FunctionCall:ue,VariableReference:ve,XPathContext:Ue,XNodeSet:J,XBoolean:le,XString:$,XNumber:G,NamespaceResolver:qe,FunctionResolver:Re,VariableResolver:je,Utilities:se}),r.select=function(e,o,f){return r.selectWithResolver(e,o,null,f)},r.useNamespaces=function(e){var o={mappings:e||{},lookupNamespaceURI:function(f){return this.mappings[f]}};return function(f,y,d){return r.selectWithResolver(f,y,o,d)}},r.selectWithResolver=function(e,o,f,y){var d=new Oe(e,f,new x),N=ge.ANY_TYPE,W=d.evaluate(o,N,null);return W.resultType==ge.STRING_TYPE?W=W.stringValue:W.resultType==ge.NUMBER_TYPE?W=W.numberValue:W.resultType==ge.BOOLEAN_TYPE?W=W.booleanValue:(W=W.nodes,y&&(W=W[0])),W},r.select1=function(e,o){return r.select(e,o,!0)};var E=function(e){return Array.isArray(e)&&e.every(p)},w=function(e){return function(o){return p(o)&&o.nodeType===e}};be(r,{isNodeLike:p,isArrayOfNodes:E,isElement:w(X.ELEMENT_NODE),isAttribute:w(X.ATTRIBUTE_NODE),isTextNode:w(X.TEXT_NODE),isCDATASection:w(X.CDATA_SECTION_NODE),isProcessingInstruction:w(X.PROCESSING_INSTRUCTION_NODE),isComment:w(X.COMMENT_NODE),isDocumentNode:w(X.DOCUMENT_NODE),isDocumentTypeNode:w(X.DOCUMENT_TYPE_NODE),isDocumentFragment:w(X.DOCUMENT_FRAGMENT_NODE)})})(t)}(vt)),vt}var Jr=Zr();const en=Qr(Jr);var ft={},Qe={},st={},It;function yt(){if(It)return st;It=1;function n(l,p,v){if(v===void 0&&(v=Array.prototype),l&&typeof v.find=="function")return v.find.call(l,p);for(var h=0;h<l.length;h++)if(Object.prototype.hasOwnProperty.call(l,h)){var m=l[h];if(p.call(void 0,m,h,l))return m}}function t(l,p){return p===void 0&&(p=Object),p&&typeof p.freeze=="function"?p.freeze(l):l}function r(l,p){if(l===null||typeof l!="object")throw new TypeError("target is not an object");for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(l[v]=p[v]);return l}var u=t({HTML:"text/html",isHTML:function(l){return l===u.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(l){return l===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return st.assign=r,st.find=n,st.freeze=t,st.MIME_TYPE=u,st.NAMESPACE=i,st}var Pt;function Lt(){if(Pt)return Qe;Pt=1;var n=yt(),t=n.find,r=n.NAMESPACE;function u(a){return a!==""}function i(a){return a?a.split(/[\t\n\f\r ]+/).filter(u):[]}function l(a,c){return a.hasOwnProperty(c)||(a[c]=!0),a}function p(a){if(!a)return[];var c=i(a);return Object.keys(c.reduce(l,{}))}function v(a){return function(c){return a&&a.indexOf(c)!==-1}}function h(a,c){for(var E in a)Object.prototype.hasOwnProperty.call(a,E)&&(c[E]=a[E])}function m(a,c){var E=a.prototype;if(!(E instanceof c)){let w=function(){};w.prototype=c.prototype,w=new w,h(E,w),a.prototype=E=w}E.constructor!=a&&(typeof a!="function"&&console.error("unknown Class:"+a),E.constructor=a)}var B={},T=B.ELEMENT_NODE=1,q=B.ATTRIBUTE_NODE=2,L=B.TEXT_NODE=3,ie=B.CDATA_SECTION_NODE=4,ce=B.ENTITY_REFERENCE_NODE=5,S=B.ENTITY_NODE=6,te=B.PROCESSING_INSTRUCTION_NODE=7,de=B.COMMENT_NODE=8,ee=B.DOCUMENT_NODE=9,Ae=B.DOCUMENT_TYPE_NODE=10,be=B.DOCUMENT_FRAGMENT_NODE=11,X=B.NOTATION_NODE=12,x={},fe={};x.INDEX_SIZE_ERR=(fe[1]="Index size error",1),x.DOMSTRING_SIZE_ERR=(fe[2]="DOMString size error",2);var k=x.HIERARCHY_REQUEST_ERR=(fe[3]="Hierarchy request error",3);x.WRONG_DOCUMENT_ERR=(fe[4]="Wrong document",4),x.INVALID_CHARACTER_ERR=(fe[5]="Invalid character",5),x.NO_DATA_ALLOWED_ERR=(fe[6]="No data allowed",6),x.NO_MODIFICATION_ALLOWED_ERR=(fe[7]="No modification allowed",7);var P=x.NOT_FOUND_ERR=(fe[8]="Not found",8);x.NOT_SUPPORTED_ERR=(fe[9]="Not supported",9);var Z=x.INUSE_ATTRIBUTE_ERR=(fe[10]="Attribute in use",10);x.INVALID_STATE_ERR=(fe[11]="Invalid state",11),x.SYNTAX_ERR=(fe[12]="Syntax error",12),x.INVALID_MODIFICATION_ERR=(fe[13]="Invalid modification",13),x.NAMESPACE_ERR=(fe[14]="Invalid namespace",14),x.INVALID_ACCESS_ERR=(fe[15]="Invalid access",15);function Y(a,c){if(c instanceof Error)var E=c;else E=this,Error.call(this,fe[a]),this.message=fe[a],Error.captureStackTrace&&Error.captureStackTrace(this,Y);return E.code=a,c&&(this.message=this.message+": "+c),E}Y.prototype=Error.prototype,h(x,Y);function M(){}M.prototype={length:0,item:function(a){return a>=0&&a<this.length?this[a]:null},toString:function(a,c){for(var E=[],w=0;w<this.length;w++)Oe(this[w],E,a,c);return E.join("")},filter:function(a){return Array.prototype.filter.call(this,a)},indexOf:function(a){return Array.prototype.indexOf.call(this,a)}};function ae(a,c){this._node=a,this._refresh=c,pe(this)}function pe(a){var c=a._node._inc||a._node.ownerDocument._inc;if(a._inc!==c){var E=a._refresh(a._node);if(ge(a,"length",E.length),!a.$$length||E.length<a.$$length)for(var w=E.length;w in a;w++)Object.prototype.hasOwnProperty.call(a,w)&&delete a[w];h(E,a),a._inc=c}}ae.prototype.item=function(a){return pe(this),this[a]||null},m(ae,M);function I(){}function D(a,c){for(var E=a.length;E--;)if(a[E]===c)return E}function g(a,c,E,w){if(w?c[D(c,w)]=E:c[c.length++]=E,a){E.ownerElement=a;var e=a.ownerDocument;e&&(w&&re(e,a,w),z(e,a,E))}}function b(a,c,E){var w=D(c,E);if(w>=0){for(var e=c.length-1;w<e;)c[w]=c[++w];if(c.length=e,a){var o=a.ownerDocument;o&&(re(o,a,E),E.ownerElement=null)}}else throw new Y(P,new Error(a.tagName+"@"+E))}I.prototype={length:0,item:M.prototype.item,getNamedItem:function(a){for(var c=this.length;c--;){var E=this[c];if(E.nodeName==a)return E}},setNamedItem:function(a){var c=a.ownerElement;if(c&&c!=this._ownerElement)throw new Y(Z);var E=this.getNamedItem(a.nodeName);return g(this._ownerElement,this,a,E),E},setNamedItemNS:function(a){var c=a.ownerElement,E;if(c&&c!=this._ownerElement)throw new Y(Z);return E=this.getNamedItemNS(a.namespaceURI,a.localName),g(this._ownerElement,this,a,E),E},removeNamedItem:function(a){var c=this.getNamedItem(a);return b(this._ownerElement,this,c),c},removeNamedItemNS:function(a,c){var E=this.getNamedItemNS(a,c);return b(this._ownerElement,this,E),E},getNamedItemNS:function(a,c){for(var E=this.length;E--;){var w=this[E];if(w.localName==c&&w.namespaceURI==a)return w}return null}};function _(){}_.prototype={hasFeature:function(a,c){return!0},createDocument:function(a,c,E){var w=new V;if(w.implementation=this,w.childNodes=new M,w.doctype=E||null,E&&w.appendChild(E),c){var e=w.createElementNS(a,c);w.appendChild(e)}return w},createDocumentType:function(a,c,E){var w=new J;return w.name=a,w.nodeName=a,w.publicId=c||"",w.systemId=E||"",w}};function C(){}C.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(a,c){return ue(this,a,c)},replaceChild:function(a,c){ue(this,a,c,ve),c&&this.removeChild(c)},removeChild:function(a){return j(this,a)},appendChild:function(a){return this.insertBefore(a,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(a){return Ke(this.ownerDocument||this,this,a)},normalize:function(){for(var a=this.firstChild;a;){var c=a.nextSibling;c&&c.nodeType==L&&a.nodeType==L?(this.removeChild(c),a.appendData(c.data)):(a.normalize(),a=c)}},isSupported:function(a,c){return this.ownerDocument.implementation.hasFeature(a,c)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(a){for(var c=this;c;){var E=c._nsMap;if(E){for(var w in E)if(Object.prototype.hasOwnProperty.call(E,w)&&E[w]===a)return w}c=c.nodeType==q?c.ownerDocument:c.parentNode}return null},lookupNamespaceURI:function(a){for(var c=this;c;){var E=c._nsMap;if(E&&Object.prototype.hasOwnProperty.call(E,a))return E[a];c=c.nodeType==q?c.ownerDocument:c.parentNode}return null},isDefaultNamespace:function(a){var c=this.lookupPrefix(a);return c==null}};function F(a){return a=="<"&&"<"||a==">"&&">"||a=="&"&&"&"||a=='"'&&"""||"&#"+a.charCodeAt()+";"}h(B,C),h(B,C.prototype);function R(a,c){if(c(a))return!0;if(a=a.firstChild)do if(R(a,c))return!0;while(a=a.nextSibling)}function V(){this.ownerDocument=this}function z(a,c,E){a&&a._inc++;var w=E.namespaceURI;w===r.XMLNS&&(c._nsMap[E.prefix?E.localName:""]=E.value)}function re(a,c,E,w){a&&a._inc++;var e=E.namespaceURI;e===r.XMLNS&&delete c._nsMap[E.prefix?E.localName:""]}function me(a,c,E){if(a&&a._inc){a._inc++;var w=c.childNodes;if(E)w[w.length++]=E;else{for(var e=c.firstChild,o=0;e;)w[o++]=e,e=e.nextSibling;w.length=o,delete w[w.length]}}}function j(a,c){var E=c.previousSibling,w=c.nextSibling;return E?E.nextSibling=w:a.firstChild=w,w?w.previousSibling=E:a.lastChild=E,c.parentNode=null,c.previousSibling=null,c.nextSibling=null,me(a.ownerDocument,a),c}function De(a){return a&&(a.nodeType===C.DOCUMENT_NODE||a.nodeType===C.DOCUMENT_FRAGMENT_NODE||a.nodeType===C.ELEMENT_NODE)}function Ce(a){return a&&(ke(a)||He(a)||Ie(a)||a.nodeType===C.DOCUMENT_FRAGMENT_NODE||a.nodeType===C.COMMENT_NODE||a.nodeType===C.PROCESSING_INSTRUCTION_NODE)}function Ie(a){return a&&a.nodeType===C.DOCUMENT_TYPE_NODE}function ke(a){return a&&a.nodeType===C.ELEMENT_NODE}function He(a){return a&&a.nodeType===C.TEXT_NODE}function we(a,c){var E=a.childNodes||[];if(t(E,ke)||Ie(c))return!1;var w=t(E,Ie);return!(c&&w&&E.indexOf(w)>E.indexOf(c))}function A(a,c){var E=a.childNodes||[];function w(o){return ke(o)&&o!==c}if(t(E,w))return!1;var e=t(E,Ie);return!(c&&e&&E.indexOf(e)>E.indexOf(c))}function H(a,c,E){if(!De(a))throw new Y(k,"Unexpected parent node type "+a.nodeType);if(E&&E.parentNode!==a)throw new Y(P,"child not in parent");if(!Ce(c)||Ie(c)&&a.nodeType!==C.DOCUMENT_NODE)throw new Y(k,"Unexpected node type "+c.nodeType+" for parent node type "+a.nodeType)}function U(a,c,E){var w=a.childNodes||[],e=c.childNodes||[];if(c.nodeType===C.DOCUMENT_FRAGMENT_NODE){var o=e.filter(ke);if(o.length>1||t(e,He))throw new Y(k,"More than one element or text in fragment");if(o.length===1&&!we(a,E))throw new Y(k,"Element in fragment can not be inserted before doctype")}if(ke(c)&&!we(a,E))throw new Y(k,"Only one element can be added and only after doctype");if(Ie(c)){if(t(w,Ie))throw new Y(k,"Only one doctype is allowed");var f=t(w,ke);if(E&&w.indexOf(f)<w.indexOf(E))throw new Y(k,"Doctype can only be inserted before an element");if(!E&&f)throw new Y(k,"Doctype can not be appended since element is present")}}function ve(a,c,E){var w=a.childNodes||[],e=c.childNodes||[];if(c.nodeType===C.DOCUMENT_FRAGMENT_NODE){var o=e.filter(ke);if(o.length>1||t(e,He))throw new Y(k,"More than one element or text in fragment");if(o.length===1&&!A(a,E))throw new Y(k,"Element in fragment can not be inserted before doctype")}if(ke(c)&&!A(a,E))throw new Y(k,"Only one element can be added and only after doctype");if(Ie(c)){if(t(w,function(d){return Ie(d)&&d!==E}))throw new Y(k,"Only one doctype is allowed");var f=t(w,ke);if(E&&w.indexOf(f)<w.indexOf(E))throw new Y(k,"Doctype can only be inserted before an element")}}function ue(a,c,E,w){H(a,c,E),a.nodeType===C.DOCUMENT_NODE&&(w||U)(a,c,E);var e=c.parentNode;if(e&&e.removeChild(c),c.nodeType===be){var o=c.firstChild;if(o==null)return c;var f=c.lastChild}else o=f=c;var y=E?E.previousSibling:a.lastChild;o.previousSibling=y,f.nextSibling=E,y?y.nextSibling=o:a.firstChild=o,E==null?a.lastChild=f:E.previousSibling=f;do{o.parentNode=a;var d=a.ownerDocument||a;ne(o,d)}while(o!==f&&(o=o.nextSibling));return me(a.ownerDocument||a,a),c.nodeType==be&&(c.firstChild=c.lastChild=null),c}function ne(a,c){if(a.ownerDocument!==c){if(a.ownerDocument=c,a.nodeType===T&&a.attributes)for(var E=0;E<a.attributes.length;E++){var w=a.attributes.item(E);w&&(w.ownerDocument=c)}for(var e=a.firstChild;e;)ne(e,c),e=e.nextSibling}}function $(a,c){c.parentNode&&c.parentNode.removeChild(c),c.parentNode=a,c.previousSibling=a.lastChild,c.nextSibling=null,c.previousSibling?c.previousSibling.nextSibling=c:a.firstChild=c,a.lastChild=c,me(a.ownerDocument,a,c);var E=a.ownerDocument||a;return ne(c,E),c}V.prototype={nodeName:"#document",nodeType:ee,doctype:null,documentElement:null,_inc:1,insertBefore:function(a,c){if(a.nodeType==be){for(var E=a.firstChild;E;){var w=E.nextSibling;this.insertBefore(E,c),E=w}return a}return ue(this,a,c),ne(a,this),this.documentElement===null&&a.nodeType===T&&(this.documentElement=a),a},removeChild:function(a){return this.documentElement==a&&(this.documentElement=null),j(this,a)},replaceChild:function(a,c){ue(this,a,c,ve),ne(a,this),c&&this.removeChild(c),ke(a)&&(this.documentElement=a)},importNode:function(a,c){return Je(this,a,c)},getElementById:function(a){var c=null;return R(this.documentElement,function(E){if(E.nodeType==T&&E.getAttribute("id")==a)return c=E,!0}),c},getElementsByClassName:function(a){var c=p(a);return new ae(this,function(E){var w=[];return c.length>0&&R(E.documentElement,function(e){if(e!==E&&e.nodeType===T){var o=e.getAttribute("class");if(o){var f=a===o;if(!f){var y=p(o);f=c.every(v(y))}f&&w.push(e)}}}),w})},createElement:function(a){var c=new G;c.ownerDocument=this,c.nodeName=a,c.tagName=a,c.localName=a,c.childNodes=new M;var E=c.attributes=new I;return E._ownerElement=c,c},createDocumentFragment:function(){var a=new Re;return a.ownerDocument=this,a.childNodes=new M,a},createTextNode:function(a){var c=new le;return c.ownerDocument=this,c.appendData(a),c},createComment:function(a){var c=new Se;return c.ownerDocument=this,c.appendData(a),c},createCDATASection:function(a){var c=new mt;return c.ownerDocument=this,c.appendData(a),c},createProcessingInstruction:function(a,c){var E=new qe;return E.ownerDocument=this,E.tagName=E.nodeName=E.target=a,E.nodeValue=E.data=c,E},createAttribute:function(a){var c=new rt;return c.ownerDocument=this,c.name=a,c.nodeName=a,c.localName=a,c.specified=!0,c},createEntityReference:function(a){var c=new je;return c.ownerDocument=this,c.nodeName=a,c},createElementNS:function(a,c){var E=new G,w=c.split(":"),e=E.attributes=new I;return E.childNodes=new M,E.ownerDocument=this,E.nodeName=c,E.tagName=c,E.namespaceURI=a,w.length==2?(E.prefix=w[0],E.localName=w[1]):E.localName=c,e._ownerElement=E,E},createAttributeNS:function(a,c){var E=new rt,w=c.split(":");return E.ownerDocument=this,E.nodeName=c,E.name=c,E.namespaceURI=a,E.specified=!0,w.length==2?(E.prefix=w[0],E.localName=w[1]):E.localName=c,E}},m(V,C);function G(){this._nsMap={}}G.prototype={nodeType:T,hasAttribute:function(a){return this.getAttributeNode(a)!=null},getAttribute:function(a){var c=this.getAttributeNode(a);return c&&c.value||""},getAttributeNode:function(a){return this.attributes.getNamedItem(a)},setAttribute:function(a,c){var E=this.ownerDocument.createAttribute(a);E.value=E.nodeValue=""+c,this.setAttributeNode(E)},removeAttribute:function(a){var c=this.getAttributeNode(a);c&&this.removeAttributeNode(c)},appendChild:function(a){return a.nodeType===be?this.insertBefore(a,null):$(this,a)},setAttributeNode:function(a){return this.attributes.setNamedItem(a)},setAttributeNodeNS:function(a){return this.attributes.setNamedItemNS(a)},removeAttributeNode:function(a){return this.attributes.removeNamedItem(a.nodeName)},removeAttributeNS:function(a,c){var E=this.getAttributeNodeNS(a,c);E&&this.removeAttributeNode(E)},hasAttributeNS:function(a,c){return this.getAttributeNodeNS(a,c)!=null},getAttributeNS:function(a,c){var E=this.getAttributeNodeNS(a,c);return E&&E.value||""},setAttributeNS:function(a,c,E){var w=this.ownerDocument.createAttributeNS(a,c);w.value=w.nodeValue=""+E,this.setAttributeNode(w)},getAttributeNodeNS:function(a,c){return this.attributes.getNamedItemNS(a,c)},getElementsByTagName:function(a){return new ae(this,function(c){var E=[];return R(c,function(w){w!==c&&w.nodeType==T&&(a==="*"||w.tagName==a)&&E.push(w)}),E})},getElementsByTagNameNS:function(a,c){return new ae(this,function(E){var w=[];return R(E,function(e){e!==E&&e.nodeType===T&&(a==="*"||e.namespaceURI===a)&&(c==="*"||e.localName==c)&&w.push(e)}),w})}},V.prototype.getElementsByTagName=G.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=G.prototype.getElementsByTagNameNS,m(G,C);function rt(){}rt.prototype.nodeType=q,m(rt,C);function lt(){}lt.prototype={data:"",substringData:function(a,c){return this.data.substring(a,a+c)},appendData:function(a){a=this.data+a,this.nodeValue=this.data=a,this.length=a.length},insertData:function(a,c){this.replaceData(a,0,c)},appendChild:function(a){throw new Error(fe[k])},deleteData:function(a,c){this.replaceData(a,c,"")},replaceData:function(a,c,E){var w=this.data.substring(0,a),e=this.data.substring(a+c);E=w+E+e,this.nodeValue=this.data=E,this.length=E.length}},m(lt,C);function le(){}le.prototype={nodeName:"#text",nodeType:L,splitText:function(a){var c=this.data,E=c.substring(a);c=c.substring(0,a),this.data=this.nodeValue=c,this.length=c.length;var w=this.ownerDocument.createTextNode(E);return this.parentNode&&this.parentNode.insertBefore(w,this.nextSibling),w}},m(le,lt);function Se(){}Se.prototype={nodeName:"#comment",nodeType:de},m(Se,lt);function mt(){}mt.prototype={nodeName:"#cdata-section",nodeType:ie},m(mt,lt);function J(){}J.prototype.nodeType=Ae,m(J,C);function Ge(){}Ge.prototype.nodeType=X,m(Ge,C);function Ue(){}Ue.prototype.nodeType=S,m(Ue,C);function je(){}je.prototype.nodeType=ce,m(je,C);function Re(){}Re.prototype.nodeName="#document-fragment",Re.prototype.nodeType=be,m(Re,C);function qe(){}qe.prototype.nodeType=te,m(qe,C);function he(){}he.prototype.serializeToString=function(a,c,E){return se.call(a,c,E)},C.prototype.toString=se;function se(a,c){var E=[],w=this.nodeType==9&&this.documentElement||this,e=w.prefix,o=w.namespaceURI;if(o&&e==null){var e=w.lookupPrefix(o);if(e==null)var f=[{namespace:o,prefix:null}]}return Oe(this,E,a,c,f),E.join("")}function gt(a,c,E){var w=a.prefix||"",e=a.namespaceURI;if(!e||w==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var o=E.length;o--;){var f=E[o];if(f.prefix===w)return f.namespace!==e}return!0}function Ve(a,c,E){a.push(" ",c,'="',E.replace(/[<>&"\t\n\r]/g,F),'"')}function Oe(a,c,E,w,e){if(e||(e=[]),w)if(a=w(a),a){if(typeof a=="string"){c.push(a);return}}else return;switch(a.nodeType){case T:var o=a.attributes,f=o.length,_e=a.firstChild,y=a.tagName;E=r.isHTML(a.namespaceURI)||E;var d=y;if(!E&&!a.prefix&&a.namespaceURI){for(var N,W=0;W<o.length;W++)if(o.item(W).name==="xmlns"){N=o.item(W).value;break}if(!N)for(var Ee=e.length-1;Ee>=0;Ee--){var ye=e[Ee];if(ye.prefix===""&&ye.namespace===a.namespaceURI){N=ye.namespace;break}}if(N!==a.namespaceURI)for(var Ee=e.length-1;Ee>=0;Ee--){var ye=e[Ee];if(ye.namespace===a.namespaceURI){ye.prefix&&(d=ye.prefix+":"+y);break}}}c.push("<",d);for(var Q=0;Q<f;Q++){var oe=o.item(Q);oe.prefix=="xmlns"?e.push({prefix:oe.localName,namespace:oe.value}):oe.nodeName=="xmlns"&&e.push({prefix:"",namespace:oe.value})}for(var Q=0;Q<f;Q++){var oe=o.item(Q);if(gt(oe,E,e)){var Fe=oe.prefix||"",$e=oe.namespaceURI;Ve(c,Fe?"xmlns:"+Fe:"xmlns",$e),e.push({prefix:Fe,namespace:$e})}Oe(oe,c,E,w,e)}if(y===d&>(a,E,e)){var Fe=a.prefix||"",$e=a.namespaceURI;Ve(c,Fe?"xmlns:"+Fe:"xmlns",$e),e.push({prefix:Fe,namespace:$e})}if(_e||E&&!/^(?:meta|link|img|br|hr|input)$/i.test(y)){if(c.push(">"),E&&/^script$/i.test(y))for(;_e;)_e.data?c.push(_e.data):Oe(_e,c,E,w,e.slice()),_e=_e.nextSibling;else for(;_e;)Oe(_e,c,E,w,e.slice()),_e=_e.nextSibling;c.push("</",d,">")}else c.push("/>");return;case ee:case be:for(var _e=a.firstChild;_e;)Oe(_e,c,E,w,e.slice()),_e=_e.nextSibling;return;case q:return Ve(c,a.name,a.value);case L:return c.push(a.data.replace(/[<&>]/g,F));case ie:return c.push("<![CDATA[",a.data,"]]>");case de:return c.push("<!--",a.data,"-->");case Ae:var ze=a.publicId,Xe=a.systemId;if(c.push("<!DOCTYPE ",a.name),ze)c.push(" PUBLIC ",ze),Xe&&Xe!="."&&c.push(" ",Xe),c.push(">");else if(Xe&&Xe!=".")c.push(" SYSTEM ",Xe,">");else{var nt=a.internalSubset;nt&&c.push(" [",nt,"]"),c.push(">")}return;case te:return c.push("<?",a.target," ",a.data,"?>");case ce:return c.push("&",a.nodeName,";");default:c.push("??",a.nodeName)}}function Je(a,c,E){var w;switch(c.nodeType){case T:w=c.cloneNode(!1),w.ownerDocument=a;case be:break;case q:E=!0;break}if(w||(w=c.cloneNode(!1)),w.ownerDocument=a,w.parentNode=null,E)for(var e=c.firstChild;e;)w.appendChild(Je(a,e,E)),e=e.nextSibling;return w}function Ke(a,c,E){var w=new c.constructor;for(var e in c)if(Object.prototype.hasOwnProperty.call(c,e)){var o=c[e];typeof o!="object"&&o!=w[e]&&(w[e]=o)}switch(c.childNodes&&(w.childNodes=new M),w.ownerDocument=a,w.nodeType){case T:var f=c.attributes,y=w.attributes=new I,d=f.length;y._ownerElement=w;for(var N=0;N<d;N++)w.setAttributeNode(Ke(a,f.item(N),!0));break;case q:E=!0}if(E)for(var W=c.firstChild;W;)w.appendChild(Ke(a,W,E)),W=W.nextSibling;return w}function ge(a,c,E){a[c]=E}try{if(Object.defineProperty){let a=function(c){switch(c.nodeType){case T:case be:var E=[];for(c=c.firstChild;c;)c.nodeType!==7&&c.nodeType!==8&&E.push(a(c)),c=c.nextSibling;return E.join("");default:return c.nodeValue}};Object.defineProperty(ae.prototype,"length",{get:function(){return pe(this),this.$$length}}),Object.defineProperty(C.prototype,"textContent",{get:function(){return a(this)},set:function(c){switch(this.nodeType){case T:case be:for(;this.firstChild;)this.removeChild(this.firstChild);(c||String(c))&&this.appendChild(this.ownerDocument.createTextNode(c));break;default:this.data=c,this.value=c,this.nodeValue=c}}}),ge=function(c,E,w){c["$$"+E]=w}}}catch{}return Qe.DocumentType=J,Qe.DOMException=Y,Qe.DOMImplementation=_,Qe.Element=G,Qe.Node=C,Qe.NodeList=M,Qe.XMLSerializer=he,Qe}var pt={},Ct={},Vt;function tn(){return Vt||(Vt=1,function(n){var t=yt().freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
10
|
-
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),n.entityMap=n.HTML_ENTITIES}(Ct)),Ct}var At={},Mt;function rn(){if(Mt)return At;Mt=1;var n=yt().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),u=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),i=0,l=1,p=2,v=3,h=4,m=5,B=6,T=7;function q(k,P){this.message=k,this.locator=P,Error.captureStackTrace&&Error.captureStackTrace(this,q)}q.prototype=new Error,q.prototype.name=q.name;function L(){}L.prototype={parse:function(k,P,Z){var Y=this.domBuilder;Y.startDocument(),Ae(P,P={}),ie(k,P,Z,Y,this.errorHandler),Y.endDocument()}};function ie(k,P,Z,Y,M){function ae($){if($>65535){$-=65536;var G=55296+($>>10),rt=56320+($&1023);return String.fromCharCode(G,rt)}else return String.fromCharCode($)}function pe($){var G=$.slice(1,-1);return Object.hasOwnProperty.call(Z,G)?Z[G]:G.charAt(0)==="#"?ae(parseInt(G.substr(1).replace("x","0x"))):(M.error("entity not found:"+$),$)}function I($){if($>V){var G=k.substring(V,$).replace(/&#?\w+;/g,pe);C&&D(V),Y.characters(G,0,$-V),V=$}}function D($,G){for(;$>=b&&(G=_.exec(k));)g=G.index,b=g+G[0].length,C.lineNumber++;C.columnNumber=$-g+1}for(var g=0,b=0,_=/.*(?:\r\n?|\n)|.*$/g,C=Y.locator,F=[{currentNSMap:P}],R={},V=0;;){try{var z=k.indexOf("<",V);if(z<0){if(!k.substr(V).match(/^\s*$/)){var re=Y.doc,me=re.createTextNode(k.substr(V));re.appendChild(me),Y.currentElement=me}return}switch(z>V&&I(z),k.charAt(z+1)){case"/":var H=k.indexOf(">",z+3),j=k.substring(z+2,H).replace(/[ \t\n\r]+$/g,""),De=F.pop();H<0?(j=k.substring(z+2).replace(/[\s<].*/,""),M.error("end tag name: "+j+" is not complete:"+De.tagName),H=z+1+j.length):j.match(/\s</)&&(j=j.replace(/[\s<].*/,""),M.error("end tag name: "+j+" maybe not complete"),H=z+1+j.length);var Ce=De.localNSMap,Ie=De.tagName==j,ke=Ie||De.tagName&&De.tagName.toLowerCase()==j.toLowerCase();if(ke){if(Y.endElement(De.uri,De.localName,j),Ce)for(var He in Ce)Object.prototype.hasOwnProperty.call(Ce,He)&&Y.endPrefixMapping(He);Ie||M.fatalError("end tag name: "+j+" is not match the current start tagName:"+De.tagName)}else F.push(De);H++;break;case"?":C&&D(z),H=X(k,z,Y);break;case"!":C&&D(z),H=be(k,z,Y,M);break;default:C&&D(z);var we=new x,A=F[F.length-1].currentNSMap,H=S(k,z,we,A,pe,M),U=we.length;if(!we.closed&&ee(k,H,we.tagName,R)&&(we.closed=!0,Z.nbsp||M.warning("unclosed xml attribute")),C&&U){for(var ve=ce(C,{}),ue=0;ue<U;ue++){var ne=we[ue];D(ne.offset),ne.locator=ce(C,{})}Y.locator=ve,te(we,Y,A)&&F.push(we),Y.locator=C}else te(we,Y,A)&&F.push(we);n.isHTML(we.uri)&&!we.closed?H=de(k,H,we.tagName,pe,Y):H++}}catch($){if($ instanceof q)throw $;M.error("element parse error: "+$),H=-1}H>V?V=H:I(Math.max(z,V)+1)}}function ce(k,P){return P.lineNumber=k.lineNumber,P.columnNumber=k.columnNumber,P}function S(k,P,Z,Y,M,ae){function pe(C,F,R){Z.attributeNames.hasOwnProperty(C)&&ae.fatalError("Attribute "+C+" redefined"),Z.addValue(C,F.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,M),R)}for(var I,D,g=++P,b=i;;){var _=k.charAt(g);switch(_){case"=":if(b===l)I=k.slice(P,g),b=v;else if(b===p)b=v;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(b===v||b===l)if(b===l&&(ae.warning('attribute value must after "="'),I=k.slice(P,g)),P=g+1,g=k.indexOf(_,P),g>0)D=k.slice(P,g),pe(I,D,P-1),b=m;else throw new Error("attribute value no end '"+_+"' match");else if(b==h)D=k.slice(P,g),pe(I,D,P),ae.warning('attribute "'+I+'" missed start quot('+_+")!!"),P=g+1,b=m;else throw new Error('attribute value must after "="');break;case"/":switch(b){case i:Z.setTagName(k.slice(P,g));case m:case B:case T:b=T,Z.closed=!0;case h:case l:break;case p:Z.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ae.error("unexpected end of input"),b==i&&Z.setTagName(k.slice(P,g)),g;case">":switch(b){case i:Z.setTagName(k.slice(P,g));case m:case B:case T:break;case h:case l:D=k.slice(P,g),D.slice(-1)==="/"&&(Z.closed=!0,D=D.slice(0,-1));case p:b===p&&(D=I),b==h?(ae.warning('attribute "'+D+'" missed quot(")!'),pe(I,D,P)):((!n.isHTML(Y[""])||!D.match(/^(?:disabled|checked|selected)$/i))&&ae.warning('attribute "'+D+'" missed value!! "'+D+'" instead!!'),pe(D,D,P));break;case v:throw new Error("attribute value missed!!")}return g;case"":_=" ";default:if(_<=" ")switch(b){case i:Z.setTagName(k.slice(P,g)),b=B;break;case l:I=k.slice(P,g),b=p;break;case h:var D=k.slice(P,g);ae.warning('attribute "'+D+'" missed quot(")!!'),pe(I,D,P);case m:b=B;break}else switch(b){case p:Z.tagName,(!n.isHTML(Y[""])||!I.match(/^(?:disabled|checked|selected)$/i))&&ae.warning('attribute "'+I+'" missed value!! "'+I+'" instead2!!'),pe(I,I,P),P=g,b=l;break;case m:ae.warning('attribute space is required"'+I+'"!!');case B:b=l,P=g;break;case v:b=h,P=g;break;case T:throw new Error("elements closed character '/' and '>' must be connected to")}}g++}}function te(k,P,Z){for(var Y=k.tagName,M=null,_=k.length;_--;){var ae=k[_],pe=ae.qName,I=ae.value,C=pe.indexOf(":");if(C>0)var D=ae.prefix=pe.slice(0,C),g=pe.slice(C+1),b=D==="xmlns"&&g;else g=pe,D=null,b=pe==="xmlns"&&"";ae.localName=g,b!==!1&&(M==null&&(M={},Ae(Z,Z={})),Z[b]=M[b]=I,ae.uri=n.XMLNS,P.startPrefixMapping(b,I))}for(var _=k.length;_--;){ae=k[_];var D=ae.prefix;D&&(D==="xml"&&(ae.uri=n.XML),D!=="xmlns"&&(ae.uri=Z[D||""]))}var C=Y.indexOf(":");C>0?(D=k.prefix=Y.slice(0,C),g=k.localName=Y.slice(C+1)):(D=null,g=k.localName=Y);var F=k.uri=Z[D||""];if(P.startElement(F,g,Y,k),k.closed){if(P.endElement(F,g,Y),M)for(D in M)Object.prototype.hasOwnProperty.call(M,D)&&P.endPrefixMapping(D)}else return k.currentNSMap=Z,k.localNSMap=M,!0}function de(k,P,Z,Y,M){if(/^(?:script|textarea)$/i.test(Z)){var ae=k.indexOf("</"+Z+">",P),pe=k.substring(P+1,ae);if(/[&<]/.test(pe))return/^script$/i.test(Z)?(M.characters(pe,0,pe.length),ae):(pe=pe.replace(/&#?\w+;/g,Y),M.characters(pe,0,pe.length),ae)}return P+1}function ee(k,P,Z,Y){var M=Y[Z];return M==null&&(M=k.lastIndexOf("</"+Z+">"),M<P&&(M=k.lastIndexOf("</"+Z)),Y[Z]=M),M<P}function Ae(k,P){for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&(P[Z]=k[Z])}function be(k,P,Z,Y){var M=k.charAt(P+2);switch(M){case"-":if(k.charAt(P+3)==="-"){var ae=k.indexOf("-->",P+4);return ae>P?(Z.comment(k,P+4,ae-P-4),ae+3):(Y.error("Unclosed comment"),-1)}else return-1;default:if(k.substr(P+3,6)=="CDATA["){var ae=k.indexOf("]]>",P+9);return Z.startCDATA(),Z.characters(k,P+9,ae-P-9),Z.endCDATA(),ae+3}var pe=fe(k,P),I=pe.length;if(I>1&&/!doctype/i.test(pe[0][0])){var D=pe[1][0],g=!1,b=!1;I>3&&(/^public$/i.test(pe[2][0])?(g=pe[3][0],b=I>4&&pe[4][0]):/^system$/i.test(pe[2][0])&&(b=pe[3][0]));var _=pe[I-1];return Z.startDTD(D,g,b),Z.endDTD(),_.index+_[0].length}}return-1}function X(k,P,Z){var Y=k.indexOf("?>",P);if(Y){var M=k.substring(P,Y).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return M?(M[0].length,Z.processingInstruction(M[1],M[2]),Y+2):-1}return-1}function x(){this.attributeNames={}}x.prototype={setTagName:function(k){if(!u.test(k))throw new Error("invalid tagName:"+k);this.tagName=k},addValue:function(k,P,Z){if(!u.test(k))throw new Error("invalid attribute:"+k);this.attributeNames[k]=this.length,this[this.length++]={qName:k,value:P,offset:Z}},length:0,getLocalName:function(k){return this[k].localName},getLocator:function(k){return this[k].locator},getQName:function(k){return this[k].qName},getURI:function(k){return this[k].uri},getValue:function(k){return this[k].value}};function fe(k,P){var Z,Y=[],M=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(M.lastIndex=P,M.exec(k);Z=M.exec(k);)if(Y.push(Z),Z[1])return Y}return At.XMLReader=L,At.ParseError=q,At}var Ut;function nn(){if(Ut)return pt;Ut=1;var n=yt(),t=Lt(),r=tn(),u=rn(),i=t.DOMImplementation,l=n.NAMESPACE,p=u.ParseError,v=u.XMLReader;function h(S){return S.replace(/\r[\n\u0085]/g,`
|
|
8
|
+
`)(L);k=$(u.value,R,G),p.value=k}else throw new Error(`Unsupported filter type: ${w.type}`);m.value="",o.nextTick(()=>{W()})}catch(k){m.value=k instanceof Error?k.message:"Filter execution error",p.value=null}},K=(w,k="root")=>{const L=new Map,G=(R,J)=>{if(R==null)return R;if(typeof R=="object"&&R.__protected_number__!==void 0){const ge=parseFloat(R.__protected_number__);return L.set(ge,J),ge}if(Array.isArray(R)){const ge=R.map((Ee,_e)=>{const ke=`${J}[${_e}]`,De=G(Ee,ke);return L.set(De,ke),De});return L.set(ge,J),ge}if(typeof R=="object"){const ge={};for(const Ee in R)if(Object.prototype.hasOwnProperty.call(R,Ee)){const _e=J==="root"?Ee:`${J}.${Ee}`;ge[Ee]=G(R[Ee],_e)}return L.set(ge,J),ge}return R};return{proxyData:G(w,k),indexMap:L}},$=(w,k,L)=>{if(k===null||typeof k!="object")return k;if(Array.isArray(k))return k.map(R=>{const J=L.get(R);if(J){const ge=ae(w,J);if(ge!==void 0)return ge}return $(w,R,L)});const G=L.get(k);if(G){const R=ae(w,G);if(R!==void 0)return R}const Q={};for(const R in k)Object.prototype.hasOwnProperty.call(k,R)&&(Q[R]=$(w,k[R],L));return Q},ae=(w,k)=>{if(k==="root")return w;const L=[];let G=k.replace(/^root\.?/,"");const Q=/([^\[\].]+)|\[(\d+)\]/g;let R;for(;(R=Q.exec(G))!==null;)R[1]?L.push(R[1]):R[2]!==void 0&&L.push(parseInt(R[2]));let J=w;for(const ge of L){if(J==null)return;J=J[ge]}return J},ee=()=>{p.value=null,m.value=""},U=()=>{_.value=!0},A=()=>{_.value=!1};o.watch(()=>a.modelValue,w=>{v(w)},{immediate:!0});const te=(w,k,L)=>{const G=J=>{if(J===null||typeof J!="object")return J;if(!Array.isArray(J)&&"__protected_number__"in J&&Object.keys(J).length===1)return`__PROTECTED_NUMBER_${J.__protected_number__}_PROTECTED_NUMBER__`;if(Array.isArray(J))return J.map(Ee=>G(Ee));const ge={};for(const[Ee,_e]of Object.entries(J))ge[Ee]=G(_e);return ge},Q=G(w);return JSON.stringify(Q,k,L).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g,"$1")},N=(w,k)=>{if(!a.readonly)try{const L=T(u.value,w,k),G=te(L,null,2);i("update:modelValue",G)}catch(L){console.error("Failed to update JSON:",L)}},T=(w,k,L)=>{if(!k||k==="root")return L;const G=k.split("."),Q=X(w,G.slice(0,-1));let R=Q;for(let ge=0;ge<G.length-1;ge++){const Ee=G[ge];Ee!=="root"&&(Array.isArray(R)?R=R[parseInt(Ee)]:R=R[Ee])}const J=G[G.length-1];return J==="root"?L:(Array.isArray(R)?R[parseInt(J)]=L:R[J]=L,Q)},q=w=>{b.value.has(w)?b.value.delete(w):b.value.add(w)},W=()=>{const w=new Set,k=(L,G="")=>{L!==null&&typeof L=="object"&&(w.add(G||"root"),Array.isArray(L)?L.forEach((Q,R)=>{const J=G?`${G}.${R}`:`${R}`;k(Q,J)}):Object.keys(L).forEach(Q=>{const R=G?`${G}.${Q}`:Q;k(L[Q],R)}))};k(ie.value),b.value=w,i("expand-all")},M=()=>{b.value=new Set(["root"]),i("collapse-all")},de=async()=>{if(D.value)try{const w=ie.value,k=te(w,null,2);await navigator.clipboard.writeText(k),i("copy-success",k)}catch(w){console.error("Failed to copy JSON:",w),i("copy-error",w instanceof Error?w:new Error("Failed to copy JSON"))}},he=()=>{if(D.value)try{const w=ie.value,k=te(w);i("update:modelValue",k),i("compress",k)}catch(w){console.error("Failed to compress JSON:",w)}},ye=async w=>{try{let k;typeof w=="object"&&w!==null&&!Array.isArray(w)&&"__protected_number__"in w&&Object.keys(w).length===1?k=w.__protected_number__:typeof w=="string"?k=`"${w}"`:k=JSON.stringify(w),await navigator.clipboard.writeText(k)}catch(k){console.error("Failed to copy value:",k)}},x=(w,k)=>{if(!a.readonly)try{const L=B(u.value,w,k),G=te(L,null,2);i("update:modelValue",G),le(w,k)}catch(L){console.error("Failed to rename key:",L)}},B=(w,k,L)=>{if(!k||k==="root")return w;const G=k.split("."),Q=X(w,G.slice(0,-1));if(G.length===1){const ge=G[0];return Q&&typeof Q=="object"&&!Array.isArray(Q)?Z(Q,ge,L):Q}let R=Q;for(let ge=0;ge<G.length-1;ge++){const Ee=G[ge];Array.isArray(R)?R=R[parseInt(Ee)]:R=R[Ee]}const J=G[G.length-1];if(!Array.isArray(R)&&R&&typeof R=="object"){const ge=Z(R,J,L),Ee=G.slice(0,-1);Ee.length>0&&F(Q,Ee,ge)}return Q},X=(w,k)=>{if(k.length===0)return w;if(Array.isArray(w)){const L=[...w],G=k[0],Q=parseInt(G);return k.length===1||(L[Q]=X(w[Q],k.slice(1))),L}else if(w&&typeof w=="object"){const L={...w},G=k[0];return k.length===1||(L[G]=X(w[G],k.slice(1))),L}return w},Z=(w,k,L)=>{if(!w||typeof w!="object"||Array.isArray(w))return w;const G=Object.keys(w),Q={};for(const R of G)R===k?Q[L]=w[R]:Q[R]=w[R];return Q},F=(w,k,L)=>{let G=w;for(let R=0;R<k.length-1;R++){const J=k[R];Array.isArray(G)?G=G[parseInt(J)]:G=G[J]}const Q=k[k.length-1];Array.isArray(G)?G[parseInt(Q)]=L:G[Q]=L},le=(w,k)=>{const L=new Set;b.value.forEach(G=>{if(G===w){const Q=w.split(".");Q[Q.length-1]=k,L.add(Q.join("."))}else if(G.startsWith(w+".")){const Q=w.split(".");Q[Q.length-1]=k;const R=Q.join("."),J=G.substring(w.length);L.add(R+J)}else L.add(G)}),b.value=L};return t({copyJson:de,compressSource:he,expandAll:W,collapseAll:M,toggleExpand:q,updateValue:N,updateKey:x,filter:H,clearFilter:ee,sortKeys:U,clearSortKeys:A,isSorted:()=>_.value,isValidJson:()=>D.value,getParsedJson:()=>u.value,getFilteredJson:()=>p.value,getExpandedNodes:()=>b.value,getParseError:()=>c.value,getFilterError:()=>m.value,parseJson:w=>v(w),copyValue:w=>ye(w)}),(w,k)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["json-format",`json-format--${V.value.name}`])},[w.showToolbar?(o.openBlock(),o.createElementBlock("div",qr,[o.createElementVNode("div",Hr,[o.createElementVNode("button",{class:"json-format__btn json-format__btn--primary",onClick:de,disabled:!D.value,title:"Copy JSON"}," 📋 Copy ",8,jr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:W,disabled:!D.value,title:"Expand All"}," ⬇️ Expand All ",8,Kr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:M,disabled:!D.value,title:"Collapse All"}," ➡️ Collapse All ",8,Gr),o.createElementVNode("button",{class:"json-format__btn json-format__btn--secondary",onClick:he,disabled:!D.value,title:"Compress JSON"}," 📦 Compress ",8,Xr)]),o.createElementVNode("div",zr,[D.value?(o.openBlock(),o.createElementBlock("span",Wr," ✅ Valid JSON ")):(o.openBlock(),o.createElementBlock("span",Yr," ❌ Invalid JSON "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Qr,[D.value?m.value?(o.openBlock(),o.createElementBlock("div",Jr,[k[1]||(k[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",en,[o.createVNode($r,{value:ie.value,"key-name":"",level:0,expanded:b.value,"is-last":!0,theme:V.value,"onUpdate:value":N,onToggleExpand:q,onCopy:ye,"onUpdate:key":x},null,8,["value","expanded","theme"])])):(o.openBlock(),o.createElementBlock("div",Zr,[k[0]||(k[0]=o.createElementVNode("h4",null,"JSON Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]))])],2))}}),[["__scopeId","data-v-94157be3"]]);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vt={},Ft;function rn(){return Ft||(Ft=1,function(n){var t=n;(function(r){var a="__namespace",i=function(e){return e==null},u=function(e){return e===a||Number.isInteger(e)&&e>=1&&e<=11},c=function(e){return e&&u(e.nodeType)&&typeof e.nodeName=="string"};function b(e){var s=Array.prototype.slice,d=e.length,E=function(C,oe){return function(){return oe.apply(this,C.concat(s.call(arguments)))}},h=function(){var C=s.call(arguments);return C.length<d?E(C,h):e.apply(this,s.apply(arguments,[0,d]))};return h}var p=function(e,s){for(var d=0;d<s.length;d+=1)e(s[d],d,s)},m=function(e,s,d){var E=s;return p(function(h,C){E=e(E,h,C)},d),E},_=function(e,s){var d=new Array(s.length);return p(function(E,h){d[h]=e(E)},s),d},D=function(e,s){var d=[];return p(function(E,h){e(E,h)&&d.push(E)},s),d},V=function(e,s){for(var d=0;d<e.length;d+=1)if(e[d]===s)return!0;return!1};function j(e){return function(){return e}}function Y(e){return e.toString()}var ie=function(e,s){return s.join(e)},v=function(e,s,d){return e+d+s},H=Array.prototype.concat,K=function(e,s){var d=new ue;d.addArray(e);var E=d.toArray();return s?E.reverse():E},$=32767;function ae(e){for(var s=[],d=0;d<e.length;d+=$){var E=e.slice(d,d+$);s=H.apply(s,E)}return s}function ee(e,s){for(var d=Object(e),E=1;E<arguments.length;E++){var h=arguments[E];if(h!=null)for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(d[C]=h[C])}return d}var U={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NAMESPACE_NODE:a};A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(){this.init()}A.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(e){return new de(e[0],e[2])},this.reduceActions[5]=function(e){return new he(e[0],e[2])},this.reduceActions[7]=function(e){return new ye(e[0],e[2])},this.reduceActions[8]=function(e){return new x(e[0],e[2])},this.reduceActions[10]=function(e){return new B(e[0],e[2])},this.reduceActions[11]=function(e){return new X(e[0],e[2])},this.reduceActions[12]=function(e){return new Z(e[0],e[2])},this.reduceActions[13]=function(e){return new F(e[0],e[2])},this.reduceActions[15]=function(e){return new le(e[0],e[2])},this.reduceActions[16]=function(e){return new w(e[0],e[2])},this.reduceActions[18]=function(e){return new k(e[0],e[2])},this.reduceActions[19]=function(e){return new L(e[0],e[2])},this.reduceActions[20]=function(e){return new G(e[0],e[2])},this.reduceActions[22]=function(e){return new W(e[1])},this.reduceActions[24]=function(e){return new Q(e[0],e[2])},this.reduceActions[25]=function(e){return new R(void 0,void 0,e[0])},this.reduceActions[27]=function(e){return e[0].locationPath=e[2],e[0]},this.reduceActions[28]=function(e){return e[0].locationPath=e[2],e[0].locationPath.steps.unshift(new z(z.DESCENDANTORSELF,y.nodeTest,[])),e[0]},this.reduceActions[29]=function(e){return new R(e[0],[],void 0)},this.reduceActions[30]=function(e){return fe.instance_of(e[0],R)?(e[0].filterPredicates==null&&(e[0].filterPredicates=[]),e[0].filterPredicates.push(e[1]),e[0]):new R(e[0],[e[1]],void 0)},this.reduceActions[32]=function(e){return e[1]},this.reduceActions[33]=function(e){return new O(e[0])},this.reduceActions[34]=function(e){return new P(e[0])},this.reduceActions[36]=function(e){return new Ce(e[0],[])},this.reduceActions[37]=function(e){return new Ce(e[0],e[2])},this.reduceActions[38]=function(e){return[e[0]]},this.reduceActions[39]=function(e){return e[2].unshift(e[0]),e[2]},this.reduceActions[43]=function(e){return new De(!0,[])},this.reduceActions[44]=function(e){return e[1].absolute=!0,e[1]},this.reduceActions[46]=function(e){return new De(!1,[e[0]])},this.reduceActions[47]=function(e){return e[0].steps.push(e[2]),e[0]},this.reduceActions[49]=function(e){return new z(e[0],e[1],[])},this.reduceActions[50]=function(e){return new z(z.CHILD,e[0],[])},this.reduceActions[51]=function(e){return new z(e[0],e[1],e[2])},this.reduceActions[52]=function(e){return new z(z.CHILD,e[0],e[1])},this.reduceActions[54]=function(e){return[e[0]]},this.reduceActions[55]=function(e){return e[1].unshift(e[0]),e[1]},this.reduceActions[56]=function(e){return e[0]=="ancestor"?z.ANCESTOR:e[0]=="ancestor-or-self"?z.ANCESTORORSELF:e[0]=="attribute"?z.ATTRIBUTE:e[0]=="child"?z.CHILD:e[0]=="descendant"?z.DESCENDANT:e[0]=="descendant-or-self"?z.DESCENDANTORSELF:e[0]=="following"?z.FOLLOWING:e[0]=="following-sibling"?z.FOLLOWINGSIBLING:e[0]=="namespace"?z.NAMESPACE:e[0]=="parent"?z.PARENT:e[0]=="preceding"?z.PRECEDING:e[0]=="preceding-sibling"?z.PRECEDINGSIBLING:e[0]=="self"?z.SELF:-1},this.reduceActions[57]=function(e){return z.ATTRIBUTE},this.reduceActions[59]=function(e){return e[0]=="comment"?y.commentTest:e[0]=="text"?y.textTest:e[0]=="processing-instruction"?y.anyPiTest:e[0]=="node"?y.nodeTest:new y(-1,void 0)},this.reduceActions[60]=function(e){return new y.PITest(e[2])},this.reduceActions[61]=function(e){return e[1]},this.reduceActions[63]=function(e){return e[1].absolute=!0,e[1].steps.unshift(new z(z.DESCENDANTORSELF,y.nodeTest,[])),e[1]},this.reduceActions[64]=function(e){return e[0].steps.push(new z(z.DESCENDANTORSELF,y.nodeTest,[])),e[0].steps.push(e[2]),e[0]},this.reduceActions[65]=function(e){return new z(z.SELF,y.nodeTest,[])},this.reduceActions[66]=function(e){return new z(z.PARENT,y.nodeTest,[])},this.reduceActions[67]=function(e){return new ne(e[1])},this.reduceActions[68]=function(e){return y.nameTestAny},this.reduceActions[69]=function(e){return new y.NameTestPrefixAny(e[0].split(":")[0])},this.reduceActions[70]=function(e){return new y.NameTestQName(e[0])}},A.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],A.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," "," F ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],A.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," =>?@ AB CDEFGH IJ ","456789:;<=>?@ AB CDEFGH IJ"," EFGH IJ "," EFGH IJ "," "," GH IJ ","
GH IJ "," i "," i "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABqCDEFGH IJ "," "," "],A.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],A.DOUBLEDOT=2,A.DOUBLECOLON=3,A.DOUBLESLASH=4,A.NOTEQUAL=5,A.LESSTHANOREQUAL=6,A.GREATERTHANOREQUAL=7,A.AND=8,A.OR=9,A.MOD=10,A.DIV=11,A.MULTIPLYOPERATOR=12,A.FUNCTIONNAME=13,A.AXISNAME=14,A.LITERAL=15,A.NUMBER=16,A.ASTERISKNAMETEST=17,A.QNAME=18,A.NCNAMECOLONASTERISK=19,A.NODETYPE=20,A.PROCESSINGINSTRUCTIONWITHLITERAL=21,A.EQUALS=22,A.LESSTHAN=23,A.GREATERTHAN=24,A.PLUS=25,A.MINUS=26,A.BAR=27,A.SLASH=28,A.LEFTPARENTHESIS=29,A.RIGHTPARENTHESIS=30,A.COMMA=31,A.AT=32,A.LEFTBRACKET=33,A.RIGHTBRACKET=34,A.DOT=35,A.DOLLAR=36,A.prototype.tokenize=function(e){for(var s=[],d=[],E=e+"\0",h=0,C=E.charAt(h++);;){for(;C==" "||C==" "||C=="\r"||C==`
|
|
9
|
+
`;)C=E.charAt(h++);if(C=="\0"||h>=E.length)break;if(C=="("){s.push(A.LEFTPARENTHESIS),d.push(C),C=E.charAt(h++);continue}if(C==")"){s.push(A.RIGHTPARENTHESIS),d.push(C),C=E.charAt(h++);continue}if(C=="["){s.push(A.LEFTBRACKET),d.push(C),C=E.charAt(h++);continue}if(C=="]"){s.push(A.RIGHTBRACKET),d.push(C),C=E.charAt(h++);continue}if(C=="@"){s.push(A.AT),d.push(C),C=E.charAt(h++);continue}if(C==","){s.push(A.COMMA),d.push(C),C=E.charAt(h++);continue}if(C=="|"){s.push(A.BAR),d.push(C),C=E.charAt(h++);continue}if(C=="+"){s.push(A.PLUS),d.push(C),C=E.charAt(h++);continue}if(C=="-"){s.push(A.MINUS),d.push(C),C=E.charAt(h++);continue}if(C=="="){s.push(A.EQUALS),d.push(C),C=E.charAt(h++);continue}if(C=="$"){s.push(A.DOLLAR),d.push(C),C=E.charAt(h++);continue}if(C=="."){if(C=E.charAt(h++),C=="."){s.push(A.DOUBLEDOT),d.push(".."),C=E.charAt(h++);continue}if(C>="0"&&C<="9"){var oe="."+C;for(C=E.charAt(h++);C>="0"&&C<="9";)oe+=C,C=E.charAt(h++);s.push(A.NUMBER),d.push(oe);continue}s.push(A.DOT),d.push(".");continue}if(C=="'"||C=='"'){for(var xe=C,Ne="";h<E.length&&(C=E.charAt(h))!==xe;)Ne+=C,h+=1;if(C!==xe)throw Me.fromMessage("Unterminated string literal: "+xe+Ne);h+=1,s.push(A.LITERAL),d.push(Ne),C=E.charAt(h++);continue}if(C>="0"&&C<="9"){var oe=C;for(C=E.charAt(h++);C>="0"&&C<="9";)oe+=C,C=E.charAt(h++);if(C=="."&&E.charAt(h)>="0"&&E.charAt(h)<="9")for(oe+=C,oe+=E.charAt(h++),C=E.charAt(h++);C>="0"&&C<="9";)oe+=C,C=E.charAt(h++);s.push(A.NUMBER),d.push(oe);continue}if(C=="*"){if(s.length>0){var se=s[s.length-1];if(se!=A.AT&&se!=A.DOUBLECOLON&&se!=A.LEFTPARENTHESIS&&se!=A.LEFTBRACKET&&se!=A.AND&&se!=A.OR&&se!=A.MOD&&se!=A.DIV&&se!=A.MULTIPLYOPERATOR&&se!=A.SLASH&&se!=A.DOUBLESLASH&&se!=A.BAR&&se!=A.PLUS&&se!=A.MINUS&&se!=A.EQUALS&&se!=A.NOTEQUAL&&se!=A.LESSTHAN&&se!=A.LESSTHANOREQUAL&&se!=A.GREATERTHAN&&se!=A.GREATERTHANOREQUAL){s.push(A.MULTIPLYOPERATOR),d.push(C),C=E.charAt(h++);continue}}s.push(A.ASTERISKNAMETEST),d.push(C),C=E.charAt(h++);continue}if(C==":"&&E.charAt(h)==":"){s.push(A.DOUBLECOLON),d.push("::"),h++,C=E.charAt(h++);continue}if(C=="/"){if(C=E.charAt(h++),C=="/"){s.push(A.DOUBLESLASH),d.push("//"),C=E.charAt(h++);continue}s.push(A.SLASH),d.push("/");continue}if(C=="!"&&E.charAt(h)=="="){s.push(A.NOTEQUAL),d.push("!="),h++,C=E.charAt(h++);continue}if(C=="<"){if(E.charAt(h)=="="){s.push(A.LESSTHANOREQUAL),d.push("<="),h++,C=E.charAt(h++);continue}s.push(A.LESSTHAN),d.push("<"),C=E.charAt(h++);continue}if(C==">"){if(E.charAt(h)=="="){s.push(A.GREATERTHANOREQUAL),d.push(">="),h++,C=E.charAt(h++);continue}s.push(A.GREATERTHAN),d.push(">"),C=E.charAt(h++);continue}if(C=="_"||fe.isLetter(C.charCodeAt(0))){var ce=C;for(C=E.charAt(h++);fe.isNCNameChar(C.charCodeAt(0));)ce+=C,C=E.charAt(h++);if(s.length>0){var se=s[s.length-1];if(se!=A.AT&&se!=A.DOUBLECOLON&&se!=A.LEFTPARENTHESIS&&se!=A.LEFTBRACKET&&se!=A.AND&&se!=A.OR&&se!=A.MOD&&se!=A.DIV&&se!=A.MULTIPLYOPERATOR&&se!=A.SLASH&&se!=A.DOUBLESLASH&&se!=A.BAR&&se!=A.PLUS&&se!=A.MINUS&&se!=A.EQUALS&&se!=A.NOTEQUAL&&se!=A.LESSTHAN&&se!=A.LESSTHANOREQUAL&&se!=A.GREATERTHAN&&se!=A.GREATERTHANOREQUAL){if(ce=="and"){s.push(A.AND),d.push(ce);continue}if(ce=="or"){s.push(A.OR),d.push(ce);continue}if(ce=="mod"){s.push(A.MOD),d.push(ce);continue}if(ce=="div"){s.push(A.DIV),d.push(ce);continue}}}if(C==":"){if(E.charAt(h)=="*"){s.push(A.NCNAMECOLONASTERISK),d.push(ce+":*"),h++,C=E.charAt(h++);continue}if(E.charAt(h)=="_"||fe.isLetter(E.charCodeAt(h))){for(ce+=":",C=E.charAt(h++);fe.isNCNameChar(C.charCodeAt(0));)ce+=C,C=E.charAt(h++);if(C=="("){s.push(A.FUNCTIONNAME),d.push(ce);continue}s.push(A.QNAME),d.push(ce);continue}if(E.charAt(h)==":"){s.push(A.AXISNAME),d.push(ce);continue}}if(C=="("){if(ce=="comment"||ce=="text"||ce=="node"){s.push(A.NODETYPE),d.push(ce);continue}if(ce=="processing-instruction"){E.charAt(h)==")"?s.push(A.NODETYPE):s.push(A.PROCESSINGINSTRUCTIONWITHLITERAL),d.push(ce);continue}s.push(A.FUNCTIONNAME),d.push(ce);continue}s.push(A.QNAME),d.push(ce);continue}throw new Error("Unexpected character "+C)}return s.push(1),d.push("[EOF]"),[s,d]},A.SHIFT="s",A.REDUCE="r",A.ACCEPT="a",A.prototype.parse=function(Ne){if(!Ne)throw new Error("XPath expression unspecified.");if(typeof Ne!="string")throw new Error("XPath expression must be a string.");var s,d,E=this.tokenize(Ne);if(E!=null){s=E[0],d=E[1];var h=0,C=[],oe=[],xe=[],Ne,se,ce;for(C.push(0),oe.push(1),xe.push("_S"),se=s[h],ce=d[h++];;)switch(Ne=C[C.length-1],A.actionTable[Ne].charAt(se-1)){case A.SHIFT:oe.push(-se),xe.push(ce),C.push(A.actionTableNumber[Ne].charCodeAt(se-1)-32),se=s[h],ce=d[h++];break;case A.REDUCE:for(var Le=A.productions[A.actionTableNumber[Ne].charCodeAt(se-1)-32][1],Ke=[],Se=0;Se<Le;Se++)oe.pop(),Ke.unshift(xe.pop()),C.pop();var Qe=C[C.length-1];oe.push(A.productions[A.actionTableNumber[Ne].charCodeAt(se-1)-32][0]),this.reduceActions[A.actionTableNumber[Ne].charCodeAt(se-1)-32]==null?xe.push(Ke[0]):xe.push(this.reduceActions[A.actionTableNumber[Ne].charCodeAt(se-1)-32](Ke)),C.push(A.gotoTable[Qe].charCodeAt(A.productions[A.actionTableNumber[Ne].charCodeAt(se-1)-32][0]-2)-33);break;case A.ACCEPT:return new te(xe.pop());default:throw new Error("XPath parse error")}}},te.prototype=new Object,te.prototype.constructor=te,te.superclass=Object.prototype;function te(e){this.expression=e}te.prototype.toString=function(){return this.expression.toString()};function N(e,s,d){s in e||(e[s]=d)}te.prototype.evaluate=function(e){var s=e.expressionContextNode;if(!(i(s)||c(s)))throw new Error("Context node does not appear to be a valid DOM node.");return e.contextNode=e.expressionContextNode,e.contextSize=1,e.contextPosition=1,e.isHtml&&(N(e,"caseInsensitive",!0),N(e,"allowAnyNamespaceForNoPrefix",!0)),N(e,"caseInsensitive",!1),this.expression.evaluate(e)},te.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",te.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",T.prototype=new Object,T.prototype.constructor=T,T.superclass=Object.prototype;function T(){}T.prototype.init=function(){},T.prototype.toString=function(){return"<Expression>"},T.prototype.evaluate=function(e){throw new Error("Could not evaluate expression.")},q.prototype=new T,q.prototype.constructor=q,q.superclass=T.prototype;function q(e){arguments.length>0&&this.init(e)}q.prototype.init=function(e){this.rhs=e},W.prototype=new q,W.prototype.constructor=W,W.superclass=q.prototype;function W(e){arguments.length>0&&this.init(e)}W.prototype.init=function(e){W.superclass.init.call(this,e)},W.prototype.evaluate=function(e){return this.rhs.evaluate(e).number().negate()},W.prototype.toString=function(){return"-"+this.rhs.toString()},M.prototype=new T,M.prototype.constructor=M,M.superclass=T.prototype;function M(e,s){arguments.length>0&&this.init(e,s)}M.prototype.init=function(e,s){this.lhs=e,this.rhs=s},de.prototype=new M,de.prototype.constructor=de,de.superclass=M.prototype;function de(e,s){arguments.length>0&&this.init(e,s)}de.prototype.init=function(e,s){de.superclass.init.call(this,e,s)},de.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},de.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?s:this.rhs.evaluate(e).bool()},he.prototype=new M,he.prototype.constructor=he,he.superclass=M.prototype;function he(e,s){arguments.length>0&&this.init(e,s)}he.prototype.init=function(e,s){he.superclass.init.call(this,e,s)},he.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},he.prototype.evaluate=function(e){var s=this.lhs.evaluate(e).bool();return s.booleanValue()?this.rhs.evaluate(e).bool():s},ye.prototype=new M,ye.prototype.constructor=ye,ye.superclass=M.prototype;function ye(e,s){arguments.length>0&&this.init(e,s)}ye.prototype.init=function(e,s){ye.superclass.init.call(this,e,s)},ye.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},ye.prototype.evaluate=function(e){return this.lhs.evaluate(e).equals(this.rhs.evaluate(e))},x.prototype=new M,x.prototype.constructor=x,x.superclass=M.prototype;function x(e,s){arguments.length>0&&this.init(e,s)}x.prototype.init=function(e,s){x.superclass.init.call(this,e,s)},x.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},x.prototype.evaluate=function(e){return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e))},B.prototype=new M,B.prototype.constructor=B,B.superclass=M.prototype;function B(e,s){arguments.length>0&&this.init(e,s)}B.prototype.init=function(e,s){B.superclass.init.call(this,e,s)},B.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e))},B.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},X.prototype=new M,X.prototype.constructor=X,X.superclass=M.prototype;function X(e,s){arguments.length>0&&this.init(e,s)}X.prototype.init=function(e,s){X.superclass.init.call(this,e,s)},X.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e))},X.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},Z.prototype=new M,Z.prototype.constructor=Z,Z.superclass=M.prototype;function Z(e,s){arguments.length>0&&this.init(e,s)}Z.prototype.init=function(e,s){Z.superclass.init.call(this,e,s)},Z.prototype.evaluate=function(e){return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e))},Z.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},F.prototype=new M,F.prototype.constructor=F,F.superclass=M.prototype;function F(e,s){arguments.length>0&&this.init(e,s)}F.prototype.init=function(e,s){F.superclass.init.call(this,e,s)},F.prototype.evaluate=function(e){return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e))},F.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},le.prototype=new M,le.prototype.constructor=le,le.superclass=M.prototype;function le(e,s){arguments.length>0&&this.init(e,s)}le.prototype.init=function(e,s){le.superclass.init.call(this,e,s)},le.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number())},le.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},w.prototype=new M,w.prototype.constructor=w,w.superclass=M.prototype;function w(e,s){arguments.length>0&&this.init(e,s)}w.prototype.init=function(e,s){w.superclass.init.call(this,e,s)},w.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number())},w.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},k.prototype=new M,k.prototype.constructor=k,k.superclass=M.prototype;function k(e,s){arguments.length>0&&this.init(e,s)}k.prototype.init=function(e,s){k.superclass.init.call(this,e,s)},k.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number())},k.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},L.prototype=new M,L.prototype.constructor=L,L.superclass=M.prototype;function L(e,s){arguments.length>0&&this.init(e,s)}L.prototype.init=function(e,s){L.superclass.init.call(this,e,s)},L.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number())},L.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},G.prototype=new M,G.prototype.constructor=G,G.superclass=M.prototype;function G(e,s){arguments.length>0&&this.init(e,s)}G.prototype.init=function(e,s){G.superclass.init.call(this,e,s)},G.prototype.evaluate=function(e){return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number())},G.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},Q.prototype=new M,Q.prototype.constructor=Q,Q.superclass=M.prototype;function Q(e,s){arguments.length>0&&this.init(e,s)}Q.prototype.init=function(e,s){Q.superclass.init.call(this,e,s)},Q.prototype.evaluate=function(e){return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset())},Q.prototype.toString=function(){return _(Y,[this.lhs,this.rhs]).join(" | ")},R.prototype=new T,R.prototype.constructor=R,R.superclass=T.prototype;function R(e,s,d){arguments.length>0&&this.init(e,s,d)}R.prototype.init=function(e,s,d){R.superclass.init.call(this),this.filter=e,this.filterPredicates=s,this.locationPath=d};function J(e){for(;e&&e.parentNode;)e=e.parentNode;return e}var ge=function(e,s,d,E){if(e.length===0)return d;var h=s.extend({});return m(function(C,oe){return h.contextSize=C.length,D(function(xe,Ne){return h.contextNode=xe,h.contextPosition=Ne+1,R.predicateMatches(oe,h)},C)},K(d,E),e)};R.getRoot=function(e,s){var d=s[0];if(d&&d.nodeType===U.DOCUMENT_NODE)return d;if(e.virtualRoot)return e.virtualRoot;if(!d)throw new Error("Context node not found when determining document root.");var E=d.ownerDocument;if(E)return E;for(var h=d;h.parentNode!=null;)h=h.parentNode;return h};var Ee=function(e){var s=String(e.name);return s==="xmlns"?"":s.substring(0,6)==="xmlns:"?s.substring(6,s.length):null};R.applyStep=function(e,s,d){if(!d)throw new Error("Context node not found when evaluating XPath step: "+e);var E=[];switch(s.contextNode=d,e.axis){case z.ANCESTOR:if(s.contextNode===s.virtualRoot)break;var h;for(s.contextNode.nodeType==U.ATTRIBUTE_NODE?h=R.getOwnerElement(s.contextNode):h=s.contextNode.parentNode;h!=null&&(e.nodeTest.matches(h,s)&&E.push(h),h!==s.virtualRoot);)h=h.parentNode;break;case z.ANCESTORORSELF:for(var h=s.contextNode;h!=null&&(e.nodeTest.matches(h,s)&&E.push(h),h!==s.virtualRoot);h=h.nodeType==U.ATTRIBUTE_NODE?R.getOwnerElement(h):h.parentNode);break;case z.ATTRIBUTE:var C=s.contextNode.attributes;if(C!=null)for(var oe=0;oe<C.length;oe++){var h=C.item(oe);e.nodeTest.matches(h,s)&&E.push(h)}break;case z.CHILD:for(var h=s.contextNode.firstChild;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&E.push(h);break;case z.DESCENDANT:for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&E.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case z.DESCENDANTORSELF:e.nodeTest.matches(s.contextNode,s)&&E.push(s.contextNode);for(var ce=[s.contextNode.firstChild];ce.length>0;)for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&E.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;break;case z.FOLLOWING:if(s.contextNode===s.virtualRoot)break;var ce=[];s.contextNode.firstChild!=null?ce.unshift(s.contextNode.firstChild):ce.unshift(s.contextNode.nextSibling);for(var h=s.contextNode.parentNode;h!=null&&h.nodeType!=U.DOCUMENT_NODE&&h!==s.virtualRoot;h=h.parentNode)ce.unshift(h.nextSibling);do for(var h=ce.pop();h!=null;)e.nodeTest.matches(h,s)&&E.push(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling;while(ce.length>0);break;case z.FOLLOWINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.nextSibling;h!=null;h=h.nextSibling)e.nodeTest.matches(h,s)&&E.push(h);break;case z.NAMESPACE:var xe={};if(s.contextNode.nodeType==U.ELEMENT_NODE){xe.xml=new We("xml",null,te.XML_NAMESPACE_URI,s.contextNode);for(var h=s.contextNode;h!=null&&h.nodeType==U.ELEMENT_NODE;h=h.parentNode)for(var oe=0;oe<h.attributes.length;oe++){var Ne=h.attributes.item(oe),se=Ee(Ne);se!=null&&xe[se]==null&&(xe[se]=new We(se,Ne,Ne.value,s.contextNode))}for(var se in xe){var d=xe[se];e.nodeTest.matches(d,s)&&E.push(d)}}break;case z.PARENT:h=null,s.contextNode!==s.virtualRoot&&(s.contextNode.nodeType==U.ATTRIBUTE_NODE?h=R.getOwnerElement(s.contextNode):h=s.contextNode.parentNode),h!=null&&e.nodeTest.matches(h,s)&&E.push(h);break;case z.PRECEDING:var ce;s.virtualRoot!=null?ce=[s.virtualRoot]:ce=[J(s.contextNode)];e:for(;ce.length>0;)for(var h=ce.pop();h!=null;){if(h==s.contextNode)break e;e.nodeTest.matches(h,s)&&E.unshift(h),h.firstChild!=null?(ce.push(h.nextSibling),h=h.firstChild):h=h.nextSibling}break;case z.PRECEDINGSIBLING:if(s.contextNode===s.virtualRoot)break;for(var h=s.contextNode.previousSibling;h!=null;h=h.previousSibling)e.nodeTest.matches(h,s)&&E.push(h);break;case z.SELF:e.nodeTest.matches(s.contextNode,s)&&E.push(s.contextNode);break}return E};function _e(e,s,d){return ge(e.predicates,s,R.applyStep(e,s,d),V(Be,e.axis))}function ke(e,s,d){return ae(_(_e.bind(null,d,e),s))}R.applySteps=function(e,s,d){return m(ke.bind(null,s),d,e)},R.prototype.applyFilter=function(e,s){if(!this.filter)return{nodes:[e.contextNode]};var d=this.filter.evaluate(e);if(!fe.instance_of(d,ue)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:d}}return{nodes:ge(this.filterPredicates||[],s,d.toUnsortedArray(),!1)}},R.applyLocationPath=function(e,s,d){if(!e)return d;var E=e.absolute?[R.getRoot(s,d)]:d;return R.applySteps(e.steps,s,E)},R.prototype.evaluate=function(e){var s=ee(new He,e),d=this.applyFilter(e,s);if("nonNodes"in d)return d.nonNodes;var E=new ue;return E.addArray(R.applyLocationPath(this.locationPath,s,d.nodes)),E},R.predicateMatches=function(e,s){var d=e.evaluate(s);return fe.instance_of(d,P)?s.contextPosition===d.numberValue():d.booleanValue()},R.predicateString=function(e){return v("[","]",e.toString())},R.predicatesString=function(e){return ie("",_(R.predicateString,e))},R.prototype.toString=function(){if(this.filter!=null){var e=Y(this.filter);return fe.instance_of(this.filter,O)?v("'","'",e):this.filterPredicates!=null&&this.filterPredicates.length?v("(",")",e)+R.predicatesString(this.filterPredicates):this.locationPath!=null?e+(this.locationPath.absolute?"":"/")+Y(this.locationPath):e}return Y(this.locationPath)},R.getOwnerElement=function(e){if(e.ownerElement)return e.ownerElement;try{if(e.selectSingleNode)return e.selectSingleNode("..")}catch{}for(var s=e.nodeType==U.DOCUMENT_NODE?e:e.ownerDocument,d=s.getElementsByTagName("*"),E=0;E<d.length;E++)for(var h=d.item(E),C=h.attributes,oe=0;oe<C.length;oe++){var xe=C.item(oe);if(xe===e)return h}return null},De.prototype=new Object,De.prototype.constructor=De,De.superclass=Object.prototype;function De(e,s){arguments.length>0&&this.init(e,s)}De.prototype.init=function(e,s){this.absolute=e,this.steps=s},De.prototype.toString=function(){return(this.absolute?"/":"")+_(Y,this.steps).join("/")},z.prototype=new Object,z.prototype.constructor=z,z.superclass=Object.prototype;function z(e,s,d){arguments.length>0&&this.init(e,s,d)}z.prototype.init=function(e,s,d){this.axis=e,this.nodeTest=s,this.predicates=d},z.prototype.toString=function(){return z.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+R.predicatesString(this.predicates)},z.ANCESTOR=0,z.ANCESTORORSELF=1,z.ATTRIBUTE=2,z.CHILD=3,z.DESCENDANT=4,z.DESCENDANTORSELF=5,z.FOLLOWING=6,z.FOLLOWINGSIBLING=7,z.NAMESPACE=8,z.PARENT=9,z.PRECEDING=10,z.PRECEDINGSIBLING=11,z.SELF=12,z.STEPNAMES=m(function(e,s){return e[s[0]]=s[1],e},{},[[z.ANCESTOR,"ancestor"],[z.ANCESTORORSELF,"ancestor-or-self"],[z.ATTRIBUTE,"attribute"],[z.CHILD,"child"],[z.DESCENDANT,"descendant"],[z.DESCENDANTORSELF,"descendant-or-self"],[z.FOLLOWING,"following"],[z.FOLLOWINGSIBLING,"following-sibling"],[z.NAMESPACE,"namespace"],[z.PARENT,"parent"],[z.PRECEDING,"preceding"],[z.PRECEDINGSIBLING,"preceding-sibling"],[z.SELF,"self"]]);var Be=[z.ANCESTOR,z.ANCESTORORSELF,z.PARENT,z.PRECEDING,z.PRECEDINGSIBLING];y.prototype=new Object,y.prototype.constructor=y,y.superclass=Object.prototype;function y(e,s){arguments.length>0&&this.init(e,s)}y.prototype.init=function(e,s){this.type=e,this.value=s},y.prototype.toString=function(){return"<unknown nodetest type>"},y.prototype.matches=function(e,s){console.warn("unknown node test type")},y.NAMETESTANY=0,y.NAMETESTPREFIXANY=1,y.NAMETESTQNAME=2,y.COMMENT=3,y.TEXT=4,y.PI=5,y.NODE=6,y.isNodeType=function(e){return function(s){return V(e,s.nodeType)}},y.makeNodeTestType=function(e,s,d){var E=d||function(){};return E.prototype=new y(e),E.prototype.constructor=E,ee(E.prototype,s),E},y.makeNodeTypeTest=function(e,s,d){return new(y.makeNodeTestType(e,{matches:y.isNodeType(s),toString:j(d)}))},y.hasPrefix=function(e){return e.prefix||(e.nodeName||e.tagName).indexOf(":")!==-1},y.isElementOrAttribute=y.isNodeType([1,2]),y.nameSpaceMatches=function(e,s,d){var E=d.namespaceURI||"";if(!e)return!E||s.allowAnyNamespaceForNoPrefix&&!y.hasPrefix(d);var h=s.namespaceResolver.getNamespace(e,s.expressionContextNode);if(h==null)throw new Error("Cannot resolve QName "+e);return h===E},y.localNameMatches=function(e,s,d){var E=d.localName||d.nodeName;return s.caseInsensitive?e.toLowerCase()===E.toLowerCase():e===E},y.NameTestPrefixAny=y.makeNodeTestType(y.NAMETESTPREFIXANY,{matches:function(e,s){return y.isElementOrAttribute(e)&&y.nameSpaceMatches(this.prefix,s,e)},toString:function(){return this.prefix+":*"}},function(s){this.prefix=s}),y.NameTestQName=y.makeNodeTestType(y.NAMETESTQNAME,{matches:function(e,s){return y.isNodeType([U.ELEMENT_NODE,U.ATTRIBUTE_NODE,U.NAMESPACE_NODE])(e)&&y.nameSpaceMatches(this.prefix,s,e)&&y.localNameMatches(this.localName,s,e)},toString:function(){return this.name}},function(s){var d=s.split(":");this.name=s,this.prefix=d.length>1?d[0]:null,this.localName=d[d.length>1?1:0]}),y.PITest=y.makeNodeTestType(y.PI,{matches:function(e,s){return y.isNodeType([U.PROCESSING_INSTRUCTION_NODE])(e)&&(e.target||e.nodeName)===this.name},toString:function(){return v('processing-instruction("','")',this.name)}},function(e){this.name=e}),y.nameTestAny=y.makeNodeTypeTest(y.NAMETESTANY,[U.ELEMENT_NODE,U.ATTRIBUTE_NODE,U.NAMESPACE_NODE],"*"),y.textTest=y.makeNodeTypeTest(y.TEXT,[U.TEXT_NODE,U.CDATA_SECTION_NODE],"text()"),y.commentTest=y.makeNodeTypeTest(y.COMMENT,[U.COMMENT_NODE],"comment()"),y.nodeTest=y.makeNodeTypeTest(y.NODE,[U.ELEMENT_NODE,U.ATTRIBUTE_NODE,U.TEXT_NODE,U.CDATA_SECTION_NODE,U.PROCESSING_INSTRUCTION_NODE,U.COMMENT_NODE,U.DOCUMENT_NODE],"node()"),y.anyPiTest=y.makeNodeTypeTest(y.PI,[U.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),ne.prototype=new T,ne.prototype.constructor=ne,ne.superclass=T.prototype;function ne(e){arguments.length>0&&this.init(e)}ne.prototype.init=function(e){this.variable=e},ne.prototype.toString=function(){return"$"+this.variable},ne.prototype.evaluate=function(e){var s=fe.resolveQName(this.variable,e.namespaceResolver,e.contextNode,!1);if(s[0]==null)throw new Error("Cannot resolve QName "+fn);var d=e.variableResolver.getVariable(s[1],s[0]);if(!d)throw Me.fromMessage("Undeclared variable: "+this.toString());return d},Ce.prototype=new T,Ce.prototype.constructor=Ce,Ce.superclass=T.prototype;function Ce(e,s){arguments.length>0&&this.init(e,s)}Ce.prototype.init=function(e,s){this.functionName=e,this.arguments=s},Ce.prototype.toString=function(){for(var e=this.functionName+"(",s=0;s<this.arguments.length;s++)s>0&&(e+=", "),e+=this.arguments[s].toString();return e+")"},Ce.prototype.evaluate=function(e){var s=Pe.getFunctionFromContext(this.functionName,e);if(!s)throw new Error("Unknown function "+this.functionName);var d=[e].concat(this.arguments);return s.apply(e.functionResolver.thisArg,d)};var be=new Object;be.equals=function(e,s){return e.equals(s)},be.notequal=function(e,s){return e.notequal(s)},be.lessthan=function(e,s){return e.lessthan(s)},be.greaterthan=function(e,s){return e.greaterthan(s)},be.lessthanorequal=function(e,s){return e.lessthanorequal(s)},be.greaterthanorequal=function(e,s){return e.greaterthanorequal(s)},O.prototype=new T,O.prototype.constructor=O,O.superclass=T.prototype;function O(e){arguments.length>0&&this.init(e)}O.prototype.init=function(e){this.str=String(e)},O.prototype.toString=function(){return this.str},O.prototype.evaluate=function(e){return this},O.prototype.string=function(){return this},O.prototype.number=function(){return new P(this.str)},O.prototype.bool=function(){return new pe(this.str)},O.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},O.prototype.stringValue=function(){return this.str},O.prototype.numberValue=function(){return this.number().numberValue()},O.prototype.booleanValue=function(){return this.bool().booleanValue()},O.prototype.equals=function(e){return fe.instance_of(e,pe)?this.bool().equals(e):fe.instance_of(e,P)?this.number().equals(e):fe.instance_of(e,ue)?e.compareWithString(this,be.equals):new pe(this.str==e.str)},O.prototype.notequal=function(e){return fe.instance_of(e,pe)?this.bool().notequal(e):fe.instance_of(e,P)?this.number().notequal(e):fe.instance_of(e,ue)?e.compareWithString(this,be.notequal):new pe(this.str!=e.str)},O.prototype.lessthan=function(e){return this.number().lessthan(e)},O.prototype.greaterthan=function(e){return this.number().greaterthan(e)},O.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},O.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},P.prototype=new T,P.prototype.constructor=P,P.superclass=T.prototype;function P(e){arguments.length>0&&this.init(e)}P.prototype.init=function(e){this.num=typeof e=="string"?this.parse(e):Number(e)},P.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,P.prototype.parse=function(e){return this.numberFormat.test(e)?parseFloat(e):Number.NaN};function Re(e){for(var s=e.split("e-"),d=s[0].replace(".",""),E=Number(s[1]),h=0;h<E-1;h+=1)d="0"+d;return"0."+d}function qe(e){for(var s=e.split("e"),d=s[0].replace(".",""),E=Number(s[1]),h=E+1-d.length,C=0;C<h;C+=1)d+="0";return d}P.prototype.toString=function(){var e=this.num.toString();return e.indexOf("e-")!==-1?Re(e):e.indexOf("e")!==-1?qe(e):e},P.prototype.evaluate=function(e){return this},P.prototype.string=function(){return new O(this.toString())},P.prototype.number=function(){return this},P.prototype.bool=function(){return new pe(this.num)},P.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},P.prototype.stringValue=function(){return this.string().stringValue()},P.prototype.numberValue=function(){return this.num},P.prototype.booleanValue=function(){return this.bool().booleanValue()},P.prototype.negate=function(){return new P(-this.num)},P.prototype.equals=function(e){return fe.instance_of(e,pe)?this.bool().equals(e):fe.instance_of(e,O)?this.equals(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,be.equals):new pe(this.num==e.num)},P.prototype.notequal=function(e){return fe.instance_of(e,pe)?this.bool().notequal(e):fe.instance_of(e,O)?this.notequal(e.number()):fe.instance_of(e,ue)?e.compareWithNumber(this,be.notequal):new pe(this.num!=e.num)},P.prototype.lessthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.greaterthan):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.lessthan(e.number()):new pe(this.num<e.num)},P.prototype.greaterthan=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.lessthan):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.greaterthan(e.number()):new pe(this.num>e.num)},P.prototype.lessthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.greaterthanorequal):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.lessthanorequal(e.number()):new pe(this.num<=e.num)},P.prototype.greaterthanorequal=function(e){return fe.instance_of(e,ue)?e.compareWithNumber(this,be.lessthanorequal):fe.instance_of(e,pe)||fe.instance_of(e,O)?this.greaterthanorequal(e.number()):new pe(this.num>=e.num)},P.prototype.plus=function(e){return new P(this.num+e.num)},P.prototype.minus=function(e){return new P(this.num-e.num)},P.prototype.multiply=function(e){return new P(this.num*e.num)},P.prototype.div=function(e){return new P(this.num/e.num)},P.prototype.mod=function(e){return new P(this.num%e.num)},pe.prototype=new T,pe.prototype.constructor=pe,pe.superclass=T.prototype;function pe(e){arguments.length>0&&this.init(e)}pe.prototype.init=function(e){this.b=!!e},pe.prototype.toString=function(){return this.b.toString()},pe.prototype.evaluate=function(e){return this},pe.prototype.string=function(){return new O(this.b)},pe.prototype.number=function(){return new P(this.b)},pe.prototype.bool=function(){return this},pe.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},pe.prototype.stringValue=function(){return this.string().stringValue()},pe.prototype.numberValue=function(){return this.number().numberValue()},pe.prototype.booleanValue=function(){return this.b},pe.prototype.not=function(){return new pe(!this.b)},pe.prototype.equals=function(e){return fe.instance_of(e,O)||fe.instance_of(e,P)?this.equals(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,be.equals):new pe(this.b==e.b)},pe.prototype.notequal=function(e){return fe.instance_of(e,O)||fe.instance_of(e,P)?this.notequal(e.bool()):fe.instance_of(e,ue)?e.compareWithBoolean(this,be.notequal):new pe(this.b!=e.b)},pe.prototype.lessthan=function(e){return this.number().lessthan(e)},pe.prototype.greaterthan=function(e){return this.number().greaterthan(e)},pe.prototype.lessthanorequal=function(e){return this.number().lessthanorequal(e)},pe.prototype.greaterthanorequal=function(e){return this.number().greaterthanorequal(e)},pe.true_=new pe(!0),pe.false_=new pe(!1),Ie.prototype=new Object,Ie.prototype.constructor=Ie,Ie.superclass=Object.prototype;function Ie(e){this.init(e)}Ie.prototype.init=function(e){this.left=null,this.right=null,this.node=e,this.depth=1},Ie.prototype.balance=function(){var e=this.left==null?0:this.left.depth,s=this.right==null?0:this.right.depth;if(e>s+1){var d=this.left.left==null?0:this.left.left.depth,E=this.left.right==null?0:this.left.right.depth;d<E&&this.left.rotateRR(),this.rotateLL()}else if(e+1<s){var h=this.right.right==null?0:this.right.right.depth,C=this.right.left==null?0:this.right.left.depth;C>h&&this.right.rotateLL(),this.rotateRR()}},Ie.prototype.rotateLL=function(){var e=this.node,s=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=s,this.right.node=e,this.right.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.rotateRR=function(){var e=this.node,s=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=s,this.left.node=e,this.left.updateInNewLocation(),this.updateInNewLocation()},Ie.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Ie.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function gt(e,s){if(e===s)return 0;if(e.compareDocumentPosition){var d=e.compareDocumentPosition(s);return d&1||d&10?1:d&20?-1:0}for(var E=0,h=0,C=e;C!=null;C=C.parentNode||C.ownerElement)E++;for(var oe=s;oe!=null;oe=oe.parentNode||oe.ownerElement)h++;if(E>h){for(;E>h;)e=e.parentNode||e.ownerElement,E--;if(e===s)return 1}else if(h>E){for(;h>E;)s=s.parentNode||s.ownerElement,h--;if(e===s)return-1}for(var xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;xe!==Ne;)e=xe,s=Ne,xe=e.parentNode||e.ownerElement,Ne=s.parentNode||s.ownerElement;var se=Et(e),ce=Et(s);if(se&&!ce)return-1;if(!se&&ce)return 1;if(e.isXPathNamespace){if(e.nodeValue===te.XML_NAMESPACE_URI||!s.isXPathNamespace)return-1;if(s.nodeValue===te.XML_NAMESPACE_URI)return 1}else if(s.isXPathNamespace)return 1;if(xe)for(var Le=se?xe.attributes:xe.childNodes,Ke=Le.length,Se=e.baseNode||e,Qe=s.baseNode||s,Xe=0;Xe<Ke;Xe+=1){var ot=Le[Xe];if(ot===Se)return-1;if(ot===Qe)return 1}throw new Error("Unexpected: could not determine node order")}Ie.prototype.add=function(e){if(e===this.node)return!1;var s=gt(e,this.node),d=!1;return s==-1?this.left==null?(this.left=new Ie(e),d=!0):(d=this.left.add(e),d&&this.balance()):s==1&&(this.right==null?(this.right=new Ie(e),d=!0):(d=this.right.add(e),d&&this.balance())),d&&this.getDepthFromChildren(),d},ue.prototype=new T,ue.prototype.constructor=ue,ue.superclass=T.prototype;function ue(){this.init()}ue.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},ue.prototype.toString=function(){var e=this.first();return e==null?"":this.stringForNode(e)},ue.prototype.evaluate=function(e){return this},ue.prototype.string=function(){return new O(this.toString())},ue.prototype.stringValue=function(){return this.toString()},ue.prototype.number=function(){return new P(this.string())},ue.prototype.numberValue=function(){return Number(this.string())},ue.prototype.bool=function(){return new pe(this.booleanValue())},ue.prototype.booleanValue=function(){return!!this.size},ue.prototype.nodeset=function(){return this},ue.prototype.stringForNode=function(e){return e.nodeType==U.DOCUMENT_NODE||e.nodeType==U.ELEMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(e):e.nodeType===U.ATTRIBUTE_NODE?e.value||e.nodeValue:e.isNamespaceNode?e.namespace:e.nodeValue},ue.prototype.stringForContainerNode=function(e){for(var s="",d=e.firstChild;d!=null;d=d.nextSibling){var E=d.nodeType;(E===1||E===3||E===4||E===9||E===11)&&(s+=this.stringForNode(d))}return s},ue.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new Ie(this.nodes[0]);for(var e=1;e<this.nodes.length;e+=1)this.tree.add(this.nodes[e])}return this.tree},ue.prototype.first=function(){var e=this.buildTree();if(e==null)return null;for(;e.left!=null;)e=e.left;return e.node},ue.prototype.add=function(e){for(var s=0;s<this.nodes.length;s+=1)if(e===this.nodes[s])return;this.tree=null,this.nodes.push(e),this.size+=1},ue.prototype.addArray=function(e){var s=this;p(function(d){s.add(d)},e)},ue.prototype.toArray=function(){var e=[];return this.toArrayRec(this.buildTree(),e),e},ue.prototype.toArrayRec=function(e,s){e!=null&&(this.toArrayRec(e.left,s),s.push(e.node),this.toArrayRec(e.right,s))},ue.prototype.toUnsortedArray=function(){return this.nodes.slice()},ue.prototype.compareWithString=function(e,s){for(var d=this.toUnsortedArray(),E=0;E<d.length;E++){var h=d[E],C=new O(this.stringForNode(h)),oe=s(C,e);if(oe.booleanValue())return oe}return new pe(!1)},ue.prototype.compareWithNumber=function(e,s){for(var d=this.toUnsortedArray(),E=0;E<d.length;E++){var h=d[E],C=new P(this.stringForNode(h)),oe=s(C,e);if(oe.booleanValue())return oe}return new pe(!1)},ue.prototype.compareWithBoolean=function(e,s){return s(this.bool(),e)},ue.prototype.compareWithNodeSet=function(e,s){for(var d=this.toUnsortedArray(),E=function(xe,Ne){return s(Ne,xe)},h=0;h<d.length;h++){var C=new O(this.stringForNode(d[h])),oe=e.compareWithString(C,E);if(oe.booleanValue())return oe}return new pe(!1)},ue.compareWith=b(function(e,s){return fe.instance_of(s,O)?this.compareWithString(s,e):fe.instance_of(s,P)?this.compareWithNumber(s,e):fe.instance_of(s,pe)?this.compareWithBoolean(s,e):this.compareWithNodeSet(s,e)}),ue.prototype.equals=ue.compareWith(be.equals),ue.prototype.notequal=ue.compareWith(be.notequal),ue.prototype.lessthan=ue.compareWith(be.lessthan),ue.prototype.greaterthan=ue.compareWith(be.greaterthan),ue.prototype.lessthanorequal=ue.compareWith(be.lessthanorequal),ue.prototype.greaterthanorequal=ue.compareWith(be.greaterthanorequal),ue.prototype.union=function(e){var s=new ue;return s.addArray(this.toUnsortedArray()),s.addArray(e.toUnsortedArray()),s},We.prototype=new Object,We.prototype.constructor=We,We.superclass=Object.prototype;function We(e,s,d,E){this.isXPathNamespace=!0,this.baseNode=s,this.ownerDocument=E.ownerDocument,this.nodeName=e,this.prefix=e,this.localName=e,this.namespaceURI=null,this.nodeValue=d,this.ownerElement=E,this.nodeType=U.NAMESPACE_NODE}We.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},He.prototype=new Object,He.prototype.constructor=He,He.superclass=Object.prototype;function He(e,s,d){this.variableResolver=e??new Ge,this.namespaceResolver=s??new je,this.functionResolver=d??new Pe}He.prototype.extend=function(e){return ee(new He,this,e)},Ge.prototype=new Object,Ge.prototype.constructor=Ge,Ge.superclass=Object.prototype;function Ge(){}Ge.prototype.getVariable=function(e,s){return null},Pe.prototype=new Object,Pe.prototype.constructor=Pe,Pe.superclass=Object.prototype;function Pe(e){this.thisArg=e??me,this.functions=new Object,this.addStandardFunctions()}Pe.prototype.addStandardFunctions=function(){this.functions["{}last"]=me.last,this.functions["{}position"]=me.position,this.functions["{}count"]=me.count,this.functions["{}id"]=me.id,this.functions["{}local-name"]=me.localName,this.functions["{}namespace-uri"]=me.namespaceURI,this.functions["{}name"]=me.name,this.functions["{}string"]=me.string,this.functions["{}concat"]=me.concat,this.functions["{}starts-with"]=me.startsWith,this.functions["{}contains"]=me.contains,this.functions["{}substring-before"]=me.substringBefore,this.functions["{}substring-after"]=me.substringAfter,this.functions["{}substring"]=me.substring,this.functions["{}string-length"]=me.stringLength,this.functions["{}normalize-space"]=me.normalizeSpace,this.functions["{}translate"]=me.translate,this.functions["{}boolean"]=me.boolean_,this.functions["{}not"]=me.not,this.functions["{}true"]=me.true_,this.functions["{}false"]=me.false_,this.functions["{}lang"]=me.lang,this.functions["{}number"]=me.number,this.functions["{}sum"]=me.sum,this.functions["{}floor"]=me.floor,this.functions["{}ceiling"]=me.ceiling,this.functions["{}round"]=me.round},Pe.prototype.addFunction=function(e,s,d){this.functions["{"+e+"}"+s]=d},Pe.getFunctionFromContext=function(e,s){var d=fe.resolveQName(e,s.namespaceResolver,s.contextNode,!1);if(d[0]===null)throw new Error("Cannot resolve QName "+name);return s.functionResolver.getFunction(d[1],d[0])},Pe.prototype.getFunction=function(e,s){return this.functions["{"+s+"}"+e]},je.prototype=new Object,je.prototype.constructor=je,je.superclass=Object.prototype;function je(){}je.prototype.getNamespace=function(e,s){if(e=="xml")return te.XML_NAMESPACE_URI;if(e=="xmlns")return te.XMLNS_NAMESPACE_URI;for(s.nodeType==U.DOCUMENT_NODE?s=s.documentElement:s.nodeType==U.ATTRIBUTE_NODE?s=R.getOwnerElement(s):s.nodeType!=U.ELEMENT_NODE&&(s=s.parentNode);s!=null&&s.nodeType==U.ELEMENT_NODE;){for(var d=s.attributes,E=0;E<d.length;E++){var h=d.item(E),C=h.name||h.nodeName;if(C==="xmlns"&&e===""||C==="xmlns:"+e)return String(h.value||h.nodeValue)}s=s.parentNode}return null};var me=new Object;me.last=function(e){if(arguments.length!=1)throw new Error("Function last expects ()");return new P(e.contextSize)},me.position=function(e){if(arguments.length!=1)throw new Error("Function position expects ()");return new P(e.contextPosition)},me.count=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),ue))throw new Error("Function count expects (node-set)");return new P(s.size)},me.id=function(){var e=arguments[0],s;if(arguments.length!=2)throw new Error("Function id expects (object)");s=arguments[1].evaluate(e),fe.instance_of(s,ue)?s=s.toArray().join(" "):s=s.stringValue();for(var d=s.split(/[\x0d\x0a\x09\x20]+/),E=new ue,h=e.contextNode.nodeType==U.DOCUMENT_NODE?e.contextNode:e.contextNode.ownerDocument,C=0;C<d.length;C++){var oe;h.getElementById?oe=h.getElementById(d[C]):oe=fe.getElementById(h,d[C]),oe!=null&&E.add(oe)}return E},me.localName=function(e,s){var d;if(arguments.length==1)d=e.contextNode;else if(arguments.length==2)d=s.evaluate(e).first();else throw new Error("Function local-name expects (node-set?)");return d==null?new O(""):new O(d.localName||d.baseName||d.target||d.nodeName||"")},me.namespaceURI=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function namespace-uri expects (node-set?)");return s==null?new O(""):new O(s.namespaceURI||"")},me.name=function(){var e=arguments[0],s;if(arguments.length==1)s=e.contextNode;else if(arguments.length==2)s=arguments[1].evaluate(e).first();else throw new Error("Function name expects (node-set?)");return s==null?new O(""):s.nodeType==U.ELEMENT_NODE?new O(s.nodeName):s.nodeType==U.ATTRIBUTE_NODE?new O(s.name||s.nodeName):s.nodeType===U.PROCESSING_INSTRUCTION_NODE?new O(s.target||s.nodeName):s.localName==null?new O(""):new O(s.localName)},me.string=function(){var e=arguments[0];if(arguments.length==1)return new O(ue.prototype.stringForNode(e.contextNode));if(arguments.length==2)return arguments[1].evaluate(e).string();throw new Error("Function string expects (object?)")},me.concat=function(e){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var s="",d=1;d<arguments.length;d++)s+=arguments[d].evaluate(e).stringValue();return new O(s)},me.startsWith=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new pe(s.substring(0,d.length)==d)},me.contains=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new pe(s.indexOf(d)!==-1)},me.substringBefore=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();return new O(s.substring(0,s.indexOf(d)))},me.substringAfter=function(){var e=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var s=arguments[1].evaluate(e).stringValue(),d=arguments[2].evaluate(e).stringValue();if(d.length==0)return new O(s);var E=s.indexOf(d);return E==-1?new O(""):new O(s.substring(E+d.length))},me.substring=function(){var e=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var s=arguments[1].evaluate(e).stringValue(),d=Math.round(arguments[2].evaluate(e).numberValue())-1,E=arguments.length==4?d+Math.round(arguments[3].evaluate(e).numberValue()):void 0;return new O(s.substring(d,E))},me.stringLength=function(){var e=arguments[0],s;if(arguments.length==1)s=ue.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function string-length expects (string?)");return new P(s.length)},me.normalizeSpace=function(){var e=arguments[0],s;if(arguments.length==1)s=ue.prototype.stringForNode(e.contextNode);else if(arguments.length==2)s=arguments[1].evaluate(e).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var d=0,E=s.length-1;fe.isSpace(s.charCodeAt(E));)E--;for(var h="";d<=E&&fe.isSpace(s.charCodeAt(d));)d++;for(;d<=E;)if(fe.isSpace(s.charCodeAt(d)))for(h+=" ";d<=E&&fe.isSpace(s.charCodeAt(d));)d++;else h+=s.charAt(d),d++;return new O(h)},me.translate=function(e,s,d,E){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var h=s.evaluate(e).stringValue(),C=d.evaluate(e).stringValue(),oe=E.evaluate(e).stringValue(),xe=m(function(se,ce,Le){return ce in se||(se[ce]=Le>oe.length?"":oe[Le]),se},{},C),Ne=ie("",_(function(se){return se in xe?xe[se]:se},h));return new O(Ne)},me.boolean_=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(e).bool()},me.not=function(e,s){if(arguments.length!=2)throw new Error("Function not expects (object)");return s.evaluate(e).bool().not()},me.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return pe.true_},me.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return pe.false_},me.lang=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var s,d=e.contextNode;d!=null&&d.nodeType!=U.DOCUMENT_NODE;d=d.parentNode){var E=d.getAttributeNS(te.XML_NAMESPACE_URI,"lang");if(E!=null){s=String(E);break}}if(s==null)return pe.false_;var h=arguments[1].evaluate(e).stringValue();return new pe(s.substring(0,h.length)==h&&(s.length==h.length||s.charAt(h.length)=="-"))},me.number=function(){var e=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new P(ue.prototype.stringForNode(e.contextNode)):arguments[1].evaluate(e).number()},me.sum=function(){var e=arguments[0],s;if(arguments.length!=2||!fe.instance_of(s=arguments[1].evaluate(e),ue))throw new Error("Function sum expects (node-set)");s=s.toUnsortedArray();for(var d=0,E=0;E<s.length;E++)d+=new P(ue.prototype.stringForNode(s[E])).numberValue();return new P(d)},me.floor=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new P(Math.floor(arguments[1].evaluate(e).numberValue()))},me.ceiling=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new P(Math.ceil(arguments[1].evaluate(e).numberValue()))},me.round=function(){var e=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new P(Math.round(arguments[1].evaluate(e).numberValue()))};var fe=new Object,Et=function(e){return e&&(e.nodeType===U.ATTRIBUTE_NODE||e.ownerElement||e.isXPathNamespace)};fe.splitQName=function(e){var s=e.indexOf(":");return s==-1?[null,e]:[e.substring(0,s),e.substring(s+1)]},fe.resolveQName=function(e,s,d,E){var h=fe.splitQName(e);return h[0]!=null?h[0]=s.getNamespace(h[0],d):E?(h[0]=s.getNamespace("",d),h[0]==null&&(h[0]="")):h[0]="",h},fe.isSpace=function(e){return e==9||e==13||e==10||e==32},fe.isLetter=function(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=255||e>=256&&e<=305||e>=308&&e<=318||e>=321&&e<=328||e>=330&&e<=382||e>=384&&e<=451||e>=461&&e<=496||e>=500&&e<=501||e>=506&&e<=535||e>=592&&e<=680||e>=699&&e<=705||e==902||e>=904&&e<=906||e==908||e>=910&&e<=929||e>=931&&e<=974||e>=976&&e<=982||e==986||e==988||e==990||e==992||e>=994&&e<=1011||e>=1025&&e<=1036||e>=1038&&e<=1103||e>=1105&&e<=1116||e>=1118&&e<=1153||e>=1168&&e<=1220||e>=1223&&e<=1224||e>=1227&&e<=1228||e>=1232&&e<=1259||e>=1262&&e<=1269||e>=1272&&e<=1273||e>=1329&&e<=1366||e==1369||e>=1377&&e<=1414||e>=1488&&e<=1514||e>=1520&&e<=1522||e>=1569&&e<=1594||e>=1601&&e<=1610||e>=1649&&e<=1719||e>=1722&&e<=1726||e>=1728&&e<=1742||e>=1744&&e<=1747||e==1749||e>=1765&&e<=1766||e>=2309&&e<=2361||e==2365||e>=2392&&e<=2401||e>=2437&&e<=2444||e>=2447&&e<=2448||e>=2451&&e<=2472||e>=2474&&e<=2480||e==2482||e>=2486&&e<=2489||e>=2524&&e<=2525||e>=2527&&e<=2529||e>=2544&&e<=2545||e>=2565&&e<=2570||e>=2575&&e<=2576||e>=2579&&e<=2600||e>=2602&&e<=2608||e>=2610&&e<=2611||e>=2613&&e<=2614||e>=2616&&e<=2617||e>=2649&&e<=2652||e==2654||e>=2674&&e<=2676||e>=2693&&e<=2699||e==2701||e>=2703&&e<=2705||e>=2707&&e<=2728||e>=2730&&e<=2736||e>=2738&&e<=2739||e>=2741&&e<=2745||e==2749||e==2784||e>=2821&&e<=2828||e>=2831&&e<=2832||e>=2835&&e<=2856||e>=2858&&e<=2864||e>=2866&&e<=2867||e>=2870&&e<=2873||e==2877||e>=2908&&e<=2909||e>=2911&&e<=2913||e>=2949&&e<=2954||e>=2958&&e<=2960||e>=2962&&e<=2965||e>=2969&&e<=2970||e==2972||e>=2974&&e<=2975||e>=2979&&e<=2980||e>=2984&&e<=2986||e>=2990&&e<=2997||e>=2999&&e<=3001||e>=3077&&e<=3084||e>=3086&&e<=3088||e>=3090&&e<=3112||e>=3114&&e<=3123||e>=3125&&e<=3129||e>=3168&&e<=3169||e>=3205&&e<=3212||e>=3214&&e<=3216||e>=3218&&e<=3240||e>=3242&&e<=3251||e>=3253&&e<=3257||e==3294||e>=3296&&e<=3297||e>=3333&&e<=3340||e>=3342&&e<=3344||e>=3346&&e<=3368||e>=3370&&e<=3385||e>=3424&&e<=3425||e>=3585&&e<=3630||e==3632||e>=3634&&e<=3635||e>=3648&&e<=3653||e>=3713&&e<=3714||e==3716||e>=3719&&e<=3720||e==3722||e==3725||e>=3732&&e<=3735||e>=3737&&e<=3743||e>=3745&&e<=3747||e==3749||e==3751||e>=3754&&e<=3755||e>=3757&&e<=3758||e==3760||e>=3762&&e<=3763||e==3773||e>=3776&&e<=3780||e>=3904&&e<=3911||e>=3913&&e<=3945||e>=4256&&e<=4293||e>=4304&&e<=4342||e==4352||e>=4354&&e<=4355||e>=4357&&e<=4359||e==4361||e>=4363&&e<=4364||e>=4366&&e<=4370||e==4412||e==4414||e==4416||e==4428||e==4430||e==4432||e>=4436&&e<=4437||e==4441||e>=4447&&e<=4449||e==4451||e==4453||e==4455||e==4457||e>=4461&&e<=4462||e>=4466&&e<=4467||e==4469||e==4510||e==4520||e==4523||e>=4526&&e<=4527||e>=4535&&e<=4536||e==4538||e>=4540&&e<=4546||e==4587||e==4592||e==4601||e>=7680&&e<=7835||e>=7840&&e<=7929||e>=7936&&e<=7957||e>=7960&&e<=7965||e>=7968&&e<=8005||e>=8008&&e<=8013||e>=8016&&e<=8023||e==8025||e==8027||e==8029||e>=8031&&e<=8061||e>=8064&&e<=8116||e>=8118&&e<=8124||e==8126||e>=8130&&e<=8132||e>=8134&&e<=8140||e>=8144&&e<=8147||e>=8150&&e<=8155||e>=8160&&e<=8172||e>=8178&&e<=8180||e>=8182&&e<=8188||e==8486||e>=8490&&e<=8491||e==8494||e>=8576&&e<=8578||e>=12353&&e<=12436||e>=12449&&e<=12538||e>=12549&&e<=12588||e>=44032&&e<=55203||e>=19968&&e<=40869||e==12295||e>=12321&&e<=12329},fe.isNCNameChar=function(e){return e>=48&&e<=57||e>=1632&&e<=1641||e>=1776&&e<=1785||e>=2406&&e<=2415||e>=2534&&e<=2543||e>=2662&&e<=2671||e>=2790&&e<=2799||e>=2918&&e<=2927||e>=3047&&e<=3055||e>=3174&&e<=3183||e>=3302&&e<=3311||e>=3430&&e<=3439||e>=3664&&e<=3673||e>=3792&&e<=3801||e>=3872&&e<=3881||e==46||e==45||e==95||fe.isLetter(e)||e>=768&&e<=837||e>=864&&e<=865||e>=1155&&e<=1158||e>=1425&&e<=1441||e>=1443&&e<=1465||e>=1467&&e<=1469||e==1471||e>=1473&&e<=1474||e==1476||e>=1611&&e<=1618||e==1648||e>=1750&&e<=1756||e>=1757&&e<=1759||e>=1760&&e<=1764||e>=1767&&e<=1768||e>=1770&&e<=1773||e>=2305&&e<=2307||e==2364||e>=2366&&e<=2380||e==2381||e>=2385&&e<=2388||e>=2402&&e<=2403||e>=2433&&e<=2435||e==2492||e==2494||e==2495||e>=2496&&e<=2500||e>=2503&&e<=2504||e>=2507&&e<=2509||e==2519||e>=2530&&e<=2531||e==2562||e==2620||e==2622||e==2623||e>=2624&&e<=2626||e>=2631&&e<=2632||e>=2635&&e<=2637||e>=2672&&e<=2673||e>=2689&&e<=2691||e==2748||e>=2750&&e<=2757||e>=2759&&e<=2761||e>=2763&&e<=2765||e>=2817&&e<=2819||e==2876||e>=2878&&e<=2883||e>=2887&&e<=2888||e>=2891&&e<=2893||e>=2902&&e<=2903||e>=2946&&e<=2947||e>=3006&&e<=3010||e>=3014&&e<=3016||e>=3018&&e<=3021||e==3031||e>=3073&&e<=3075||e>=3134&&e<=3140||e>=3142&&e<=3144||e>=3146&&e<=3149||e>=3157&&e<=3158||e>=3202&&e<=3203||e>=3262&&e<=3268||e>=3270&&e<=3272||e>=3274&&e<=3277||e>=3285&&e<=3286||e>=3330&&e<=3331||e>=3390&&e<=3395||e>=3398&&e<=3400||e>=3402&&e<=3405||e==3415||e==3633||e>=3636&&e<=3642||e>=3655&&e<=3662||e==3761||e>=3764&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=3864&&e<=3865||e==3893||e==3895||e==3897||e==3902||e==3903||e>=3953&&e<=3972||e>=3974&&e<=3979||e>=3984&&e<=3989||e==3991||e>=3993&&e<=4013||e>=4017&&e<=4023||e==4025||e>=8400&&e<=8412||e==8417||e>=12330&&e<=12335||e==12441||e==12442||e==183||e==720||e==721||e==903||e==1600||e==3654||e==3782||e==12293||e>=12337&&e<=12341||e>=12445&&e<=12446||e>=12540&&e<=12542},fe.coalesceText=function(e){for(var s=e.firstChild;s!=null;s=s.nextSibling)if(s.nodeType==U.TEXT_NODE||s.nodeType==U.CDATA_SECTION_NODE){var d=s.nodeValue,E=s;for(s=s.nextSibling;s!=null&&(s.nodeType==U.TEXT_NODE||s.nodeType==U.CDATA_SECTION_NODE);){d+=s.nodeValue;var h=s;s=s.nextSibling,h.parentNode.removeChild(h)}if(E.nodeType==U.CDATA_SECTION_NODE){var C=E.parentNode;if(E.nextSibling==null)C.removeChild(E),C.appendChild(C.ownerDocument.createTextNode(d));else{var oe=E.nextSibling;C.removeChild(E),C.insertBefore(C.ownerDocument.createTextNode(d),oe)}}else E.nodeValue=d;if(s==null)break}else s.nodeType==U.ELEMENT_NODE&&fe.coalesceText(s)},fe.instance_of=function(e,s){for(;e!=null;){if(e.constructor===s)return!0;if(e===Object)return!1;e=e.constructor.superclass}return!1},fe.getElementById=function(e,s){if(e.nodeType==U.ELEMENT_NODE&&(e.getAttribute("id")==s||e.getAttributeNS(null,"id")==s))return e;for(var d=e.firstChild;d!=null;d=d.nextSibling){var E=fe.getElementById(d,s);if(E!=null)return E}return null};var Me=function(){function e(d,E){var h=E?": "+E.toString():"";switch(d){case s.INVALID_EXPRESSION_ERR:return"Invalid expression"+h;case s.TYPE_ERR:return"Type error"+h}return null}function s(d,E,h){var C=Error.call(this,e(d,E)||h);return C.code=d,C.exception=E,C}return s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.superclass=Error,s.prototype.toString=function(){return this.message},s.fromMessage=function(d,E){return new s(null,E,d)},s.INVALID_EXPRESSION_ERR=51,s.TYPE_ERR=52,s}();Fe.prototype={},Fe.prototype.constructor=Fe,Fe.superclass=Object.prototype;function Fe(e,s,d){this.xpath=d.parse(e),this.context=new He,this.context.namespaceResolver=new tt(s)}Fe.getOwnerDocument=function(e){return e.nodeType===U.DOCUMENT_NODE?e:e.ownerDocument},Fe.detectHtmlDom=function(e){if(!e)return!1;var s=Fe.getOwnerDocument(e);try{return s.implementation.hasFeature("HTML","2.0")}catch{return!0}},Fe.prototype.evaluate=function(e,s,d){this.context.expressionContextNode=e,this.context.caseInsensitive=Fe.detectHtmlDom(e);var E=this.xpath.evaluate(this.context);return new Ae(E,s)},tt.prototype={},tt.prototype.constructor=tt,tt.superclass=Object.prototype;function tt(e){this.xpathNSResolver=e}tt.prototype.getNamespace=function(e,s){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(e)},Ye.prototype={},Ye.prototype.constructor=Ye,Ye.superclass=Object.prototype;function Ye(e){this.node=e,this.namespaceResolver=new je}Ye.prototype.lookupNamespaceURI=function(e){return this.namespaceResolver.getNamespace(e,this.node)},Ae.prototype={},Ae.prototype.constructor=Ae,Ae.superclass=Object.prototype;function Ae(e,s){switch(s==Ae.ANY_TYPE&&(e.constructor===O?s=Ae.STRING_TYPE:e.constructor===P?s=Ae.NUMBER_TYPE:e.constructor===pe?s=Ae.BOOLEAN_TYPE:e.constructor===ue&&(s=Ae.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=s,s){case Ae.NUMBER_TYPE:this.numberValue=e.numberValue();return;case Ae.STRING_TYPE:this.stringValue=e.stringValue();return;case Ae.BOOLEAN_TYPE:this.booleanValue=e.booleanValue();return;case Ae.ANY_UNORDERED_NODE_TYPE:case Ae.FIRST_ORDERED_NODE_TYPE:if(e.constructor===ue){this.singleNodeValue=e.first();return}break;case Ae.UNORDERED_NODE_ITERATOR_TYPE:case Ae.ORDERED_NODE_ITERATOR_TYPE:if(e.constructor===ue){this.invalidIteratorState=!1,this.nodes=e.toArray(),this.iteratorIndex=0;return}break;case Ae.UNORDERED_NODE_SNAPSHOT_TYPE:case Ae.ORDERED_NODE_SNAPSHOT_TYPE:if(e.constructor===ue){this.nodes=e.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Me(Me.TYPE_ERR)}Ae.prototype.iterateNext=function(){if(this.resultType!=Ae.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Ae.ORDERED_NODE_ITERATOR_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Ae.prototype.snapshotItem=function(e){if(this.resultType!=Ae.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Ae.ORDERED_NODE_SNAPSHOT_TYPE)throw new Me(Me.TYPE_ERR);return this.nodes[e]},Ae.ANY_TYPE=0,Ae.NUMBER_TYPE=1,Ae.STRING_TYPE=2,Ae.BOOLEAN_TYPE=3,Ae.UNORDERED_NODE_ITERATOR_TYPE=4,Ae.ORDERED_NODE_ITERATOR_TYPE=5,Ae.UNORDERED_NODE_SNAPSHOT_TYPE=6,Ae.ORDERED_NODE_SNAPSHOT_TYPE=7,Ae.ANY_UNORDERED_NODE_TYPE=8,Ae.FIRST_ORDERED_NODE_TYPE=9;function l(e,s){e.createExpression=function(d,E){try{return new Fe(d,E,s)}catch(h){throw new Me(Me.INVALID_EXPRESSION_ERR,h)}},e.createNSResolver=function(d){return new Ye(d)},e.evaluate=function(d,E,h,C,oe){if(C<0||C>9)throw{code:0,toString:function(){return"Request type not supported"}};return e.createExpression(d,h,s).evaluate(E,C,oe)}}try{var f=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(f=!1)}catch{}f&&l(document,new A)}catch{}l(r,new A),function(){var e=new A,s=new je,d=new Pe,E=new Ge;function h(re){return{getNamespace:function(ve,Ue){var st=re(ve,Ue);return st||s.getNamespace(ve,Ue)}}}function C(re){return h(re.getNamespace.bind(re))}function oe(re){return h(function(ve){return re[ve]})}function xe(re){return re&&typeof re.getNamespace=="function"?C(re):typeof re=="function"?h(re):typeof re=="object"?oe(re):s}function Ne(re){if(re===null||typeof re>"u"||re instanceof O||re instanceof pe||re instanceof P||re instanceof ue)return re;switch(typeof re){case"string":return new O(re);case"boolean":return new pe(re);case"number":return new P(re)}var ve=new ue;return ve.addArray([].concat(re)),ve}function se(re){return function(ve){var Ue=Array.prototype.slice.call(arguments,1).map(function(ti){return ti.evaluate(ve)}),st=re.apply(this,[].concat(ve,Ue));return Ne(st)}}function ce(re){return{getFunction:function(ve,Ue){var st=re(ve,Ue);return st?se(st):d.getFunction(ve,Ue)}}}function Le(re){return ce(re.getFunction.bind(re))}function Ke(re){return ce(function(ve){return re[ve]})}function Se(re){return re&&typeof re.getFunction=="function"?Le(re):typeof re=="function"?ce(re):typeof re=="object"?Ke(re):d}function Qe(re){return{getVariable:function(ve,Ue){var st=re(ve,Ue);return Ne(st)}}}function Xe(re){if(re){if(typeof re.getVariable=="function")return Qe(re.getVariable.bind(re));if(typeof re=="function")return Qe(re);if(typeof re=="object")return Qe(function(ve){return re[ve]})}return E}function ot(re,ve,Ue){re in Ue&&(ve[re]=Ue[re])}function Qs(re){var ve=new He;return re?(ve.namespaceResolver=xe(re.namespaces),ve.functionResolver=Se(re.functions),ve.variableResolver=Xe(re.variables),ve.expressionContextNode=re.node,ot("allowAnyNamespaceForNoPrefix",ve,re),ot("isHtml",ve,re)):ve.namespaceResolver=s,ve}function Zs(re,ve){var Ue=Qs(ve);return re.evaluate(Ue)}var Js={evaluate:function(re){return Zs(this.expression,re)},evaluateNumber:function(re){return this.evaluate(re).numberValue()},evaluateString:function(re){return this.evaluate(re).stringValue()},evaluateBoolean:function(re){return this.evaluate(re).booleanValue()},evaluateNodeSet:function(re){return this.evaluate(re).nodeset()},select:function(re){return this.evaluateNodeSet(re).toArray()},select1:function(re){return this.select(re)[0]}};function ei(re){var ve=e.parse(re);return Object.create(Js,{expression:{value:ve}})}r.parse=ei}(),ee(r,{XPath:te,XPathParser:A,XPathResult:Ae,Step:z,PathExpr:R,NodeTest:y,LocationPath:De,OrOperation:de,AndOperation:he,BarOperation:Q,EqualsOperation:ye,NotEqualOperation:x,LessThanOperation:B,GreaterThanOperation:X,LessThanOrEqualOperation:Z,GreaterThanOrEqualOperation:F,PlusOperation:le,MinusOperation:w,MultiplyOperation:k,DivOperation:L,ModOperation:G,UnaryMinusOperation:W,FunctionCall:Ce,VariableReference:ne,XPathContext:He,XNodeSet:ue,XBoolean:pe,XString:O,XNumber:P,NamespaceResolver:je,FunctionResolver:Pe,VariableResolver:Ge,Utilities:fe}),r.select=function(e,s,d){return r.selectWithResolver(e,s,null,d)},r.useNamespaces=function(e){var s={mappings:e||{},lookupNamespaceURI:function(d){return this.mappings[d]}};return function(d,E,h){return r.selectWithResolver(d,E,s,h)}},r.selectWithResolver=function(e,s,d,E){var h=new Fe(e,d,new A),C=Ae.ANY_TYPE,oe=h.evaluate(s,C,null);return oe.resultType==Ae.STRING_TYPE?oe=oe.stringValue:oe.resultType==Ae.NUMBER_TYPE?oe=oe.numberValue:oe.resultType==Ae.BOOLEAN_TYPE?oe=oe.booleanValue:(oe=oe.nodes,E&&(oe=oe[0])),oe},r.select1=function(e,s){return r.select(e,s,!0)};var g=function(e){return Array.isArray(e)&&e.every(c)},S=function(e){return function(s){return c(s)&&s.nodeType===e}};ee(r,{isNodeLike:c,isArrayOfNodes:g,isElement:S(U.ELEMENT_NODE),isAttribute:S(U.ATTRIBUTE_NODE),isTextNode:S(U.TEXT_NODE),isCDATASection:S(U.CDATA_SECTION_NODE),isProcessingInstruction:S(U.PROCESSING_INSTRUCTION_NODE),isComment:S(U.COMMENT_NODE),isDocumentNode:S(U.DOCUMENT_NODE),isDocumentTypeNode:S(U.DOCUMENT_TYPE_NODE),isDocumentFragment:S(U.DOCUMENT_FRAGMENT_NODE)})})(t)}(vt)),vt}var nn=rn();const on=tn(nn);var dt={},Je={},it={},Pt;function yt(){if(Pt)return it;Pt=1;function n(u,c,b){if(b===void 0&&(b=Array.prototype),u&&typeof b.find=="function")return b.find.call(u,c);for(var p=0;p<u.length;p++)if(Object.prototype.hasOwnProperty.call(u,p)){var m=u[p];if(c.call(void 0,m,p,u))return m}}function t(u,c){return c===void 0&&(c=Object),c&&typeof c.freeze=="function"?c.freeze(u):u}function r(u,c){if(u===null||typeof u!="object")throw new TypeError("target is not an object");for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(u[b]=c[b]);return u}var a=t({HTML:"text/html",isHTML:function(u){return u===a.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(u){return u===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return it.assign=r,it.find=n,it.freeze=t,it.MIME_TYPE=a,it.NAMESPACE=i,it}var Lt;function Vt(){if(Lt)return Je;Lt=1;var n=yt(),t=n.find,r=n.NAMESPACE;function a(l){return l!==""}function i(l){return l?l.split(/[\t\n\f\r ]+/).filter(a):[]}function u(l,f){return l.hasOwnProperty(f)||(l[f]=!0),l}function c(l){if(!l)return[];var f=i(l);return Object.keys(f.reduce(u,{}))}function b(l){return function(f){return l&&l.indexOf(f)!==-1}}function p(l,f){for(var g in l)Object.prototype.hasOwnProperty.call(l,g)&&(f[g]=l[g])}function m(l,f){var g=l.prototype;if(!(g instanceof f)){let S=function(){};S.prototype=f.prototype,S=new S,p(g,S),l.prototype=g=S}g.constructor!=l&&(typeof l!="function"&&console.error("unknown Class:"+l),g.constructor=l)}var _={},D=_.ELEMENT_NODE=1,V=_.ATTRIBUTE_NODE=2,j=_.TEXT_NODE=3,Y=_.CDATA_SECTION_NODE=4,ie=_.ENTITY_REFERENCE_NODE=5,v=_.ENTITY_NODE=6,H=_.PROCESSING_INSTRUCTION_NODE=7,K=_.COMMENT_NODE=8,$=_.DOCUMENT_NODE=9,ae=_.DOCUMENT_TYPE_NODE=10,ee=_.DOCUMENT_FRAGMENT_NODE=11,U=_.NOTATION_NODE=12,A={},te={};A.INDEX_SIZE_ERR=(te[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(te[2]="DOMString size error",2);var N=A.HIERARCHY_REQUEST_ERR=(te[3]="Hierarchy request error",3);A.WRONG_DOCUMENT_ERR=(te[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(te[5]="Invalid character",5),A.NO_DATA_ALLOWED_ERR=(te[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(te[7]="No modification allowed",7);var T=A.NOT_FOUND_ERR=(te[8]="Not found",8);A.NOT_SUPPORTED_ERR=(te[9]="Not supported",9);var q=A.INUSE_ATTRIBUTE_ERR=(te[10]="Attribute in use",10);A.INVALID_STATE_ERR=(te[11]="Invalid state",11),A.SYNTAX_ERR=(te[12]="Syntax error",12),A.INVALID_MODIFICATION_ERR=(te[13]="Invalid modification",13),A.NAMESPACE_ERR=(te[14]="Invalid namespace",14),A.INVALID_ACCESS_ERR=(te[15]="Invalid access",15);function W(l,f){if(f instanceof Error)var g=f;else g=this,Error.call(this,te[l]),this.message=te[l],Error.captureStackTrace&&Error.captureStackTrace(this,W);return g.code=l,f&&(this.message=this.message+": "+f),g}W.prototype=Error.prototype,p(A,W);function M(){}M.prototype={length:0,item:function(l){return l>=0&&l<this.length?this[l]:null},toString:function(l,f){for(var g=[],S=0;S<this.length;S++)Fe(this[S],g,l,f);return g.join("")},filter:function(l){return Array.prototype.filter.call(this,l)},indexOf:function(l){return Array.prototype.indexOf.call(this,l)}};function de(l,f){this._node=l,this._refresh=f,he(this)}function he(l){var f=l._node._inc||l._node.ownerDocument._inc;if(l._inc!==f){var g=l._refresh(l._node);if(Ae(l,"length",g.length),!l.$$length||g.length<l.$$length)for(var S=g.length;S in l;S++)Object.prototype.hasOwnProperty.call(l,S)&&delete l[S];p(g,l),l._inc=f}}de.prototype.item=function(l){return he(this),this[l]||null},m(de,M);function ye(){}function x(l,f){for(var g=l.length;g--;)if(l[g]===f)return g}function B(l,f,g,S){if(S?f[x(f,S)]=g:f[f.length++]=g,l){g.ownerElement=l;var e=l.ownerDocument;e&&(S&&G(e,l,S),L(e,l,g))}}function X(l,f,g){var S=x(f,g);if(S>=0){for(var e=f.length-1;S<e;)f[S]=f[++S];if(f.length=e,l){var s=l.ownerDocument;s&&(G(s,l,g),g.ownerElement=null)}}else throw new W(T,new Error(l.tagName+"@"+g))}ye.prototype={length:0,item:M.prototype.item,getNamedItem:function(l){for(var f=this.length;f--;){var g=this[f];if(g.nodeName==l)return g}},setNamedItem:function(l){var f=l.ownerElement;if(f&&f!=this._ownerElement)throw new W(q);var g=this.getNamedItem(l.nodeName);return B(this._ownerElement,this,l,g),g},setNamedItemNS:function(l){var f=l.ownerElement,g;if(f&&f!=this._ownerElement)throw new W(q);return g=this.getNamedItemNS(l.namespaceURI,l.localName),B(this._ownerElement,this,l,g),g},removeNamedItem:function(l){var f=this.getNamedItem(l);return X(this._ownerElement,this,f),f},removeNamedItemNS:function(l,f){var g=this.getNamedItemNS(l,f);return X(this._ownerElement,this,g),g},getNamedItemNS:function(l,f){for(var g=this.length;g--;){var S=this[g];if(S.localName==f&&S.namespaceURI==l)return S}return null}};function Z(){}Z.prototype={hasFeature:function(l,f){return!0},createDocument:function(l,f,g){var S=new k;if(S.implementation=this,S.childNodes=new M,S.doctype=g||null,g&&S.appendChild(g),f){var e=S.createElementNS(l,f);S.appendChild(e)}return S},createDocumentType:function(l,f,g){var S=new ue;return S.name=l,S.nodeName=l,S.publicId=f||"",S.systemId=g||"",S}};function F(){}F.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(l,f){return Ce(this,l,f)},replaceChild:function(l,f){Ce(this,l,f,ne),f&&this.removeChild(f)},removeChild:function(l){return R(this,l)},appendChild:function(l){return this.insertBefore(l,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(l){return Ye(this.ownerDocument||this,this,l)},normalize:function(){for(var l=this.firstChild;l;){var f=l.nextSibling;f&&f.nodeType==j&&l.nodeType==j?(this.removeChild(f),l.appendData(f.data)):(l.normalize(),l=f)}},isSupported:function(l,f){return this.ownerDocument.implementation.hasFeature(l,f)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(l){for(var f=this;f;){var g=f._nsMap;if(g){for(var S in g)if(Object.prototype.hasOwnProperty.call(g,S)&&g[S]===l)return S}f=f.nodeType==V?f.ownerDocument:f.parentNode}return null},lookupNamespaceURI:function(l){for(var f=this;f;){var g=f._nsMap;if(g&&Object.prototype.hasOwnProperty.call(g,l))return g[l];f=f.nodeType==V?f.ownerDocument:f.parentNode}return null},isDefaultNamespace:function(l){var f=this.lookupPrefix(l);return f==null}};function le(l){return l=="<"&&"<"||l==">"&&">"||l=="&"&&"&"||l=='"'&&"""||"&#"+l.charCodeAt()+";"}p(_,F),p(_,F.prototype);function w(l,f){if(f(l))return!0;if(l=l.firstChild)do if(w(l,f))return!0;while(l=l.nextSibling)}function k(){this.ownerDocument=this}function L(l,f,g){l&&l._inc++;var S=g.namespaceURI;S===r.XMLNS&&(f._nsMap[g.prefix?g.localName:""]=g.value)}function G(l,f,g,S){l&&l._inc++;var e=g.namespaceURI;e===r.XMLNS&&delete f._nsMap[g.prefix?g.localName:""]}function Q(l,f,g){if(l&&l._inc){l._inc++;var S=f.childNodes;if(g)S[S.length++]=g;else{for(var e=f.firstChild,s=0;e;)S[s++]=e,e=e.nextSibling;S.length=s,delete S[S.length]}}}function R(l,f){var g=f.previousSibling,S=f.nextSibling;return g?g.nextSibling=S:l.firstChild=S,S?S.previousSibling=g:l.lastChild=g,f.parentNode=null,f.previousSibling=null,f.nextSibling=null,Q(l.ownerDocument,l),f}function J(l){return l&&(l.nodeType===F.DOCUMENT_NODE||l.nodeType===F.DOCUMENT_FRAGMENT_NODE||l.nodeType===F.ELEMENT_NODE)}function ge(l){return l&&(_e(l)||ke(l)||Ee(l)||l.nodeType===F.DOCUMENT_FRAGMENT_NODE||l.nodeType===F.COMMENT_NODE||l.nodeType===F.PROCESSING_INSTRUCTION_NODE)}function Ee(l){return l&&l.nodeType===F.DOCUMENT_TYPE_NODE}function _e(l){return l&&l.nodeType===F.ELEMENT_NODE}function ke(l){return l&&l.nodeType===F.TEXT_NODE}function De(l,f){var g=l.childNodes||[];if(t(g,_e)||Ee(f))return!1;var S=t(g,Ee);return!(f&&S&&g.indexOf(S)>g.indexOf(f))}function z(l,f){var g=l.childNodes||[];function S(s){return _e(s)&&s!==f}if(t(g,S))return!1;var e=t(g,Ee);return!(f&&e&&g.indexOf(e)>g.indexOf(f))}function Be(l,f,g){if(!J(l))throw new W(N,"Unexpected parent node type "+l.nodeType);if(g&&g.parentNode!==l)throw new W(T,"child not in parent");if(!ge(f)||Ee(f)&&l.nodeType!==F.DOCUMENT_NODE)throw new W(N,"Unexpected node type "+f.nodeType+" for parent node type "+l.nodeType)}function y(l,f,g){var S=l.childNodes||[],e=f.childNodes||[];if(f.nodeType===F.DOCUMENT_FRAGMENT_NODE){var s=e.filter(_e);if(s.length>1||t(e,ke))throw new W(N,"More than one element or text in fragment");if(s.length===1&&!De(l,g))throw new W(N,"Element in fragment can not be inserted before doctype")}if(_e(f)&&!De(l,g))throw new W(N,"Only one element can be added and only after doctype");if(Ee(f)){if(t(S,Ee))throw new W(N,"Only one doctype is allowed");var d=t(S,_e);if(g&&S.indexOf(d)<S.indexOf(g))throw new W(N,"Doctype can only be inserted before an element");if(!g&&d)throw new W(N,"Doctype can not be appended since element is present")}}function ne(l,f,g){var S=l.childNodes||[],e=f.childNodes||[];if(f.nodeType===F.DOCUMENT_FRAGMENT_NODE){var s=e.filter(_e);if(s.length>1||t(e,ke))throw new W(N,"More than one element or text in fragment");if(s.length===1&&!z(l,g))throw new W(N,"Element in fragment can not be inserted before doctype")}if(_e(f)&&!z(l,g))throw new W(N,"Only one element can be added and only after doctype");if(Ee(f)){if(t(S,function(h){return Ee(h)&&h!==g}))throw new W(N,"Only one doctype is allowed");var d=t(S,_e);if(g&&S.indexOf(d)<S.indexOf(g))throw new W(N,"Doctype can only be inserted before an element")}}function Ce(l,f,g,S){Be(l,f,g),l.nodeType===F.DOCUMENT_NODE&&(S||y)(l,f,g);var e=f.parentNode;if(e&&e.removeChild(f),f.nodeType===ee){var s=f.firstChild;if(s==null)return f;var d=f.lastChild}else s=d=f;var E=g?g.previousSibling:l.lastChild;s.previousSibling=E,d.nextSibling=g,E?E.nextSibling=s:l.firstChild=s,g==null?l.lastChild=d:g.previousSibling=d;do{s.parentNode=l;var h=l.ownerDocument||l;be(s,h)}while(s!==d&&(s=s.nextSibling));return Q(l.ownerDocument||l,l),f.nodeType==ee&&(f.firstChild=f.lastChild=null),f}function be(l,f){if(l.ownerDocument!==f){if(l.ownerDocument=f,l.nodeType===D&&l.attributes)for(var g=0;g<l.attributes.length;g++){var S=l.attributes.item(g);S&&(S.ownerDocument=f)}for(var e=l.firstChild;e;)be(e,f),e=e.nextSibling}}function O(l,f){f.parentNode&&f.parentNode.removeChild(f),f.parentNode=l,f.previousSibling=l.lastChild,f.nextSibling=null,f.previousSibling?f.previousSibling.nextSibling=f:l.firstChild=f,l.lastChild=f,Q(l.ownerDocument,l,f);var g=l.ownerDocument||l;return be(f,g),f}k.prototype={nodeName:"#document",nodeType:$,doctype:null,documentElement:null,_inc:1,insertBefore:function(l,f){if(l.nodeType==ee){for(var g=l.firstChild;g;){var S=g.nextSibling;this.insertBefore(g,f),g=S}return l}return Ce(this,l,f),be(l,this),this.documentElement===null&&l.nodeType===D&&(this.documentElement=l),l},removeChild:function(l){return this.documentElement==l&&(this.documentElement=null),R(this,l)},replaceChild:function(l,f){Ce(this,l,f,ne),be(l,this),f&&this.removeChild(f),_e(l)&&(this.documentElement=l)},importNode:function(l,f){return tt(this,l,f)},getElementById:function(l){var f=null;return w(this.documentElement,function(g){if(g.nodeType==D&&g.getAttribute("id")==l)return f=g,!0}),f},getElementsByClassName:function(l){var f=c(l);return new de(this,function(g){var S=[];return f.length>0&&w(g.documentElement,function(e){if(e!==g&&e.nodeType===D){var s=e.getAttribute("class");if(s){var d=l===s;if(!d){var E=c(s);d=f.every(b(E))}d&&S.push(e)}}}),S})},createElement:function(l){var f=new P;f.ownerDocument=this,f.nodeName=l,f.tagName=l,f.localName=l,f.childNodes=new M;var g=f.attributes=new ye;return g._ownerElement=f,f},createDocumentFragment:function(){var l=new Pe;return l.ownerDocument=this,l.childNodes=new M,l},createTextNode:function(l){var f=new pe;return f.ownerDocument=this,f.appendData(l),f},createComment:function(l){var f=new Ie;return f.ownerDocument=this,f.appendData(l),f},createCDATASection:function(l){var f=new gt;return f.ownerDocument=this,f.appendData(l),f},createProcessingInstruction:function(l,f){var g=new je;return g.ownerDocument=this,g.tagName=g.nodeName=g.target=l,g.nodeValue=g.data=f,g},createAttribute:function(l){var f=new Re;return f.ownerDocument=this,f.name=l,f.nodeName=l,f.localName=l,f.specified=!0,f},createEntityReference:function(l){var f=new Ge;return f.ownerDocument=this,f.nodeName=l,f},createElementNS:function(l,f){var g=new P,S=f.split(":"),e=g.attributes=new ye;return g.childNodes=new M,g.ownerDocument=this,g.nodeName=f,g.tagName=f,g.namespaceURI=l,S.length==2?(g.prefix=S[0],g.localName=S[1]):g.localName=f,e._ownerElement=g,g},createAttributeNS:function(l,f){var g=new Re,S=f.split(":");return g.ownerDocument=this,g.nodeName=f,g.name=f,g.namespaceURI=l,g.specified=!0,S.length==2?(g.prefix=S[0],g.localName=S[1]):g.localName=f,g}},m(k,F);function P(){this._nsMap={}}P.prototype={nodeType:D,hasAttribute:function(l){return this.getAttributeNode(l)!=null},getAttribute:function(l){var f=this.getAttributeNode(l);return f&&f.value||""},getAttributeNode:function(l){return this.attributes.getNamedItem(l)},setAttribute:function(l,f){var g=this.ownerDocument.createAttribute(l);g.value=g.nodeValue=""+f,this.setAttributeNode(g)},removeAttribute:function(l){var f=this.getAttributeNode(l);f&&this.removeAttributeNode(f)},appendChild:function(l){return l.nodeType===ee?this.insertBefore(l,null):O(this,l)},setAttributeNode:function(l){return this.attributes.setNamedItem(l)},setAttributeNodeNS:function(l){return this.attributes.setNamedItemNS(l)},removeAttributeNode:function(l){return this.attributes.removeNamedItem(l.nodeName)},removeAttributeNS:function(l,f){var g=this.getAttributeNodeNS(l,f);g&&this.removeAttributeNode(g)},hasAttributeNS:function(l,f){return this.getAttributeNodeNS(l,f)!=null},getAttributeNS:function(l,f){var g=this.getAttributeNodeNS(l,f);return g&&g.value||""},setAttributeNS:function(l,f,g){var S=this.ownerDocument.createAttributeNS(l,f);S.value=S.nodeValue=""+g,this.setAttributeNode(S)},getAttributeNodeNS:function(l,f){return this.attributes.getNamedItemNS(l,f)},getElementsByTagName:function(l){return new de(this,function(f){var g=[];return w(f,function(S){S!==f&&S.nodeType==D&&(l==="*"||S.tagName==l)&&g.push(S)}),g})},getElementsByTagNameNS:function(l,f){return new de(this,function(g){var S=[];return w(g,function(e){e!==g&&e.nodeType===D&&(l==="*"||e.namespaceURI===l)&&(f==="*"||e.localName==f)&&S.push(e)}),S})}},k.prototype.getElementsByTagName=P.prototype.getElementsByTagName,k.prototype.getElementsByTagNameNS=P.prototype.getElementsByTagNameNS,m(P,F);function Re(){}Re.prototype.nodeType=V,m(Re,F);function qe(){}qe.prototype={data:"",substringData:function(l,f){return this.data.substring(l,l+f)},appendData:function(l){l=this.data+l,this.nodeValue=this.data=l,this.length=l.length},insertData:function(l,f){this.replaceData(l,0,f)},appendChild:function(l){throw new Error(te[N])},deleteData:function(l,f){this.replaceData(l,f,"")},replaceData:function(l,f,g){var S=this.data.substring(0,l),e=this.data.substring(l+f);g=S+g+e,this.nodeValue=this.data=g,this.length=g.length}},m(qe,F);function pe(){}pe.prototype={nodeName:"#text",nodeType:j,splitText:function(l){var f=this.data,g=f.substring(l);f=f.substring(0,l),this.data=this.nodeValue=f,this.length=f.length;var S=this.ownerDocument.createTextNode(g);return this.parentNode&&this.parentNode.insertBefore(S,this.nextSibling),S}},m(pe,qe);function Ie(){}Ie.prototype={nodeName:"#comment",nodeType:K},m(Ie,qe);function gt(){}gt.prototype={nodeName:"#cdata-section",nodeType:Y},m(gt,qe);function ue(){}ue.prototype.nodeType=ae,m(ue,F);function We(){}We.prototype.nodeType=U,m(We,F);function He(){}He.prototype.nodeType=v,m(He,F);function Ge(){}Ge.prototype.nodeType=ie,m(Ge,F);function Pe(){}Pe.prototype.nodeName="#document-fragment",Pe.prototype.nodeType=ee,m(Pe,F);function je(){}je.prototype.nodeType=H,m(je,F);function me(){}me.prototype.serializeToString=function(l,f,g){return fe.call(l,f,g)},F.prototype.toString=fe;function fe(l,f){var g=[],S=this.nodeType==9&&this.documentElement||this,e=S.prefix,s=S.namespaceURI;if(s&&e==null){var e=S.lookupPrefix(s);if(e==null)var d=[{namespace:s,prefix:null}]}return Fe(this,g,l,f,d),g.join("")}function Et(l,f,g){var S=l.prefix||"",e=l.namespaceURI;if(!e||S==="xml"&&e===r.XML||e===r.XMLNS)return!1;for(var s=g.length;s--;){var d=g[s];if(d.prefix===S)return d.namespace!==e}return!0}function Me(l,f,g){l.push(" ",f,'="',g.replace(/[<>&"\t\n\r]/g,le),'"')}function Fe(l,f,g,S,e){if(e||(e=[]),S)if(l=S(l),l){if(typeof l=="string"){f.push(l);return}}else return;switch(l.nodeType){case D:var s=l.attributes,d=s.length,Se=l.firstChild,E=l.tagName;g=r.isHTML(l.namespaceURI)||g;var h=E;if(!g&&!l.prefix&&l.namespaceURI){for(var C,oe=0;oe<s.length;oe++)if(s.item(oe).name==="xmlns"){C=s.item(oe).value;break}if(!C)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.prefix===""&&Ne.namespace===l.namespaceURI){C=Ne.namespace;break}}if(C!==l.namespaceURI)for(var xe=e.length-1;xe>=0;xe--){var Ne=e[xe];if(Ne.namespace===l.namespaceURI){Ne.prefix&&(h=Ne.prefix+":"+E);break}}}f.push("<",h);for(var se=0;se<d;se++){var ce=s.item(se);ce.prefix=="xmlns"?e.push({prefix:ce.localName,namespace:ce.value}):ce.nodeName=="xmlns"&&e.push({prefix:"",namespace:ce.value})}for(var se=0;se<d;se++){var ce=s.item(se);if(Et(ce,g,e)){var Le=ce.prefix||"",Ke=ce.namespaceURI;Me(f,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}Fe(ce,f,g,S,e)}if(E===h&&Et(l,g,e)){var Le=l.prefix||"",Ke=l.namespaceURI;Me(f,Le?"xmlns:"+Le:"xmlns",Ke),e.push({prefix:Le,namespace:Ke})}if(Se||g&&!/^(?:meta|link|img|br|hr|input)$/i.test(E)){if(f.push(">"),g&&/^script$/i.test(E))for(;Se;)Se.data?f.push(Se.data):Fe(Se,f,g,S,e.slice()),Se=Se.nextSibling;else for(;Se;)Fe(Se,f,g,S,e.slice()),Se=Se.nextSibling;f.push("</",h,">")}else f.push("/>");return;case $:case ee:for(var Se=l.firstChild;Se;)Fe(Se,f,g,S,e.slice()),Se=Se.nextSibling;return;case V:return Me(f,l.name,l.value);case j:return f.push(l.data.replace(/[<&>]/g,le));case Y:return f.push("<![CDATA[",l.data,"]]>");case K:return f.push("<!--",l.data,"-->");case ae:var Qe=l.publicId,Xe=l.systemId;if(f.push("<!DOCTYPE ",l.name),Qe)f.push(" PUBLIC ",Qe),Xe&&Xe!="."&&f.push(" ",Xe),f.push(">");else if(Xe&&Xe!=".")f.push(" SYSTEM ",Xe,">");else{var ot=l.internalSubset;ot&&f.push(" [",ot,"]"),f.push(">")}return;case H:return f.push("<?",l.target," ",l.data,"?>");case ie:return f.push("&",l.nodeName,";");default:f.push("??",l.nodeName)}}function tt(l,f,g){var S;switch(f.nodeType){case D:S=f.cloneNode(!1),S.ownerDocument=l;case ee:break;case V:g=!0;break}if(S||(S=f.cloneNode(!1)),S.ownerDocument=l,S.parentNode=null,g)for(var e=f.firstChild;e;)S.appendChild(tt(l,e,g)),e=e.nextSibling;return S}function Ye(l,f,g){var S=new f.constructor;for(var e in f)if(Object.prototype.hasOwnProperty.call(f,e)){var s=f[e];typeof s!="object"&&s!=S[e]&&(S[e]=s)}switch(f.childNodes&&(S.childNodes=new M),S.ownerDocument=l,S.nodeType){case D:var d=f.attributes,E=S.attributes=new ye,h=d.length;E._ownerElement=S;for(var C=0;C<h;C++)S.setAttributeNode(Ye(l,d.item(C),!0));break;case V:g=!0}if(g)for(var oe=f.firstChild;oe;)S.appendChild(Ye(l,oe,g)),oe=oe.nextSibling;return S}function Ae(l,f,g){l[f]=g}try{if(Object.defineProperty){let l=function(f){switch(f.nodeType){case D:case ee:var g=[];for(f=f.firstChild;f;)f.nodeType!==7&&f.nodeType!==8&&g.push(l(f)),f=f.nextSibling;return g.join("");default:return f.nodeValue}};Object.defineProperty(de.prototype,"length",{get:function(){return he(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return l(this)},set:function(f){switch(this.nodeType){case D:case ee:for(;this.firstChild;)this.removeChild(this.firstChild);(f||String(f))&&this.appendChild(this.ownerDocument.createTextNode(f));break;default:this.data=f,this.value=f,this.nodeValue=f}}}),Ae=function(f,g,S){f["$$"+g]=S}}}catch{}return Je.DocumentType=ue,Je.DOMException=W,Je.DOMImplementation=Z,Je.Element=P,Je.Node=F,Je.NodeList=M,Je.XMLSerializer=me,Je}var pt={},wt={},$t;function sn(){return $t||($t=1,function(n){var t=yt().freeze;n.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),n.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
10
|
+
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),n.entityMap=n.HTML_ENTITIES}(wt)),wt}var bt={},Mt;function an(){if(Mt)return bt;Mt=1;var n=yt().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),i=0,u=1,c=2,b=3,p=4,m=5,_=6,D=7;function V(N,T){this.message=N,this.locator=T,Error.captureStackTrace&&Error.captureStackTrace(this,V)}V.prototype=new Error,V.prototype.name=V.name;function j(){}j.prototype={parse:function(N,T,q){var W=this.domBuilder;W.startDocument(),ae(T,T={}),Y(N,T,q,W,this.errorHandler),W.endDocument()}};function Y(N,T,q,W,M){function de(O){if(O>65535){O-=65536;var P=55296+(O>>10),Re=56320+(O&1023);return String.fromCharCode(P,Re)}else return String.fromCharCode(O)}function he(O){var P=O.slice(1,-1);return Object.hasOwnProperty.call(q,P)?q[P]:P.charAt(0)==="#"?de(parseInt(P.substr(1).replace("x","0x"))):(M.error("entity not found:"+O),O)}function ye(O){if(O>k){var P=N.substring(k,O).replace(/&#?\w+;/g,he);F&&x(k),W.characters(P,0,O-k),k=O}}function x(O,P){for(;O>=X&&(P=Z.exec(N));)B=P.index,X=B+P[0].length,F.lineNumber++;F.columnNumber=O-B+1}for(var B=0,X=0,Z=/.*(?:\r\n?|\n)|.*$/g,F=W.locator,le=[{currentNSMap:T}],w={},k=0;;){try{var L=N.indexOf("<",k);if(L<0){if(!N.substr(k).match(/^\s*$/)){var G=W.doc,Q=G.createTextNode(N.substr(k));G.appendChild(Q),W.currentElement=Q}return}switch(L>k&&ye(L),N.charAt(L+1)){case"/":var Be=N.indexOf(">",L+3),R=N.substring(L+2,Be).replace(/[ \t\n\r]+$/g,""),J=le.pop();Be<0?(R=N.substring(L+2).replace(/[\s<].*/,""),M.error("end tag name: "+R+" is not complete:"+J.tagName),Be=L+1+R.length):R.match(/\s</)&&(R=R.replace(/[\s<].*/,""),M.error("end tag name: "+R+" maybe not complete"),Be=L+1+R.length);var ge=J.localNSMap,Ee=J.tagName==R,_e=Ee||J.tagName&&J.tagName.toLowerCase()==R.toLowerCase();if(_e){if(W.endElement(J.uri,J.localName,R),ge)for(var ke in ge)Object.prototype.hasOwnProperty.call(ge,ke)&&W.endPrefixMapping(ke);Ee||M.fatalError("end tag name: "+R+" is not match the current start tagName:"+J.tagName)}else le.push(J);Be++;break;case"?":F&&x(L),Be=U(N,L,W);break;case"!":F&&x(L),Be=ee(N,L,W,M);break;default:F&&x(L);var De=new A,z=le[le.length-1].currentNSMap,Be=v(N,L,De,z,he,M),y=De.length;if(!De.closed&&$(N,Be,De.tagName,w)&&(De.closed=!0,q.nbsp||M.warning("unclosed xml attribute")),F&&y){for(var ne=ie(F,{}),Ce=0;Ce<y;Ce++){var be=De[Ce];x(be.offset),be.locator=ie(F,{})}W.locator=ne,H(De,W,z)&&le.push(De),W.locator=F}else H(De,W,z)&&le.push(De);n.isHTML(De.uri)&&!De.closed?Be=K(N,Be,De.tagName,he,W):Be++}}catch(O){if(O instanceof V)throw O;M.error("element parse error: "+O),Be=-1}Be>k?k=Be:ye(Math.max(L,k)+1)}}function ie(N,T){return T.lineNumber=N.lineNumber,T.columnNumber=N.columnNumber,T}function v(N,T,q,W,M,de){function he(F,le,w){q.attributeNames.hasOwnProperty(F)&&de.fatalError("Attribute "+F+" redefined"),q.addValue(F,le.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,M),w)}for(var ye,x,B=++T,X=i;;){var Z=N.charAt(B);switch(Z){case"=":if(X===u)ye=N.slice(T,B),X=b;else if(X===c)X=b;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(X===b||X===u)if(X===u&&(de.warning('attribute value must after "="'),ye=N.slice(T,B)),T=B+1,B=N.indexOf(Z,T),B>0)x=N.slice(T,B),he(ye,x,T-1),X=m;else throw new Error("attribute value no end '"+Z+"' match");else if(X==p)x=N.slice(T,B),he(ye,x,T),de.warning('attribute "'+ye+'" missed start quot('+Z+")!!"),T=B+1,X=m;else throw new Error('attribute value must after "="');break;case"/":switch(X){case i:q.setTagName(N.slice(T,B));case m:case _:case D:X=D,q.closed=!0;case p:case u:break;case c:q.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return de.error("unexpected end of input"),X==i&&q.setTagName(N.slice(T,B)),B;case">":switch(X){case i:q.setTagName(N.slice(T,B));case m:case _:case D:break;case p:case u:x=N.slice(T,B),x.slice(-1)==="/"&&(q.closed=!0,x=x.slice(0,-1));case c:X===c&&(x=ye),X==p?(de.warning('attribute "'+x+'" missed quot(")!'),he(ye,x,T)):((!n.isHTML(W[""])||!x.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+x+'" missed value!! "'+x+'" instead!!'),he(x,x,T));break;case b:throw new Error("attribute value missed!!")}return B;case"":Z=" ";default:if(Z<=" ")switch(X){case i:q.setTagName(N.slice(T,B)),X=_;break;case u:ye=N.slice(T,B),X=c;break;case p:var x=N.slice(T,B);de.warning('attribute "'+x+'" missed quot(")!!'),he(ye,x,T);case m:X=_;break}else switch(X){case c:q.tagName,(!n.isHTML(W[""])||!ye.match(/^(?:disabled|checked|selected)$/i))&&de.warning('attribute "'+ye+'" missed value!! "'+ye+'" instead2!!'),he(ye,ye,T),T=B,X=u;break;case m:de.warning('attribute space is required"'+ye+'"!!');case _:X=u,T=B;break;case b:X=p,T=B;break;case D:throw new Error("elements closed character '/' and '>' must be connected to")}}B++}}function H(N,T,q){for(var W=N.tagName,M=null,Z=N.length;Z--;){var de=N[Z],he=de.qName,ye=de.value,F=he.indexOf(":");if(F>0)var x=de.prefix=he.slice(0,F),B=he.slice(F+1),X=x==="xmlns"&&B;else B=he,x=null,X=he==="xmlns"&&"";de.localName=B,X!==!1&&(M==null&&(M={},ae(q,q={})),q[X]=M[X]=ye,de.uri=n.XMLNS,T.startPrefixMapping(X,ye))}for(var Z=N.length;Z--;){de=N[Z];var x=de.prefix;x&&(x==="xml"&&(de.uri=n.XML),x!=="xmlns"&&(de.uri=q[x||""]))}var F=W.indexOf(":");F>0?(x=N.prefix=W.slice(0,F),B=N.localName=W.slice(F+1)):(x=null,B=N.localName=W);var le=N.uri=q[x||""];if(T.startElement(le,B,W,N),N.closed){if(T.endElement(le,B,W),M)for(x in M)Object.prototype.hasOwnProperty.call(M,x)&&T.endPrefixMapping(x)}else return N.currentNSMap=q,N.localNSMap=M,!0}function K(N,T,q,W,M){if(/^(?:script|textarea)$/i.test(q)){var de=N.indexOf("</"+q+">",T),he=N.substring(T+1,de);if(/[&<]/.test(he))return/^script$/i.test(q)?(M.characters(he,0,he.length),de):(he=he.replace(/&#?\w+;/g,W),M.characters(he,0,he.length),de)}return T+1}function $(N,T,q,W){var M=W[q];return M==null&&(M=N.lastIndexOf("</"+q+">"),M<T&&(M=N.lastIndexOf("</"+q)),W[q]=M),M<T}function ae(N,T){for(var q in N)Object.prototype.hasOwnProperty.call(N,q)&&(T[q]=N[q])}function ee(N,T,q,W){var M=N.charAt(T+2);switch(M){case"-":if(N.charAt(T+3)==="-"){var de=N.indexOf("-->",T+4);return de>T?(q.comment(N,T+4,de-T-4),de+3):(W.error("Unclosed comment"),-1)}else return-1;default:if(N.substr(T+3,6)=="CDATA["){var de=N.indexOf("]]>",T+9);return q.startCDATA(),q.characters(N,T+9,de-T-9),q.endCDATA(),de+3}var he=te(N,T),ye=he.length;if(ye>1&&/!doctype/i.test(he[0][0])){var x=he[1][0],B=!1,X=!1;ye>3&&(/^public$/i.test(he[2][0])?(B=he[3][0],X=ye>4&&he[4][0]):/^system$/i.test(he[2][0])&&(X=he[3][0]));var Z=he[ye-1];return q.startDTD(x,B,X),q.endDTD(),Z.index+Z[0].length}}return-1}function U(N,T,q){var W=N.indexOf("?>",T);if(W){var M=N.substring(T,W).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return M?(M[0].length,q.processingInstruction(M[1],M[2]),W+2):-1}return-1}function A(){this.attributeNames={}}A.prototype={setTagName:function(N){if(!a.test(N))throw new Error("invalid tagName:"+N);this.tagName=N},addValue:function(N,T,q){if(!a.test(N))throw new Error("invalid attribute:"+N);this.attributeNames[N]=this.length,this[this.length++]={qName:N,value:T,offset:q}},length:0,getLocalName:function(N){return this[N].localName},getLocator:function(N){return this[N].locator},getQName:function(N){return this[N].qName},getURI:function(N){return this[N].uri},getValue:function(N){return this[N].value}};function te(N,T){var q,W=[],M=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(M.lastIndex=T,M.exec(N);q=M.exec(N);)if(W.push(q),q[1])return W}return bt.XMLReader=j,bt.ParseError=V,bt}var Ut;function un(){if(Ut)return pt;Ut=1;var n=yt(),t=Vt(),r=sn(),a=an(),i=t.DOMImplementation,u=n.NAMESPACE,c=a.ParseError,b=a.XMLReader;function p(v){return v.replace(/\r[\n\u0085]/g,`
|
|
11
11
|
`).replace(/[\r\u0085\u2028]/g,`
|
|
12
|
-
`)}function m(
|
|
13
|
-
@`+(S.systemId||"")+"#[line:"+S.lineNumber+",col:"+S.columnNumber+"]"}function ie(S,te,de){return typeof S=="string"?S.substr(te,de):S.length>=te+de||te?new java.lang.String(S,te,de)+"":S}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(S){T.prototype[S]=function(){return null}});function ce(S,te){S.currentElement?S.currentElement.appendChild(te):S.doc.appendChild(te)}return pt.__DOMHandler=T,pt.normalizeLineEndings=h,pt.DOMParser=m,pt}var qt;function on(){if(qt)return ft;qt=1;var n=Lt();return ft.DOMImplementation=n.DOMImplementation,ft.XMLSerializer=n.XMLSerializer,ft.DOMParser=nn().DOMParser,ft}var $t=on();const sn={key:0,class:"xml-node__comment"},un={key:1,class:"xml-node__cdata"},an={key:2,class:"xml-node__element"},ln={key:0,class:"xml-node__line"},cn=["contenteditable","onKeydown"],pn=["contenteditable","onDblclick","onKeydown"],dn=["contenteditable","onDblclick","onKeydown"],hn=["contenteditable","onKeydown"],mn={key:1,class:"xml-node__line"},gn=["contenteditable","onKeydown"],En=["contenteditable","onDblclick","onKeydown"],yn=["contenteditable","onDblclick","onKeydown"],An=["contenteditable","onKeydown"],bn={key:2},xn={key:0,class:"xml-node__line"},Nn=["contenteditable","onKeydown"],Dn=["contenteditable","onDblclick","onKeydown"],vn=["contenteditable","onDblclick","onKeydown"],Cn=["title"],wn={class:"xml-node__line"},Tn=["title"],_n=["contenteditable","onKeydown"],Bn={key:1},Sn=["contenteditable","onKeydown"],On=["contenteditable","onDblclick","onKeydown"],kn=["contenteditable","onDblclick","onKeydown"],Rn=["title"],Fn={key:0,class:"xml-node__children"},In={key:0,class:"xml-node__text"},Pn=["contenteditable","onKeydown"],Ln={key:1,class:"xml-node__line"},Vn=Et(s.defineComponent({__name:"XmlNode",props:{node:{},index:{},level:{default:0},parentPath:{default:""},expanded:{},theme:{}},emits:["toggle-expand","copy","update:tagName","update:attributeName","update:attributeValue","update:textContent","update:cdataContent"],setup(n,{emit:t}){s.useCssVars(A=>({"623698b5":A.theme.colors.indentLine}));const r=n,u=t,i=s.ref(!1),l=s.ref(null),p=s.ref(null),v=s.ref(!1),h=s.ref(!1),m=s.ref(""),B=s.ref(""),T=s.ref(""),q=s.ref(""),L=s.ref(""),ie=s.ref(null),ce=s.ref(null),S=s.ref(null),te=s.ref(null),de=s.ref(null),ee=s.computed(()=>Object.keys(r.node).find(H=>!H.startsWith(":")&&!H.startsWith("#"))||""),Ae=s.computed(()=>ee.value?r.parentPath?`${r.parentPath}.${ee.value}[${r.index}]`:`${ee.value}[${r.index}]`:""),be=s.computed(()=>r.expanded.has(Ae.value)),X=s.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":ee.value?"element":"unknown"),x=s.computed(()=>{const A=r.node[":@"]||{},H={};return Object.keys(A).forEach(U=>{U.startsWith("@_")&&(H[U.substring(2)]=A[U])}),H}),fe=s.computed(()=>{if(X.value!=="element"||!ee.value)return[];const A=r.node[ee.value];return Array.isArray(A)?A:[]}),k=s.computed(()=>fe.value.some(A=>A.__cdata)),P=s.computed(()=>{if(!k.value)return"";const A=fe.value.find(H=>H.__cdata);if(A&&Array.isArray(A.__cdata)){const H=A.__cdata;if(H.length>0&&H[0]["#text"])return H[0]["#text"]}return""}),Z=s.computed(()=>{if(X.value!=="element"||!ee.value||k.value)return"";const A=r.node[ee.value];if(!Array.isArray(A))return"";const H=A.find(U=>U["#text"]);return H?H["#text"]:""}),Y=s.computed(()=>{if(X.value!=="comment")return"";const A=r.node["#comment"];return Array.isArray(A)&&A.length>0&&A[0]["#text"]||""}),M=s.computed(()=>fe.value.some(A=>Object.keys(A).some(U=>!U.startsWith("#")&&!U.startsWith(":")))),ae=s.computed(()=>M.value?fe.value.filter(A=>Object.keys(A).some(U=>!U.startsWith("#")&&!U.startsWith(":"))).length:0),pe=s.computed(()=>X.value==="element"&&!M.value&&Z.value.trim()!==""),I=()=>{M.value&&u("toggle-expand",Ae.value)},D=(A,H)=>`${Ae.value}-child-${H}`,g=()=>`${Ae.value}.${ee.value}`,b=()=>{i.value=!0,m.value=ee.value,s.nextTick(()=>{if(ie.value){ie.value.focus();const A=document.createRange();A.selectNodeContents(ie.value);const H=window.getSelection();H?.removeAllRanges(),H?.addRange(A)}})},_=A=>{l.value=A,B.value=A,s.nextTick(()=>{if(ce.value){ce.value.focus();const H=document.createRange();H.selectNodeContents(ce.value);const U=window.getSelection();U?.removeAllRanges(),U?.addRange(H)}})},C=A=>{p.value=A,T.value=x.value[A]||"",s.nextTick(()=>{if(S.value){S.value.focus();const H=document.createRange();H.selectNodeContents(S.value);const U=window.getSelection();U?.removeAllRanges(),U?.addRange(H)}})},F=()=>{v.value=!0,q.value=Z.value,s.nextTick(()=>{if(te.value){te.value.focus();const A=document.createRange();A.selectNodeContents(te.value);const H=window.getSelection();H?.removeAllRanges(),H?.addRange(A)}})},R=()=>{if(!i.value)return;const A=ie.value?.innerText.trim()||"";if(!A||A===ee.value){i.value=!1;return}i.value=!1,u("update:tagName",Ae.value,ee.value,A)},V=()=>{if(!l.value)return;const A=l.value,H=ce.value?.innerText.trim()||"";if(!H||H===A){l.value=null;return}l.value=null,u("update:attributeName",Ae.value,A,H)},z=()=>{if(!p.value)return;const A=p.value,H=S.value?.innerText.trim()||"";p.value=null,u("update:attributeValue",Ae.value,A,H)},re=()=>{if(!v.value)return;const A=te.value?.innerText||"";if(A===Z.value){v.value=!1;return}v.value=!1,u("update:textContent",Ae.value,A)},me=()=>{i.value=!1,m.value=ee.value},j=()=>{l.value&&(B.value=l.value,l.value=null)},De=()=>{p.value&&(T.value=x.value[p.value]||"",p.value=null)},Ce=()=>{v.value=!1,q.value=Z.value},Ie=()=>{h.value=!0,L.value=P.value,s.nextTick(()=>{if(de.value){de.value.focus();const A=document.createRange();A.selectNodeContents(de.value);const H=window.getSelection();H?.removeAllRanges(),H?.addRange(A)}})},ke=()=>{if(!h.value)return;const A=de.value?.innerText||"";if(A===P.value){h.value=!1;return}h.value=!1,u("update:cdataContent",Ae.value,A)},He=()=>{h.value=!1,L.value=P.value},we=A=>{M.value&&(A.preventDefault(),b())};return(A,H)=>{const U=s.resolveComponent("XmlNode",!0);return s.openBlock(),s.createElementBlock("div",{class:"xml-node",style:s.normalizeStyle({paddingLeft:A.level>0?"16px":"0"})},[X.value==="comment"?(s.openBlock(),s.createElementBlock("div",sn,[s.createElementVNode("span",{style:s.normalizeStyle({color:A.theme.colors.xmlComment})}," <!-- "+s.toDisplayString(Y.value)+" --> ",5)])):X.value==="cdata"?(s.openBlock(),s.createElementBlock("div",un,[s.createElementVNode("span",{style:s.normalizeStyle({color:A.theme.colors.xmlCdata})}," <![CDATA["+s.toDisplayString(A.node.__cdata)+"]]> ",5)])):X.value==="element"?(s.openBlock(),s.createElementBlock("div",an,[k.value?(s.openBlock(),s.createElementBlock("div",ln,[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),s.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:s.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:b,onContextmenu:we,onKeydown:[s.withKeys(s.withModifiers(R,["prevent"]),["enter"]),s.withKeys(me,["escape"])],onBlur:R,ref_key:"tagNameRef",ref:ie,title:"Double-click to edit tag name"},s.toDisplayString(i.value?m.value:ee.value),45,cn),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(x.value,(ve,ue)=>(s.openBlock(),s.createElementBlock("span",{key:ue,class:"xml-node__attribute"},[s.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:l.value===ue,onDblclick:ne=>_(ue),onKeydown:[s.withKeys(s.withModifiers(V,["prevent"]),["enter"]),s.withKeys(j,["escape"])],onBlur:V,ref_for:!0,ref:ne=>{l.value===ue&&(ce.value=ne)},title:"Double-click to edit attribute name"},s.toDisplayString(l.value===ue?B.value:ue),45,pn),s.createElementVNode("span",{class:"xml-node__equals",style:s.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),s.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:p.value===ue,onDblclick:ne=>C(ue),onKeydown:[s.withKeys(s.withModifiers(z,["prevent"]),["enter"]),s.withKeys(De,["escape"])],onBlur:z,ref_for:!0,ref:ne=>{p.value===ue&&(S.value=ne)},title:"Double-click to edit attribute value"},s.toDisplayString(p.value===ue?T.value:ve),45,dn),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),s.createElementVNode("span",{class:"xml-node__cdata",style:s.normalizeStyle({color:A.theme.colors.xmlCdata})},"<![CDATA[",4),s.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:s.normalizeStyle({color:A.theme.colors.xmlCdata}),contenteditable:h.value,onDblclick:Ie,onKeydown:[s.withKeys(s.withModifiers(ke,["prevent"]),["enter"]),s.withKeys(He,["escape"])],onBlur:ke,ref_key:"cdataContentRef",ref:de,title:"Double-click to edit CDATA content"},s.toDisplayString(h.value?L.value:P.value),45,hn),s.createElementVNode("span",{class:"xml-node__cdata",style:s.normalizeStyle({color:A.theme.colors.xmlCdata})},"]]>",4),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),s.createElementVNode("span",{class:"xml-node__tag",style:s.normalizeStyle({color:A.theme.colors.xmlTag})},s.toDisplayString(i.value?m.value:ee.value),5),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):pe.value?(s.openBlock(),s.createElementBlock("div",mn,[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),s.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:s.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:b,onContextmenu:we,onKeydown:[s.withKeys(s.withModifiers(R,["prevent"]),["enter"]),s.withKeys(me,["escape"])],onBlur:R,ref_key:"tagNameRef",ref:ie,title:"Double-click to edit tag name"},s.toDisplayString(i.value?m.value:ee.value),45,gn),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(x.value,(ve,ue)=>(s.openBlock(),s.createElementBlock("span",{key:ue,class:"xml-node__attribute"},[s.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:l.value===ue,onDblclick:ne=>_(ue),onKeydown:[s.withKeys(s.withModifiers(V,["prevent"]),["enter"]),s.withKeys(j,["escape"])],onBlur:V,ref_for:!0,ref:ne=>{l.value===ue&&(ce.value=ne)},title:"Double-click to edit attribute name"},s.toDisplayString(l.value===ue?B.value:ue),45,En),s.createElementVNode("span",{class:"xml-node__equals",style:s.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),s.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:p.value===ue,onDblclick:ne=>C(ue),onKeydown:[s.withKeys(s.withModifiers(z,["prevent"]),["enter"]),s.withKeys(De,["escape"])],onBlur:z,ref_for:!0,ref:ne=>{p.value===ue&&(S.value=ne)},title:"Double-click to edit attribute value"},s.toDisplayString(p.value===ue?T.value:ve),45,yn),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4),s.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:s.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:v.value,onDblclick:F,onKeydown:[s.withKeys(s.withModifiers(re,["prevent"]),["enter"]),s.withKeys(Ce,["escape"])],onBlur:re,ref_key:"textContentRef",ref:te,title:"Double-click to edit text content"},s.toDisplayString(v.value?q.value:Z.value),45,An),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),s.createElementVNode("span",{class:"xml-node__tag",style:s.normalizeStyle({color:A.theme.colors.xmlTag})},s.toDisplayString(i.value?m.value:ee.value),5),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])):(s.openBlock(),s.createElementBlock("div",bn,[!be.value&&M.value?(s.openBlock(),s.createElementBlock("div",xn,[s.createElementVNode("span",{class:"xml-node__clickable-part",onClick:H[0]||(H[0]=ve=>I()),title:"Click to expand"},[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),s.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:s.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:s.withModifiers(b,["stop"]),onContextmenu:we,onKeydown:[s.withKeys(s.withModifiers(R,["prevent"]),["enter"]),s.withKeys(me,["escape"])],onBlur:R,ref_key:"tagNameRef",ref:ie,title:"Double-click or right-click to edit tag name"},s.toDisplayString(i.value?m.value:ee.value),45,Nn)]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(x.value,(ve,ue)=>(s.openBlock(),s.createElementBlock("span",{key:ue,class:"xml-node__attribute"},[s.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:l.value===ue,onDblclick:ne=>_(ue),onKeydown:[s.withKeys(s.withModifiers(V,["prevent"]),["enter"]),s.withKeys(j,["escape"])],onBlur:V,ref_for:!0,ref:ne=>{l.value===ue&&(ce.value=ne)},title:"Double-click to edit attribute name"},s.toDisplayString(l.value===ue?B.value:ue),45,Dn),s.createElementVNode("span",{class:"xml-node__equals",style:s.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),s.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:p.value===ue,onDblclick:ne=>C(ue),onKeydown:[s.withKeys(s.withModifiers(z,["prevent"]),["enter"]),s.withKeys(De,["escape"])],onBlur:z,ref_for:!0,ref:ne=>{p.value===ue&&(S.value=ne)},title:"Double-click to edit attribute value"},s.toDisplayString(p.value===ue?T.value:ve),45,vn),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),s.createElementVNode("span",{class:"xml-node__clickable-part",onClick:H[1]||(H[1]=ve=>I()),title:"Click to expand"},[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)]),s.createElementVNode("span",{class:"xml-node__collapsed-badge",style:s.normalizeStyle({backgroundColor:A.theme.colors.collapsedBackground,color:A.theme.colors.collapsedText}),onClick:H[2]||(H[2]=ve=>I()),title:`Click to expand ${ae.value} child element${ae.value>1?"s":""}`},s.toDisplayString(ae.value)+" child"+s.toDisplayString(ae.value>1?"ren":""),13,Cn),s.createElementVNode("span",{class:"xml-node__clickable-part",onClick:H[3]||(H[3]=ve=>I()),title:"Click to expand"},[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),s.createElementVNode("span",{class:"xml-node__tag",style:s.normalizeStyle({color:A.theme.colors.xmlTag})},s.toDisplayString(i.value?m.value:ee.value),5),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("div",wn,[M.value?(s.openBlock(),s.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:H[4]||(H[4]=ve=>I()),title:be.value?"Click to collapse":"Click to expand"},[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),s.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:s.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:s.withModifiers(b,["stop"]),onContextmenu:we,onKeydown:[s.withKeys(s.withModifiers(R,["prevent"]),["enter"]),s.withKeys(me,["escape"])],onBlur:R,ref_key:"tagNameRef",ref:ie,title:"Double-click or right-click to edit tag name"},s.toDisplayString(i.value?m.value:ee.value),45,_n)],8,Tn)):(s.openBlock(),s.createElementBlock("span",Bn,[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"<",4),s.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:s.normalizeStyle({color:A.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:b,onKeydown:[s.withKeys(s.withModifiers(R,["prevent"]),["enter"]),s.withKeys(me,["escape"])],onBlur:R,ref_key:"tagNameRef",ref:ie,title:"Double-click to edit tag name"},s.toDisplayString(i.value?m.value:ee.value),45,Sn)])),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(x.value,(ve,ue)=>(s.openBlock(),s.createElementBlock("span",{key:ue,class:"xml-node__attribute"},[s.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttribute}),contenteditable:l.value===ue,onDblclick:ne=>_(ue),onKeydown:[s.withKeys(s.withModifiers(V,["prevent"]),["enter"]),s.withKeys(j,["escape"])],onBlur:V,ref_for:!0,ref:ne=>{l.value===ue&&(ce.value=ne)},title:"Double-click to edit attribute name"},s.toDisplayString(l.value===ue?B.value:ue),45,On),s.createElementVNode("span",{class:"xml-node__equals",style:s.normalizeStyle({color:A.theme.colors.xmlEquals})},"=",4),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4),s.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:s.normalizeStyle({color:A.theme.colors.xmlAttributeValue}),contenteditable:p.value===ue,onDblclick:ne=>C(ue),onKeydown:[s.withKeys(s.withModifiers(z,["prevent"]),["enter"]),s.withKeys(De,["escape"])],onBlur:z,ref_for:!0,ref:ne=>{p.value===ue&&(S.value=ne)},title:"Double-click to edit attribute value"},s.toDisplayString(p.value===ue?T.value:ve),45,kn),s.createElementVNode("span",{class:"xml-node__quote",style:s.normalizeStyle({color:A.theme.colors.xmlQuote})},'"',4)]))),128)),M.value?(s.openBlock(),s.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:H[5]||(H[5]=ve=>I()),title:be.value?"Click to collapse":"Click to expand"},[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)],8,Rn)):(s.openBlock(),s.createElementBlock("span",{key:3,class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},s.toDisplayString(M.value?">":"/>"),5))]),be.value&&M.value?(s.openBlock(),s.createElementBlock("div",Fn,[fe.value.length===0&&Z.value.trim()?(s.openBlock(),s.createElementBlock("div",In,[s.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:s.normalizeStyle({color:A.theme.colors.xmlText}),contenteditable:v.value,onDblclick:F,onKeydown:[s.withKeys(s.withModifiers(re,["prevent"]),["enter"]),s.withKeys(Ce,["escape"])],onBlur:re,ref_key:"textContentRef",ref:te,title:"Double-click to edit text content"},s.toDisplayString(v.value?q.value:Z.value),45,Pn)])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(fe.value,(ve,ue)=>(s.openBlock(),s.createBlock(U,{key:D(ve,ue),node:ve,index:ue,level:A.level+1,"parent-path":g(),expanded:A.expanded,theme:A.theme,onToggleExpand:H[6]||(H[6]=ne=>A.$emit("toggle-expand",ne)),onCopy:H[7]||(H[7]=ne=>A.$emit("copy",ne)),"onUpdate:tagName":H[8]||(H[8]=(ne,$,G)=>A.$emit("update:tagName",ne,$,G)),"onUpdate:attributeName":H[9]||(H[9]=(ne,$,G)=>A.$emit("update:attributeName",ne,$,G)),"onUpdate:attributeValue":H[10]||(H[10]=(ne,$,G)=>A.$emit("update:attributeValue",ne,$,G)),"onUpdate:textContent":H[11]||(H[11]=(ne,$)=>A.$emit("update:textContent",ne,$)),"onUpdate:cdataContent":H[12]||(H[12]=(ne,$)=>A.$emit("update:cdataContent",ne,$))},null,8,["node","index","level","parent-path","expanded","theme"]))),128))])):s.createCommentVNode("",!0),be.value&&M.value?(s.openBlock(),s.createElementBlock("div",Ln,[s.createElementVNode("span",{class:"xml-node__clickable-part",onClick:H[13]||(H[13]=ve=>I()),title:"Click to collapse"},[s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},"</",4),s.createElementVNode("span",{class:"xml-node__tag",style:s.normalizeStyle({color:A.theme.colors.xmlTag})},s.toDisplayString(i.value?m.value:ee.value),5),s.createElementVNode("span",{class:"xml-node__bracket",style:s.normalizeStyle({color:A.theme.colors.xmlBracket})},">",4)])])):s.createCommentVNode("",!0)],64))]))])):s.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-44ac0d91"]]),jt={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",xmlTag:"#116329",xmlAttribute:"#0550ae",xmlAttributeValue:"#0a3069",xmlText:"#24292f",xmlComment:"#6e7781",xmlCdata:"#8250df",xmlDeclaration:"#953800",xmlBracket:"#6e7781",xmlEquals:"#6e7781",xmlQuote:"#0550ae",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",xmlTag:"#7ee787",xmlAttribute:"#79c0ff",xmlAttributeValue:"#a5d6ff",xmlText:"#c9d1d9",xmlComment:"#8b949e",xmlCdata:"#d2a8ff",xmlDeclaration:"#ffa657",xmlBracket:"#8b949e",xmlEquals:"#8b949e",xmlQuote:"#79c0ff",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",xmlTag:"#16a34a",xmlAttribute:"#2563eb",xmlAttributeValue:"#1e40af",xmlText:"#171717",xmlComment:"#737373",xmlCdata:"#9333ea",xmlDeclaration:"#ea580c",xmlBracket:"#737373",xmlEquals:"#737373",xmlQuote:"#2563eb",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",xmlTag:"#007a5a",xmlAttribute:"#1264a3",xmlAttributeValue:"#0b4c8c",xmlText:"#3d3c40",xmlComment:"#616061",xmlCdata:"#8b2eff",xmlDeclaration:"#e8912d",xmlBracket:"#616061",xmlEquals:"#616061",xmlQuote:"#1264a3",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#e8d5b7"}}},Mn=n=>jt[n]||jt["github-light"],Xt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Un=Xt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",qn="["+Xt+"]["+Un+"]*",$n=new RegExp("^"+qn+"$");function Ht(n,t){const r=[];let u=t.exec(n);for(;u;){const i=[];i.startIndex=t.lastIndex-u[0].length;const l=u.length;for(let p=0;p<l;p++)i.push(u[p]);r.push(i),u=t.exec(n)}return r}const bt=function(n){const t=$n.exec(n);return!(t===null||typeof t>"u")};function jn(n){return typeof n<"u"}const Xn={allowBooleanAttributes:!1,unpairedTags:[]};function Gt(n,t){t=Object.assign({},Xn,t);const r=[];let u=!1,i=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let l=0;l<n.length;l++)if(n[l]==="<"&&n[l+1]==="?"){if(l+=2,l=zt(n,l),l.err)return l}else if(n[l]==="<"){let p=l;if(l++,n[l]==="!"){l=Yt(n,l);continue}else{let v=!1;n[l]==="/"&&(v=!0,l++);let h="";for(;l<n.length&&n[l]!==">"&&n[l]!==" "&&n[l]!==" "&&n[l]!==`
|
|
14
|
-
`&&n[
|
|
15
|
-
`||n==="\r"}function zt(n,t){const r=t;for(;t<n.length;t++)if(n[t]=="?"||n[t]==" "){const u=n.substr(r,t-r);if(t>5&&u==="xml")return Be("InvalidXml","XML declaration allowed only at the start of the document.",Pe(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function Yt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let r=1;for(t+=8;t<n.length;t++)if(n[t]==="<")r++;else if(n[t]===">"&&(r--,r===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}const Hn='"',Gn="'";function Kn(n,t){let r="",u="",i=!1;for(;t<n.length;t++){if(n[t]===Hn||n[t]===Gn)u===""?u=n[t]:u!==n[t]||(u="");else if(n[t]===">"&&u===""){i=!0;break}r+=n[t]}return u!==""?!1:{value:r,index:t,tagClosed:i}}const zn=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Wt(n,t){const r=Ht(n,zn),u={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Be("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",dt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Be("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",dt(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return Be("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",dt(r[i]));const l=r[i][2];if(!Qn(l))return Be("InvalidAttr","Attribute '"+l+"' is an invalid name.",dt(r[i]));if(!u.hasOwnProperty(l))u[l]=1;else return Be("InvalidAttr","Attribute '"+l+"' is repeated.",dt(r[i]))}return!0}function Yn(n,t){let r=/\d/;for(n[t]==="x"&&(t++,r=/[\da-fA-F]/);t<n.length;t++){if(n[t]===";")return t;if(!n[t].match(r))break}return-1}function Wn(n,t){if(t++,n[t]===";")return-1;if(n[t]==="#")return t++,Yn(n,t);let r=0;for(;t<n.length;t++,r++)if(!(n[t].match(/\w/)&&r<20)){if(n[t]===";")break;return-1}return t}function Be(n,t,r){return{err:{code:n,msg:t,line:r.line||r,col:r.col}}}function Qn(n){return bt(n)}function Zn(n){return bt(n)}function Pe(n,t){const r=n.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function dt(n){return n.startIndex+n[1].length}const Jn={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,r){return n},captureMetaData:!1},eo=function(n){return Object.assign({},Jn,n)};let xt;typeof Symbol!="function"?xt="@@xmlMetadata":xt=Symbol("XML Node Metadata");class it{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][xt]={startIndex:r})}static getMetaDataSymbol(){return xt}}class to{constructor(t){this.suppressValidationErr=!t}readDocType(t,r){const u={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let i=1,l=!1,p=!1,v="";for(;r<t.length;r++)if(t[r]==="<"&&!p){if(l&&ut(t,"!ENTITY",r)){r+=7;let h,m;[h,m,r]=this.readEntityExp(t,r+1,this.suppressValidationErr),m.indexOf("&")===-1&&(u[h]={regx:RegExp(`&${h};`,"g"),val:m})}else if(l&&ut(t,"!ELEMENT",r)){r+=8;const{index:h}=this.readElementExp(t,r+1);r=h}else if(l&&ut(t,"!ATTLIST",r))r+=8;else if(l&&ut(t,"!NOTATION",r)){r+=9;const{index:h}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=h}else if(ut(t,"!--",r))p=!0;else throw new Error("Invalid DOCTYPE");i++,v=""}else if(t[r]===">"){if(p?t[r-1]==="-"&&t[r-2]==="-"&&(p=!1,i--):i--,i===0)break}else t[r]==="["?l=!0:v+=t[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:u,i:r}}readEntityExp(t,r){r=Le(t,r);let u="";for(;r<t.length&&!/\s/.test(t[r])&&t[r]!=='"'&&t[r]!=="'";)u+=t[r],r++;if(ht(u),r=Le(t,r),!this.suppressValidationErr){if(t.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(t,r,"entity"),r--,[u,i,r]}readNotationExp(t,r){r=Le(t,r);let u="";for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;!this.suppressValidationErr&&ht(u),r=Le(t,r);const i=t.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=Le(t,r);let l=null,p=null;if(i==="PUBLIC")[r,l]=this.readIdentifierVal(t,r,"publicIdentifier"),r=Le(t,r),(t[r]==='"'||t[r]==="'")&&([r,p]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,p]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!p))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:u,publicIdentifier:l,systemIdentifier:p,index:--r}}readIdentifierVal(t,r,u){let i="";const l=t[r];if(l!=='"'&&l!=="'")throw new Error(`Expected quoted string, found "${l}"`);for(r++;r<t.length&&t[r]!==l;)i+=t[r],r++;if(t[r]!==l)throw new Error(`Unterminated ${u} value`);return r++,[r,i]}readElementExp(t,r){r=Le(t,r);let u="";for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;if(!this.suppressValidationErr&&!bt(u))throw new Error(`Invalid element name: "${u}"`);r=Le(t,r);let i="";if(t[r]==="E"&&ut(t,"MPTY",r))r+=4;else if(t[r]==="A"&&ut(t,"NY",r))r+=2;else if(t[r]==="("){for(r++;r<t.length&&t[r]!==")";)i+=t[r],r++;if(t[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[r]}"`);return{elementName:u,contentModel:i.trim(),index:r}}readAttlistExp(t,r){r=Le(t,r);let u="";for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;ht(u),r=Le(t,r);let i="";for(;r<t.length&&!/\s/.test(t[r]);)i+=t[r],r++;if(!ht(i))throw new Error(`Invalid attribute name: "${i}"`);r=Le(t,r);let l="";if(t.substring(r,r+8).toUpperCase()==="NOTATION"){if(l="NOTATION",r+=8,r=Le(t,r),t[r]!=="(")throw new Error(`Expected '(', found "${t[r]}"`);r++;let v=[];for(;r<t.length&&t[r]!==")";){let h="";for(;r<t.length&&t[r]!=="|"&&t[r]!==")";)h+=t[r],r++;if(h=h.trim(),!ht(h))throw new Error(`Invalid notation name: "${h}"`);v.push(h),t[r]==="|"&&(r++,r=Le(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,l+=" ("+v.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)l+=t[r],r++;const v=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!v.includes(l.toUpperCase()))throw new Error(`Invalid attribute type: "${l}"`)}r=Le(t,r);let p="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(p="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(p="#IMPLIED",r+=7):[r,p]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:u,attributeName:i,attributeType:l,defaultValue:p,index:r}}}const Le=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function ut(n,t,r){for(let u=0;u<t.length;u++)if(t[u]!==n[r+u+1])return!1;return!0}function ht(n){if(bt(n))return n;throw new Error(`Invalid entity name ${n}`)}const ro=/^[-+]?0x[a-fA-F0-9]+$/,no=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,oo={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function so(n,t={}){if(t=Object.assign({},oo,t),!n||typeof n!="string")return n;let r=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return n;if(n==="0")return 0;if(t.hex&&ro.test(r))return lo(r,16);if(r.search(/.+[eE].+/)!==-1)return uo(n,r,t);{const u=no.exec(r);if(u){const i=u[1]||"",l=u[2];let p=ao(u[3]);const v=i?n[l.length+1]===".":n[l.length]===".";if(!t.leadingZeros&&(l.length>1||l.length===1&&!v))return n;{const h=Number(r),m=String(h);if(h===0)return h;if(m.search(/[eE]/)!==-1)return t.eNotation?h:n;if(r.indexOf(".")!==-1)return m==="0"||m===p||m===`${i}${p}`?h:n;let B=l?p:r;return l?B===m||i+B===m?h:n:B===m||B===i+m?h:n}}else return n}}const io=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function uo(n,t,r){if(!r.eNotation)return n;const u=t.match(io);if(u){let i=u[1]||"";const l=u[3].indexOf("e")===-1?"E":"e",p=u[2],v=i?n[p.length+1]===l:n[p.length]===l;return p.length>1&&v?n:p.length===1&&(u[3].startsWith(`.${l}`)||u[3][0]===l)?Number(t):r.leadingZeros&&!v?(t=(u[1]||"")+u[3],Number(t)):n}else return n}function ao(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function lo(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Qt(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const r of n)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class co{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,u)=>String.fromCodePoint(Number.parseInt(u,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,u)=>String.fromCodePoint(Number.parseInt(u,16))}},this.addExternalEntities=fo,this.parseXml=Eo,this.parseTextData=po,this.resolveNameSpace=ho,this.buildAttributesMap=go,this.isItStopNode=xo,this.replaceEntitiesValue=Ao,this.readStopNodeData=Do,this.saveTextToParentTag=bo,this.addChild=yo,this.ignoreAttributesFn=Qt(this.options.ignoreAttributes)}}function fo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const u=t[r];this.lastEntities[u]={regex:new RegExp("&"+u+";","g"),val:n[u]}}}function po(n,t,r,u,i,l,p){if(n!==void 0&&(this.options.trimValues&&!u&&(n=n.trim()),n.length>0)){p||(n=this.replaceEntitiesValue(n));const v=this.options.tagValueProcessor(t,n,r,i,l);return v==null?n:typeof v!=typeof n||v!==n?v:this.options.trimValues?Tt(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?Tt(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function ho(n){if(this.options.removeNSPrefix){const t=n.split(":"),r=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=r+t[1])}return n}const mo=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function go(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const u=Ht(n,mo),i=u.length,l={};for(let p=0;p<i;p++){const v=this.resolveNameSpace(u[p][1]);if(this.ignoreAttributesFn(v,t))continue;let h=u[p][4],m=this.options.attributeNamePrefix+v;if(v.length)if(this.options.transformAttributeName&&(m=this.options.transformAttributeName(m)),m==="__proto__"&&(m="#__proto__"),h!==void 0){this.options.trimValues&&(h=h.trim()),h=this.replaceEntitiesValue(h);const B=this.options.attributeValueProcessor(v,h,t);B==null?l[m]=h:typeof B!=typeof h||B!==h?l[m]=B:l[m]=Tt(h,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(l[m]=!0)}if(!Object.keys(l).length)return;if(this.options.attributesGroupName){const p={};return p[this.options.attributesGroupName]=l,p}return l}}const Eo=function(n){n=n.replace(/\r\n?/g,`
|
|
16
|
-
`);const t=new
|
|
17
|
-
`;function
|
|
12
|
+
`)}function m(v){this.options=v||{locator:{}}}m.prototype.parseFromString=function(v,H){var K=this.options,$=new b,ae=K.domBuilder||new D,ee=K.errorHandler,U=K.locator,A=K.xmlns||{},te=/\/x?html?$/.test(H),N=te?r.HTML_ENTITIES:r.XML_ENTITIES;U&&ae.setDocumentLocator(U),$.errorHandler=_(ee,ae,U),$.domBuilder=K.domBuilder||ae,te&&(A[""]=u.HTML),A.xml=A.xml||u.XML;var T=K.normalizeLineEndings||p;return v&&typeof v=="string"?$.parse(T(v),A,N):$.errorHandler.error("invalid doc source"),ae.doc};function _(v,H,K){if(!v){if(H instanceof D)return H;v=H}var $={},ae=v instanceof Function;K=K||{};function ee(U){var A=v[U];!A&&ae&&(A=v.length==2?function(te){v(U,te)}:v),$[U]=A&&function(te){A("[xmldom "+U+"] "+te+j(K))}||function(){}}return ee("warning"),ee("error"),ee("fatalError"),$}function D(){this.cdata=!1}function V(v,H){H.lineNumber=v.lineNumber,H.columnNumber=v.columnNumber}D.prototype={startDocument:function(){this.doc=new i().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(v,H,K,$){var ae=this.doc,ee=ae.createElementNS(v,K||H),U=$.length;ie(this,ee),this.currentElement=ee,this.locator&&V(this.locator,ee);for(var A=0;A<U;A++){var v=$.getURI(A),te=$.getValue(A),K=$.getQName(A),N=ae.createAttributeNS(v,K);this.locator&&V($.getLocator(A),N),N.value=N.nodeValue=te,ee.setAttributeNode(N)}},endElement:function(v,H,K){var $=this.currentElement;$.tagName,this.currentElement=$.parentNode},startPrefixMapping:function(v,H){},endPrefixMapping:function(v){},processingInstruction:function(v,H){var K=this.doc.createProcessingInstruction(v,H);this.locator&&V(this.locator,K),ie(this,K)},ignorableWhitespace:function(v,H,K){},characters:function(v,H,K){if(v=Y.apply(this,arguments),v){if(this.cdata)var $=this.doc.createCDATASection(v);else var $=this.doc.createTextNode(v);this.currentElement?this.currentElement.appendChild($):/^\s*$/.test(v)&&this.doc.appendChild($),this.locator&&V(this.locator,$)}},skippedEntity:function(v){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(v){(this.locator=v)&&(v.lineNumber=0)},comment:function(v,H,K){v=Y.apply(this,arguments);var $=this.doc.createComment(v);this.locator&&V(this.locator,$),ie(this,$)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(v,H,K){var $=this.doc.implementation;if($&&$.createDocumentType){var ae=$.createDocumentType(v,H,K);this.locator&&V(this.locator,ae),ie(this,ae),this.doc.doctype=ae}},warning:function(v){console.warn("[xmldom warning] "+v,j(this.locator))},error:function(v){console.error("[xmldom error] "+v,j(this.locator))},fatalError:function(v){throw new c(v,this.locator)}};function j(v){if(v)return`
|
|
13
|
+
@`+(v.systemId||"")+"#[line:"+v.lineNumber+",col:"+v.columnNumber+"]"}function Y(v,H,K){return typeof v=="string"?v.substr(H,K):v.length>=H+K||H?new java.lang.String(v,H,K)+"":v}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(v){D.prototype[v]=function(){return null}});function ie(v,H){v.currentElement?v.currentElement.appendChild(H):v.doc.appendChild(H)}return pt.__DOMHandler=D,pt.normalizeLineEndings=p,pt.DOMParser=m,pt}var qt;function ln(){if(qt)return dt;qt=1;var n=Vt();return dt.DOMImplementation=n.DOMImplementation,dt.XMLSerializer=n.XMLSerializer,dt.DOMParser=un().DOMParser,dt}var Ht=ln();const cn={key:0,class:"xml-node__comment"},dn={key:1,class:"xml-node__cdata"},pn={key:2,class:"xml-node__element"},hn={key:0,class:"xml-node__line"},mn=["contenteditable","onKeydown"],gn=["contenteditable","onDblclick","onKeydown"],En=["contenteditable","onDblclick","onKeydown"],yn=["contenteditable","onKeydown"],bn={key:1,class:"xml-node__line"},An=["contenteditable","onKeydown"],xn=["contenteditable","onDblclick","onKeydown"],Nn=["contenteditable","onDblclick","onKeydown"],Cn=["contenteditable","onKeydown"],Dn={key:2,class:"xml-node__line"},vn=["contenteditable","onKeydown"],wn=["contenteditable","onDblclick","onKeydown"],_n=["contenteditable","onDblclick","onKeydown"],Tn={key:3,class:"xml-node__line"},Bn=["contenteditable","onKeydown"],Sn=["contenteditable","onDblclick","onKeydown"],On=["contenteditable","onDblclick","onKeydown"],kn={key:4},Rn={key:0,class:"xml-node__line"},In=["contenteditable","onKeydown"],Fn=["contenteditable","onDblclick","onKeydown"],Pn=["contenteditable","onDblclick","onKeydown"],Ln=["title"],Vn={class:"xml-node__line"},$n=["title"],Mn=["contenteditable","onKeydown"],Un={key:1},qn=["contenteditable","onKeydown"],Hn=["contenteditable","onDblclick","onKeydown"],jn=["contenteditable","onDblclick","onKeydown"],Kn=["title"],Gn={key:0,class:"xml-node__children"},Xn={key:0,class:"xml-node__text"},zn=["contenteditable","onKeydown"],Wn={key:1,class:"xml-node__line"},Yn=ft(o.defineComponent({__name:"XmlNode",props:{node:{},index:{},level:{default:0},parentPath:{default:""},expanded:{},theme:{},selfClosingTags:{default:()=>new Set}},emits:["toggle-expand","copy","update:tagName","update:attributeName","update:attributeValue","update:textContent","update:cdataContent"],setup(n,{emit:t}){o.useCssVars(y=>({a71f898c:y.theme.colors.indentLine}));const r=n,a=t,i=o.ref(!1),u=o.ref(null),c=o.ref(null),b=o.ref(!1),p=o.ref(!1),m=o.ref(""),_=o.ref(""),D=o.ref(""),V=o.ref(""),j=o.ref(""),Y=o.ref(null),ie=o.ref(null),v=o.ref(null),H=o.ref(null),K=o.ref(null),$=o.computed(()=>Object.keys(r.node).find(ne=>!ne.startsWith(":")&&!ne.startsWith("#"))||""),ae=o.computed(()=>$.value?r.parentPath?`${r.parentPath}.${$.value}[${r.index}]`:`${$.value}[${r.index}]`:""),ee=o.computed(()=>r.expanded.has(ae.value)),U=o.computed(()=>r.node["#comment"]?"comment":r.node.__cdata?"cdata":$.value?"element":"unknown"),A=o.computed(()=>{const y=r.node[":@"]||{},ne={};return Object.keys(y).forEach(Ce=>{Ce.startsWith("@_")&&(ne[Ce.substring(2)]=y[Ce])}),ne}),te=o.computed(()=>{if(U.value!=="element"||!$.value)return[];const y=r.node[$.value];return Array.isArray(y)?y:[]}),N=o.computed(()=>te.value.some(y=>y.__cdata)),T=o.computed(()=>{if(!N.value)return"";const y=te.value.find(ne=>ne.__cdata);if(y&&Array.isArray(y.__cdata)){const ne=y.__cdata;if(ne.length>0&&ne[0]["#text"])return ne[0]["#text"]}return""}),q=o.computed(()=>{if(U.value!=="element"||!$.value||N.value)return"";const y=r.node[$.value];if(!Array.isArray(y))return"";const ne=y.find(Ce=>Ce["#text"]);return ne?ne["#text"]:""}),W=o.computed(()=>{if(U.value!=="comment")return"";const y=r.node["#comment"];return Array.isArray(y)&&y.length>0&&y[0]["#text"]||""}),M=o.computed(()=>te.value.some(y=>Object.keys(y).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":")))),de=o.computed(()=>M.value?te.value.filter(y=>Object.keys(y).some(Ce=>!Ce.startsWith("#")&&!Ce.startsWith(":"))).length:0),he=o.computed(()=>U.value==="element"&&!M.value&&q.value!==""),ye=o.computed(()=>U.value==="element"&&!M.value&&q.value===""),x=o.computed(()=>ye.value&&r.selfClosingTags?.has($.value)||!1),B=()=>{M.value&&a("toggle-expand",ae.value)},X=(y,ne)=>`${ae.value}-child-${ne}`,Z=()=>`${ae.value}.${$.value}`,F=()=>{i.value=!0,m.value=$.value,o.nextTick(()=>{if(Y.value){Y.value.focus();const y=document.createRange();y.selectNodeContents(Y.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(y)}})},le=y=>{u.value=y,_.value=y,o.nextTick(()=>{if(ie.value){ie.value.focus();const ne=document.createRange();ne.selectNodeContents(ie.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(ne)}})},w=y=>{c.value=y,D.value=A.value[y]||"",o.nextTick(()=>{if(v.value){v.value.focus();const ne=document.createRange();ne.selectNodeContents(v.value);const Ce=window.getSelection();Ce?.removeAllRanges(),Ce?.addRange(ne)}})},k=()=>{b.value=!0,V.value=q.value,o.nextTick(()=>{if(H.value){H.value.focus();const y=document.createRange();y.selectNodeContents(H.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(y)}})},L=()=>{if(!i.value)return;const y=Y.value?.innerText.trim()||"";if(!y||y===$.value){i.value=!1;return}i.value=!1,a("update:tagName",ae.value,$.value,y)},G=()=>{if(!u.value)return;const y=u.value,ne=ie.value?.innerText.trim()||"";if(!ne||ne===y){u.value=null;return}u.value=null,a("update:attributeName",ae.value,y,ne)},Q=()=>{if(!c.value)return;const y=c.value,ne=v.value?.innerText.trim()||"";c.value=null,a("update:attributeValue",ae.value,y,ne)},R=()=>{if(!b.value)return;const y=H.value?.innerText||"";if(y===q.value){b.value=!1;return}b.value=!1,a("update:textContent",ae.value,y)},J=()=>{i.value=!1,m.value=$.value},ge=()=>{u.value&&(_.value=u.value,u.value=null)},Ee=()=>{c.value&&(D.value=A.value[c.value]||"",c.value=null)},_e=()=>{b.value=!1,V.value=q.value},ke=()=>{p.value=!0,j.value=T.value,o.nextTick(()=>{if(K.value){K.value.focus();const y=document.createRange();y.selectNodeContents(K.value);const ne=window.getSelection();ne?.removeAllRanges(),ne?.addRange(y)}})},De=()=>{if(!p.value)return;const y=K.value?.innerText||"";if(y===T.value){p.value=!1;return}p.value=!1,a("update:cdataContent",ae.value,y)},z=()=>{p.value=!1,j.value=T.value},Be=y=>{M.value&&(y.preventDefault(),F())};return(y,ne)=>{const Ce=o.resolveComponent("XmlNode",!0);return o.openBlock(),o.createElementBlock("div",{class:"xml-node",style:o.normalizeStyle({paddingLeft:y.level>0?"16px":"0"})},[U.value==="comment"?(o.openBlock(),o.createElementBlock("div",cn,[o.createElementVNode("span",{style:o.normalizeStyle({color:y.theme.colors.xmlComment})}," <!-- "+o.toDisplayString(W.value)+" --> ",5)])):U.value==="cdata"?(o.openBlock(),o.createElementBlock("div",dn,[o.createElementVNode("span",{style:o.normalizeStyle({color:y.theme.colors.xmlCdata})}," <![CDATA["+o.toDisplayString(y.node.__cdata)+"]]> ",5)])):U.value==="element"?(o.openBlock(),o.createElementBlock("div",pn,[N.value?(o.openBlock(),o.createElementBlock("div",hn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,mn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,gn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,En),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:y.theme.colors.xmlCdata})},"<![CDATA[",4),o.createElementVNode("span",{class:"xml-node__cdata-content xml-node__cdata-content--editable",style:o.normalizeStyle({color:y.theme.colors.xmlCdata}),contenteditable:p.value,onDblclick:ke,onKeydown:[o.withKeys(o.withModifiers(De,["prevent"]),["enter"]),o.withKeys(z,["escape"])],onBlur:De,ref_key:"cdataContentRef",ref:K,title:"Double-click to edit CDATA content"},o.toDisplayString(p.value?j.value:T.value),45,yn),o.createElementVNode("span",{class:"xml-node__cdata",style:o.normalizeStyle({color:y.theme.colors.xmlCdata})},"]]>",4),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])):he.value?(o.openBlock(),o.createElementBlock("div",bn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,An),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,xn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,Nn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4),o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:y.theme.colors.xmlText}),contenteditable:b.value,onDblclick:k,onKeydown:[o.withKeys(o.withModifiers(R,["prevent"]),["enter"]),o.withKeys(_e,["escape"])],onBlur:R,ref_key:"textContentRef",ref:H,title:"Double-click to edit text content"},o.toDisplayString(b.value?V.value:q.value),45,Cn),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])):ye.value&&x.value?(o.openBlock(),o.createElementBlock("div",Dn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,vn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,wn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,_n),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})}," />",4)])):ye.value?(o.openBlock(),o.createElementBlock("div",Tn,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,Bn),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,Sn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,On),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"></",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])):(o.openBlock(),o.createElementBlock("div",kn,[!ee.value&&M.value?(o.openBlock(),o.createElementBlock("div",Rn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[0]||(ne[0]=be=>B()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(F,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,In)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,Fn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,Pn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[1]||(ne[1]=be=>B()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)]),o.createElementVNode("span",{class:"xml-node__collapsed-badge",style:o.normalizeStyle({backgroundColor:y.theme.colors.collapsedBackground,color:y.theme.colors.collapsedText}),onClick:ne[2]||(ne[2]=be=>B()),title:`Click to expand ${de.value} child element${de.value>1?"s":""}`},o.toDisplayString(de.value)+" child"+o.toDisplayString(de.value>1?"ren":""),13,Ln),o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[3]||(ne[3]=be=>B()),title:"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Vn,[M.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:"xml-node__clickable-part",onClick:ne[4]||(ne[4]=be=>B()),title:ee.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:o.withModifiers(F,["stop"]),onContextmenu:Be,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click or right-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,Mn)],8,$n)):(o.openBlock(),o.createElementBlock("span",Un,[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"<",4),o.createElementVNode("span",{class:"xml-node__tag xml-node__tag--editable",style:o.normalizeStyle({color:y.theme.colors.xmlTag}),contenteditable:i.value,onDblclick:F,onKeydown:[o.withKeys(o.withModifiers(L,["prevent"]),["enter"]),o.withKeys(J,["escape"])],onBlur:L,ref_key:"tagNameRef",ref:Y,title:"Double-click to edit tag name"},o.toDisplayString(i.value?m.value:$.value),45,qn)])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,(be,O)=>(o.openBlock(),o.createElementBlock("span",{key:O,class:"xml-node__attribute"},[o.createElementVNode("span",{class:"xml-node__attr-name xml-node__attr-name--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttribute}),contenteditable:u.value===O,onDblclick:P=>le(O),onKeydown:[o.withKeys(o.withModifiers(G,["prevent"]),["enter"]),o.withKeys(ge,["escape"])],onBlur:G,ref_for:!0,ref:P=>{u.value===O&&(ie.value=P)},title:"Double-click to edit attribute name"},o.toDisplayString(u.value===O?_.value:O),45,Hn),o.createElementVNode("span",{class:"xml-node__equals",style:o.normalizeStyle({color:y.theme.colors.xmlEquals})},"=",4),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4),o.createElementVNode("span",{class:"xml-node__attr-value xml-node__attr-value--editable",style:o.normalizeStyle({color:y.theme.colors.xmlAttributeValue}),contenteditable:c.value===O,onDblclick:P=>w(O),onKeydown:[o.withKeys(o.withModifiers(Q,["prevent"]),["enter"]),o.withKeys(Ee,["escape"])],onBlur:Q,ref_for:!0,ref:P=>{c.value===O&&(v.value=P)},title:"Double-click to edit attribute value"},o.toDisplayString(c.value===O?D.value:be),45,jn),o.createElementVNode("span",{class:"xml-node__quote",style:o.normalizeStyle({color:y.theme.colors.xmlQuote})},'"',4)]))),128)),M.value?(o.openBlock(),o.createElementBlock("span",{key:2,class:"xml-node__clickable-part",onClick:ne[5]||(ne[5]=be=>B()),title:ee.value?"Click to collapse":"Click to expand"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)],8,Kn)):(o.openBlock(),o.createElementBlock("span",{key:3,class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},o.toDisplayString(M.value?">":"/>"),5))]),ee.value&&M.value?(o.openBlock(),o.createElementBlock("div",Gn,[te.value.length===0&&q.value.trim()?(o.openBlock(),o.createElementBlock("div",Xn,[o.createElementVNode("span",{class:"xml-node__text-content xml-node__text-content--editable",style:o.normalizeStyle({color:y.theme.colors.xmlText}),contenteditable:b.value,onDblclick:k,onKeydown:[o.withKeys(o.withModifiers(R,["prevent"]),["enter"]),o.withKeys(_e,["escape"])],onBlur:R,ref_key:"textContentRef",ref:H,title:"Double-click to edit text content"},o.toDisplayString(b.value?V.value:q.value),45,zn)])):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(te.value,(be,O)=>(o.openBlock(),o.createBlock(Ce,{key:X(be,O),node:be,index:O,level:y.level+1,"parent-path":Z(),expanded:y.expanded,theme:y.theme,selfClosingTags:y.selfClosingTags,onToggleExpand:ne[6]||(ne[6]=P=>y.$emit("toggle-expand",P)),onCopy:ne[7]||(ne[7]=P=>y.$emit("copy",P)),"onUpdate:tagName":ne[8]||(ne[8]=(P,Re,qe)=>y.$emit("update:tagName",P,Re,qe)),"onUpdate:attributeName":ne[9]||(ne[9]=(P,Re,qe)=>y.$emit("update:attributeName",P,Re,qe)),"onUpdate:attributeValue":ne[10]||(ne[10]=(P,Re,qe)=>y.$emit("update:attributeValue",P,Re,qe)),"onUpdate:textContent":ne[11]||(ne[11]=(P,Re)=>y.$emit("update:textContent",P,Re)),"onUpdate:cdataContent":ne[12]||(ne[12]=(P,Re)=>y.$emit("update:cdataContent",P,Re))},null,8,["node","index","level","parent-path","expanded","theme","selfClosingTags"]))),128))])):o.createCommentVNode("",!0),ee.value&&M.value?(o.openBlock(),o.createElementBlock("div",Wn,[o.createElementVNode("span",{class:"xml-node__clickable-part",onClick:ne[13]||(ne[13]=be=>B()),title:"Click to collapse"},[o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},"</",4),o.createElementVNode("span",{class:"xml-node__tag",style:o.normalizeStyle({color:y.theme.colors.xmlTag})},o.toDisplayString(i.value?m.value:$.value),5),o.createElementVNode("span",{class:"xml-node__bracket",style:o.normalizeStyle({color:y.theme.colors.xmlBracket})},">",4)])])):o.createCommentVNode("",!0)],64))]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-acda96f3"]]),jt={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",xmlTag:"#116329",xmlAttribute:"#0550ae",xmlAttributeValue:"#0a3069",xmlText:"#24292f",xmlComment:"#6e7781",xmlCdata:"#8250df",xmlDeclaration:"#953800",xmlBracket:"#6e7781",xmlEquals:"#6e7781",xmlQuote:"#0550ae",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",xmlTag:"#7ee787",xmlAttribute:"#79c0ff",xmlAttributeValue:"#a5d6ff",xmlText:"#c9d1d9",xmlComment:"#8b949e",xmlCdata:"#d2a8ff",xmlDeclaration:"#ffa657",xmlBracket:"#8b949e",xmlEquals:"#8b949e",xmlQuote:"#79c0ff",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",xmlTag:"#16a34a",xmlAttribute:"#2563eb",xmlAttributeValue:"#1e40af",xmlText:"#171717",xmlComment:"#737373",xmlCdata:"#9333ea",xmlDeclaration:"#ea580c",xmlBracket:"#737373",xmlEquals:"#737373",xmlQuote:"#2563eb",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",xmlTag:"#007a5a",xmlAttribute:"#1264a3",xmlAttributeValue:"#0b4c8c",xmlText:"#3d3c40",xmlComment:"#616061",xmlCdata:"#8b2eff",xmlDeclaration:"#e8912d",xmlBracket:"#616061",xmlEquals:"#616061",xmlQuote:"#1264a3",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#e8d5b7"}}},Qn=n=>jt[n]||jt["github-light"],Kt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Zn=Kt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Jn="["+Kt+"]["+Zn+"]*",eo=new RegExp("^"+Jn+"$");function Gt(n,t){const r=[];let a=t.exec(n);for(;a;){const i=[];i.startIndex=t.lastIndex-a[0].length;const u=a.length;for(let c=0;c<u;c++)i.push(a[c]);r.push(i),a=t.exec(n)}return r}const At=function(n){const t=eo.exec(n);return!(t===null||typeof t>"u")};function to(n){return typeof n<"u"}const ro={allowBooleanAttributes:!1,unpairedTags:[]};function Xt(n,t){t=Object.assign({},ro,t);const r=[];let a=!1,i=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let u=0;u<n.length;u++)if(n[u]==="<"&&n[u+1]==="?"){if(u+=2,u=Wt(n,u),u.err)return u}else if(n[u]==="<"){let c=u;if(u++,n[u]==="!"){u=Yt(n,u);continue}else{let b=!1;n[u]==="/"&&(b=!0,u++);let p="";for(;u<n.length&&n[u]!==">"&&n[u]!==" "&&n[u]!==" "&&n[u]!==`
|
|
14
|
+
`&&n[u]!=="\r";u++)p+=n[u];if(p=p.trim(),p[p.length-1]==="/"&&(p=p.substring(0,p.length-1),u--),!co(p)){let D;return p.trim().length===0?D="Invalid space after '<'.":D="Tag '"+p+"' is an invalid name.",Oe("InvalidTag",D,Ve(n,u))}const m=so(n,u);if(m===!1)return Oe("InvalidAttr","Attributes for '"+p+"' have open quote.",Ve(n,u));let _=m.value;if(u=m.index,_[_.length-1]==="/"){const D=u-_.length;_=_.substring(0,_.length-1);const V=Qt(_,t);if(V===!0)a=!0;else return Oe(V.err.code,V.err.msg,Ve(n,D+V.err.line))}else if(b)if(m.tagClosed){if(_.trim().length>0)return Oe("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",Ve(n,c));if(r.length===0)return Oe("InvalidTag","Closing tag '"+p+"' has not been opened.",Ve(n,c));{const D=r.pop();if(p!==D.tagName){let V=Ve(n,D.tagStartPos);return Oe("InvalidTag","Expected closing tag '"+D.tagName+"' (opened in line "+V.line+", col "+V.col+") instead of closing tag '"+p+"'.",Ve(n,c))}r.length==0&&(i=!0)}}else return Oe("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",Ve(n,u));else{const D=Qt(_,t);if(D!==!0)return Oe(D.err.code,D.err.msg,Ve(n,u-_.length+D.err.line));if(i===!0)return Oe("InvalidXml","Multiple possible root nodes found.",Ve(n,u));t.unpairedTags.indexOf(p)!==-1||r.push({tagName:p,tagStartPos:c}),a=!0}for(u++;u<n.length;u++)if(n[u]==="<")if(n[u+1]==="!"){u++,u=Yt(n,u);continue}else if(n[u+1]==="?"){if(u=Wt(n,++u),u.err)return u}else break;else if(n[u]==="&"){const D=uo(n,u);if(D==-1)return Oe("InvalidChar","char '&' is not expected.",Ve(n,u));u=D}else if(i===!0&&!zt(n[u]))return Oe("InvalidXml","Extra text at the end",Ve(n,u));n[u]==="<"&&u--}}else{if(zt(n[u]))continue;return Oe("InvalidChar","char '"+n[u]+"' is not expected.",Ve(n,u))}if(a){if(r.length==1)return Oe("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Ve(n,r[0].tagStartPos));if(r.length>0)return Oe("InvalidXml","Invalid '"+JSON.stringify(r.map(u=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Oe("InvalidXml","Start tag expected.",1);return!0}function zt(n){return n===" "||n===" "||n===`
|
|
15
|
+
`||n==="\r"}function Wt(n,t){const r=t;for(;t<n.length;t++)if(n[t]=="?"||n[t]==" "){const a=n.substr(r,t-r);if(t>5&&a==="xml")return Oe("InvalidXml","XML declaration allowed only at the start of the document.",Ve(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function Yt(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t<n.length;t++)if(n[t]==="-"&&n[t+1]==="-"&&n[t+2]===">"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let r=1;for(t+=8;t<n.length;t++)if(n[t]==="<")r++;else if(n[t]===">"&&(r--,r===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t<n.length;t++)if(n[t]==="]"&&n[t+1]==="]"&&n[t+2]===">"){t+=2;break}}return t}const no='"',oo="'";function so(n,t){let r="",a="",i=!1;for(;t<n.length;t++){if(n[t]===no||n[t]===oo)a===""?a=n[t]:a!==n[t]||(a="");else if(n[t]===">"&&a===""){i=!0;break}r+=n[t]}return a!==""?!1:{value:r,index:t,tagClosed:i}}const io=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Qt(n,t){const r=Gt(n,io),a={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",ht(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return Oe("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",ht(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return Oe("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",ht(r[i]));const u=r[i][2];if(!lo(u))return Oe("InvalidAttr","Attribute '"+u+"' is an invalid name.",ht(r[i]));if(!a.hasOwnProperty(u))a[u]=1;else return Oe("InvalidAttr","Attribute '"+u+"' is repeated.",ht(r[i]))}return!0}function ao(n,t){let r=/\d/;for(n[t]==="x"&&(t++,r=/[\da-fA-F]/);t<n.length;t++){if(n[t]===";")return t;if(!n[t].match(r))break}return-1}function uo(n,t){if(t++,n[t]===";")return-1;if(n[t]==="#")return t++,ao(n,t);let r=0;for(;t<n.length;t++,r++)if(!(n[t].match(/\w/)&&r<20)){if(n[t]===";")break;return-1}return t}function Oe(n,t,r){return{err:{code:n,msg:t,line:r.line||r,col:r.col}}}function lo(n){return At(n)}function co(n){return At(n)}function Ve(n,t){const r=n.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function ht(n){return n.startIndex+n[1].length}const fo={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,r){return n},captureMetaData:!1},po=function(n){return Object.assign({},fo,n)};let xt;typeof Symbol!="function"?xt="@@xmlMetadata":xt=Symbol("XML Node Metadata");class at{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t,r){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),r!==void 0&&(this.child[this.child.length-1][xt]={startIndex:r})}static getMetaDataSymbol(){return xt}}class ho{constructor(t){this.suppressValidationErr=!t}readDocType(t,r){const a={};if(t[r+3]==="O"&&t[r+4]==="C"&&t[r+5]==="T"&&t[r+6]==="Y"&&t[r+7]==="P"&&t[r+8]==="E"){r=r+9;let i=1,u=!1,c=!1,b="";for(;r<t.length;r++)if(t[r]==="<"&&!c){if(u&&ut(t,"!ENTITY",r)){r+=7;let p,m;[p,m,r]=this.readEntityExp(t,r+1,this.suppressValidationErr),m.indexOf("&")===-1&&(a[p]={regx:RegExp(`&${p};`,"g"),val:m})}else if(u&&ut(t,"!ELEMENT",r)){r+=8;const{index:p}=this.readElementExp(t,r+1);r=p}else if(u&&ut(t,"!ATTLIST",r))r+=8;else if(u&&ut(t,"!NOTATION",r)){r+=9;const{index:p}=this.readNotationExp(t,r+1,this.suppressValidationErr);r=p}else if(ut(t,"!--",r))c=!0;else throw new Error("Invalid DOCTYPE");i++,b=""}else if(t[r]===">"){if(c?t[r-1]==="-"&&t[r-2]==="-"&&(c=!1,i--):i--,i===0)break}else t[r]==="["?u=!0:b+=t[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:a,i:r}}readEntityExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r])&&t[r]!=='"'&&t[r]!=="'";)a+=t[r],r++;if(mt(a),r=$e(t,r),!this.suppressValidationErr){if(t.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(t,r,"entity"),r--,[a,i,r]}readNotationExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;!this.suppressValidationErr&&mt(a),r=$e(t,r);const i=t.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=$e(t,r);let u=null,c=null;if(i==="PUBLIC")[r,u]=this.readIdentifierVal(t,r,"publicIdentifier"),r=$e(t,r),(t[r]==='"'||t[r]==="'")&&([r,c]=this.readIdentifierVal(t,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,c]=this.readIdentifierVal(t,r,"systemIdentifier"),!this.suppressValidationErr&&!c))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:c,index:--r}}readIdentifierVal(t,r,a){let i="";const u=t[r];if(u!=='"'&&u!=="'")throw new Error(`Expected quoted string, found "${u}"`);for(r++;r<t.length&&t[r]!==u;)i+=t[r],r++;if(t[r]!==u)throw new Error(`Unterminated ${a} value`);return r++,[r,i]}readElementExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;if(!this.suppressValidationErr&&!At(a))throw new Error(`Invalid element name: "${a}"`);r=$e(t,r);let i="";if(t[r]==="E"&&ut(t,"MPTY",r))r+=4;else if(t[r]==="A"&&ut(t,"NY",r))r+=2;else if(t[r]==="("){for(r++;r<t.length&&t[r]!==")";)i+=t[r],r++;if(t[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[r]}"`);return{elementName:a,contentModel:i.trim(),index:r}}readAttlistExp(t,r){r=$e(t,r);let a="";for(;r<t.length&&!/\s/.test(t[r]);)a+=t[r],r++;mt(a),r=$e(t,r);let i="";for(;r<t.length&&!/\s/.test(t[r]);)i+=t[r],r++;if(!mt(i))throw new Error(`Invalid attribute name: "${i}"`);r=$e(t,r);let u="";if(t.substring(r,r+8).toUpperCase()==="NOTATION"){if(u="NOTATION",r+=8,r=$e(t,r),t[r]!=="(")throw new Error(`Expected '(', found "${t[r]}"`);r++;let b=[];for(;r<t.length&&t[r]!==")";){let p="";for(;r<t.length&&t[r]!=="|"&&t[r]!==")";)p+=t[r],r++;if(p=p.trim(),!mt(p))throw new Error(`Invalid notation name: "${p}"`);b.push(p),t[r]==="|"&&(r++,r=$e(t,r))}if(t[r]!==")")throw new Error("Unterminated list of notations");r++,u+=" ("+b.join("|")+")"}else{for(;r<t.length&&!/\s/.test(t[r]);)u+=t[r],r++;const b=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!b.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}r=$e(t,r);let c="";return t.substring(r,r+8).toUpperCase()==="#REQUIRED"?(c="#REQUIRED",r+=8):t.substring(r,r+7).toUpperCase()==="#IMPLIED"?(c="#IMPLIED",r+=7):[r,c]=this.readIdentifierVal(t,r,"ATTLIST"),{elementName:a,attributeName:i,attributeType:u,defaultValue:c,index:r}}}const $e=(n,t)=>{for(;t<n.length&&/\s/.test(n[t]);)t++;return t};function ut(n,t,r){for(let a=0;a<t.length;a++)if(t[a]!==n[r+a+1])return!1;return!0}function mt(n){if(At(n))return n;throw new Error(`Invalid entity name ${n}`)}const mo=/^[-+]?0x[a-fA-F0-9]+$/,go=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Eo={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function yo(n,t={}){if(t=Object.assign({},Eo,t),!n||typeof n!="string")return n;let r=n.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return n;if(n==="0")return 0;if(t.hex&&mo.test(r))return No(r,16);if(r.search(/.+[eE].+/)!==-1)return Ao(n,r,t);{const a=go.exec(r);if(a){const i=a[1]||"",u=a[2];let c=xo(a[3]);const b=i?n[u.length+1]===".":n[u.length]===".";if(!t.leadingZeros&&(u.length>1||u.length===1&&!b))return n;{const p=Number(r),m=String(p);if(p===0)return p;if(m.search(/[eE]/)!==-1)return t.eNotation?p:n;if(r.indexOf(".")!==-1)return m==="0"||m===c||m===`${i}${c}`?p:n;let _=u?c:r;return u?_===m||i+_===m?p:n:_===m||_===i+m?p:n}}else return n}}const bo=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Ao(n,t,r){if(!r.eNotation)return n;const a=t.match(bo);if(a){let i=a[1]||"";const u=a[3].indexOf("e")===-1?"E":"e",c=a[2],b=i?n[c.length+1]===u:n[c.length]===u;return c.length>1&&b?n:c.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(t):r.leadingZeros&&!b?(t=(a[1]||"")+a[3],Number(t)):n}else return n}function xo(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function No(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Zt(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const r of n)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}class Co{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,a)=>String.fromCodePoint(Number.parseInt(a,16))}},this.addExternalEntities=Do,this.parseXml=Bo,this.parseTextData=vo,this.resolveNameSpace=wo,this.buildAttributesMap=To,this.isItStopNode=Ro,this.replaceEntitiesValue=Oo,this.readStopNodeData=Fo,this.saveTextToParentTag=ko,this.addChild=So,this.ignoreAttributesFn=Zt(this.options.ignoreAttributes)}}function Do(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];this.lastEntities[a]={regex:new RegExp("&"+a+";","g"),val:n[a]}}}function vo(n,t,r,a,i,u,c){if(n!==void 0&&(this.options.trimValues&&!a&&(n=n.trim()),n.length>0)){c||(n=this.replaceEntitiesValue(n));const b=this.options.tagValueProcessor(t,n,r,i,u);return b==null?n:typeof b!=typeof n||b!==n?b:this.options.trimValues?Tt(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?Tt(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function wo(n){if(this.options.removeNSPrefix){const t=n.split(":"),r=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=r+t[1])}return n}const _o=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function To(n,t,r){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const a=Gt(n,_o),i=a.length,u={};for(let c=0;c<i;c++){const b=this.resolveNameSpace(a[c][1]);if(this.ignoreAttributesFn(b,t))continue;let p=a[c][4],m=this.options.attributeNamePrefix+b;if(b.length)if(this.options.transformAttributeName&&(m=this.options.transformAttributeName(m)),m==="__proto__"&&(m="#__proto__"),p!==void 0){this.options.trimValues&&(p=p.trim()),p=this.replaceEntitiesValue(p);const _=this.options.attributeValueProcessor(b,p,t);_==null?u[m]=p:typeof _!=typeof p||_!==p?u[m]=_:u[m]=Tt(p,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(u[m]=!0)}if(!Object.keys(u).length)return;if(this.options.attributesGroupName){const c={};return c[this.options.attributesGroupName]=u,c}return u}}const Bo=function(n){n=n.replace(/\r\n?/g,`
|
|
16
|
+
`);const t=new at("!xml");let r=t,a="",i="";const u=new ho(this.options.processEntities);for(let c=0;c<n.length;c++)if(n[c]==="<")if(n[c+1]==="/"){const p=lt(n,">",c,"Closing Tag is not closed.");let m=n.substring(c+2,p).trim();if(this.options.removeNSPrefix){const V=m.indexOf(":");V!==-1&&(m=m.substr(V+1))}this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&(a=this.saveTextToParentTag(a,r,i));const _=i.substring(i.lastIndexOf(".")+1);if(m&&this.options.unpairedTags.indexOf(m)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);let D=0;_&&this.options.unpairedTags.indexOf(_)!==-1?(D=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):D=i.lastIndexOf("."),i=i.substring(0,D),r=this.tagsNodeStack.pop(),a="",c=p}else if(n[c+1]==="?"){let p=_t(n,c,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,r,i),!(this.options.ignoreDeclaration&&p.tagName==="?xml"||this.options.ignorePiTags)){const m=new at(p.tagName);m.add(this.options.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&(m[":@"]=this.buildAttributesMap(p.tagExp,i,p.tagName)),this.addChild(r,m,i,c)}c=p.closeIndex+1}else if(n.substr(c+1,3)==="!--"){const p=lt(n,"-->",c+4,"Comment is not closed.");if(this.options.commentPropName){const m=n.substring(c+4,p-2);a=this.saveTextToParentTag(a,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}c=p}else if(n.substr(c+1,2)==="!D"){const p=u.readDocType(n,c);this.docTypeEntities=p.entities,c=p.i}else if(n.substr(c+1,2)==="!["){const p=lt(n,"]]>",c,"CDATA is not closed.")-2,m=n.substring(c+9,p);a=this.saveTextToParentTag(a,r,i);let _=this.parseTextData(m,r.tagname,i,!0,!1,!0,!0);_==null&&(_=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:m}]):r.add(this.options.textNodeName,_),c=p+2}else{let p=_t(n,c,this.options.removeNSPrefix),m=p.tagName;const _=p.rawTagName;let D=p.tagExp,V=p.attrExpPresent,j=p.closeIndex;this.options.transformTagName&&(m=this.options.transformTagName(m)),r&&a&&r.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,r,i,!1));const Y=r;Y&&this.options.unpairedTags.indexOf(Y.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),m!==t.tagname&&(i+=i?"."+m:m);const ie=c;if(this.isItStopNode(this.options.stopNodes,i,m)){let v="";if(D.length>0&&D.lastIndexOf("/")===D.length-1)m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),D=m):D=D.substr(0,D.length-1),c=p.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)c=p.closeIndex;else{const K=this.readStopNodeData(n,_,j+1);if(!K)throw new Error(`Unexpected end of ${_}`);c=K.i,v=K.tagContent}const H=new at(m);m!==D&&V&&(H[":@"]=this.buildAttributesMap(D,i,m)),v&&(v=this.parseTextData(v,m,i,!0,V,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),H.add(this.options.textNodeName,v),this.addChild(r,H,i,ie)}else{if(D.length>0&&D.lastIndexOf("/")===D.length-1){m[m.length-1]==="/"?(m=m.substr(0,m.length-1),i=i.substr(0,i.length-1),D=m):D=D.substr(0,D.length-1),this.options.transformTagName&&(m=this.options.transformTagName(m));const v=new at(m);m!==D&&V&&(v[":@"]=this.buildAttributesMap(D,i,m)),this.addChild(r,v,i,ie),i=i.substr(0,i.lastIndexOf("."))}else{const v=new at(m);this.tagsNodeStack.push(r),m!==D&&V&&(v[":@"]=this.buildAttributesMap(D,i,m)),this.addChild(r,v,i,ie),r=v}a="",c=j}}else a+=n[c];return t.child};function So(n,t,r,a){this.options.captureMetaData||(a=void 0);const i=this.options.updateTag(t.tagname,r,t[":@"]);i===!1||(typeof i=="string"&&(t.tagname=i),n.addChild(t,a))}const Oo=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];n=n.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];n=n.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];n=n.replace(r.regex,r.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function ko(n,t,r,a){return n&&(a===void 0&&(a=t.child.length===0),n=this.parseTextData(n,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,a),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function Ro(n,t,r){const a="*."+r;for(const i in n){const u=n[i];if(a===u||t===u)return!0}return!1}function Io(n,t,r=">"){let a,i="";for(let u=t;u<n.length;u++){let c=n[u];if(a)c===a&&(a="");else if(c==='"'||c==="'")a=c;else if(c===r[0])if(r[1]){if(n[u+1]===r[1])return{data:i,index:u}}else return{data:i,index:u};else c===" "&&(c=" ");i+=c}}function lt(n,t,r,a){const i=n.indexOf(t,r);if(i===-1)throw new Error(a);return i+t.length-1}function _t(n,t,r,a=">"){const i=Io(n,t+1,a);if(!i)return;let u=i.data;const c=i.index,b=u.search(/\s/);let p=u,m=!0;b!==-1&&(p=u.substring(0,b),u=u.substring(b+1).trimStart());const _=p;if(r){const D=p.indexOf(":");D!==-1&&(p=p.substr(D+1),m=p!==i.data.substr(D+1))}return{tagName:p,tagExp:u,closeIndex:c,attrExpPresent:m,rawTagName:_}}function Fo(n,t,r){const a=r;let i=1;for(;r<n.length;r++)if(n[r]==="<")if(n[r+1]==="/"){const u=lt(n,">",r,`${t} is not closed`);if(n.substring(r+2,u).trim()===t&&(i--,i===0))return{tagContent:n.substring(a,r),i:u};r=u}else if(n[r+1]==="?")r=lt(n,"?>",r+1,"StopNode is not closed.");else if(n.substr(r+1,3)==="!--")r=lt(n,"-->",r+3,"StopNode is not closed.");else if(n.substr(r+1,2)==="![")r=lt(n,"]]>",r,"StopNode is not closed.")-2;else{const u=_t(n,r,">");u&&((u&&u.tagName)===t&&u.tagExp[u.tagExp.length-1]!=="/"&&i++,r=u.closeIndex)}}function Tt(n,t,r){if(t&&typeof n=="string"){const a=n.trim();return a==="true"?!0:a==="false"?!1:yo(n,r)}else return to(n)?n:""}const Bt=at.getMetaDataSymbol();function Po(n,t){return Jt(n,t)}function Jt(n,t,r){let a;const i={};for(let u=0;u<n.length;u++){const c=n[u],b=Lo(c);let p="";if(r===void 0?p=b:p=r+"."+b,b===t.textNodeName)a===void 0?a=c[b]:a+=""+c[b];else{if(b===void 0)continue;if(c[b]){let m=Jt(c[b],t,p);const _=$o(m,t);c[Bt]!==void 0&&(m[Bt]=c[Bt]),c[":@"]?Vo(m,c[":@"],p,t):Object.keys(m).length===1&&m[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?m=m[t.textNodeName]:Object.keys(m).length===0&&(t.alwaysCreateTextNode?m[t.textNodeName]="":m=""),i[b]!==void 0&&i.hasOwnProperty(b)?(Array.isArray(i[b])||(i[b]=[i[b]]),i[b].push(m)):t.isArray(b,p,_)?i[b]=[m]:i[b]=m}}}return typeof a=="string"?a.length>0&&(i[t.textNodeName]=a):a!==void 0&&(i[t.textNodeName]=a),i}function Lo(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(a!==":@")return a}}function Vo(n,t,r,a){if(t){const i=Object.keys(t),u=i.length;for(let c=0;c<u;c++){const b=i[c];a.isArray(b,r+"."+b,!0,!0)?n[b]=[t[b]]:n[b]=t[b]}}}function $o(n,t){const{textNodeName:r}=t,a=Object.keys(n).length;return!!(a===0||a===1&&(n[r]||typeof n[r]=="boolean"||n[r]===0))}class Mo{constructor(t){this.externalEntities={},this.options=po(t)}parse(t,r){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const u=Xt(t,r);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const a=new Co(this.options);a.addExternalEntities(this.externalEntities);const i=a.parseXml(t);return this.options.preserveOrder||i===void 0?i:Po(i,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}const Uo=`
|
|
17
|
+
`;function qo(n,t){let r="";return t.format&&t.indentBy.length>0&&(r=Uo),er(n,t,"",r)}function er(n,t,r,a){let i="",u=!1;for(let c=0;c<n.length;c++){const b=n[c],p=Ho(b);if(p===void 0)continue;let m="";if(r.length===0?m=p:m=`${r}.${p}`,p===t.textNodeName){let Y=b[p];jo(m,t)||(Y=t.tagValueProcessor(p,Y),Y=rr(Y,t)),u&&(i+=a),i+=Y,u=!1;continue}else if(p===t.cdataPropName){u&&(i+=a),i+=`<![CDATA[${b[p][0][t.textNodeName]}]]>`,u=!1;continue}else if(p===t.commentPropName){i+=a+`<!--${b[p][0][t.textNodeName]}-->`,u=!0;continue}else if(p[0]==="?"){const Y=tr(b[":@"],t),ie=p==="?xml"?"":a;let v=b[p][0][t.textNodeName];v=v.length!==0?" "+v:"",i+=ie+`<${p}${v}${Y}?>`,u=!0;continue}let _=a;_!==""&&(_+=t.indentBy);const D=tr(b[":@"],t),V=a+`<${p}${D}`,j=er(b[p],t,m,_);t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?i+=V+">":i+=V+"/>":(!j||j.length===0)&&t.suppressEmptyNode?i+=V+"/>":j&&j.endsWith(">")?i+=V+`>${j}${a}</${p}>`:(i+=V+">",j&&a!==""&&(j.includes("/>")||j.includes("</"))?i+=a+t.indentBy+j+a:i+=j,i+=`</${p}>`),u=!0}return i}function Ho(n){const t=Object.keys(n);for(let r=0;r<t.length;r++){const a=t[r];if(n.hasOwnProperty(a)&&a!==":@")return a}}function tr(n,t){let r="";if(n&&!t.ignoreAttributes)for(let a in n){if(!n.hasOwnProperty(a))continue;let i=t.attributeValueProcessor(a,n[a]);i=rr(i,t),i===!0&&t.suppressBooleanAttributes?r+=` ${a.substr(t.attributeNamePrefix.length)}`:r+=` ${a.substr(t.attributeNamePrefix.length)}="${i}"`}return r}function jo(n,t){n=n.substr(0,n.length-t.textNodeName.length-1);let r=n.substr(n.lastIndexOf(".")+1);for(let a in t.stopNodes)if(t.stopNodes[a]===n||t.stopNodes[a]==="*."+r)return!0;return!1}function rr(n,t){if(n&&n.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const a=t.entities[r];n=n.replace(a.regex,a.val)}return n}const Ko={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(n,t){return t},attributeValueProcessor:function(n,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(n){this.options=Object.assign({},Ko,n),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Zt(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=zo),this.processTextOrObjNode=Go,this.options.format?(this.indentate=Xo,this.tagEndChar=`>
|
|
18
18
|
`,this.newLine=`
|
|
19
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}
|
|
20
|
-
`+
|
|
21
|
-
`:"";let
|
|
22
|
-
`,
|
|
23
|
-
`:
|
|
24
|
-
`:
|
|
25
|
-
`)}),C+="</result>"):C=_.serializeToString(b),h.value=Bt(C),m.value="",s.nextTick(()=>{ee()})}catch(D){m.value=D instanceof Error?D.message:"Filter execution error",h.value=null}},k=()=>{h.value=null,m.value="",s.nextTick(()=>{ee()})},P=async I=>{try{const D=typeof I=="string"?I:JSON.stringify(I,null,2);await navigator.clipboard.writeText(D),i("copy-success",D)}catch(D){const g=D instanceof Error?D:new Error("Copy failed");i("copy-error",g),console.error("Failed to copy value:",D)}},Z=(I,D,g)=>{if(!(!l.value||!Array.isArray(l.value)))try{const b=I.split(/\./).filter(Boolean);let _=l.value;for(let F=0;F<b.length;F++){const R=b[F],V=R.match(/^(.+?)\[(\d+)\]$/);if(V){const z=V[1],re=parseInt(V[2]);if(F===b.length-1){if(Array.isArray(_)&&_[re]){const me=_[re];if(me[D]){const j=me[D];delete me[D],me[g]=j}}}else Array.isArray(_)&&_[re]&&(_=_[re])}else _[R]&&(_=_[R])}const C=Ze(l.value,{indent:" "});i("update:modelValue",C)}catch(b){console.error("Failed to update tag name:",b)}},Y=(I,D,g)=>{if(!(!l.value||!Array.isArray(l.value)))try{const b=I.split(/\./).filter(Boolean);let _=l.value;for(let F=0;F<b.length;F++){const R=b[F],V=R.match(/^(.+?)\[(\d+)\]$/);if(V){const z=V[1],re=parseInt(V[2]);if(F===b.length-1){if(Array.isArray(_)&&_[re]){const j=_[re][":@"];if(j&&j[`@_${D}`]!==void 0){const De=j[`@_${D}`];delete j[`@_${D}`],j[`@_${g}`]=De}}}else Array.isArray(_)&&_[re]&&(_=_[re])}else _[R]&&(_=_[R])}const C=Ze(l.value,{indent:" "});i("update:modelValue",C)}catch(b){console.error("Failed to update attribute name:",b)}},M=(I,D,g)=>{if(!(!l.value||!Array.isArray(l.value)))try{const b=I.split(/\./).filter(Boolean);let _=l.value;for(let F=0;F<b.length;F++){const R=b[F],V=R.match(/^(.+?)\[(\d+)\]$/);if(V){const z=V[1],re=parseInt(V[2]);if(F===b.length-1){if(Array.isArray(_)&&_[re]){const j=_[re][":@"];j&&j[`@_${D}`]!==void 0&&(j[`@_${D}`]=g)}}else Array.isArray(_)&&_[re]&&(_=_[re])}else _[R]&&(_=_[R])}const C=Ze(l.value,{indent:" "});i("update:modelValue",C)}catch(b){console.error("Failed to update attribute value:",b)}},ae=(I,D)=>{if(!(!l.value||!Array.isArray(l.value)))try{const g=I.split(/\./).filter(Boolean);let b=l.value,_="";for(let F=0;F<g.length;F++){const R=g[F],V=R.match(/^(.+?)\[(\d+)\]$/);if(V){const z=V[1],re=parseInt(V[2]);if(F===g.length-1){if(Array.isArray(b)&&b[re]){const me=b[re];if(_=Object.keys(me).find(j=>!j.startsWith(":")&&!j.startsWith("#"))||"",_&&Array.isArray(me[_])){const j=me[_],De=j.findIndex(Ce=>Ce["#text"]!==void 0);De!==-1?j[De]["#text"]=D:j.push({"#text":D})}}}else Array.isArray(b)&&b[re]&&(b=b[re])}else b[R]&&(b=b[R])}const C=Ze(l.value,{indent:" "});i("update:modelValue",C)}catch(g){console.error("Failed to update text content:",g)}},pe=(I,D)=>{if(!(!l.value||!Array.isArray(l.value)))try{const g=I.split(/\./).filter(Boolean);let b=l.value;for(let C=0;C<g.length;C++){const F=g[C],R=F.match(/^(.+?)\[(\d+)\]$/);if(R){const V=R[1],z=parseInt(R[2]);if(C===g.length-1){if(Array.isArray(b)&&b[z]){const re=b[z],me=Object.keys(re).find(j=>!j.startsWith(":")&&!j.startsWith("#"));if(me&&Array.isArray(re[me])){const j=re[me],De=j.findIndex(Ce=>Ce.__cdata!==void 0);if(De!==-1){const Ce=j[De];Array.isArray(Ce.__cdata)&&Ce.__cdata[0]&&(Ce.__cdata[0]["#text"]=D)}else j.push({__cdata:[{"#text":D}]})}}}else Array.isArray(b)&&b[z]&&(b=b[z])}else b[F]&&(b=b[F])}const _=Ze(l.value,{indent:" "});i("update:modelValue",_)}catch(g){console.error("Failed to update CDATA content:",g)}};return s.watch(()=>u.modelValue,I=>{te(I)},{immediate:!0}),t({copyXml:be,compressSource:X,formatSource:x,expandAll:ee,collapseAll:Ae,toggleExpand:de,filter:fe,clearFilter:k,isValidXml:()=>T.value,getParsedXml:()=>l.value,getFilteredXml:()=>h.value,getExpandedNodes:()=>v.value,getParseError:()=>p.value,getFilterError:()=>m.value,parseXmlString:I=>te(I),copyValue:I=>P(I)}),(I,D)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["xml-format",`xml-format--${L.value.name}`])},[I.showToolbar?(s.openBlock(),s.createElementBlock("div",jo,[s.createElementVNode("div",Xo,[s.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:be,disabled:!T.value,title:"Copy XML"}," 📋 Copy ",8,Ho),s.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:ee,disabled:!T.value,title:"Expand All"}," ⬇️ Expand All ",8,Go),s.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:Ae,disabled:!T.value,title:"Collapse All"}," ➡️ Collapse All ",8,Ko),s.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:X,disabled:!T.value,title:"Compress XML"}," 📦 Compress ",8,zo),s.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:x,disabled:!T.value,title:"Format XML"}," ✨ Format ",8,Yo)]),s.createElementVNode("div",Wo,[T.value?(s.openBlock(),s.createElementBlock("span",Qo," ✅ Valid XML ")):(s.openBlock(),s.createElementBlock("span",Zo," ❌ Invalid XML "))])])):s.createCommentVNode("",!0),s.createElementVNode("div",Jo,[T.value?m.value?(s.openBlock(),s.createElementBlock("div",ts,[D[1]||(D[1]=s.createElementVNode("h4",null,"Filter Error:",-1)),s.createElementVNode("pre",null,s.toDisplayString(m.value),1)])):(s.openBlock(),s.createElementBlock("div",rs,[ce.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"xml-declaration",style:s.normalizeStyle({color:L.value.colors.xmlDeclaration})},s.toDisplayString(ce.value),5)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(S.value,(g,b)=>(s.openBlock(),s.createBlock(Vn,{key:b,node:g.node,index:g.originalIndex,level:0,expanded:v.value,theme:L.value,onToggleExpand:de,onCopy:P,"onUpdate:tagName":Z,"onUpdate:attributeName":Y,"onUpdate:attributeValue":M,"onUpdate:textContent":ae,"onUpdate:cdataContent":pe},null,8,["node","index","expanded","theme"]))),128))])):(s.openBlock(),s.createElementBlock("div",es,[D[0]||(D[0]=s.createElementVNode("h4",null,"XML Parse Error:",-1)),s.createElementVNode("pre",null,s.toDisplayString(p.value),1)]))])],2))}}),[["__scopeId","data-v-b32c0437"]]),os=[Rt],ss={install:n=>{os.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};Ye.JsonFormat=Rt,Ye.XmlFormat=ns,Ye.default=ss,Object.defineProperties(Ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
19
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}nt.prototype.build=function(n){return this.options.preserveOrder?qo(n,this.options):(Array.isArray(n)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(n={[this.options.arrayNodeName]:n}),this.j2x(n,0,[]).val)},nt.prototype.j2x=function(n,t,r){let a="",i="";const u=r.join(".");for(let c in n)if(Object.prototype.hasOwnProperty.call(n,c))if(typeof n[c]>"u")this.isAttribute(c)&&(i+="");else if(n[c]===null)this.isAttribute(c)||c===this.options.cdataPropName?i+="":c[0]==="?"?i+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(n[c]instanceof Date)i+=this.buildTextValNode(n[c],c,"",t);else if(typeof n[c]!="object"){const b=this.isAttribute(c);if(b&&!this.ignoreAttributesFn(b,u))a+=this.buildAttrPairStr(b,""+n[c]);else if(!b)if(c===this.options.textNodeName){let p=this.options.tagValueProcessor(c,""+n[c]);i+=this.replaceEntitiesValue(p)}else i+=this.buildTextValNode(n[c],c,"",t)}else if(Array.isArray(n[c])){const b=n[c].length;let p="",m="";for(let _=0;_<b;_++){const D=n[c][_];if(!(typeof D>"u"))if(D===null)c[0]==="?"?i+=this.indentate(t)+"<"+c+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+c+"/"+this.tagEndChar;else if(typeof D=="object")if(this.options.oneListGroup){const V=this.j2x(D,t+1,r.concat(c));p+=V.val,this.options.attributesGroupName&&D.hasOwnProperty(this.options.attributesGroupName)&&(m+=V.attrStr)}else p+=this.processTextOrObjNode(D,c,t,r);else if(this.options.oneListGroup){let V=this.options.tagValueProcessor(c,D);V=this.replaceEntitiesValue(V),p+=V}else p+=this.buildTextValNode(D,c,"",t)}this.options.oneListGroup&&(p=this.buildObjectNode(p,c,m,t)),i+=p}else if(this.options.attributesGroupName&&c===this.options.attributesGroupName){const b=Object.keys(n[c]),p=b.length;for(let m=0;m<p;m++)a+=this.buildAttrPairStr(b[m],""+n[c][b[m]])}else i+=this.processTextOrObjNode(n[c],c,t,r);return{attrStr:a,val:i}},nt.prototype.buildAttrPairStr=function(n,t){return t=this.options.attributeValueProcessor(n,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+n:" "+n+'="'+t+'"'};function Go(n,t,r,a){const i=this.j2x(n,r+1,a.concat(t));return n[this.options.textNodeName]!==void 0&&Object.keys(n).length===1?this.buildTextValNode(n[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)}nt.prototype.buildObjectNode=function(n,t,r,a){if(n==="")return t[0]==="?"?this.indentate(a)+"<"+t+r+"?"+this.tagEndChar:this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,u="";return t[0]==="?"&&(u="?",i=""),(r||r==="")&&n.indexOf("<")===-1?this.indentate(a)+"<"+t+r+u+">"+n+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&u.length===0?this.indentate(a)+`<!--${n}-->`+this.newLine:this.indentate(a)+"<"+t+r+u+this.tagEndChar+n+this.indentate(a)+i}},nt.prototype.closeTag=function(n){let t="";return this.options.unpairedTags.indexOf(n)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${n}`,t},nt.prototype.buildTextValNode=function(n,t,r,a){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(a)+`<![CDATA[${n}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(a)+`<!--${n}-->`+this.newLine;if(t[0]==="?")return this.indentate(a)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,n);return i=this.replaceEntitiesValue(i),i===""?this.indentate(a)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(a)+"<"+t+r+">"+i+"</"+t+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(n){if(n&&n.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];n=n.replace(r.regex,r.val)}return n};function Xo(n){return this.options.indentBy.repeat(n)}function zo(n){return n.startsWith(this.options.attributeNamePrefix)&&n!==this.options.textNodeName?n.substr(this.attrPrefixLen):!1}const Wo={validate:Xt},Yo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",ignoreDeclaration:!1,commentPropName:"#comment",cdataPropName:"__cdata",preserveOrder:!0,parseAttributeValue:!1,trimValues:!1,parseTagValue:!1,processEntities:!1,htmlEntities:!1,ignoreNameSpace:!1,allowBooleanAttributes:!0,unpairedTags:[],stopNodes:[],alwaysCreateTextNode:!1},Qo={ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#text",format:!0,indentBy:" ",suppressEmptyNode:!1,suppressBooleanAttributes:!1,suppressUnpairedNode:!1},Zo=n=>{const t=/&([a-zA-Z0-9#]+);/g,r=["lt","gt","amp","quot","apos"];let a,i=1,u=0;for(;(a=t.exec(n))!==null;){const c=a[1],b=a.index,p=n.substring(u,b);if(i+=(p.match(/\n/g)||[]).length,u=b,c.startsWith("#")){const m=c.substring(1);if(m.startsWith("x")||m.startsWith("X")){const _=m.substring(1);if(!/^[0-9a-fA-F]+$/.test(_))return{valid:!1,error:`Line ${i}: Invalid hexadecimal character reference '&${c};'`}}else if(!/^[0-9]+$/.test(m))return{valid:!1,error:`Line ${i}: Invalid numeric character reference '&${c};'`};continue}if(!r.includes(c))return{valid:!1,error:`Line ${i}: Invalid entity reference '&${c};'. Valid predefined entities are: < > & " '`}}return{valid:!0}},Jo=n=>{try{const t=Wo.validate(n,{allowBooleanAttributes:!0});if(t!==!0)return{valid:!1,error:`Line ${t.err.line}: ${t.err.msg}`};const r=Zo(n);return r.valid?{valid:!0}:r}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},St=(n,t)=>{try{return new Mo({...Yo,...t}).parse(n)}catch(r){throw new Error(`XML 解析失败: ${r instanceof Error?r.message:"Unknown error"}`)}},Ot=(n,t)=>{try{let a=new nt({...Qo,format:t?.format??!0,indentBy:t?.indentBy??" "}).build(n);return t?.showDeclaration!==!1&&!a.startsWith("<?xml")&&(a=`<?xml version="1.0" encoding="UTF-8"?>
|
|
20
|
+
`+a),a}catch(r){throw new Error(`XML 构建失败: ${r instanceof Error?r.message:"Unknown error"}`)}},es=(n,t)=>Array.isArray(n)?et(n,{format:!1,originalXml:t}):Ot(n,{format:!1,showDeclaration:!1}),ts=(n,t)=>{const r=St(n);return Array.isArray(r)?et(r,{indent:t?.indentBy,originalXml:n}):Ot(r,t)},nr=n=>{const t=new Set,r=/<([a-zA-Z0-9_-]+)(?:\s[^>]*)?\s*\/>/g;let a;for(;(a=r.exec(n))!==null;)t.add(a[1]);return t},et=(n,t={})=>{const r=t.indent!==void 0?t.indent:" ",a=t.level||0,i=t.format!==!1,u=i?r.repeat(a):"",c=i?`
|
|
21
|
+
`:"";let b=t.selfClosingTags;!b&&t.originalXml&&a===0&&(b=nr(t.originalXml));let p="";for(const m of n){if(m["?xml"]){const $=m[":@"]||{},ae=Object.entries($).map(([ee,U])=>`${ee.startsWith("@_")?ee.substring(2):ee}="${U}"`).join(" ");p+=`<?xml ${ae}?>${c}`;continue}if(m["#comment"]){const $=m["#comment"];if(Array.isArray($)&&$.length>0){const ae=$[0]["#text"]||$[0];p+=`${u}<!--${ae}-->${c}`}continue}const _=Object.keys(m).find($=>!$.startsWith(":")&&!$.startsWith("#")&&!$.startsWith("__"));if(!_)continue;const D=m[_],V=m[":@"]||{},j=Object.entries(V).map(([$,ae])=>`${$.startsWith("@_")?$.substring(2):$}="${ae}"`).join(" "),Y=j?" "+j:"";if(!Array.isArray(D)||D.length===0){b&&b.has(_)?p+=`${u}<${_}${Y}/>${c}`:p+=`${u}<${_}${Y}></${_}>${c}`;continue}const ie=D.length===1&&D[0]["#text"]!==void 0,v=ie?D[0]["#text"]:"",H=D.some($=>$.__cdata),K=ie&&v==="";if(H){const $=D.find(ae=>ae.__cdata);if($){const ae=$.__cdata[0]["#text"]||"";p+=`${u}<${_}${Y}><![CDATA[${ae}]]></${_}>${c}`}}else K?p+=`${u}<${_}${Y}></${_}>${c}`:ie?p+=`${u}<${_}${Y}>${v}</${_}>${c}`:(p+=`${u}<${_}${Y}>${c}`,p+=et(D,{indent:r,level:a+1,format:i,selfClosingTags:b}),p+=`${u}</${_}>${c}`)}return p},rs={key:0,class:"xml-format__toolbar"},ns={class:"xml-format__actions"},os=["disabled"],ss=["disabled"],is=["disabled"],as=["disabled"],us=["disabled"],ls={class:"xml-format__info"},cs={key:0,class:"xml-format__status xml-format__status--success"},fs={key:1,class:"xml-format__status xml-format__status--error"},ds={class:"xml-format__content"},ps={key:0,class:"xml-format__error"},hs={key:1,class:"xml-format__error"},ms={key:2,class:"xml-format__viewer"},gs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},showComments:{type:Boolean,default:!0},showCdata:{type:Boolean,default:!0},preserveWhitespace:{type:Boolean,default:!1}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(x=>({"0182b876":Y.value.colors.border,78071047:Y.value.colors.background,"43b18706":Y.value.colors.text,"52bf9efc":Y.value.colors.surfaceBackground,"7c039a52":Y.value.colors.buttonBorder,b936734e:Y.value.colors.buttonBackground,"46649ad0":Y.value.colors.buttonText,"56b12263":Y.value.colors.buttonBackgroundHover,"670324b7":Y.value.colors.buttonPrimary,"2dc50ec5":Y.value.colors.buttonPrimaryHover,"7549038a":Y.value.colors.success,"46d3d058":Y.value.colors.successBackground,"31b1cb4f":Y.value.colors.error,"07a53446":Y.value.colors.errorBackground}));const a=n,i=r,u=o.ref(null),c=o.ref(""),b=o.ref(new Set),p=o.ref(null),m=o.ref(""),_=o.ref(""),D=o.ref(new Set),V=o.computed(()=>c.value===""),j=o.computed(()=>m.value?null:p.value!==null?p.value:u.value),Y=o.computed(()=>Qn(a.theme)),ie=o.computed(()=>{const x=j.value;return!x||!Array.isArray(x)?[]:x.map((B,X)=>({node:B,originalIndex:X})).filter(B=>!B.node["?xml"])}),v=o.computed(()=>{const x=j.value;if(!x||!Array.isArray(x))return null;const B=x.find(F=>F["?xml"]);if(!B||!B[":@"])return null;const X=B[":@"],Z=[];return X["@_version"]&&Z.push(`version="${X["@_version"]}"`),X["@_encoding"]&&Z.push(`encoding="${X["@_encoding"]}"`),X["@_standalone"]&&Z.push(`standalone="${X["@_standalone"]}"`),Z.length>0?`<?xml ${Z.join(" ")}?>`:null}),H=o.computed(()=>ie.value),K=x=>{if(!x||!x.trim()){c.value="",u.value=null,_.value="",p.value=null,m.value="";return}try{const B=Jo(x);if(!B.valid){c.value=B.error||"Invalid XML",u.value=null,_.value="",D.value=new Set;return}_.value=x,D.value=nr(x),u.value=St(x),c.value="",p.value=null,m.value="",o.nextTick(()=>{ae()})}catch(B){c.value=B instanceof Error?B.message:"Unknown parse error",u.value=null,_.value="",p.value=null,m.value=""}},$=x=>{b.value.has(x)?b.value.delete(x):b.value.add(x)},ae=()=>{const x=new Set,B=(X,Z="")=>{Array.isArray(X)&&X.forEach((F,le)=>{const w=Object.keys(F).find(G=>!G.startsWith(":")&&!G.startsWith("#"));if(!w)return;const k=Z?`${Z}.${w}[${le}]`:`${w}[${le}]`;x.add(k);const L=F[w];Array.isArray(L)&&B(L,k+"."+w)})};ie.value.forEach(({node:X,originalIndex:Z})=>{const F=Object.keys(X).find(le=>!le.startsWith(":")&&!le.startsWith("#"));if(F){const le=`${F}[${Z}]`;x.add(le);const w=X[F];Array.isArray(w)&&B(w,le+"."+F)}}),b.value=x,i("expand-all")},ee=()=>{b.value.clear(),i("collapse-all")},U=async()=>{if(V.value)try{const x=j.value||u.value;if(!x)return;const B=Array.isArray(x)?et(x,{indent:" ",selfClosingTags:D.value}):Ot(x,{format:!0,indentBy:" "});await navigator.clipboard.writeText(B),i("copy-success",B)}catch(x){const B=x instanceof Error?x:new Error("Copy failed");i("copy-error",B),console.error("Failed to copy XML:",x)}},A=()=>{if(!(!V.value||!u.value))try{const x=es(u.value,a.modelValue);i("update:modelValue",x),i("compress",x)}catch(x){console.error("Failed to compress XML:",x)}},te=()=>{if(V.value)try{const x=ts(a.modelValue,{format:!0,indentBy:" "});i("update:modelValue",x),i("format",x)}catch(x){console.error("Failed to format XML:",x)}},N=x=>{if(!x||!x.expression.trim()){T();return}if(!u.value||!_.value){m.value="No valid XML data to filter";return}try{const X=new Ht.DOMParser().parseFromString(_.value,"text/xml"),Z=on.select(x.expression,X);if(!Z||Array.isArray(Z)&&Z.length===0){p.value=[],m.value="";return}const F=new Ht.XMLSerializer;let le="";Array.isArray(Z)?(le=`<result>
|
|
22
|
+
`,Z.forEach(w=>{w.nodeType===1?le+=" "+F.serializeToString(w)+`
|
|
23
|
+
`:w.nodeType===2?le+=` <attribute name="${w.name}" value="${w.value}"/>
|
|
24
|
+
`:w.nodeType===3&&(le+=` <text>${w.nodeValue}</text>
|
|
25
|
+
`)}),le+="</result>"):le=F.serializeToString(Z),p.value=St(le),m.value="",o.nextTick(()=>{ae()})}catch(B){m.value=B instanceof Error?B.message:"Filter execution error",p.value=null}},T=()=>{p.value=null,m.value="",o.nextTick(()=>{ae()})},q=async x=>{try{const B=typeof x=="string"?x:JSON.stringify(x,null,2);await navigator.clipboard.writeText(B),i("copy-success",B)}catch(B){const X=B instanceof Error?B:new Error("Copy failed");i("copy-error",X),console.error("Failed to copy value:",B)}},W=(x,B,X)=>{if(!(!u.value||!Array.isArray(u.value)))try{const Z=x.split(/\./).filter(Boolean);let F=u.value;for(let w=0;w<Z.length;w++){const k=Z[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===Z.length-1){if(Array.isArray(F)&&F[Q]){const R=F[Q];if(R[B]){const J=R[B];delete R[B],R[X]=J,D.value.has(B)&&(D.value.delete(B),D.value.add(X))}}}else Array.isArray(F)&&F[Q]&&(F=F[Q])}else F[k]&&(F=F[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(Z){console.error("Failed to update tag name:",Z)}},M=(x,B,X)=>{if(!(!u.value||!Array.isArray(u.value)))try{const Z=x.split(/\./).filter(Boolean);let F=u.value;for(let w=0;w<Z.length;w++){const k=Z[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===Z.length-1){if(Array.isArray(F)&&F[Q]){const J=F[Q][":@"];if(J&&J[`@_${B}`]!==void 0){const ge=J[`@_${B}`];delete J[`@_${B}`],J[`@_${X}`]=ge}}}else Array.isArray(F)&&F[Q]&&(F=F[Q])}else F[k]&&(F=F[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(Z){console.error("Failed to update attribute name:",Z)}},de=(x,B,X)=>{if(!(!u.value||!Array.isArray(u.value)))try{const Z=x.split(/\./).filter(Boolean);let F=u.value;for(let w=0;w<Z.length;w++){const k=Z[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===Z.length-1){if(Array.isArray(F)&&F[Q]){const J=F[Q][":@"];J&&J[`@_${B}`]!==void 0&&(J[`@_${B}`]=X)}}else Array.isArray(F)&&F[Q]&&(F=F[Q])}else F[k]&&(F=F[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(Z){console.error("Failed to update attribute value:",Z)}},he=(x,B)=>{if(!(!u.value||!Array.isArray(u.value)))try{const X=x.split(/\./).filter(Boolean);let Z=u.value,F="";for(let w=0;w<X.length;w++){const k=X[w],L=k.match(/^(.+?)\[(\d+)\]$/);if(L){const G=L[1],Q=parseInt(L[2]);if(w===X.length-1){if(Array.isArray(Z)&&Z[Q]){const R=Z[Q];if(F=Object.keys(R).find(J=>!J.startsWith(":")&&!J.startsWith("#"))||"",F&&Array.isArray(R[F])){const J=R[F],ge=J.findIndex(Ee=>Ee["#text"]!==void 0);ge!==-1?J[ge]["#text"]=B:J.push({"#text":B})}}}else Array.isArray(Z)&&Z[Q]&&(Z=Z[Q])}else Z[k]&&(Z=Z[k])}const le=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",le)}catch(X){console.error("Failed to update text content:",X)}},ye=(x,B)=>{if(!(!u.value||!Array.isArray(u.value)))try{const X=x.split(/\./).filter(Boolean);let Z=u.value;for(let le=0;le<X.length;le++){const w=X[le],k=w.match(/^(.+?)\[(\d+)\]$/);if(k){const L=k[1],G=parseInt(k[2]);if(le===X.length-1){if(Array.isArray(Z)&&Z[G]){const Q=Z[G],R=Object.keys(Q).find(J=>!J.startsWith(":")&&!J.startsWith("#"));if(R&&Array.isArray(Q[R])){const J=Q[R],ge=J.findIndex(Ee=>Ee.__cdata!==void 0);if(ge!==-1){const Ee=J[ge];Array.isArray(Ee.__cdata)&&Ee.__cdata[0]&&(Ee.__cdata[0]["#text"]=B)}else J.push({__cdata:[{"#text":B}]})}}}else Array.isArray(Z)&&Z[G]&&(Z=Z[G])}else Z[w]&&(Z=Z[w])}const F=et(u.value,{indent:" ",selfClosingTags:D.value});i("update:modelValue",F)}catch(X){console.error("Failed to update CDATA content:",X)}};return o.watch(()=>a.modelValue,x=>{K(x)},{immediate:!0}),t({copyXml:U,compressSource:A,formatSource:te,expandAll:ae,collapseAll:ee,toggleExpand:$,filter:N,clearFilter:T,isValidXml:()=>V.value,getParsedXml:()=>u.value,getFilteredXml:()=>p.value,getExpandedNodes:()=>b.value,getParseError:()=>c.value,getFilterError:()=>m.value,parseXmlString:x=>K(x),copyValue:x=>q(x)}),(x,B)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["xml-format",`xml-format--${Y.value.name}`])},[x.showToolbar?(o.openBlock(),o.createElementBlock("div",rs,[o.createElementVNode("div",ns,[o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--primary",onClick:U,disabled:!V.value,title:"Copy XML"}," 📋 Copy ",8,os),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:ae,disabled:!V.value,title:"Expand All"}," ⬇️ Expand All ",8,ss),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:ee,disabled:!V.value,title:"Collapse All"}," ➡️ Collapse All ",8,is),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:A,disabled:!V.value,title:"Compress XML"}," 📦 Compress ",8,as),o.createElementVNode("button",{class:"xml-format__btn xml-format__btn--secondary",onClick:te,disabled:!V.value,title:"Format XML"}," ✨ Format ",8,us)]),o.createElementVNode("div",ls,[V.value?(o.openBlock(),o.createElementBlock("span",cs," ✅ Valid XML ")):(o.openBlock(),o.createElementBlock("span",fs," ❌ Invalid XML "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",ds,[V.value?m.value?(o.openBlock(),o.createElementBlock("div",hs,[B[1]||(B[1]=o.createElementVNode("h4",null,"Filter Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(m.value),1)])):(o.openBlock(),o.createElementBlock("div",ms,[v.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"xml-declaration",style:o.normalizeStyle({color:Y.value.colors.xmlDeclaration})},o.toDisplayString(v.value),5)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(H.value,(X,Z)=>(o.openBlock(),o.createBlock(Yn,{key:Z,node:X.node,index:X.originalIndex,level:0,expanded:b.value,theme:Y.value,selfClosingTags:D.value,onToggleExpand:$,onCopy:q,"onUpdate:tagName":W,"onUpdate:attributeName":M,"onUpdate:attributeValue":de,"onUpdate:textContent":he,"onUpdate:cdataContent":ye},null,8,["node","index","expanded","theme","selfClosingTags"]))),128))])):(o.openBlock(),o.createElementBlock("div",ps,[B[0]||(B[0]=o.createElementVNode("h4",null,"XML Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(c.value),1)]))])],2))}}),[["__scopeId","data-v-c6e64630"]]),or={"github-light":{name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",hoverBackground:"#f3f4f6",border:"#d0d7de",text:"#24292f",textSecondary:"#57606a",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#1f883d",buttonPrimaryHover:"#1a7f37",success:"#1f883d",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",sqlKeyword:"#cf222e",sqlFunction:"#8250df",sqlString:"#0a3069",sqlNumber:"#0550ae",sqlComment:"#6e7781",sqlOperator:"#cf222e",sqlIdentifier:"#24292f",sqlPunctuation:"#24292f",collapsedBackground:"#ddf4ff",collapsedText:"#0969da",indentLine:"#d0d7de"}},"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",hoverBackground:"#30363d",border:"#30363d",text:"#c9d1d9",textSecondary:"#8b949e",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#c9d1d9",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2e1c",error:"#f85149",errorBackground:"#3d1319",sqlKeyword:"#ff7b72",sqlFunction:"#d2a8ff",sqlString:"#a5d6ff",sqlNumber:"#79c0ff",sqlComment:"#8b949e",sqlOperator:"#ff7b72",sqlIdentifier:"#c9d1d9",sqlPunctuation:"#c9d1d9",collapsedBackground:"#1c2d41",collapsedText:"#58a6ff",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",hoverBackground:"#f5f5f5",border:"#e5e5e5",text:"#171717",textSecondary:"#737373",buttonBackground:"#fafafa",buttonBackgroundHover:"#f5f5f5",buttonBorder:"#e5e5e5",buttonText:"#171717",buttonPrimary:"#22c55e",buttonPrimaryHover:"#16a34a",success:"#22c55e",successBackground:"#dcfce7",error:"#ef4444",errorBackground:"#fee2e2",sqlKeyword:"#dc2626",sqlFunction:"#9333ea",sqlString:"#1e40af",sqlNumber:"#2563eb",sqlComment:"#737373",sqlOperator:"#dc2626",sqlIdentifier:"#171717",sqlPunctuation:"#171717",collapsedBackground:"#dbeafe",collapsedText:"#1d4ed8",indentLine:"#e0e0e0"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fef5ed",surfaceBackground:"#fef9f3",hoverBackground:"#f9f0e5",border:"#e9dcc9",text:"#3d3c40",textSecondary:"#616061",buttonBackground:"#fef9f3",buttonBackgroundHover:"#f9f0e5",buttonBorder:"#e9dcc9",buttonText:"#3d3c40",buttonPrimary:"#007a5a",buttonPrimaryHover:"#006644",success:"#007a5a",successBackground:"#d1f4e0",error:"#e01e5a",errorBackground:"#ffdbea",sqlKeyword:"#e01e5a",sqlFunction:"#8b2eff",sqlString:"#0b4c8c",sqlNumber:"#1264a3",sqlComment:"#616061",sqlOperator:"#e01e5a",sqlIdentifier:"#3d3c40",sqlPunctuation:"#3d3c40",collapsedBackground:"#d8eaf5",collapsedText:"#0b4c8c",indentLine:"#3e4348"}}},Es=n=>or[n]||or["github-light"],Nt=["SELECT","FROM","WHERE","JOIN","INNER","LEFT","RIGHT","FULL","OUTER","ON","GROUP","BY","HAVING","ORDER","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","CREATE","ALTER","DROP","TABLE","DATABASE","INDEX","VIEW","AND","OR","NOT","IN","BETWEEN","LIKE","IS","NULL","AS","DISTINCT","UNION","ALL","EXISTS","CASE","WHEN","THEN","ELSE","END"],ys=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","INSERT","UPDATE","DELETE","CREATE","ALTER","DROP","JOIN","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","OUTER JOIN"],bs=n=>{try{if(!n||!n.trim())return{valid:!1,error:"SQL string is empty"};const t=n.toUpperCase();if(!Nt.some(b=>new RegExp(`\\b${b}\\b`).test(t)))return{valid:!1,error:"No valid SQL keywords found"};let a=0;for(const b of n)if(b==="("&&a++,b===")"&&a--,a<0)return{valid:!1,error:"Mismatched parentheses"};if(a!==0)return{valid:!1,error:"Mismatched parentheses"};let i=0,u=0,c=!1;for(let b=0;b<n.length;b++){const p=n[b];if(c){c=!1;continue}if(p==="\\"){c=!0;continue}p==="'"&&i++,p==='"'&&u++}return i%2!==0?{valid:!1,error:"Mismatched single quotes"}:u%2!==0?{valid:!1,error:"Mismatched double quotes"}:{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}},sr=(n,t)=>{try{const r=t?.tabWidth||2,a=t?.keywordCase||"upper",i=" ".repeat(r);let u=n.trim();const c=[];u=u.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,v=>(c.push({type:"string",value:v}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/--[^\n]*/g,v=>(c.push({type:"comment",value:v}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/\/\*[\s\S]*?\*\//g,v=>(c.push({type:"comment",value:v}),`__PROTECTED_${c.length-1}__`)),u=u.replace(/,(?!\s)/g,", ").replace(/\s*\bAS\b\s*/gi," AS ").replace(/\s*\bOVER\b\s*/gi," OVER ").replace(/\s*\b(DESC|ASC)\b\s*/gi," $1 ").replace(/\s*([<>=!]+)\s*/g," $1 ").replace(/\s*\bON\b\s*/gi," ON ").replace(/\)([A-Z])/gi,") $1").replace(/[ \t]+/g," ").replace(/ +$/gm,"").replace(/^ +/gm,""),a==="upper"?Nt.forEach(v=>{const H=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(H,v.toUpperCase())}):a==="lower"&&Nt.forEach(v=>{const H=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(H,v.toLowerCase())});const b=["WITH","SELECT","FROM","WHERE","GROUP BY","HAVING","ORDER BY","LIMIT","OFFSET","INNER JOIN","LEFT JOIN","RIGHT JOIN","FULL JOIN","CROSS JOIN","OUTER JOIN","JOIN","UNION","UNION ALL","INTERSECT","EXCEPT","INSERT INTO","UPDATE","DELETE FROM","CREATE","ALTER","DROP"];b.sort((v,H)=>H.length-v.length);const p=[];b.forEach((v,H)=>{if(v.includes(" ")){const K=a==="upper"?v:v.toLowerCase(),$=new RegExp(`\\b${v}\\b`,"gi"),ae=`__KEYWORD_${H}__`;u=u.replace($,ae),p.push({placeholder:ae,original:K})}}),b.forEach(v=>{if(!v.includes(" ")){const H=a==="upper"?v:v.toLowerCase(),K=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(K,`
|
|
26
|
+
${H}`)}}),p.forEach(({placeholder:v,original:H})=>{u=u.replace(new RegExp(v,"g"),`
|
|
27
|
+
${H}`)}),u=u.replace(/\b((?:INNER\s+|LEFT\s+|RIGHT\s+|FULL\s+|CROSS\s+|OUTER\s+)?JOIN\s+[^\n]+?)\s+ON\s+(.+?)(?=\n|$)/gi,(v,H,K)=>`${H}
|
|
28
|
+
${i}${a==="upper"?"ON":"on"} ${K.trim()}`),u=u.replace(/\b(WHERE)\s+([^\n]+?)(?=\s+AND\b|\s+OR\b|\n|$)/gis,(v,H,K)=>{const $=a==="upper"?"WHERE":"where",ae=K.trim();return`${$}
|
|
29
|
+
${i}${ae}`}),u=u.replace(/\b(HAVING)\s+(?!\n)(.+?)(?=\n|$)/gis,(v,H,K)=>`${a==="upper"?"HAVING":"having"}
|
|
30
|
+
${i}${K.trim()}`),u=u.replace(/\b(ORDER BY)\s+(?!\n)([^,\n]+?)(?=\n|$|;)/gis,(v,H,K)=>{const $=a==="upper"?"ORDER BY":"order by";return K.includes(",")?v:`${$}
|
|
31
|
+
${i}${K.trim()}`}),u=u.replace(/\b(INSERT\s+INTO)\s+(\w+)\s*\(([^)]+)\)\s*(VALUES)/gis,(v,H,K,$,ae)=>{const ee=a==="upper"?"INSERT INTO":"insert into",U=a==="upper"?"VALUES":"values",A=$.split(",").map(N=>N.trim());let te=`${ee} ${K}
|
|
32
|
+
(`;return te+=A.join(`,
|
|
33
|
+
`),te+=`)
|
|
34
|
+
${U}`,te}),u=u.replace(/\b(VALUES)\s*\n?\s*\(([^)]+)\)/gis,(v,H,K)=>{const $=a==="upper"?"VALUES":"values",ae=K.split(/,\s*(?=(?:[^']*'[^']*')*[^']*$)/).map(U=>U.trim());let ee=`${$}
|
|
35
|
+
(`;return ee+=ae.join(`,
|
|
36
|
+
`),ee+=")",ee}),u=u.replace(/\b(UPDATE\s+)(\w+)\s+(SET)\s+([^\n]+?)(?=\n(?:WHERE)|$|;)/gis,(v,H,K,$,ae)=>{const ee=a==="upper"?"UPDATE":"update",U=a==="upper"?"SET":"set",A=ae.split(/,\s*(?![^()]*\))/).map(N=>N.trim());let te=`${ee} ${K}
|
|
37
|
+
${U}`;return A.forEach((N,T)=>{te+=`
|
|
38
|
+
${i}${N}`,T<A.length-1&&(te+=",")}),te}),["AND","OR"].forEach(v=>{const H=a==="upper"?v:v.toLowerCase(),K=new RegExp(`\\b${v}\\b`,"gi");u=u.replace(K,`
|
|
39
|
+
${i}${H}`)});const _=u.split(`
|
|
40
|
+
`),D=[],V=v=>{const H=[];let K="",$=0;for(let ae=0;ae<v.length;ae++){const ee=v[ae];ee==="("?($++,K+=ee):ee===")"?($--,K+=ee):ee===","&&$===0?(H.push(K.trim()),K=""):K+=ee}return K.trim()&&H.push(K.trim()),H},j=v=>{if(!/\bCASE\b/i.test(v))return[v];const H=[],K=[];let $=v.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,te=>{const N=K.length;return K.push(te),`__STRING_${N}__`});const ae=/\b(CASE)\b([\s\S]*?)\b(END)\b/gi;let ee=0,U;for(;(U=ae.exec($))!==null;){if(U.index>ee){const T=$.substring(ee,U.index).trim();T&&H.push(T)}H.push("CASE");const N=U[2].split(/\b(WHEN|ELSE)\b/gi);for(let T=0;T<N.length;T++){const q=N[T].trim();if(q){if(/^WHEN$/i.test(q)){const W=N[++T]?.trim()||"",M=W.match(/^(.*?)\s+THEN\s+(.*)$/i);M?H.push(i+"WHEN "+M[1].trim()+" THEN "+M[2].trim()):H.push(i+"WHEN "+W)}else if(/^ELSE$/i.test(q)){const W=N[++T]?.trim()||"";H.push(i+"ELSE "+W)}}}H.push("END"),ee=ae.lastIndex}if(ee<$.length){const te=$.substring(ee).trim();te&&(H[H.length-1]+=" "+te)}return H.map(te=>te.replace(/__STRING_(\d+)__/g,(N,T)=>K[parseInt(T)]))};for(let v=0;v<_.length;v++){const H=_[v].trim();if(/^SELECT\b/i.test(H)){const K=H.match(/^(SELECT\s+(?:DISTINCT\s+)?)(.*)/i);if(K){const $=K[1].trim(),ae=K[2],ee=V(ae);D.push($),ee.forEach((U,A)=>{const te=A===ee.length-1;if(/\bCASE\b/i.test(U)){const N=j(U);N.forEach((T,q)=>{q===0?D.push(i+T):q===N.length-1?D.push(i+T+(te?"":",")):D.push(T)})}else te?D.push(i+U):D.push(i+U+",")})}else D.push(H)}else if(/^GROUP BY\b/i.test(H)){const K=H.match(/^(GROUP BY\s+)(.*)/i);if(K){const $=K[1].trim(),ae=K[2],ee=V(ae);ee.length>1?(D.push($),ee.forEach((U,A)=>{A===ee.length-1?D.push(i+U):D.push(i+U+",")})):D.push(H)}else D.push(H)}else if(/^ORDER BY\b/i.test(H)){const K=H.match(/^(ORDER BY\s+)(.*)/i);if(K){const $=K[1].trim(),ae=K[2],ee=V(ae);ee.length>1?(D.push($),ee.forEach((U,A)=>{A===ee.length-1?D.push(i+U):D.push(i+U+",")})):D.push(H)}else D.push(H)}else D.push(H)}u=D.join(`
|
|
41
|
+
`),u=u.split(`
|
|
42
|
+
`).filter(v=>v.trim().length>0).join(`
|
|
43
|
+
`),c.forEach((v,H)=>{u=u.replace(`__PROTECTED_${H}__`,v.value)});const Y=u.split(`
|
|
44
|
+
`),ie=[];for(let v=0;v<Y.length;v++){const H=Y[v],K=H.trim();if(H.startsWith(" ")||H.startsWith(" ")){ie.push(H);continue}if(b.some(U=>new RegExp(`^${U}\\b`,"i").test(K))){ie.push(K);continue}let ee="";for(let U=v-1;U>=0;U--){const A=Y[U].trim(),te=b.find(N=>new RegExp(`^${N}\\b`,"i").test(A));if(te){ee=te;break}}/^(AND|OR)\b/i.test(K)?ie.push(K):ee.match(/^(WHERE|HAVING)$/i)||ee.match(/JOIN$/i)||ee.match(/^ORDER BY$/i)?ie.push(i+K):ie.push(K)}return ie.join(`
|
|
45
|
+
`)}catch(r){throw new Error(`SQL 格式化失败: ${r instanceof Error?r.message:"Unknown error"}`)}},As=n=>{try{let t=n.replace(/--[^\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"");const r=[];return t=t.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,a=>(r.push(a),`__STRING_${r.length-1}__`)),t=t.replace(/\s+/g," ").replace(/\s*([(),;])\s*/g,"$1").trim(),r.forEach((a,i)=>{t=t.replace(`__STRING_${i}__`,a)}),t}catch(t){throw new Error(`SQL 压缩失败: ${t instanceof Error?t.message:"Unknown error"}`)}},xs=n=>{const t=[];try{const a=sr(n,{keywordCase:"upper"}).split(`
|
|
46
|
+
`);let i=null,u=[],c=[];for(const b of a){const p=b.trim();if(!p){i&&u.push(b);continue}if(p.startsWith("--")||p.startsWith("/*")){i?u.push(b):c.push(b);continue}let _=!1,D="UNKNOWN";for(const V of ys)if(new RegExp(`^${V}\\b`,"i").test(p)){_=!0,D=V.replace(/ /g," ");break}_?(i&&u.length>0&&(i.content=u.join(`
|
|
47
|
+
`),i.raw=u.join(`
|
|
48
|
+
`),t.push(i)),u=[...c,b],c=[],i={type:D,content:"",raw:"",collapsible:!0,path:`clause-${t.length}`}):i?u.push(b):(u=[...c,b],c=[],i={type:"UNKNOWN",content:"",raw:"",collapsible:!1,path:`clause-${t.length}`})}return i&&u.length>0&&(i.content=u.join(`
|
|
49
|
+
`),i.raw=u.join(`
|
|
50
|
+
`),t.push(i)),c.length>0&&t.push({type:"UNKNOWN",content:c.join(`
|
|
51
|
+
`),raw:c.join(`
|
|
52
|
+
`),collapsible:!1,path:`clause-${t.length}`}),{clauses:t,raw:n}}catch{return{clauses:[{type:"UNKNOWN",content:n,raw:n,collapsible:!1,path:"clause-0"}],raw:n}}},Ns=n=>{const t=[];let r=n;const a=["COUNT","SUM","AVG","MAX","MIN","UPPER","LOWER","SUBSTRING","CONCAT","LENGTH","TRIM","NOW","DATE","YEAR","MONTH","DAY","COALESCE","CAST","CONVERT","ROUND","ABS","FLOOR","CEIL"],i=["=","!=","<>","<",">","<=",">=","+","-","*","/","%","||"],u=["(",")",",",";","."];for(;r.length>0;){let c=!1;const b=r.match(/^(\s+)/);if(b){t.push({type:"whitespace",value:b[1]}),r=r.slice(b[1].length);continue}const p=r.match(/^(--[^\n]*)/);if(p){t.push({type:"comment",value:p[1]}),r=r.slice(p[1].length);continue}const m=r.match(/^(\/\*[\s\S]*?\*\/)/);if(m){t.push({type:"comment",value:m[1]}),r=r.slice(m[1].length);continue}const _=r.match(/^(["'])(?:(?=(\\?))\2.)*?\1/);if(_){t.push({type:"string",value:_[0]}),r=r.slice(_[0].length);continue}const D=r.match(/^(\d+\.?\d*|\.\d+)/);if(D){t.push({type:"number",value:D[1]}),r=r.slice(D[1].length);continue}for(const j of i)if(r.startsWith(j)){t.push({type:"operator",value:j}),r=r.slice(j.length),c=!0;break}if(c)continue;for(const j of u)if(r.startsWith(j)){t.push({type:"punctuation",value:j}),r=r.slice(j.length),c=!0;break}if(c)continue;const V=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)/);if(V){const j=V[1],Y=j.toUpperCase();Nt.includes(Y)?t.push({type:"keyword",value:j}):a.includes(Y)?t.push({type:"function",value:j}):t.push({type:"identifier",value:j}),r=r.slice(j.length);continue}t.push({type:"punctuation",value:r[0]}),r=r.slice(1)}return t},Cs={key:0,class:"sql-format__toolbar"},Ds={class:"sql-format__actions"},vs=["disabled"],ws=["disabled"],_s=["disabled"],Ts=["disabled"],Bs=["disabled"],Ss={class:"sql-format__info"},Os={key:0,class:"sql-format__status sql-format__status--success"},ks={key:1,class:"sql-format__status sql-format__status--error"},Rs={class:"sql-format__content"},Is={key:0,class:"sql-format__error"},Fs={key:1,class:"sql-format__viewer"},Ps={key:0,class:"sql-format__clauses"},Ls=["onClick"],Vs=["onClick","title"],$s={key:1,class:"sql-format__toggle-spacer"},Ms={class:"sql-format__clause-keyword"},Us={class:"sql-format__clause-code"},qs=["innerHTML"],Hs={key:0,class:"sql-format__clause-content"},js={class:"sql-format__clause-code"},Ks=["innerHTML"],Gs={key:1,class:"sql-format__code"},Xs=["innerHTML"],zs=ft(o.defineComponent({__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"},dialect:{default:"sql"},tabWidth:{default:2}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress","format"],setup(n,{expose:t,emit:r}){o.useCssVars(N=>({"64cbdf35":_.value.colors.background,"1c3fa074":_.value.colors.text,"26a7cc9a":_.value.colors.border,ea614c58:_.value.colors.surfaceBackground,de6a0376:_.value.colors.buttonBorder,"5ee22ac7":_.value.colors.buttonBackground,"6cdafcf4":_.value.colors.buttonText,bcb15a96:_.value.colors.buttonBackgroundHover,"71cfc709":_.value.colors.buttonPrimary,"0109e09a":_.value.colors.buttonPrimaryHover,"09fa0cac":_.value.colors.successBackground,"358a4b5c":_.value.colors.success,f34a88a2:_.value.colors.errorBackground,"6ae6dfa1":_.value.colors.error,19523360:_.value.colors.textSecondary}));const a=n,i=r,u=o.ref(""),c=o.ref(a.dialect),b=o.ref([]),p=o.ref(new Set),m=o.computed(()=>u.value===""),_=o.computed(()=>Es(a.theme)),D=N=>{if(!N||!N.trim()){u.value="",b.value=[],p.value.clear();return}try{const T=bs(N);if(!T.valid){u.value=T.error||"Invalid SQL",b.value=[];return}const q=xs(N);b.value=q.clauses,p.value=new Set(q.clauses.map(W=>W.path||"")),u.value=""}catch(T){u.value=T instanceof Error?T.message:"Unknown parse error",b.value=[]}},V=N=>{const T=Ns(N),q=_.value.colors;return T.map(W=>{let M=q.text;switch(W.type){case"keyword":M=q.sqlKeyword;break;case"function":M=q.sqlFunction;break;case"string":M=q.sqlString;break;case"number":M=q.sqlNumber;break;case"comment":M=q.sqlComment;break;case"operator":M=q.sqlOperator;break;case"identifier":M=q.sqlIdentifier;break;case"punctuation":M=q.sqlPunctuation;break;case"whitespace":return W.value}const de=W.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");return`<span style="color: ${M}">${de}</span>`}).join("")},j=N=>{p.value.has(N)?p.value.delete(N):p.value.add(N),p.value=new Set(p.value)},Y=N=>p.value.has(N),ie=N=>{const T=N.content.split(`
|
|
53
|
+
`);if(T.length===0)return"";for(const q of T)if(q.trim())return q;return""},v=N=>{const T=ie(N),q=Y(N.path||""),W=!!H(N);return N.collapsible&&!q&&W?`${V(T)}<span style="color: ${_.value.colors.textSecondary}; opacity: 0.6; font-style: italic; margin-left: 4px;"> ...</span>`:V(T)},H=N=>{const T=N.content.split(`
|
|
54
|
+
`);if(T.length<=1)return"";let q=0;for(let M=0;M<T.length;M++)if(T[M].trim()){q=M;break}return T.slice(q+1).join(`
|
|
55
|
+
`)},K=()=>{p.value=new Set(b.value.map(N=>N.path||"")),i("expand-all")},$=()=>{p.value=new Set,i("collapse-all")},ae=async()=>{if(m.value)try{await navigator.clipboard.writeText(a.modelValue),i("copy-success",a.modelValue)}catch(N){const T=N instanceof Error?N:new Error("Failed to copy");i("copy-error",T)}},ee=()=>{if(m.value)try{const N=sr(a.modelValue,{dialect:c.value,tabWidth:a.tabWidth});i("update:modelValue",N),i("format",N)}catch(N){console.error("Format error:",N)}},U=()=>{if(m.value)try{const N=As(a.modelValue);i("update:modelValue",N),i("compress",N)}catch(N){console.error("Compress error:",N)}},A=()=>null,te=()=>u.value;return o.watch(()=>a.modelValue,N=>{D(N)},{immediate:!0}),o.watch(()=>a.dialect,N=>{c.value=N}),t({copySql:ae,formatSource:ee,compressSource:U,expandAll:K,collapseAll:$,toggleExpand:j,isValidSql:()=>m.value,getParsedSql:A,getParseError:te}),(N,T)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["sql-format",`sql-format--${_.value.name}`])},[N.showToolbar?(o.openBlock(),o.createElementBlock("div",Cs,[o.createElementVNode("div",Ds,[o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--primary",onClick:ae,disabled:!m.value,title:"Copy SQL"}," 📋 Copy ",8,vs),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:ee,disabled:!m.value,title:"Format SQL"}," ✨ Format ",8,ws),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:U,disabled:!m.value,title:"Compress SQL"}," 📦 Compress ",8,_s),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:K,disabled:!m.value||b.value.length===0,title:"Expand All Clauses"}," ⬇️ Expand All ",8,Ts),o.createElementVNode("button",{class:"sql-format__btn sql-format__btn--secondary",onClick:$,disabled:!m.value||b.value.length===0,title:"Collapse All Clauses"}," ⬆️ Collapse All ",8,Bs),o.withDirectives(o.createElementVNode("select",{"onUpdate:modelValue":T[0]||(T[0]=q=>c.value=q),class:"sql-format__dialect-select",title:"SQL Dialect"},T[1]||(T[1]=[o.createStaticVNode('<option value="sql" data-v-64a81173>SQL</option><option value="mysql" data-v-64a81173>MySQL</option><option value="postgresql" data-v-64a81173>PostgreSQL</option><option value="sqlite" data-v-64a81173>SQLite</option><option value="plsql" data-v-64a81173>PL/SQL</option><option value="tsql" data-v-64a81173>T-SQL</option>',6)]),512),[[o.vModelSelect,c.value]])]),o.createElementVNode("div",Ss,[m.value?(o.openBlock(),o.createElementBlock("span",Os," ✅ Valid SQL ")):(o.openBlock(),o.createElementBlock("span",ks," ❌ Invalid SQL "))])])):o.createCommentVNode("",!0),o.createElementVNode("div",Rs,[m.value?(o.openBlock(),o.createElementBlock("div",Fs,[b.value.length>0?(o.openBlock(),o.createElementBlock("div",Ps,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.value,q=>(o.openBlock(),o.createElementBlock("div",{key:q.path,class:"sql-format__clause"},[o.createElementVNode("div",{class:"sql-format__clause-header",onClick:W=>q.collapsible&&j(q.path||"")},[q.collapsible?(o.openBlock(),o.createElementBlock("button",{key:0,class:"sql-format__toggle-btn",onClick:o.withModifiers(W=>j(q.path||""),["stop"]),title:Y(q.path||"")?"Collapse":"Expand"},[o.createElementVNode("span",{class:o.normalizeClass(["sql-format__toggle-icon",{"sql-format__toggle-icon--expanded":Y(q.path||"")}])},"▶",2)],8,Vs)):(o.openBlock(),o.createElementBlock("span",$s)),o.createElementVNode("div",Ms,[o.createElementVNode("pre",Us,[o.createElementVNode("code",{innerHTML:v(q)},null,8,qs)])])],8,Ls),Y(q.path||"")&&H(q)?(o.openBlock(),o.createElementBlock("div",Hs,[o.createElementVNode("pre",js,[o.createElementVNode("code",{innerHTML:V(H(q))},null,8,Ks)])])):o.createCommentVNode("",!0)]))),128))])):(o.openBlock(),o.createElementBlock("pre",Gs,[o.createElementVNode("code",{innerHTML:V(a.modelValue)},null,8,Xs)]))])):(o.openBlock(),o.createElementBlock("div",Is,[T[2]||(T[2]=o.createElementVNode("h4",null,"SQL Parse Error:",-1)),o.createElementVNode("pre",null,o.toDisplayString(u.value),1)]))])],2))}}),[["__scopeId","data-v-64a81173"]]),Ws=[It],Ys={install:n=>{Ws.forEach(t=>{const r=t.name||t.__name||"UnknownComponent";n.component(r,t)})}};ze.JsonFormat=It,ze.SqlFormat=zs,ze.XmlFormat=gs,ze.default=Ys,Object.defineProperties(ze,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|