prettier-plugin-phpdoc
Version:
A prettier plugin for sorting PHPDoc
23 lines • 184 kB
JavaScript
"use strict";var Kf=Object.create;var Gt=Object.defineProperty;var Vf=Object.getOwnPropertyDescriptor;var Wf=Object.getOwnPropertyNames;var Qf=Object.getPrototypeOf,Yf=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(t&&(e=t(t=0)),e);var a=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ve=(t,e)=>{for(var s in e)Gt(t,s,{get:e[s],enumerable:!0})},We=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Wf(e))!Yf.call(t,n)&&n!==s&&Gt(t,n,{get:()=>e[n],enumerable:!(i=Vf(e,n))||i.enumerable});return t};var Qe=(t,e,s)=>(s=t!=null?Kf(Qf(t)):{},We(e||!t||!t.__esModule?Gt(s,"default",{value:t,enumerable:!0}):s,t)),Ye=t=>We(Gt({},"__esModule",{value:!0}),t);var ts=a((td,Ze)=>{Ze.exports={name:"PHP",type:"programming",tmScope:"text.html.php",aceMode:"php",codemirrorMode:"php",codemirrorMimeType:"application/x-httpd-php",color:"#4F5D95",extensions:[".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"],filenames:[".php",".php_cs",".php_cs.dist","Phakefile"],interpreters:["php"],aliases:["inc"],languageId:272}});var ss=a((ed,es)=>{es.exports={name:"HTML+PHP",type:"markup",color:"#4f5d95",tmScope:"text.html.php",group:"HTML",extensions:[".phtml"],aceMode:"php",codemirrorMode:"php",codemirrorMimeType:"application/x-httpd-php",languageId:151}});var is=a((sd,pe)=>{"use strict";pe.exports.LINGUIST_LANGUAGES_PHP=ts();pe.exports.LINGUIST_LANGUAGES_HTML_PHP=ss()});var rs=a((id,ns)=>{"use strict";ns.exports={attributeIndex:0,attributeListDepth:{},matchST_ATTRIBUTE:function(){let t=this.input();if(this.is_WHITESPACE()){do t=this.input();while(this.is_WHITESPACE());return this.unput(1),null}switch(t){case"]":return this.attributeListDepth[this.attributeIndex]===0?(delete this.attributeListDepth[this.attributeIndex],this.attributeIndex--,this.popState()):this.attributeListDepth[this.attributeIndex]--,"]";case"(":case")":case":":case"=":case"|":case"&":case"^":case"-":case"+":case"*":case"%":case"~":case"<":case">":case"!":case".":return this.consume_TOKEN();case"[":return this.attributeListDepth[this.attributeIndex]++,"[";case",":return",";case'"':return this.ST_DOUBLE_QUOTES();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case"/":return this._input[this.offset]==="/"?this.T_COMMENT():this._input[this.offset]==="*"?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN()}if(this.is_LABEL_START()||t==="\\"){for(;this.offset<this.size;){let e=this.input();if(!(this.is_LABEL()||e==="\\")){e&&this.unput(1);break}}return this.T_STRING()}else if(this.is_NUM())return this.consume_NUM();throw new Error(`Bad terminal sequence "${t}" at line ${this.yylineno} (offset ${this.offset})`)}}});var hs=a((nd,os)=>{"use strict";os.exports={T_COMMENT:function(){for(;this.offset<this.size;){let t=this.input();if(t===`
`||t==="\r")return this.tok.T_COMMENT;if(t==="?"&&!this.aspTagMode&&this._input[this.offset]===">")return this.unput(1),this.tok.T_COMMENT;if(t==="%"&&this.aspTagMode&&this._input[this.offset]===">")return this.unput(1),this.tok.T_COMMENT}return this.tok.T_COMMENT},T_DOC_COMMENT:function(){let t=this.input(),e=this.tok.T_COMMENT;if(t==="*"){if(t=this.input(),this.is_WHITESPACE()&&(e=this.tok.T_DOC_COMMENT),t==="/")return e;this.unput(1)}for(;this.offset<this.size;)if(t=this.input(),t==="*"&&this._input[this.offset]==="/"){this.input();break}return e}}});var ls=a((rd,as)=>{"use strict";as.exports={nextINITIAL:function(){return this.conditionStack.length>1&&this.conditionStack[this.conditionStack.length-1]==="INITIAL"?this.popState():this.begin("ST_IN_SCRIPTING"),this},matchINITIAL:function(){for(;this.offset<this.size;){let t=this.input();if(t=="<"){if(t=this.ahead(1),t=="?"){if(this.tryMatch("?=")){this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}else if(this.tryMatchCaseless("?php")&&(t=this._input[this.offset+4],t===" "||t===" "||t===`
`||t==="\r")){this.unput(1).appendToken(this.tok.T_OPEN_TAG,6).nextINITIAL();break}if(this.short_tags){this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}else if(this.asp_tags&&t=="%")if(this.tryMatch("%=")){this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}else{this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}}return this.yytext.length>0?this.tok.T_INLINE_HTML:!1}}});var fs=a((od,us)=>{"use strict";var Ht=10,cs="2147483648";process.arch=="x64"&&(Ht=19,cs="9223372036854775808");us.exports={consume_NUM:function(){let t=this.yytext[0],e=t===".";if(t==="0")if(t=this.input(),t==="x"||t==="X"){if(t=this.input(),t!=="_"&&this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if(t==="b"||t==="B"){if(t=this.input(),t!=="_"&&t==="0"||t==="1")return this.consume_BNUM();this.unput(t?2:1)}else if(t==="o"||t==="O"){if(t=this.input(),t!=="_"&&this.is_OCTAL())return this.consume_ONUM();this.unput(t?2:1)}else this.is_NUM()||t&&this.unput(1);for(;this.offset<this.size;){let s=t;if(t=this.input(),t==="_"){if(s==="_"){this.unput(2);break}if(s==="."){this.unput(1);break}if(s==="e"||s==="E"){this.unput(2);break}}else if(t==="."){if(e){this.unput(1);break}if(s==="_"){this.unput(2);break}e=!0;continue}else if(t==="e"||t==="E"){if(s==="_"){this.unput(1);break}let i=2;if(t=this.input(),(t==="+"||t==="-")&&(i=3,t=this.input()),this.is_NUM_START())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?i:i-1);break}if(!this.is_NUM()){t&&this.unput(1);break}}return e?this.tok.T_DNUMBER:this.yytext.length<Ht-1?this.tok.T_LNUMBER:this.yytext.length<Ht||this.yytext.length==Ht&&this.yytext<cs?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){let t=this.input();if(!this.is_HEX()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_LNUM:function(){for(;this.offset<this.size;){let t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){let t;for(;this.offset<this.size;)if(t=this.input(),t!=="0"&&t!=="1"&&t!=="_"){t&&this.unput(1);break}return this.tok.T_LNUMBER},consume_ONUM:function(){for(;this.offset<this.size;){let t=this.input();if(!this.is_OCTAL()){t&&this.unput(1);break}}return this.tok.T_LNUMBER}}});var ps=a((hd,_s)=>{"use strict";_s.exports={matchST_LOOKING_FOR_PROPERTY:function(){let t=this.input();if(t==="-"){if(t=this.input(),t===">")return this.tok.T_OBJECT_OPERATOR;t&&this.unput(1)}else{if(this.is_WHITESPACE())return this.tok.T_WHITESPACE;if(this.is_LABEL_START())return this.consume_LABEL(),this.popState(),this.tok.T_STRING}return this.popState(),t&&this.unput(1),!1},matchST_LOOKING_FOR_VARNAME:function(){let t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),t=this.input(),t==="["||t==="}")return this.unput(1),this.tok.T_STRING_VARNAME;this.unput(this.yytext.length)}else t&&this.unput(1);return!1},matchST_VAR_OFFSET:function(){let t=this.input();if(this.is_NUM_START())return this.consume_NUM(),this.tok.T_NUM_STRING;if(t==="]")return this.popState(),"]";if(t==="$"){if(this.input(),this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_VARIABLE;throw new Error("Unexpected terminal")}else{if(this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_STRING;if(this.is_WHITESPACE()||t==="\\"||t==="'"||t==="#")return this.tok.T_ENCAPSED_AND_WHITESPACE;if(t==="["||t==="{"||t==="}"||t==='"'||t==="`"||this.is_TOKEN())return t;throw new Error("Unexpected terminal")}}}});var ks=a((ad,ds)=>{"use strict";ds.exports={matchST_IN_SCRIPTING:function(){let t=this.input();switch(t){case" ":case" ":case`
`:case"\r":case`\r
`:return this.T_WHITESPACE();case"#":return this.version>=800&&this._input[this.offset]==="["?(this.input(),this.attributeListDepth[++this.attributeIndex]=0,this.begin("ST_ATTRIBUTE"),this.tok.T_ATTRIBUTE):this.T_COMMENT();case"/":return this._input[this.offset]==="/"?this.T_COMMENT():this._input[this.offset]==="*"?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case'"':return this.ST_DOUBLE_QUOTES();case"`":return this.begin("ST_BACKQUOTE"),"`";case"?":if(!this.aspTagMode&&this.tryMatch(">")){this.input();let e=this._input[this.offset];return(e===`
`||e==="\r")&&this.input(),this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG}return this.consume_TOKEN();case"%":return this.aspTagMode&&this._input[this.offset]===">"?(this.input(),t=this._input[this.offset],(t===`
`||t==="\r")&&this.input(),this.aspTagMode=!1,this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG):this.consume_TOKEN();case"{":return this.begin("ST_IN_SCRIPTING"),"{";case"}":return this.conditionStack.length>2&&this.popState(),"}";default:if(t==="."){if(t=this.input(),this.is_NUM_START())return this.consume_NUM();t&&this.unput(1)}if(this.is_NUM_START())return this.consume_NUM();if(this.is_LABEL_START())return this.consume_LABEL().T_STRING();if(this.is_TOKEN())return this.consume_TOKEN()}throw new Error('Bad terminal sequence "'+t+'" at line '+this.yylineno+" (offset "+this.offset+")")},T_WHITESPACE:function(){for(;this.offset<this.size;){let t=this.input();if(!(t===" "||t===" "||t===`
`||t==="\r")){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}}});var ms=a((ld,xs)=>{"use strict";var it=[`
`,"\r"],Ts=[`
`,"\r",";"],jf=Ts.concat([" "," ",",","]",")","/","=","!"]);xs.exports={T_CONSTANT_ENCAPSED_STRING:function(){let t;for(;this.offset<this.size;)if(t=this.input(),t=="\\")this.input();else if(t=="'")break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){let t=this.offset;if(this._input[this.offset-1]==="<"&&this._input[this.offset]==="<"&&this._input[this.offset+1]==="<"){if(this.offset+=3,this.is_TABSPACE())for(;this.offset<this.size&&(this.offset++,!!this.is_TABSPACE()););let e=this._input[this.offset-1];if(e==="'"||e==='"'?this.offset++:e=null,this.is_LABEL_START()){let s=this.offset-1;for(;this.offset<this.size&&(this.offset++,!!this.is_LABEL()););let i=this._input.substring(s,this.offset-1);if((!e||e===this._input[this.offset-1])&&(e&&this.offset++,it.includes(this._input[this.offset-1])))return this.heredoc_label.label=i,this.heredoc_label.length=i.length,this.heredoc_label.finished=!1,s=this.offset-t,this.offset=t,this.consume(s),e==="'"?this.begin("ST_NOWDOC"):this.begin("ST_HEREDOC"),this.prematch_ENDOFDOC(),this.tok.T_START_HEREDOC}}return this.offset=t,!1},ST_DOUBLE_QUOTES:function(){let t;for(;this.offset<this.size;)if(t=this.input(),t=="\\")this.input();else{if(t=='"')break;if(t=="$"){if(t=this.input(),t=="{"||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if(t=="{"){if(t=this.input(),t=="$"){this.unput(2);break}t&&this.unput(1)}}if(t=='"')return this.tok.T_CONSTANT_ENCAPSED_STRING;{let e=1;return(this.yytext[0]==="b"||this.yytext[0]==="B")&&(e=2),this.yytext.length>2&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-e),this.unput(this.yytext.length-e),this.begin("ST_DOUBLE_QUOTES"),this.yytext}},isDOC_MATCH:function(t,e){let s=this._input[t-2];if(!it.includes(s))return!1;let i=!1,n=!1,r=0,o=this._input[t-1];if(this.version>=703){for(;o===" "||o===" ";)o===" "?i=!0:o===" "&&(n=!0),o=this._input[t+r],r++;if(t=t+r,it.includes(this._input[t-1]))return!1}if(this._input.substring(t-1,t-1+this.heredoc_label.length)===this.heredoc_label.label){let h=this._input[t-1+this.heredoc_label.length];if((this.version>=703?jf:Ts).includes(h)){if(e){if(this.consume(r),i&&n)throw new Error("Parse error: mixing spaces and tabs in ending marker at line "+this.yylineno+" (offset "+this.offset+")")}else this.heredoc_label.indentation=r,this.heredoc_label.indentation_uses_spaces=i,this.heredoc_label.first_encaps_node=!0;return!0}}return!1},prematch_ENDOFDOC:function(){this.heredoc_label.indentation_uses_spaces=!1,this.heredoc_label.indentation=0,this.heredoc_label.first_encaps_node=!0;let t=this.offset+1;for(;t<this._input.length;){if(this.isDOC_MATCH(t,!1))return;if(!it.includes(this._input[t-1]))for(;!it.includes(this._input[t++])&&t<this._input.length;);t++}},matchST_NOWDOC:function(){if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length),this.popState(),this.tok.T_END_HEREDOC;let t=this._input[this.offset-1];for(;this.offset<this.size;)if(it.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_HEREDOC:function(){let t=this.input();if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length-1),this.popState(),this.tok.T_END_HEREDOC;for(;this.offset<this.size;)if(t==="\\"&&(t=this.input(),it.includes(t)||(t=this.input())),it.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else if(t==="$"){if(t=this.input(),t==="{")return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){let e=this.offset,s=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(s,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):s}}else if(t==="{"){if(t=this.input(),t==="$")return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN)}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},consume_VARIABLE:function(){this.consume_LABEL();let t=this.input();if(t=="[")return this.unput(1),this.begin("ST_VAR_OFFSET"),this.tok.T_VARIABLE;if(t==="-"){if(this.input()===">")return this.input(),this.is_LABEL_START()&&this.begin("ST_LOOKING_FOR_PROPERTY"),this.unput(3),this.tok.T_VARIABLE;this.unput(2)}else t&&this.unput(1);return this.tok.T_VARIABLE},matchST_BACKQUOTE:function(){let t=this.input();if(t==="$"){if(t=this.input(),t==="{")return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if(t==="{"){if(this._input[this.offset]==="$")return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if(t==="`")return this.popState(),"`";for(;this.offset<this.size;){if(t==="\\")this.input();else if(t==="`"){this.unput(1),this.popState(),this.appendToken("`",1);break}else if(t==="$"){if(t=this.input(),t==="{")return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){let e=this.offset,s=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(s,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):s}continue}else if(t==="{"){if(t=this.input(),t==="$")return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);continue}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_DOUBLE_QUOTES:function(){let t=this.input();if(t==="$"){if(t=this.input(),t==="{")return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if(t==="{"){if(this._input[this.offset]==="$")return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if(t==='"')return this.popState(),'"';for(;this.offset<this.size;){if(t==="\\")this.input();else if(t==='"'){this.unput(1),this.popState(),this.appendToken('"',1);break}else if(t==="$"){if(t=this.input(),t==="{")return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){let e=this.offset,s=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(s,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):s}t&&this.unput(1)}else if(t==="{"){if(t=this.input(),t==="$")return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);t&&this.unput(1)}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE}}});var Es=a((cd,ys)=>{"use strict";ys.exports={T_STRING:function(){let t=this.yytext.toLowerCase(),e=this.keywords[t];if(typeof e!="number"){if(t==="yield")this.version>=700&&this.tryMatch(" from")?(this.consume(5),e=this.tok.T_YIELD_FROM):e=this.tok.T_YIELD;else if(e=this.tok.T_STRING,t==="b"||t==="B"){let s=this.input();if(s==='"')return this.ST_DOUBLE_QUOTES();if(s==="'")return this.T_CONSTANT_ENCAPSED_STRING();s&&this.unput(1)}}if(e===this.tok.T_ENUM){if(this.version<801)return this.tok.T_STRING;let s=this.offset,i=this.input();for(;i==" ";)i=this.input();let n=!1;if(this.is_LABEL_START()){for(;this.is_LABEL();)i+=this.input();let r=i.slice(0,-1).toLowerCase();n=r!=="extends"&&r!=="implements"}return this.unput(this.offset-s),n?this.tok.T_ENUM:this.tok.T_STRING}if(this.offset<this.size&&e!==this.tok.T_YIELD_FROM){let s=this.input();if(s==="\\"){e=t==="namespace"?this.tok.T_NAME_RELATIVE:this.tok.T_NAME_QUALIFIED;do{if(this._input[this.offset]==="{"){this.input();break}this.consume_LABEL(),s=this.input()}while(s==="\\")}s&&this.unput(1)}return e},consume_TOKEN:function(){let t=this._input[this.offset-1],e=this.tokenTerminals[t];return e?e.apply(this,[]):this.yytext},tokenTerminals:{$:function(){return this.offset++,this.is_LABEL_START()?(this.offset--,this.consume_LABEL(),this.tok.T_VARIABLE):(this.offset--,"$")},"-":function(){let t=this._input[this.offset];return t===">"?(this.begin("ST_LOOKING_FOR_PROPERTY").input(),this.tok.T_OBJECT_OPERATOR):t==="-"?(this.input(),this.tok.T_DEC):t==="="?(this.input(),this.tok.T_MINUS_EQUAL):"-"},"\\":function(){if(this.offset<this.size)if(this.input(),this.is_LABEL_START()){let t;do{if(this._input[this.offset]==="{"){this.input();break}this.consume_LABEL(),t=this.input()}while(t==="\\");return this.unput(1),this.tok.T_NAME_FULLY_QUALIFIED}else this.unput(1);return this.tok.T_NS_SEPARATOR},"/":function(){return this._input[this.offset]==="="?(this.input(),this.tok.T_DIV_EQUAL):"/"},":":function(){return this._input[this.offset]===":"?(this.input(),this.tok.T_DOUBLE_COLON):":"},"(":function(){let t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){let e=this.yytext.length;this.consume_LABEL();let s=this.yytext.substring(e-1).toLowerCase(),i=this.castKeywords[s];if(typeof i=="number"&&(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this._input[this.offset-1]===")"))return i}return this.unput(this.offset-t),"("},"=":function(){let t=this._input[this.offset];return t===">"?(this.input(),this.tok.T_DOUBLE_ARROW):t==="="?this._input[this.offset+1]==="="?(this.consume(2),this.tok.T_IS_IDENTICAL):(this.input(),this.tok.T_IS_EQUAL):"="},"+":function(){let t=this._input[this.offset];return t==="+"?(this.input(),this.tok.T_INC):t==="="?(this.input(),this.tok.T_PLUS_EQUAL):"+"},"!":function(){return this._input[this.offset]==="="?this._input[this.offset+1]==="="?(this.consume(2),this.tok.T_IS_NOT_IDENTICAL):(this.input(),this.tok.T_IS_NOT_EQUAL):"!"},"?":function(){return this.version>=700&&this._input[this.offset]==="?"?this.version>=704&&this._input[this.offset+1]==="="?(this.consume(2),this.tok.T_COALESCE_EQUAL):(this.input(),this.tok.T_COALESCE):this.version>=800&&this._input[this.offset]==="-"&&this._input[this.offset+1]===">"?(this.consume(2),this.tok.T_NULLSAFE_OBJECT_OPERATOR):"?"},"<":function(){let t=this._input[this.offset];return t==="<"?(t=this._input[this.offset+1],t==="="?(this.consume(2),this.tok.T_SL_EQUAL):t==="<"&&this.is_HEREDOC()?this.tok.T_START_HEREDOC:(this.input(),this.tok.T_SL)):t==="="?(this.input(),this.version>=700&&this._input[this.offset]===">"?(this.input(),this.tok.T_SPACESHIP):this.tok.T_IS_SMALLER_OR_EQUAL):t===">"?(this.input(),this.tok.T_IS_NOT_EQUAL):"<"},">":function(){let t=this._input[this.offset];return t==="="?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):t===">"?(t=this._input[this.offset+1],t==="="?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR)):">"},"*":function(){let t=this._input[this.offset];return t==="="?(this.input(),this.tok.T_MUL_EQUAL):t==="*"?(this.input(),this._input[this.offset]==="="?(this.input(),this.tok.T_POW_EQUAL):this.tok.T_POW):"*"},".":function(){let t=this._input[this.offset];return t==="="?(this.input(),this.tok.T_CONCAT_EQUAL):t==="."&&this._input[this.offset+1]==="."?(this.consume(2),this.tok.T_ELLIPSIS):"."},"%":function(){return this._input[this.offset]==="="?(this.input(),this.tok.T_MOD_EQUAL):"%"},"&":function(){let t=this._input[this.offset];return t==="="?(this.input(),this.tok.T_AND_EQUAL):t==="&"?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){let t=this._input[this.offset];return t==="="?(this.input(),this.tok.T_OR_EQUAL):t==="|"?(this.input(),this.tok.T_BOOLEAN_OR):"|"},"^":function(){return this._input[this.offset]==="="?(this.input(),this.tok.T_XOR_EQUAL):"^"}}}});var Ns=a((ud,As)=>{"use strict";var Zf=";:,.\\[]()|^&+-/*=%!~$<>?@";As.exports={is_NUM:function(){let t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||t===95},is_NUM_START:function(){let t=this._input.charCodeAt(this.offset-1);return t>47&&t<58},is_LABEL:function(){let t=this._input.charCodeAt(this.offset-1);return t>96&&t<123||t>64&&t<91||t===95||t>47&&t<58||t>126},is_LABEL_START:function(){let t=this._input.charCodeAt(this.offset-1);return t>64&&t<91||t>96&&t<123||t===95||t>126},consume_LABEL:function(){for(;this.offset<this.size;){let t=this.input();if(!this.is_LABEL()){t&&this.unput(1);break}}return this},is_TOKEN:function(){let t=this._input[this.offset-1];return Zf.indexOf(t)!==-1},is_WHITESPACE:function(){let t=this._input[this.offset-1];return t===" "||t===" "||t===`
`||t==="\r"},is_TABSPACE:function(){let t=this._input[this.offset-1];return t===" "||t===" "},consume_TABSPACE:function(){for(;this.offset<this.size;){let t=this.input();if(!this.is_TABSPACE()){t&&this.unput(1);break}}return this},is_HEX:function(){let t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||t>64&&t<71||t>96&&t<103||t===95},is_OCTAL:function(){let t=this._input.charCodeAt(this.offset-1);return t>47&&t<56||t===95}}});var Cs=a((fd,Is)=>{"use strict";var w=function(t){this.engine=t,this.tok=this.engine.tokens.names,this.EOF=1,this.debug=!1,this.all_tokens=!0,this.comment_tokens=!1,this.mode_eval=!1,this.asp_tags=!1,this.short_tags=!1,this.version=801,this.yyprevcol=0,this.keywords={__class__:this.tok.T_CLASS_C,__trait__:this.tok.T_TRAIT_C,__function__:this.tok.T_FUNC_C,__method__:this.tok.T_METHOD_C,__line__:this.tok.T_LINE,__file__:this.tok.T_FILE,__dir__:this.tok.T_DIR,__namespace__:this.tok.T_NS_C,exit:this.tok.T_EXIT,die:this.tok.T_EXIT,function:this.tok.T_FUNCTION,const:this.tok.T_CONST,return:this.tok.T_RETURN,try:this.tok.T_TRY,catch:this.tok.T_CATCH,finally:this.tok.T_FINALLY,throw:this.tok.T_THROW,if:this.tok.T_IF,elseif:this.tok.T_ELSEIF,endif:this.tok.T_ENDIF,else:this.tok.T_ELSE,while:this.tok.T_WHILE,endwhile:this.tok.T_ENDWHILE,do:this.tok.T_DO,for:this.tok.T_FOR,endfor:this.tok.T_ENDFOR,foreach:this.tok.T_FOREACH,endforeach:this.tok.T_ENDFOREACH,declare:this.tok.T_DECLARE,enddeclare:this.tok.T_ENDDECLARE,instanceof:this.tok.T_INSTANCEOF,as:this.tok.T_AS,switch:this.tok.T_SWITCH,endswitch:this.tok.T_ENDSWITCH,case:this.tok.T_CASE,default:this.tok.T_DEFAULT,break:this.tok.T_BREAK,continue:this.tok.T_CONTINUE,goto:this.tok.T_GOTO,echo:this.tok.T_ECHO,print:this.tok.T_PRINT,class:this.tok.T_CLASS,interface:this.tok.T_INTERFACE,trait:this.tok.T_TRAIT,enum:this.tok.T_ENUM,extends:this.tok.T_EXTENDS,implements:this.tok.T_IMPLEMENTS,new:this.tok.T_NEW,clone:this.tok.T_CLONE,var:this.tok.T_VAR,eval:this.tok.T_EVAL,include:this.tok.T_INCLUDE,include_once:this.tok.T_INCLUDE_ONCE,require:this.tok.T_REQUIRE,require_once:this.tok.T_REQUIRE_ONCE,namespace:this.tok.T_NAMESPACE,use:this.tok.T_USE,insteadof:this.tok.T_INSTEADOF,global:this.tok.T_GLOBAL,isset:this.tok.T_ISSET,empty:this.tok.T_EMPTY,__halt_compiler:this.tok.T_HALT_COMPILER,static:this.tok.T_STATIC,abstract:this.tok.T_ABSTRACT,final:this.tok.T_FINAL,private:this.tok.T_PRIVATE,protected:this.tok.T_PROTECTED,public:this.tok.T_PUBLIC,unset:this.tok.T_UNSET,list:this.tok.T_LIST,array:this.tok.T_ARRAY,callable:this.tok.T_CALLABLE,or:this.tok.T_LOGICAL_OR,and:this.tok.T_LOGICAL_AND,xor:this.tok.T_LOGICAL_XOR,match:this.tok.T_MATCH,readonly:this.tok.T_READ_ONLY},this.castKeywords={int:this.tok.T_INT_CAST,integer:this.tok.T_INT_CAST,real:this.tok.T_DOUBLE_CAST,double:this.tok.T_DOUBLE_CAST,float:this.tok.T_DOUBLE_CAST,string:this.tok.T_STRING_CAST,binary:this.tok.T_STRING_CAST,array:this.tok.T_ARRAY_CAST,object:this.tok.T_OBJECT_CAST,bool:this.tok.T_BOOL_CAST,boolean:this.tok.T_BOOL_CAST,unset:this.tok.T_UNSET_CAST}};w.prototype.setInput=function(t){return this._input=t,this.size=t.length,this.yylineno=1,this.offset=0,this.yyprevcol=0,this.yytext="",this.yylloc={first_offset:0,first_line:1,first_column:0,prev_offset:0,prev_line:1,prev_column:0,last_line:1,last_column:0},this.tokens=[],this.version>703?this.keywords.fn=this.tok.T_FN:delete this.keywords.fn,this.done=this.offset>=this.size,!this.all_tokens&&this.mode_eval?(this.conditionStack=["INITIAL"],this.begin("ST_IN_SCRIPTING")):(this.conditionStack=[],this.begin("INITIAL")),this.heredoc_label={label:"",length:0,indentation:0,indentation_uses_spaces:!1,finished:!1,first_encaps_node:!1,toString:function(){this.label}},this};w.prototype.input=function(){let t=this._input[this.offset];return t?(this.yytext+=t,this.offset++,t==="\r"&&this._input[this.offset]===`
`&&(this.yytext+=`
`,this.offset++),t===`
`||t==="\r"?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++,t):""};w.prototype.unput=function(t){if(t===1)this.offset--,this._input[this.offset]===`
`&&this._input[this.offset-1]==="\r"&&(this.offset--,t++),this._input[this.offset]==="\r"||this._input[this.offset]===`
`?(this.yylloc.last_line--,this.yylineno--,this.yylloc.last_column=this.yyprevcol):this.yylloc.last_column--,this.yytext=this.yytext.substring(0,this.yytext.length-t);else if(t>0)if(this.offset-=t,t<this.yytext.length){this.yytext=this.yytext.substring(0,this.yytext.length-t),this.yylloc.last_line=this.yylloc.first_line,this.yylloc.last_column=this.yyprevcol=this.yylloc.first_column;for(let e=0;e<this.yytext.length;e++){let s=this.yytext[e];s==="\r"?(s=this.yytext[++e],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,s!==`
`&&(s==="\r"?this.yylloc.last_line++:this.yylloc.last_column++)):s===`
`?(this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0):this.yylloc.last_column++}this.yylineno=this.yylloc.last_line}else this.yytext="",this.yylloc.last_line=this.yylineno=this.yylloc.first_line,this.yylloc.last_column=this.yylloc.first_column;return this};w.prototype.tryMatch=function(t){return t===this.ahead(t.length)};w.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()};w.prototype.ahead=function(t){let e=this._input.substring(this.offset,this.offset+t);return e[e.length-1]==="\r"&&this._input[this.offset+t+1]===`
`&&(e+=`
`),e};w.prototype.consume=function(t){for(let e=0;e<t;e++){let s=this._input[this.offset];if(!s)break;this.yytext+=s,this.offset++,s==="\r"&&this._input[this.offset]===`
`&&(this.yytext+=`
`,this.offset++,e++),s===`
`||s==="\r"?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++}return this};w.prototype.getState=function(){return{yytext:this.yytext,offset:this.offset,yylineno:this.yylineno,yyprevcol:this.yyprevcol,yylloc:{first_offset:this.yylloc.first_offset,first_line:this.yylloc.first_line,first_column:this.yylloc.first_column,last_line:this.yylloc.last_line,last_column:this.yylloc.last_column},heredoc_label:this.heredoc_label}};w.prototype.setState=function(t){return this.yytext=t.yytext,this.offset=t.offset,this.yylineno=t.yylineno,this.yyprevcol=t.yyprevcol,this.yylloc=t.yylloc,t.heredoc_label&&(this.heredoc_label=t.heredoc_label),this};w.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this};w.prototype.lex=function(){this.yylloc.prev_offset=this.offset,this.yylloc.prev_line=this.yylloc.last_line,this.yylloc.prev_column=this.yylloc.last_column;let t=this.next()||this.lex();if(!this.all_tokens){for(;t===this.tok.T_WHITESPACE||!this.comment_tokens&&(t===this.tok.T_COMMENT||t===this.tok.T_DOC_COMMENT)||t===this.tok.T_OPEN_TAG;)t=this.next()||this.lex();if(t==this.tok.T_OPEN_TAG_WITH_ECHO)return this.tok.T_ECHO;if(t===this.tok.T_CLOSE_TAG)return";"}return this.yylloc.prev_offset||(this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column),t};w.prototype.begin=function(t){if(this.conditionStack.push(t),this.curCondition=t,this.stateCb=this["match"+t],typeof this.stateCb!="function")throw new Error('Undefined condition state "'+t+'"');return this};w.prototype.popState=function(){let e=this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0];if(this.curCondition=this.conditionStack[this.conditionStack.length-1],this.stateCb=this["match"+this.curCondition],typeof this.stateCb!="function")throw new Error('Undefined condition state "'+this.curCondition+'"');return e};w.prototype.next=function(){let t;if(this._input||(this.done=!0),this.yylloc.first_offset=this.offset,this.yylloc.first_line=this.yylloc.last_line,this.yylloc.first_column=this.yylloc.last_column,this.yytext="",this.done)return this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column,this.EOF;if(this.tokens.length>0?(t=this.tokens.shift(),typeof t[1]=="object"?this.setState(t[1]):this.consume(t[1]),t=t[0]):t=this.stateCb.apply(this,[]),this.offset>=this.size&&this.tokens.length===0&&(this.done=!0),this.debug){let e=t;typeof e=="number"?e=this.engine.tokens.values[e]:e='"'+e+'"';let s=new Error(e+" from "+this.yylloc.first_line+","+this.yylloc.first_column+" - to "+this.yylloc.last_line+","+this.yylloc.last_column+' "'+this.yytext+'"');console.error(s.stack)}return t};[rs(),hs(),ls(),fs(),ps(),ks(),ms(),Es(),Ns()].forEach(function(t){for(let e in t)w.prototype[e]=t[e]});Is.exports=w});var de=a((_d,Ls)=>{"use strict";var t_=function(t,e,s){this.line=t,this.column=e,this.offset=s};Ls.exports=t_});var bs=a((pd,gs)=>{"use strict";gs.exports={read_array:function(){let t=null,e=!1,s=this.node("array");this.token===this.tok.T_ARRAY?(this.next().expect("("),t=")"):(e=!0,t="]");let i=[];return this.next().token!==t&&(i=this.read_array_pair_list(e)),this.expect(t),this.next(),s(e,i)},read_array_pair_list:function(t){let e=this;return this.read_list(function(){return e.read_array_pair(t)},",",!0)},read_array_pair:function(t){if(!t&&this.token===")"||t&&this.token==="]")return;if(this.token===",")return this.node("noop")();let e=this.node("entry"),s=null,i=null,n=!1,r=!1;if(this.token==="&")this.next(),n=!0,i=this.read_variable(!0,!1);else if(this.token===this.tok.T_ELLIPSIS&&this.version>=704)this.next(),this.token==="&"&&this.error(),r=!0,i=this.read_expr();else{let o=this.read_expr();this.token===this.tok.T_DOUBLE_ARROW?(this.next(),s=o,this.token==="&"?(this.next(),n=!0,i=this.read_variable(!0,!1)):i=this.read_expr()):i=o}return e(s,i,n,r)}}});var Rs=a((dd,Ss)=>{"use strict";Ss.exports={read_class_declaration_statement:function(t){let e=this.node("class"),s=this.read_class_modifiers();if(this.token!==this.tok.T_CLASS)return this.error(this.tok.T_CLASS),this.next(),null;this.next().expect(this.tok.T_STRING);let i=this.node("identifier"),n=this.text();this.next(),i=i(n);let r=this.read_extends_from(),o=this.read_implements_list();this.expect("{");let h=this.next().read_class_body(!0,!1),l=e(i,r,o,h,s);return t&&(l.attrGroups=t),l},read_class_modifiers:function(){let t=this.read_class_modifier({readonly:0,final_or_abstract:0});return[0,0,t.final_or_abstract,t.readonly]},read_class_modifier:function(t){return this.token===this.tok.T_READ_ONLY?(this.next(),t.readonly=1,t=this.read_class_modifier(t)):t.final_or_abstract===0&&this.token===this.tok.T_ABSTRACT?(this.next(),t.final_or_abstract=1,t=this.read_class_modifier(t)):t.final_or_abstract===0&&this.token===this.tok.T_FINAL&&(this.next(),t.final_or_abstract=2,t=this.read_class_modifier(t)),t},read_class_body:function(t,e){let s=[],i=[];for(;this.token!==this.EOF&&this.token!=="}";){if(this.token===this.tok.T_COMMENT){s.push(this.read_comment());continue}if(this.token===this.tok.T_DOC_COMMENT){s.push(this.read_doc_comment());continue}if(this.token===this.tok.T_USE){s=s.concat(this.read_trait_use_statement());continue}if(e&&this.token===this.tok.T_CASE){let o=this.read_enum_case();this.expect(";")&&this.next(),s=s.concat(o);continue}this.token===this.tok.T_ATTRIBUTE&&(i=this.read_attr_list());let n=this.position(),r=this.read_member_flags(!1);if(this.token===this.tok.T_CONST){let o=this.read_constant_list(r,i);this.expect(";")&&this.next(),s=s.concat(o);continue}if(t&&this.token===this.tok.T_VAR&&(this.next().expect(this.tok.T_VARIABLE),r[0]=null,r[1]=0),this.token===this.tok.T_FUNCTION)s.push(this.read_function(!1,r,i,n)),i=[];else if(t&&(this.token===this.tok.T_VARIABLE||this.version>=801&&this.token===this.tok.T_READ_ONLY||this.version>=704&&(this.token==="?"||this.token===this.tok.T_ARRAY||this.token===this.tok.T_CALLABLE||this.token===this.tok.T_NAMESPACE||this.token===this.tok.T_NAME_FULLY_QUALIFIED||this.token===this.tok.T_NAME_QUALIFIED||this.token===this.tok.T_NAME_RELATIVE||this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_STRING))){let o=this.read_variable_list(r,i);i=[],this.expect(";"),this.next(),s=s.concat(o)}else this.error([this.tok.T_CONST,...t?[this.tok.T_VARIABLE]:[],...e?[this.tok.T_CASE]:[],this.tok.T_FUNCTION]),this.next()}return this.expect("}"),this.next(),s},read_variable_list:function(t,e){let s=this.node("propertystatement"),i=this.read_list(function(){let r=this.node("property"),o=!1;this.token===this.tok.T_READ_ONLY&&(o=!0,this.next());let[h,l]=this.read_optional_type();this.expect(this.tok.T_VARIABLE);let c=this.node("identifier"),_=this.text().substring(1);return this.next(),c=c(_),this.token===";"||this.token===","?r(c,null,o,h,l,e||[]):this.token==="="?r(c,this.next().read_expr(),o,h,l,e||[]):(this.expect([",",";","="]),r(c,null,h,l,e||[]))},",");return s(null,i,t)},read_constant_list:function(t,e){this.expect(this.tok.T_CONST)&&this.next();let s=this.node("classconstant"),i=this.read_list(function(){let r=this.node("constant"),o=null,h=null;if(this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){o=this.node("identifier");let l=this.text();this.next(),o=o(l)}else this.expect("IDENTIFIER");return this.expect("=")&&(h=this.next().read_expr()),r(o,h)},",");return s(null,i,t,e||[])},read_member_flags:function(t){let e=[-1,-1,-1];if(this.is("T_MEMBER_FLAGS")){let s=0,i=0;do{switch(this.token){case this.tok.T_PUBLIC:s=0,i=0;break;case this.tok.T_PROTECTED:s=0,i=1;break;case this.tok.T_PRIVATE:s=0,i=2;break;case this.tok.T_STATIC:s=1,i=1;break;case this.tok.T_ABSTRACT:s=2,i=1;break;case this.tok.T_FINAL:s=2,i=2;break}t&&(s==0&&i==2?(this.expect([this.tok.T_PUBLIC,this.tok.T_PROTECTED]),i=-1):s==2&&i==1&&(this.error(),i=-1)),e[s]!==-1?this.error():i!==-1&&(e[s]=i)}while(this.next().is("T_MEMBER_FLAGS"))}return e[1]==-1&&(e[1]=0),e[2]==-1&&(e[2]=0),e},read_optional_type:function(){let t=!1;this.token==="?"&&(t=!0,this.next());let e=this.read_types();if(t&&!e&&this.raiseError("Expecting a type definition combined with nullable operator"),!t&&!e)return[!1,null];if(this.token==="|"){e=[e];do{this.next();let s=this.read_type();if(!s){this.raiseError("Expecting a type definition");break}e.push(s)}while(this.token==="|")}return[t,e]},read_interface_declaration_statement:function(t){let e=this.node("interface");if(this.token!==this.tok.T_INTERFACE)return this.error(this.tok.T_INTERFACE),this.next(),null;this.next().expect(this.tok.T_STRING);let s=this.node("identifier"),i=this.text();this.next(),s=s(i);let n=this.read_interface_extends_list();this.expect("{");let r=this.next().read_interface_body();return e(s,n,r,t||[])},read_interface_body:function(){let t=[],e=[];for(;this.token!==this.EOF&&this.token!=="}";){if(this.token===this.tok.T_COMMENT){t.push(this.read_comment());continue}if(this.token===this.tok.T_DOC_COMMENT){t.push(this.read_doc_comment());continue}let s=this.position();e=this.read_attr_list();let i=this.read_member_flags(!0);if(this.token==this.tok.T_CONST){let n=this.read_constant_list(i,e);this.expect(";")&&this.next(),t=t.concat(n),e=[]}else if(this.token===this.tok.T_FUNCTION){let n=this.read_function_declaration(2,i,e,s);n.parseFlags(i),t.push(n),this.expect(";")&&this.next(),e=[]}else this.error([this.tok.T_CONST,this.tok.T_FUNCTION]),this.next()}return this.expect("}")&&this.next(),t},read_trait_declaration_statement:function(){let t=this.node("trait");if(this.token!==this.tok.T_TRAIT)return this.error(this.tok.T_TRAIT),this.next(),null;this.next().expect(this.tok.T_STRING);let e=this.node("identifier"),s=this.text();this.next(),e=e(s),this.expect("{");let i=this.next().read_class_body(!0,!1);return t(e,i)},read_trait_use_statement:function(){let t=this.node("traituse");this.expect(this.tok.T_USE)&&this.next();let e=[this.read_namespace_name()],s=null;for(;this.token===",";)e.push(this.next().read_namespace_name());if(this.token==="{"){for(s=[];this.next().token!==this.EOF&&this.token!=="}";)s.push(this.read_trait_use_alias()),this.expect(";");this.expect("}")&&this.next()}else this.expect(";")&&this.next();return t(e,s)},read_trait_use_alias:function(){let t=this.node(),e=null,s;if(this.is("IDENTIFIER")){s=this.node("identifier");let i=this.text();this.next(),s=s(i)}else if(s=this.read_namespace_name(),this.token===this.tok.T_DOUBLE_COLON)if(this.next(),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){e=s,s=this.node("identifier");let i=this.text();this.next(),s=s(i)}else this.expect(this.tok.T_STRING);else s=s.name;if(this.token===this.tok.T_INSTEADOF)return t("traitprecedence",e,s,this.next().read_name_list());if(this.token===this.tok.T_AS){let i=null,n=null;if(this.next().is("T_MEMBER_FLAGS")&&(i=this.read_member_flags()),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){n=this.node("identifier");let r=this.text();this.next(),n=n(r)}else i===!1&&this.expect(this.tok.T_STRING);return t("traitalias",e,s,n,i)}return this.expect([this.tok.T_AS,this.tok.T_INSTEADOF]),t("traitalias",e,s,null,null)}}});var vs=a((kd,Os)=>{"use strict";Os.exports={read_comment:function(){let t=this.text(),e=this.ast.prepare(t.substring(0,2)==="/*"?"commentblock":"commentline",null,this),s=this.lexer.yylloc.first_offset,i=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),e=e(t),e.offset=s,this.prev=i,e},read_doc_comment:function(){let t=this.ast.prepare("commentblock",null,this),e=this.lexer.yylloc.first_offset,s=this.text(),i=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),t=t(s),t.offset=e,this.prev=i,t}}});var Ps=a((Td,Ds)=>{"use strict";Ds.exports={read_expr:function(t){let e=this.node();if(this.token==="@")return t||(t=this.next().read_expr()),e("silent",t);if(t||(t=this.read_expr_item()),this.token==="|")return e("bin","|",t,this.next().read_expr());if(this.token==="&")return e("bin","&",t,this.next().read_expr());if(this.token==="^")return e("bin","^",t,this.next().read_expr());if(this.token===".")return e("bin",".",t,this.next().read_expr());if(this.token==="+")return e("bin","+",t,this.next().read_expr());if(this.token==="-")return e("bin","-",t,this.next().read_expr());if(this.token==="*")return e("bin","*",t,this.next().read_expr());if(this.token==="/")return e("bin","/",t,this.next().read_expr());if(this.token==="%")return e("bin","%",t,this.next().read_expr());if(this.token===this.tok.T_POW)return e("bin","**",t,this.next().read_expr());if(this.token===this.tok.T_SL)return e("bin","<<",t,this.next().read_expr());if(this.token===this.tok.T_SR)return e("bin",">>",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_OR)return e("bin","||",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_OR)return e("bin","or",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_AND)return e("bin","&&",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_AND)return e("bin","and",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_XOR)return e("bin","xor",t,this.next().read_expr());if(this.token===this.tok.T_IS_IDENTICAL)return e("bin","===",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_IDENTICAL)return e("bin","!==",t,this.next().read_expr());if(this.token===this.tok.T_IS_EQUAL)return e("bin","==",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_EQUAL)return e("bin","!=",t,this.next().read_expr());if(this.token==="<")return e("bin","<",t,this.next().read_expr());if(this.token===">")return e("bin",">",t,this.next().read_expr());if(this.token===this.tok.T_IS_SMALLER_OR_EQUAL)return e("bin","<=",t,this.next().read_expr());if(this.token===this.tok.T_IS_GREATER_OR_EQUAL)return e("bin",">=",t,this.next().read_expr());if(this.token===this.tok.T_SPACESHIP)return e("bin","<=>",t,this.next().read_expr());if(this.token===this.tok.T_INSTANCEOF&&(t=e("bin","instanceof",t,this.next().read_class_name_reference()),this.token!==";"&&this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF&&(t=this.read_expr(t))),this.token===this.tok.T_COALESCE)return e("bin","??",t,this.next().read_expr());if(this.token==="?"){let s=null;return this.next().token!==":"&&(s=this.read_expr()),this.expect(":")&&this.next(),e("retif",t,s,this.read_expr())}else e.destroy(t);return t},read_expr_cast:function(t){return this.node("cast")(t,this.text(),this.next().read_expr())},read_isset_variable:function(){return this.read_expr()},read_isset_variables:function(){return this.read_function_list(this.read_isset_variable,",")},read_internal_functions_in_yacc:function(){let t=null;switch(this.token){case this.tok.T_ISSET:{t=this.node("isset"),this.next().expect("(")&&this.next();let e=this.read_isset_variables();this.expect(")")&&this.next(),t=t(e)}break;case this.tok.T_EMPTY:{t=this.node("empty"),this.next().expect("(")&&this.next();let e=this.read_expr();this.expect(")")&&this.next(),t=t(e)}break;case this.tok.T_INCLUDE:t=this.node("include")(!1,!1,this.next().read_expr());break;case this.tok.T_INCLUDE_ONCE:t=this.node("include")(!0,!1,this.next().read_expr());break;case this.tok.T_EVAL:{t=this.node("eval"),this.next().expect("(")&&this.next();let e=this.read_expr();this.expect(")")&&this.next(),t=t(e)}break;case this.tok.T_REQUIRE:t=this.node("include")(!1,!0,this.next().read_expr());break;case this.tok.T_REQUIRE_ONCE:t=this.node("include")(!0,!0,this.next().read_expr());break}return t},read_optional_expr:function(t){return this.token!==t?this.read_expr():null},read_exit_expr:function(){let t=null;return this.token==="("&&(this.next(),t=this.read_optional_expr(")"),this.expect(")")&&this.next()),t},read_expr_item:function(){let t,e,s=[];if(this.token==="+")return this.node("unary")("+",this.next().read_expr());if(this.token==="-")return this.node("unary")("-",this.next().read_expr());if(this.token==="!")return this.node("unary")("!",this.next().read_expr());if(this.token==="~")return this.node("unary")("~",this.next().read_expr());if(this.token==="(")return e=this.next().read_expr(),e.parenthesizedExpression=!0,this.expect(")")&&this.next(),this.handleDereferencable(e);if(this.token==="`")return this.read_encapsed_string("`");if(this.token===this.tok.T_LIST){let i=null,n=this.innerList;t=this.node("list"),n||(i=this.node("assign")),this.next().expect("(")&&this.next(),this.innerList||(this.innerList=!0);let r=this.read_array_pair_list(!1);this.expect(")")&&this.next();let o=!1;for(let h=0;h<r.length;h++)if(r[h]!==null&&r[h].kind!=="noop"){o=!0;break}return o||this.raiseError("Fatal Error : Cannot use empty list on line "+this.lexer.yylloc.first_line),n?t(r,!1):(this.innerList=!1,this.expect("=")?i(t(r,!1),this.next().read_expr(),"="):t(r,!1))}if(this.token===this.tok.T_ATTRIBUTE&&(s=this.read_attr_list()),this.token===this.tok.T_CLONE)return this.node("clone")(this.next().read_expr());switch(this.token){case this.tok.T_INC:return this.node("pre")("+",this.next().read_variable(!1,!1));case this.tok.T_DEC:return this.node("pre")("-",this.next().read_variable(!1,!1));case this.tok.T_NEW:return this.read_new_expr();case this.tok.T_ISSET:case this.tok.T_EMPTY:case this.tok.T_INCLUDE:case this.tok.T_INCLUDE_ONCE:case this.tok.T_EVAL:case this.tok.T_REQUIRE:case this.tok.T_REQUIRE_ONCE:return this.read_internal_functions_in_yacc();case this.tok.T_MATCH:return this.read_match_expression();case this.tok.T_INT_CAST:return this.read_expr_cast("int");case this.tok.T_DOUBLE_CAST:return this.read_expr_cast("float");case this.tok.T_STRING_CAST:return this.read_expr_cast(this.text().indexOf("binary")!==-1?"binary":"string");case this.tok.T_ARRAY_CAST:return this.read_expr_cast("array");case this.tok.T_OBJECT_CAST:return this.read_expr_cast("object");case this.tok.T_BOOL_CAST:return this.read_expr_cast("bool");case this.tok.T_UNSET_CAST:return this.read_expr_cast("unset");case this.tok.T_THROW:{this.version<800&&this.raiseError("PHP 8+ is required to use throw as an expression");let i=this.node("throw"),n=this.next().read_expr();return i(n)}case this.tok.T_EXIT:{let i=this.lexer.yytext.toLowerCase()==="die";t=this.node("exit"),this.next();let n=this.read_exit_expr();return t(n,i)}case this.tok.T_PRINT:return this.node("print")(this.next().read_expr());case this.tok.T_YIELD:{let i=null,n=null;return t=this.node("yield"),this.next().is("EXPR")&&(i=this.read_expr(),this.token===this.tok.T_DOUBLE_ARROW&&(n=i,i=this.next().read_expr())),t(i,n)}case this.tok.T_YIELD_FROM:return t=this.node("yieldfrom"),e=this.next().read_expr(),t(e);case this.tok.T_FN:case this.tok.T_FUNCTION:return this.read_inline_function(void 0,s);case this.tok.T_STATIC:{let i=[this.token,this.lexer.getState()];if(this.next(),this.token===this.tok.T_FUNCTION||this.version>=704&&this.token===this.tok.T_FN)return this.read_inline_function([0,1,0],s);this.lexer.tokens.push(i),this.next()}}if(this.is("VARIABLE")){t=this.node(),e=this.read_variable(!1,!1);let i=e.kind==="identifier"||e.kind==="staticlookup"&&e.offset.kind==="identifier";switch(this.token){case"=":return i&&this.error("VARIABLE"),this.next().token=="&"?this.read_assignref(t,e):t("assign",e,this.read_expr(),"=");case this.tok.T_PLUS_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"+=");case this.tok.T_MINUS_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"-=");case this.tok.T_MUL_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"*=");case this.tok.T_POW_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"**=");case this.tok.T_DIV_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"/=");case this.tok.T_CONCAT_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),".=");case this.tok.T_MOD_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"%=");case this.tok.T_AND_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"&=");case this.tok.T_OR_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"|=");case this.tok.T_XOR_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"^=");case this.tok.T_SL_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"<<=");case this.tok.T_SR_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),">>=");case this.tok.T_COALESCE_EQUAL:return i&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"??=");case this.tok.T_INC:return i&&this.error("VARIABLE"),this.next(),t("post","+",e);case this.tok.T_DEC:return i&&this.error("VARIABLE"),this.next(),t("post","-",e);default:t.destroy(e)}}else if(this.is("SCALAR")){if(t=this.node(),e=this.read_scalar(),e.kind==="array"&&e.shortForm&&this.token==="="){let i=this.convertToList(e);e.loc&&(i.loc=e.loc);let n=this.next().read_expr();return t("assign",i,n,"=")}else t.destroy(e);return this.handleDereferencable(e)}else this.error("EXPR"),this.next();return e},convertToList:function(t){let e=t.items.map(i=>(i.value&&i.value.kind==="array"&&i.value.shortForm&&(i.value=this.convertToList(i.value)),i)),s=this.node("list")(e,!0);return t.loc&&(s.loc=t.loc),t.leadingComments&&(s.leadingComments=t.leadingComments),t.trailingComments&&(s.trailingComments=t.trailingComments),s},read_assignref:function(t,e){this.next();let s;return this.token===this.tok.T_NEW?(this.version>=700&&this.error(),s=this.read_new_expr()):s=this.read_variable(!1,!1),t("assignref",e,s)},read_inline_function:function(t,e){if(this.token===this.tok.T_FUNCTION){let c=this.read_function(!0,t,e);return c.attrGroups=e,c}!this.version>=704&&this.raiseError("Arrow Func