a[g].captureNames.slice(0):null,b.addProto)}functiont(a,b){if(Array.prototype.indexOf)returna.indexOf(b);vard=a.length,c;for(c=0;c<d;++c)if(a[c]===b)returnc;return-1}functionu(a,b){returnB.call(a)==="[object "+b+"]"}functionC(a,b,d){returnj.test.call(-1<d.indexOf("x")?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,a.slice(b))}functionD(a){a=a||{};u(a,"String")&&(a=e.forEach(a,/[^\s,]+/,function(a){this[a]=!0},{}));returna}functionE(a){if(!/^[\w$]$/.test(a))throwError("Flag must be a single character A-Za-z0-9_$");
F[a]=!0}functionG(a){RegExp.prototype.exec=(a?l:j).exec;RegExp.prototype.test=(a?l:j).test;String.prototype.match=(a?l:j).match;String.prototype.replace=(a?l:j).replace;String.prototype.split=(a?l:j).split;o.natives=a}functionq(a){if(null==a)thrownewTypeError("Cannot convert null or undefined to object");returna}varg="xregexp",e,o={astral:!1,natives:!1},j={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},
p)thrownewTypeError("Cannot supply flags when copying a RegExp");returns(a,{addProto:!0})}a=a===p?"":String(a);b=b===p?"":String(b);k=a+"/"+b;if(!v[k]){h=a;varg=b,m;if(w(g)!==g)thrownewSyntaxError("Invalid duplicate regex flag "+g);h=j.replace.call(h,/^\(\?([\w$]+)\)/,function(a,b){if(j.test.call(/[gy]/,b))thrownewSyntaxError("Cannot use flag g or y in mode modifier "+a);g=w(g+b);return""});for(m=0;m<g.length;++m)if(!F[g.charAt(m)])thrownewSyntaxError("Unknown regex flag "+g.charAt(m));
b.global&&"one"!==d||"all"===d,f=(c?"g":"")+(b.sticky?"y":"");b[g]=b[g]||{captureNames:null};f=b[g][f||"noGY"]||(b[g][f||"noGY"]=s(b,{add:f,remove:"one"===d?"g":""}));a=j.match.call(q(a),f);b.global&&(b.lastIndex="one"===d&&a?a.index+a[0].length:0);returnc?a||[]:a&&a[0]};e.matchChain=function(a,b){returnfunctionc(a,i){varh=b[i].regex?b[i]:{regex:b[i]},k=[],g=function(a){if(h.backref){if(!(a.hasOwnProperty(h.backref)||+h.backref<a.length))thrownewReferenceError("Backreference to undefined group: "+
(+d+i);returna},m;if(!u(a,"Array")||!a.length)thrownewTypeError("Must provide a nonempty array of patterns to merge");for(m=0;m<a.length;++m)k=a[m],e.isRegExp(k)?(i=f,h=k[g]&&k[g].captureNames||[],c.push(j.replace.call(e(k.source).source,d,l))):c.push(e.escape(k));returne(c.join("|"),b)};l.exec=function(a){varb=this.lastIndex,d=j.exec.apply(this,arguments),c,f;if(d){!J&&(1<d.length&&-1<t(d,""))&&(c=s(this,{remove:"g"}),j.replace.call(String(a).slice(d.index),c,function(){vara=arguments.length,
e.isRegExp(a),c,f,i;d?(a[g]&&(f=a[g].captureNames),c=a.lastIndex):a+="";i=u(b,"Function")?j.replace.call(String(this),a,function(){varc=arguments,e;if(f){c[0]=newString(c[0]);for(e=0;e<f.length;++e)f[e]&&(c[0][f[e]]=c[e+1])}if(d&&a.global)a.lastIndex=c[c.length-2]+c[0].length;returnb.apply(p,c)}):j.replace.call(null==this?this:String(this),a,function(){vara=arguments;returnj.replace.call(String(b),I,function(b,d,c){if(d){c=+d;if(c<=a.length-3)returna[c]||"";c=f?t(f,d):-1;if(c<0)thrownewSyntaxError("Backreference to undefined group "+
b);returna[c+1]||""}if(c==="$")return"$";if(c==="&"||+c===0)returna[0];if(c==="`")returna[a.length-1].slice(0,a[a.length-2]);if(c==="'")returna[a.length-1].slice(a[a.length-2]+a[0].length);c=+c;if(!isNaN(c)){if(c>a.length-3)thrownewSyntaxError("Backreference to undefined group "+b);returna[c]||""}thrownewSyntaxError("Invalid token "+b);})});d&&(a.lastIndex=a.global?0:c);returni};l.split=function(a,b){if(!e.isRegExp(a))returnj.split.apply(this,arguments);vard=String(this),c=[],f=a.lastIndex,
a[0]);},{scope:"all"});n(/\[(\^?)]/,function(a){returna[1]?"[\\s\\S]":"\\b\\B"});n(/\(\?#[^)]*\)/,function(a,b,d){returnC(a.input,a.index+a[0].length,d)?"":"(?:)"});n(/\s+|#.*/,function(a,b,d){returnC(a.input,a.index+a[0].length,d)?"":"(?:)"},{flag:"x"});n(/\./,function(){return"[\\s\\S]"},{flag:"s"});n(/\\k<([\w$]+)>/,function(a){varb=isNaN(a[1])?t(this.captureNames,a[1])+1:+a[1],d=a.index+a[0].length;if(!b||b>this.captureNames.length)thrownewSyntaxError("Backreference to undefined group "+
a[0]);return"\\"+b+(d===a.input.length||isNaN(a.input.charAt(d))?"":"(?:)")});n(/\\(\d+)/,function(a,b){if(!("default"===b&&/^[1-9]/.test(a[1])&&+a[1]<=this.captureNames.length)&&"0"!==a[1])thrownewSyntaxError("Cannot use octal escape or backreference to undefined group "+a[0]);returna[0]},{scope:"all"});n(/\(\?P?<([\w$]+)>/,function(a){if(!isNaN(a[1]))thrownewSyntaxError("Cannot use integer as capture name "+a[0]);if("length"===a[1]||"__proto__"===a[1])thrownewSyntaxError("Cannot use reserved word as capture name "+
a[0]);if(-1<t(this.captureNames,a[1]))thrownewSyntaxError("Cannot use same name for multiple groups "+a[0]);this.captureNames.push(a[1]);this.hasNamedCapture=!0;return"("});n(/\((?!\?)/,function(a,b,d){if(-1<d.indexOf("n"))return"(?:";this.captureNames.push(null);return"("},{optionalFlags:"n"});returne}();