-
Notifications
You must be signed in to change notification settings - Fork 31
/
2941.30125e30.iframe.bundle.js
292 lines (259 loc) · 203 KB
/
2941.30125e30.iframe.bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[2941],{"./node_modules/@metamask/controller-utils/dist/siwe.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PW:()=>isValidSIWEOrigin}),__webpack_require__("./node_modules/@spruceid/siwe-parser/dist/parsers.js");var logging=__webpack_require__("./node_modules/@metamask/utils/dist/logging.mjs");let projectLogger=(0,logging.u)("controller-utils");__webpack_require__("./node_modules/buffer/index.js").Buffer;let log=(0,logging.X)(projectLogger,"detect-siwe"),DEFAULT_PORTS_BY_PROTOCOL={"http:":"80","https:":"443"},parseDomainParts=(domain,originProtocol)=>new URL(domain.match(/^[^/:]*:\/\//u)?domain:`${originProtocol}//${domain}`),isValidSIWEOrigin=req=>{try{let{origin,siwe}=req;if(!origin||!siwe?.parsedMessage?.domain)return!1;let originParts=new URL(origin),domainParts=parseDomainParts(siwe.parsedMessage.domain,originParts.protocol);if(0!==domainParts.hostname.localeCompare(originParts.hostname,void 0,{sensitivity:"accent"}))return!1;if(""!==domainParts.port&&domainParts.port!==originParts.port)return""===originParts.port&&domainParts.port===DEFAULT_PORTS_BY_PROTOCOL[originParts.protocol];if(""!==domainParts.username&&domainParts.username!==originParts.username)return!1;return!0}catch(e){return log(e),!1}}},"./node_modules/@metamask/transaction-controller/dist/constants.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{tx:()=>CHAIN_IDS});let CHAIN_IDS={MAINNET:"0x1",GOERLI:"0x5",BASE:"0x2105",BASE_TESTNET:"0x14a33",BSC:"0x38",BSC_TESTNET:"0x61",OPTIMISM:"0xa",OPTIMISM_TESTNET:"0x1a4",OPBNB:"0xcc",OPBNB_TESTNET:"0x15eb",OPTIMISM_SEPOLIA:"0xaa37dc",POLYGON:"0x89",POLYGON_TESTNET:"0x13881",AVALANCHE:"0xa86a",AVALANCHE_TESTNET:"0xa869",FANTOM:"0xfa",FANTOM_TESTNET:"0xfa2",SEPOLIA:"0xaa36a7",LINEA_GOERLI:"0xe704",LINEA_SEPOLIA:"0xe705",LINEA_MAINNET:"0xe708",MOONBEAM:"0x504",MOONBEAM_TESTNET:"0x507",MOONRIVER:"0x505",GNOSIS:"0x64",ARBITRUM:"0xa4b1",ZKSYNC_ERA:"0x144",ZORA:"0x76adf1",SCROLL:"0x82750",SCROLL_SEPOLIA:"0x8274f"};CHAIN_IDS.GOERLI,CHAIN_IDS.MAINNET,CHAIN_IDS.SEPOLIA,CHAIN_IDS.LINEA_GOERLI,CHAIN_IDS.LINEA_SEPOLIA,CHAIN_IDS.LINEA_MAINNET,CHAIN_IDS.BSC,CHAIN_IDS.BSC_TESTNET,CHAIN_IDS.OPTIMISM,CHAIN_IDS.OPTIMISM_SEPOLIA,CHAIN_IDS.POLYGON,CHAIN_IDS.POLYGON_TESTNET,CHAIN_IDS.AVALANCHE,CHAIN_IDS.AVALANCHE_TESTNET,CHAIN_IDS.FANTOM,CHAIN_IDS.FANTOM_TESTNET,CHAIN_IDS.MOONBEAM,CHAIN_IDS.MOONBEAM_TESTNET,CHAIN_IDS.MOONRIVER,CHAIN_IDS.GNOSIS,CHAIN_IDS.OPTIMISM,CHAIN_IDS.OPTIMISM_SEPOLIA},"./node_modules/@spruceid/siwe-parser/dist/abnf.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ParsedMessage=void 0;let api_1=__importDefault(__webpack_require__("./node_modules/apg-js/src/apg-api/api.js")),node_exports_1=__importDefault(__webpack_require__("./node_modules/apg-js/src/apg-lib/node-exports.js")),utils_1=__webpack_require__("./node_modules/@spruceid/siwe-parser/dist/utils.js"),GRAMMAR=`
sign-in-with-ethereum =
[ scheme "://" ] domain %s" wants you to sign in with your Ethereum account:" LF
address LF
LF
[ statement LF ]
LF
%s"URI: " URI LF
%s"Version: " version LF
%s"Chain ID: " chain-id LF
%s"Nonce: " nonce LF
%s"Issued At: " issued-at
[ LF %s"Expiration Time: " expiration-time ]
[ LF %s"Not Before: " not-before ]
[ LF %s"Request ID: " request-id ]
[ LF %s"Resources:"
resources ]
domain = authority
address = "0x" 40*40HEXDIG
; Must also conform to captilization
; checksum encoding specified in EIP-55
; where applicable (EOAs).
statement = 1*( reserved / unreserved / " " )
; The purpose is to exclude LF (line breaks).
version = "1"
nonce = 8*( ALPHA / DIGIT )
issued-at = date-time
expiration-time = date-time
not-before = date-time
request-id = *pchar
chain-id = 1*DIGIT
; See EIP-155 for valid CHAIN_IDs.
resources = *( LF resource )
resource = "- " URI
; ------------------------------------------------------------------------------
; RFC 3986
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
hier-part = "//" authority path-abempty
/ path-absolute
/ path-rootless
/ path-empty
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
authority = [ userinfo "@" ] host [ ":" port ]
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
host = IP-literal / IPv4address / reg-name
port = *DIGIT
IP-literal = "[" ( IPv6address / IPvFuture ) "]"
IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
IPv6address = 6( h16 ":" ) ls32
/ "::" 5( h16 ":" ) ls32
/ [ h16 ] "::" 4( h16 ":" ) ls32
/ [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
/ [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
/ [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
/ [ *4( h16 ":" ) h16 ] "::" ls32
/ [ *5( h16 ":" ) h16 ] "::" h16
/ [ *6( h16 ":" ) h16 ] "::"
h16 = 1*4HEXDIG
ls32 = ( h16 ":" h16 ) / IPv4address
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9
/ %x31-39 DIGIT ; 10-99
/ "1" 2DIGIT ; 100-199
/ "2" %x30-34 DIGIT ; 200-249
/ "25" %x30-35 ; 250-255
reg-name = *( unreserved / pct-encoded / sub-delims )
path-abempty = *( "/" segment )
path-absolute = "/" [ segment-nz *( "/" segment ) ]
path-rootless = segment-nz *( "/" segment )
path-empty = 0pchar
segment = *pchar
segment-nz = 1*pchar
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
query = *( pchar / "/" / "?" )
fragment = *( pchar / "/" / "?" )
pct-encoded = "%" HEXDIG HEXDIG
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
; ------------------------------------------------------------------------------
; RFC 3339
date-fullyear = 4DIGIT
date-month = 2DIGIT ; 01-12
date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
; month/year
time-hour = 2DIGIT ; 00-23
time-minute = 2DIGIT ; 00-59
time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second
; rules
time-secfrac = "." 1*DIGIT
time-numoffset = ("+" / "-") time-hour ":" time-minute
time-offset = "Z" / time-numoffset
partial-time = time-hour ":" time-minute ":" time-second
[time-secfrac]
full-date = date-fullyear "-" date-month "-" date-mday
full-time = partial-time time-offset
date-time = full-date "T" full-time
; ------------------------------------------------------------------------------
; RFC 5234
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
LF = %x0A
; linefeed
DIGIT = %x30-39
; 0-9
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
`;class GrammarApi{static generateApi(){let api=new api_1.default(GRAMMAR);if(api.generate(),api.errors.length)throw console.error(api.errorsToAscii()),console.error(api.linesToAscii()),console.log(api.displayAttributeErrors()),Error("ABNF grammar has errors");return api.toObject()}}GrammarApi.grammarObj=GrammarApi.generateApi(),exports.ParsedMessage=class{constructor(msg){let parser=new node_exports_1.default.parser;parser.ast=new node_exports_1.default.ast;let id=node_exports_1.default.ids;parser.ast.callbacks.scheme=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&0===phraseIndex&&(data.scheme=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks.domain=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.domain=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks.address=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.address=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks.statement=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.statement=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks.uri=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state!==id.SEM_PRE||data.uri||(data.uri=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks.version=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.version=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks["chain-id"]=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.chainId=(0,utils_1.parseIntegerNumber)(node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength))),ret},parser.ast.callbacks.nonce=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.nonce=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks["issued-at"]=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.issuedAt=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks["expiration-time"]=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.expirationTime=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks["not-before"]=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.notBefore=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks["request-id"]=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.requestId=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength)),ret},parser.ast.callbacks.resources=function(state,chars,phraseIndex,phraseLength,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.resources=node_exports_1.default.utils.charsToString(chars,phraseIndex,phraseLength).slice(3).split("\n- ")),ret};let result=parser.parse(GrammarApi.grammarObj,"sign-in-with-ethereum",msg);if(!result.success)throw Error(`Invalid message: ${JSON.stringify(result)}`);let elements={};for(let[key,value]of(parser.ast.translate(elements),Object.entries(elements)))this[key]=value;if(0===this.domain.length)throw Error("Domain cannot be empty.")}}},"./node_modules/@spruceid/siwe-parser/dist/parsers.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable))&&(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ParsedMessage=void 0;let abnf_1=__webpack_require__("./node_modules/@spruceid/siwe-parser/dist/abnf.js");Object.defineProperty(exports,"ParsedMessage",{enumerable:!0,get:function(){return abnf_1.ParsedMessage}}),__exportStar(__webpack_require__("./node_modules/@spruceid/siwe-parser/dist/utils.js"),exports)},"./node_modules/@spruceid/siwe-parser/dist/utils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseIntegerNumber=exports.isEIP55Address=void 0;let sha3_1=__webpack_require__("./node_modules/@noble/hashes/sha3.js"),utils_1=__webpack_require__("./node_modules/@noble/hashes/utils.js");exports.isEIP55Address=address=>{if(42!=address.length)return!1;let lowerAddress=`${address}`.toLowerCase().replace("0x",""),hash=(0,utils_1.bytesToHex)((0,sha3_1.keccak_256)(lowerAddress)),ret="0x";for(let i=0;i<lowerAddress.length;i++)parseInt(hash[i],16)>=8?ret+=lowerAddress[i].toUpperCase():ret+=lowerAddress[i];return address===ret},exports.parseIntegerNumber=number=>{let parsed=parseInt(number);if(isNaN(parsed)||parsed===1/0)throw Error("Invalid number.");return parsed}},"./node_modules/apg-js/src/apg-api/api.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function api(src){let lineMap;let{Buffer}=__webpack_require__("./node_modules/buffer/index.js"),thisFileName="api.js: ",thisObject=this,apglib=__webpack_require__("./node_modules/apg-js/src/apg-lib/node-exports.js"),converter=__webpack_require__("./node_modules/apg-js/src/apg-conv-api/converter.js"),scanner=__webpack_require__("./node_modules/apg-js/src/apg-api/scanner.js"),parser=new(__webpack_require__("./node_modules/apg-js/src/apg-api/parser.js")),{attributes,showAttributes,showAttributeErrors,showRuleDependencies}=__webpack_require__("./node_modules/apg-js/src/apg-api/attributes.js"),showRules=__webpack_require__("./node_modules/apg-js/src/apg-api/show-rules.js"),abnfToHtml=function abnfToHtml(chars,beg,len){let end;let CONTROL_BEG=`<span class="${apglib.style.CLASS_CTRLCHAR}">`,CONTROL_END="</span>",INVALID_BEG=`<span class="${apglib.style.CLASS_NOMATCH}">`,INVALID_END="</span>",html="";for(;Array.isArray(chars)&&0!==chars.length;){if("number"!=typeof beg)throw Error("abnfToHtml: beg must be type number");if(beg>=chars.length)break;end="number"!=typeof len||beg+len>=chars.length?chars.length:beg+len;let state=0;for(let i=beg;i<end;i+=1){let ch=chars[i];if(ch>=32&&ch<=126)switch(1===state?(html+=CONTROL_END,state=0):2===state&&(html+=INVALID_END,state=0),ch){case 32:html+=" ";break;case 60:html+="<";break;case 62:html+=">";break;case 38:html+="&";break;case 34:html+=""";break;case 39:html+="'";break;case 92:html+="\";break;default:html+=String.fromCharCode(ch)}else 9===ch||10===ch||13===ch?(0===state?(html+=CONTROL_BEG,state=1):2===state&&(html+=INVALID_END+CONTROL_BEG,state=1),9===ch&&(html+="TAB"),10===ch&&(html+="LF"),13===ch&&(html+="CR")):(0===state?(html+=INVALID_BEG,state=2):1===state&&(html+=CONTROL_END+INVALID_BEG,state=2),html+=`\\x${apglib.utils.charToHex(ch)}`)}2===state&&(html+=INVALID_END),1===state&&(html+=CONTROL_END);break}return html},abnfToAscii=function abnfToAscii(chars,beg,len){let str="";for(let i=beg;i<beg+len;i+=1){let ch=chars[i];if(ch>=32&&ch<=126)str+=String.fromCharCode(ch);else switch(ch){case 9:str+="\\t";break;case 10:str+="\\n";break;case 13:str+="\\r";break;default:str+="\\unknown"}}return str},linesToAscii=function linesToAscii(lines){let str="Annotated Input Grammar";return lines.forEach(val=>{str+=`
line no: ${val.lineNo} : char index: ${val.beginChar} : length: ${val.length} : abnf: ${abnfToAscii(thisObject.chars,val.beginChar,val.length)}`}),str+="\n"},linesToHtml=function linesToHtml(lines){let html="";return html+=`<table class="${apglib.style.CLASS_GRAMMAR}">
<caption>Annotated Input Grammar</caption>
<tr><th>line<br>no.</th><th>first<br>char</th><th><br>length</th><th><br>text</th></tr>
`,lines.forEach(val=>{html+=`<tr><td>${val.lineNo}</td><td>${val.beginChar}</td><td>${val.length}</td><td>${abnfToHtml(thisObject.chars,val.beginChar,val.length)}</td></tr>
`}),html+="</table>\n"},errorsToHtml=function errorsToHtml(errors,lines,chars,title){let[style]=apglib,html="",errorArrow=`<span class="${style.CLASS_NOMATCH}">»</span>`;return html+=`<p><table class="${style.CLASS_GRAMMAR}">
`,title&&"string"==typeof title&&(html+=`<caption>${title}</caption>
`),html+="<tr><th>line<br>no.</th><th>line<br>offset</th><th>error<br>offset</th><th><br>text</th></tr>\n",errors.forEach(val=>{let line,relchar,beg,end,text;let prefix="",suffix="";0===lines.length?(text=errorArrow,relchar=0):(beg=(line=lines[val.line]).beginChar,val.char>beg&&(prefix=abnfToHtml(chars,beg,val.char-beg)),(beg=val.char)<(end=line.beginChar+line.length)&&(suffix=abnfToHtml(chars,beg,end-beg)),text=prefix+errorArrow+suffix,relchar=val.char-line.beginChar,html+=`<tr><td>${val.line}</td><td>${line.beginChar}</td><td>${relchar}</td><td>${text}</td></tr>
<tr><td colspan="3"></td><td>↑: ${apglib.utils.stringToAsciiHtml(val.msg)}</td></tr>
`)}),html+="</table></p>\n"},errorsToAscii=function errorsToAscii(errors,lines,chars){let str,line,beg,len;return str="",errors.forEach(error=>{line=lines[error.line],str+=`${line.lineNo}: ${line.beginChar}: ${error.char-line.beginChar}: `,beg=line.beginChar,len=error.char-line.beginChar,str+=abnfToAscii(chars,beg,len)+" >> ",beg=error.char,len=line.beginChar+line.length-error.char,str+=abnfToAscii(chars,beg,len)+"\n"+`${line.lineNo}: `+`${line.beginChar}: `+`${error.char-line.beginChar}: `+"error: "+error.msg+"\n"}),str},isScanned=!1,isParsed=!1,isTranslated=!1,haveAttributes=!1,attributeErrors=0;if(this.errors=[],Buffer.isBuffer(src))this.chars=converter.decode("BINARY",src);else if(Array.isArray(src))this.chars=src.slice();else if("string"==typeof src)this.chars=converter.decode("STRING",src);else throw Error(`${thisFileName}input source is not a string, byte Buffer or character array`);this.sabnf=converter.encode("STRING",this.chars),this.scan=function scan(strict,trace){this.lines=scanner(this.chars,this.errors,strict,trace),isScanned=!0},this.parse=function parse(strict,lite,trace){if(!isScanned)throw Error(`${thisFileName}grammar not scanned`);parser.syntax(this.chars,this.lines,this.errors,strict,lite,trace),isParsed=!0},this.translate=function translate(){if(!isParsed)throw Error(`${thisFileName}grammar not scanned and parsed`);let ret=parser.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=ret.rules,this.udts=ret.udts,lineMap=ret.lineMap,isTranslated=!0)},this.attributes=function attrs(){if(!isTranslated)throw Error(`${thisFileName}grammar not scanned, parsed and translated`);return attributeErrors=attributes(this.rules,this.udts,lineMap,this.errors),haveAttributes=!0,attributeErrors},this.generate=function generate(strict){if(this.lines=scanner(this.chars,this.errors,strict),this.errors.length||(parser.syntax(this.chars,this.lines,this.errors,strict),this.errors.length))return;let ret=parser.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=ret.rules,this.udts=ret.udts,lineMap=ret.lineMap,attributeErrors=attributes(this.rules,this.udts,lineMap,this.errors),haveAttributes=!0)},this.displayRules=function displayRules(order="index"){if(!isTranslated)throw Error(`${thisFileName}grammar not scanned, parsed and translated`);return showRules(this.rules,this.udts,order)},this.displayRuleDependencies=function displayRuleDependencies(order="index"){if(!haveAttributes)throw Error(`${thisFileName}no attributes - must be preceeded by call to attributes()`);return showRuleDependencies(order)},this.displayAttributes=function displayAttributes(order="index"){if(!haveAttributes)throw Error(`${thisFileName}no attributes - must be preceeded by call to attributes()`);return attributeErrors&&showAttributeErrors(order),showAttributes(order)},this.displayAttributeErrors=function displayAttributeErrors(){if(!haveAttributes)throw Error(`${thisFileName}no attributes - must be preceeded by call to attributes()`);return showAttributeErrors()},this.toSource=function toSource(config){if(!haveAttributes)throw Error(`${thisFileName}can't generate parser source - must be preceeded by call to attributes()`);if(attributeErrors)throw Error(`${thisFileName}can't generate parser source - attributes have ${attributeErrors} errors`);return parser.generateSource(this.chars,this.lines,this.rules,this.udts,config)},this.toObject=function toObject(){if(!haveAttributes)throw Error(`${thisFileName}can't generate parser source - must be preceeded by call to attributes()`);if(attributeErrors)throw Error(`${thisFileName}can't generate parser source - attributes have ${attributeErrors} errors`);return parser.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function errorsToAsciiFunc(){return errorsToAscii(this.errors,this.lines,this.chars)},this.errorsToHtml=function errorsToHtmlFunc(title){return errorsToHtml(this.errors,this.lines,this.chars,title)},this.linesToAscii=function linesToAsciiFunc(){return linesToAscii(this.lines)},this.linesToHtml=function linesToHtmlFunc(){return linesToHtml(this.lines)}}},"./node_modules/apg-js/src/apg-api/attributes.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exportAttributes(){let id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),{ruleAttributes,showAttributes,showAttributeErrors}=__webpack_require__("./node_modules/apg-js/src/apg-api/rule-attributes.js"),{ruleDependencies,showRuleDependencies}=__webpack_require__("./node_modules/apg-js/src/apg-api/rule-dependencies.js");class State{constructor(rules,udts){this.rules=rules,this.udts=udts,this.ruleCount=rules.length,this.udtCount=udts.length,this.startRule=0,this.dependenciesComplete=!1,this.attributesComplete=!1,this.isMutuallyRecursive=!1,this.ruleIndexes=this.indexArray(this.ruleCount),this.ruleAlphaIndexes=this.indexArray(this.ruleCount),this.ruleTypeIndexes=this.indexArray(this.ruleCount),this.udtIndexes=this.indexArray(this.udtCount),this.udtAlphaIndexes=this.indexArray(this.udtCount),this.attrsErrorCount=0,this.attrs=[],this.attrsErrors=[],this.attrsWorking=[],this.ruleDeps=[];for(let i=0;i<this.ruleCount;i+=1)this.attrs.push(this.attrGen(this.rules[i])),this.attrsWorking.push(this.attrGen(this.rules[i])),this.ruleDeps.push(this.rdGen(rules[i],this.ruleCount,this.udtCount));this.compRulesAlpha=this.compRulesAlpha.bind(this),this.compUdtsAlpha=this.compUdtsAlpha.bind(this),this.compRulesType=this.compRulesType.bind(this),this.compRulesGroup=this.compRulesGroup.bind(this)}attrGen(rule){return{left:!1,nested:!1,right:!1,empty:!1,finite:!1,cyclic:!1,leaf:!1,isOpen:!1,isComplete:!1,rule}}attrInit(attr){attr.left=!1,attr.nested=!1,attr.right=!1,attr.empty=!1,attr.finite=!1,attr.cyclic=!1,attr.leaf=!1,attr.isOpen=!1,attr.isComplete=!1}attrCopy(dst,src){dst.left=src.left,dst.nested=src.nested,dst.right=src.right,dst.empty=src.empty,dst.finite=src.finite,dst.cyclic=src.cyclic,dst.leaf=src.leaf,dst.isOpen=src.isOpen,dst.isComplete=src.isComplete,dst.rule=src.rule}rdGen(rule,ruleCount,udtCount){return{rule,recursiveType:id.ATTR_N,groupNumber:-1,refersTo:this.falseArray(ruleCount),refersToUdt:this.falseArray(udtCount),referencedBy:this.falseArray(ruleCount)}}typeToString(recursiveType){switch(recursiveType){case id.ATTR_N:return" N";case id.ATTR_R:return" R";case id.ATTR_MR:return"MR";default:return"UNKNOWN"}}falseArray(length){let ret=[];if(length>0)for(let i=0;i<length;i+=1)ret.push(!1);return ret}falsifyArray(a){for(let i=0;i<a.length;i+=1)a[i]=!1}indexArray(length){let ret=[];if(length>0)for(let i=0;i<length;i+=1)ret.push(i);return ret}compRulesAlpha(left,right){return this.rules[left].lower<this.rules[right].lower?-1:this.rules[left].lower>this.rules[right].lower?1:0}compUdtsAlpha(left,right){return this.udts[left].lower<this.udts[right].lower?-1:this.udts[left].lower>this.udts[right].lower?1:0}compRulesType(left,right){return this.ruleDeps[left].recursiveType<this.ruleDeps[right].recursiveType?-1:this.ruleDeps[left].recursiveType>this.ruleDeps[right].recursiveType?1:0}compRulesGroup(left,right){if(this.ruleDeps[left].recursiveType===id.ATTR_MR&&this.ruleDeps[right].recursiveType===id.ATTR_MR){if(this.ruleDeps[left].groupNumber<this.ruleDeps[right].groupNumber)return -1;if(this.ruleDeps[left].groupNumber>this.ruleDeps[right].groupNumber)return 1}return 0}}return{attributes:function attributes(rules=[],udts=[],lineMap=[],errors=[]){let state=new State(rules,udts);return ruleDependencies(state),ruleAttributes(state),state.attrsErrorCount&&errors.push({line:0,char:0,msg:`${state.attrsErrorCount} attribute errors`}),state.attrsErrorCount},showAttributes,showAttributeErrors,showRuleDependencies}}()},"./node_modules/apg-js/src/apg-api/parser.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exportParser(){let ApgLib=__webpack_require__("./node_modules/apg-js/src/apg-lib/node-exports.js"),id=ApgLib.ids,syn=new(__webpack_require__("./node_modules/apg-js/src/apg-api/syntax-callbacks.js")),sem=new(__webpack_require__("./node_modules/apg-js/src/apg-api/semantic-callbacks.js")),sabnfGrammar=new(__webpack_require__("./node_modules/apg-js/src/apg-api/sabnf-grammar.js")),parser=new ApgLib.parser;parser.ast=new ApgLib.ast,parser.callbacks=syn.callbacks,parser.ast.callbacks=sem.callbacks;let findLine=function findLine(lines,charIndex,charLength){if(charIndex<0||charIndex>=charLength)return -1;for(let i=0;i<lines.length;i+=1)if(charIndex>=lines[i].beginChar&&charIndex<lines[i].beginChar+lines[i].length)return i;return -1},translateIndex=function translateIndex(map,index){let ret=-1;if(index<map.length){for(let i=index;i<map.length;i+=1)if(null!==map[i]){ret=map[i];break}}return ret},reduceOpcodes=function reduceOpcodes(rules){rules.forEach(rule=>{let opcodes=[],map=[],reducedIndex=0;rule.opcodes.forEach(op=>{op.type===id.ALT&&1===op.children.length?map.push(null):op.type===id.CAT&&1===op.children.length?map.push(null):op.type===id.REP&&1===op.min&&1===op.max?map.push(null):(map.push(reducedIndex),opcodes.push(op),reducedIndex+=1)}),map.push(reducedIndex),opcodes.forEach(op=>{if(op.type===id.ALT||op.type===id.CAT)for(let i=0;i<op.children.length;i+=1)op.children[i]=translateIndex(map,op.children[i])}),rule.opcodes=opcodes})};this.syntax=function syntax(chars,lines,errors,strict,lite,trace){if(trace){if("traceObject"!==trace.traceObject)throw TypeError("parser: trace argument is not a trace object");parser.trace=trace}let data={};data.errors=errors,data.strict=!!strict,data.lite=!!lite,data.lines=lines,data.findLine=findLine,data.charsLength=chars.length,data.ruleCount=0,parser.parse(sabnfGrammar,"file",chars,data).success||errors.push({line:0,char:0,msg:"syntax analysis of input grammar failed"})},this.semantic=function semantic(chars,lines,errors){let data={};return(data.errors=errors,data.lines=lines,data.findLine=findLine,data.charsLength=chars.length,parser.ast.translate(data),errors.length)?null:(reduceOpcodes(data.rules),{rules:data.rules,udts:data.udts,lineMap:data.rulesLineMap})},this.generateSource=function generateSource(chars,lines,rules,udts,config){let i,bkrname,bkrlower,str,source="",typescript=!1,lite=!1;config&&(config.typescript?(typescript=!0,lite=!1):config.lite&&(typescript=!1,lite=!0));let opcodeCount=0,charCodeMin=1/0,charCodeMax=0,ruleNames=[],udtNames=[],alt=0,cat=0,rnm=0,udt=0,rep=0,and=0,not=0,tls=0,tbs=0,trg=0,bkr=0,bka=0,bkn=0,abg=0,aen=0;return rules.forEach(rule=>{ruleNames.push(rule.lower),opcodeCount+=rule.opcodes.length,rule.opcodes.forEach(op=>{switch(op.type){case id.ALT:alt+=1;break;case id.CAT:cat+=1;break;case id.RNM:rnm+=1;break;case id.UDT:udt+=1;break;case id.REP:rep+=1;break;case id.AND:and+=1;break;case id.NOT:not+=1;break;case id.BKA:bka+=1;break;case id.BKN:bkn+=1;break;case id.BKR:bkr+=1;break;case id.ABG:abg+=1;break;case id.AEN:aen+=1;break;case id.TLS:for(tls+=1,i=0;i<op.string.length;i+=1)op.string[i]<charCodeMin&&(charCodeMin=op.string[i]),op.string[i]>charCodeMax&&(charCodeMax=op.string[i]);break;case id.TBS:for(tbs+=1,i=0;i<op.string.length;i+=1)op.string[i]<charCodeMin&&(charCodeMin=op.string[i]),op.string[i]>charCodeMax&&(charCodeMax=op.string[i]);break;case id.TRG:trg+=1,op.min<charCodeMin&&(charCodeMin=op.min),op.max>charCodeMax&&(charCodeMax=op.max);break;default:throw Error("generateSource: unrecognized opcode")}})}),ruleNames.sort(),udts.length>0&&(udts.forEach(udtFunc=>{udtNames.push(udtFunc.lower)}),udtNames.sort()),source+="// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved<br>\n// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>\n//\n// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\n",config?config.funcName?source+=`const ${config.funcName} = function grammar(){
`:typescript?source+="export function grammar(){\n":lite?source+="export default function grammar(){\n":source+=`module.exports = function grammar(){
`:source+=`module.exports = function grammar(){
`,source+=` // \`\`\`
// SUMMARY
// rules = ${rules.length}
// udts = ${udts.length}
// opcodes = ${opcodeCount}
// --- ABNF original opcodes
// ALT = ${alt}
// CAT = ${cat}
// REP = ${rep}
// RNM = ${rnm}
// TLS = ${tls}
// TBS = ${tbs}
// TRG = ${trg}
// --- SABNF superset opcodes
// UDT = ${udt}
// AND = ${and}
// NOT = ${not}
`,lite||(source+=` // BKA = ${bka}
// BKN = ${bkn}
// BKR = ${bkr}
// ABG = ${abg}
// AEN = ${aen}
`),source+=" // characters = [",tls+tbs+trg===0?source+=" none defined ]":source+=`${charCodeMin} - ${charCodeMax}]`,udt>0&&(source+=" + user defined"),source+="\n // ```\n /* OBJECT IDENTIFIER (for internal parser use) */\n this.grammarObject = 'grammarObject';\n\n /* RULES */\n this.rules = [];\n",rules.forEach((rule,ii)=>{let thisRule=" this.rules[";thisRule+=ii+"] = { name: '"+rule.name+"', lower: '"+rule.lower+"', index: "+rule.index+", isBkr: "+rule.isBkr+" };\n",source+=thisRule}),source+="\n /* UDTS */\n this.udts = [];\n",udts.length>0&&udts.forEach((udtFunc,ii)=>{let thisUdt=" this.udts[";thisUdt+=ii+"] = { name: '"+udtFunc.name+"', lower: '"+udtFunc.lower+"', index: "+udtFunc.index+", empty: "+udtFunc.empty+", isBkr: "+udtFunc.isBkr+" };\n",source+=thisUdt}),source+="\n /* OPCODES */\n",rules.forEach((rule,ruleIndex)=>{ruleIndex>0&&(source+="\n"),source+=` /* ${rule.name} */
this.rules[${ruleIndex}].opcodes = [];
`,rule.opcodes.forEach((op,opIndex)=>{let prefix;switch(op.type){case id.ALT:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, children: [${op.children.toString()}] };// ALT
`;break;case id.CAT:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, children: [${op.children.toString()}] };// CAT
`;break;case id.RNM:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, index: ${op.index} };// RNM(${rules[op.index].name})
`;break;case id.BKR:op.index>=rules.length?(bkrname=udts[op.index-rules.length].name,bkrlower=udts[op.index-rules.length].lower):(bkrname=rules[op.index].name,bkrlower=rules[op.index].lower),prefix="%i",op.bkrCase===id.BKR_MODE_CS&&(prefix="%s"),op.bkrMode===id.BKR_MODE_UM?prefix+="%u":prefix+="%p",bkrname=prefix+bkrname,source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, index: ${op.index}, lower: '${bkrlower}', bkrCase: ${op.bkrCase}, bkrMode: ${op.bkrMode} };// BKR(\\${bkrname})
`;break;case id.UDT:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, empty: ${op.empty}, index: ${op.index} };// UDT(${udts[op.index].name})
`;break;case id.REP:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, min: ${op.min}, max: ${op.max} };// REP
`;break;case id.AND:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type} };// AND
`;break;case id.NOT:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type} };// NOT
`;break;case id.ABG:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type} };// ABG(%^)
`;break;case id.AEN:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type} };// AEN(%$)
`;break;case id.BKA:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type} };// BKA
`;break;case id.BKN:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type} };// BKN
`;break;case id.TLS:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, string: [${op.string.toString()}] };// TLS
`;break;case id.TBS:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, string: [${op.string.toString()}] };// TBS
`;break;case id.TRG:source+=` this.rules[${ruleIndex}].opcodes[${opIndex}] = { type: ${op.type}, min: ${op.min}, max: ${op.max} };// TRG
`;break;default:throw Error("parser.js: ~143: unrecognized opcode")}})}),source+='\n // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n this.toString = function toString(){\n let str = "";\n',lines.forEach(line=>{let end=line.beginChar+line.length;str="",source+=' str += "';for(let ii=line.beginChar;ii<end;ii+=1){switch(chars[ii]){case 9:str=" ";break;case 10:str="\\n";break;case 13:str="\\r";break;case 34:str='\\"';break;case 92:str="\\\\";break;default:str=String.fromCharCode(chars[ii])}source+=str}source+='";\n'}),source+=" return str;\n }\n}\n"},this.generateObject=function generateObject(stringArg,rules,udts){let obj={},ruleNames=[],udtNames=[],string=stringArg.slice(0);return obj.grammarObject="grammarObject",rules.forEach(rule=>{ruleNames.push(rule.lower)}),ruleNames.sort(),udts.length>0&&(udts.forEach(udtFunc=>{udtNames.push(udtFunc.lower)}),udtNames.sort()),obj.callbacks=[],ruleNames.forEach(name=>{obj.callbacks[name]=!1}),udts.length>0&&udtNames.forEach(name=>{obj.callbacks[name]=!1}),obj.rules=rules,obj.udts=udts,obj.toString=function toStringFunc(){return string},obj}}},"./node_modules/apg-js/src/apg-api/rule-attributes.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exportRuleAttributes(){let id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),state=null;function isEmptyOnly(attr){return!attr.left&&!attr.nested&&!attr.right&&!attr.cyclic&&attr.empty}function isRecursive(attr){return!!attr.left||!!attr.nested||!!attr.right||!!attr.cyclic}function isCatNested(attrs,count){let i=0,j=0,k=0;for(i=0;i<count;i+=1)if(attrs[i].nested)return!0;for(i=0;i<count;i+=1)if(attrs[i].right&&!attrs[i].leaf){for(j=i+1;j<count;j+=1)if(!isEmptyOnly(attrs[j]))return!0}for(i=count-1;i>=0;i-=1)if(attrs[i].left&&!attrs[i].leaf){for(j=i-1;j>=0;j-=1)if(!isEmptyOnly(attrs[j]))return!0}for(i=0;i<count;i+=1)if(!attrs[i].empty&&!isRecursive(attrs[i])){for(j=i+1;j<count;j+=1)if(isRecursive(attrs[j])){for(k=j+1;k<count;k+=1)if(!attrs[k].empty&&!isRecursive(attrs[k]))return!0}}return!1}function isCatCyclic(attrs,count){for(let i=0;i<count;i+=1)if(!attrs[i].cyclic)return!1;return!0}function isCatLeft(attrs,count){for(let i=0;i<count;i+=1){if(attrs[i].left)return!0;if(!attrs[i].empty)break}return!1}function isCatRight(attrs,count){for(let i=count-1;i>=0;i-=1){if(attrs[i].right)return!0;if(!attrs[i].empty)break}return!1}function isCatEmpty(attrs,count){for(let i=0;i<count;i+=1)if(!attrs[i].empty)return!1;return!0}function isCatFinite(attrs,count){for(let i=0;i<count;i+=1)if(!attrs[i].finite)return!1;return!0}function cat(stateArg,opcodes,opIndex,iAttr){let i=0,opCat=opcodes[opIndex],count=opCat.children.length,childAttrs=[];for(i=0;i<count;i+=1)childAttrs.push(stateArg.attrGen());for(i=0;i<count;i+=1)opEval(stateArg,opcodes,opCat.children[i],childAttrs[i]);iAttr.left=isCatLeft(childAttrs,count),iAttr.right=isCatRight(childAttrs,count),iAttr.nested=isCatNested(childAttrs,count),iAttr.empty=isCatEmpty(childAttrs,count),iAttr.finite=isCatFinite(childAttrs,count),iAttr.cyclic=isCatCyclic(childAttrs,count)}function alt(stateArg,opcodes,opIndex,iAttr){let i=0,opAlt=opcodes[opIndex],count=opAlt.children.length,childAttrs=[];for(i=0;i<count;i+=1)childAttrs.push(stateArg.attrGen());for(i=0;i<count;i+=1)opEval(stateArg,opcodes,opAlt.children[i],childAttrs[i]);for(i=0,iAttr.left=!1,iAttr.right=!1,iAttr.nested=!1,iAttr.empty=!1,iAttr.finite=!1,iAttr.cyclic=!1;i<count;i+=1)childAttrs[i].left&&(iAttr.left=!0),childAttrs[i].nested&&(iAttr.nested=!0),childAttrs[i].right&&(iAttr.right=!0),childAttrs[i].empty&&(iAttr.empty=!0),childAttrs[i].finite&&(iAttr.finite=!0),childAttrs[i].cyclic&&(iAttr.cyclic=!0)}function bkr(stateArg,opcodes,opIndex,iAttr){let opBkr=opcodes[opIndex];opBkr.index>=stateArg.ruleCount?(iAttr.empty=stateArg.udts[opBkr.index-stateArg.ruleCount].empty,iAttr.finite=!0):(ruleAttrsEval(stateArg,opBkr.index,iAttr),iAttr.left=!1,iAttr.nested=!1,iAttr.right=!1,iAttr.cyclic=!1)}function opEval(stateArg,opcodes,opIndex,iAttr){stateArg.attrInit(iAttr);let opi=opcodes[opIndex];switch(opi.type){case id.ALT:alt(stateArg,opcodes,opIndex,iAttr);break;case id.CAT:cat(stateArg,opcodes,opIndex,iAttr);break;case id.REP:opEval(stateArg,opcodes,opIndex+1,iAttr),0===opi.min&&(iAttr.empty=!0,iAttr.finite=!0);break;case id.RNM:ruleAttrsEval(stateArg,opcodes[opIndex].index,iAttr);break;case id.BKR:bkr(stateArg,opcodes,opIndex,iAttr);break;case id.AND:case id.NOT:case id.BKA:case id.BKN:opEval(stateArg,opcodes,opIndex+1,iAttr),iAttr.empty=!0;break;case id.TLS:iAttr.empty=!opcodes[opIndex].string.length,iAttr.finite=!0,iAttr.cyclic=!1;break;case id.TBS:case id.TRG:iAttr.empty=!1,iAttr.finite=!0,iAttr.cyclic=!1;break;case id.UDT:iAttr.empty=opi.empty,iAttr.finite=!0,iAttr.cyclic=!1;break;case id.ABG:case id.AEN:iAttr.empty=!0,iAttr.finite=!0,iAttr.cyclic=!1;break;default:throw Error(`unknown opcode type: ${opi}`)}}function ruleAttrsEval(stateArg,ruleIndex,iAttr){let attri=stateArg.attrsWorking[ruleIndex];attri.isComplete?stateArg.attrCopy(iAttr,attri):attri.isOpen?ruleIndex===stateArg.startRule?ruleIndex===stateArg.startRule&&(iAttr.left=!0,iAttr.right=!0,iAttr.cyclic=!0,iAttr.leaf=!0):iAttr.finite=!0:(attri.isOpen=!0,opEval(stateArg,attri.rule.opcodes,0,iAttr),attri.left=iAttr.left,attri.right=iAttr.right,attri.nested=iAttr.nested,attri.empty=iAttr.empty,attri.finite=iAttr.finite,attri.cyclic=iAttr.cyclic,attri.leaf=!1,attri.isOpen=!1,attri.isComplete=!0)}let truth=val=>val?"t":"f",tError=val=>val?"e":"f",fError=val=>val?"t":"e",showAttr=(seq,index,attr,dep)=>`${seq}:${index}:`+(`${tError(attr.left)} ${truth(attr.nested)} ${truth(attr.right)} ${tError(attr.cyclic)} ${fError(attr.finite)} ${truth(attr.empty)}:${state.typeToString(dep.recursiveType)}:`+(dep.recursiveType===id.ATTR_MR?dep.groupNumber:"-"))+`:${attr.rule.name}
`,showLegend=()=>"LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n",show=type=>{let i=0,ii=0,attri=null,depi=null,str="",{ruleIndexes}=state;for(97===type?ruleIndexes=state.ruleAlphaIndexes:116===type&&(ruleIndexes=state.ruleTypeIndexes),i=0;i<state.ruleCount;i+=1)ii=ruleIndexes[i],attri=state.attrs[ii],depi=state.ruleDeps[ii],str+=showAttr(i,ii,attri,depi);return str};return{ruleAttributes:stateArg=>{let i=0,j=0,iAttr=(state=stateArg).attrGen();for(i=0;i<state.ruleCount;i+=1){for(j=0;j<state.ruleCount;j+=1)state.attrInit(state.attrsWorking[j]);state.startRule=i,ruleAttrsEval(state,i,iAttr),state.attrCopy(state.attrs[i],state.attrsWorking[i])}state.attributesComplete=!0;let attri=null;for(i=0;i<state.ruleCount;i+=1)if((attri=state.attrs[i]).left||!attri.finite||attri.cyclic){let temp=state.attrGen(attri.rule);state.attrCopy(temp,attri),state.attrsErrors.push(temp),state.attrsErrorCount+=1}},showAttributes:(order="index")=>{if(!state.attributesComplete)throw Error("rule-attributes.js:showAttributes: attributes not available");let str="",leader="RULE ATTRIBUTES\n";return 97===order.charCodeAt(0)?str+="alphabetical by rule name\n"+leader+showLegend()+show(97):116===order.charCodeAt(0)?str+="ordered by rule type\n"+leader+showLegend()+show(116):str+="ordered by rule index\n"+leader+showLegend()+show(),str},showAttributeErrors:()=>{let attri=null,depi=null,str="";if(str+="RULE ATTRIBUTES WITH ERRORS\n"+showLegend(),state.attrsErrorCount)for(let i=0;i<state.attrsErrorCount;i+=1)attri=state.attrsErrors[i],depi=state.ruleDeps[attri.rule.index],str+=showAttr(i,attri.rule.index,attri,depi);else str+="<none>\n";return str}}}()},"./node_modules/apg-js/src/apg-api/rule-dependencies.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=(()=>{let id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),state=null,scan=(ruleCount,ruleDeps,index,isScanned)=>{let i=0,j=0,rdi=ruleDeps[index];isScanned[index]=!0;let op=rdi.rule.opcodes;for(i=0;i<op.length;i+=1){let opi=op[i];if(opi.type===id.RNM)for(rdi.refersTo[opi.index]=!0,isScanned[opi.index]||scan(ruleCount,ruleDeps,opi.index,isScanned),j=0;j<ruleCount;j+=1)ruleDeps[opi.index].refersTo[j]&&(rdi.refersTo[j]=!0);else opi.type===id.UDT?rdi.refersToUdt[opi.index]=!0:opi.type!==id.BKR||(opi.index<ruleCount?(rdi.refersTo[opi.index]=!0,isScanned[opi.index]||scan(ruleCount,ruleDeps,opi.index,isScanned)):rdi.refersToUdt[ruleCount-opi.index]=!0)}},show=(type=null)=>{let i=0,j=0,count=0,startSeg=0,maxRule=state.ruleCount-1,maxUdt=state.udtCount-1,str="",pre="",first=!1,rdi=null,{ruleIndexes}=state,{udtIndexes}=state;for(97===type?(ruleIndexes=state.ruleAlphaIndexes,udtIndexes=state.udtAlphaIndexes):116===type&&(ruleIndexes=state.ruleTypeIndexes,udtIndexes=state.udtAlphaIndexes),i=0;i<state.ruleCount;i+=1){for(rdi=state.ruleDeps[ruleIndexes[i]],pre=`${ruleIndexes[i]}:${state.typeToString(rdi.recursiveType)}:`,state.isMutuallyRecursive&&(pre+=(rdi.groupNumber>-1?rdi.groupNumber:"-")+":"),pre+=" ",str+=`${pre+state.rules[ruleIndexes[i]].name}
`,first=!0,count=0,startSeg=str.length,str+=pre,j=0;j<state.ruleCount;j+=1)rdi.refersTo[ruleIndexes[j]]&&(first?(first=!1,str+="=> "+state.ruleDeps[ruleIndexes[j]].rule.name):str+=`, ${state.ruleDeps[ruleIndexes[j]].rule.name}`,count+=1),str.length-startSeg>100&&j!==maxRule&&(str+=`
${pre}=> `,startSeg=str.length);if(state.udtCount)for(j=0;j<state.udtCount;j+=1)rdi.refersToUdt[udtIndexes[j]]&&(first?(first=!1,str+="=> "+state.udts[udtIndexes[j]].name):str+=`, ${state.udts[udtIndexes[j]].name}`,count+=1),str.length-startSeg>100&&j!==maxUdt&&(str+=`
${pre}=> `,startSeg=str.length);for(0===count&&(str+="=> <none>\n"),!1===first&&(str+="\n"),first=!0,count=0,startSeg=str.length,str+=pre,j=0;j<state.ruleCount;j+=1)rdi.referencedBy[ruleIndexes[j]]&&(first?(first=!1,str+="<= "+state.ruleDeps[ruleIndexes[j]].rule.name):str+=`, ${state.ruleDeps[ruleIndexes[j]].rule.name}`,count+=1),str.length-startSeg>100&&j!==maxRule&&(str+=`
${pre}=> `,startSeg=str.length);0===count&&(str+="<= <none>\n"),!1===first&&(str+="\n"),str+="\n"}return str};return{ruleDependencies:stateArg=>{let i=0,j=0,groupCount=0,rdi=null,rdj=null,newGroup=!1;(state=stateArg).dependenciesComplete=!1;let isScanned=state.falseArray(state.ruleCount);for(i=0;i<state.ruleCount;i+=1)state.falsifyArray(isScanned),scan(state.ruleCount,state.ruleDeps,i,isScanned);for(i=0;i<state.ruleCount;i+=1)for(j=0;j<state.ruleCount;j+=1)i!==j&&state.ruleDeps[j].refersTo[i]&&(state.ruleDeps[i].referencedBy[j]=!0);for(i=0;i<state.ruleCount;i+=1)state.ruleDeps[i].recursiveType=id.ATTR_N,state.ruleDeps[i].refersTo[i]&&(state.ruleDeps[i].recursiveType=id.ATTR_R);for(i=0,groupCount=-1;i<state.ruleCount;i+=1)if((rdi=state.ruleDeps[i]).recursiveType===id.ATTR_R)for(j=0,newGroup=!0;j<state.ruleCount;j+=1)i!==j&&(rdj=state.ruleDeps[j]).recursiveType===id.ATTR_R&&rdi.refersTo[j]&&rdj.refersTo[i]&&(newGroup&&(groupCount+=1,rdi.recursiveType=id.ATTR_MR,rdi.groupNumber=groupCount,newGroup=!1),rdj.recursiveType=id.ATTR_MR,rdj.groupNumber=groupCount);state.isMutuallyRecursive=groupCount>-1,state.ruleAlphaIndexes.sort(state.compRulesAlpha),state.ruleTypeIndexes.sort(state.compRulesAlpha),state.ruleTypeIndexes.sort(state.compRulesType),state.isMutuallyRecursive&&state.ruleTypeIndexes.sort(state.compRulesGroup),state.udtCount&&state.udtAlphaIndexes.sort(state.compUdtsAlpha),state.dependenciesComplete=!0},showRuleDependencies:(order="index")=>{let str="RULE DEPENDENCIES(index:type:[group number:])\n";return str+="=> refers to rule names\n<= referenced by rule names\n",state.dependenciesComplete&&(97===order.charCodeAt(0)?str+="alphabetical by rule name\n"+show(97):116===order.charCodeAt(0)?str+="ordered by rule type\n"+show(116):str+="ordered by rule index\n"+show(null)),str}}})()},"./node_modules/apg-js/src/apg-api/sabnf-grammar.js":module=>{module.exports=function grammar(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=function toString(){return";\n; ABNF for JavaScript APG 2.0 SABNF\n; RFC 5234 with some restrictions and additions.\n; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n; - accepts %s\"string\" as a case-sensitive string\n; - accepts %i\"string\" as a case-insensitive string\n; - accepts \"string\" as a case-insensitive string\n;\n; Some restrictions:\n; 1. Rules must begin at first character of each line.\n; Indentations on first rule and rules thereafter are not allowed.\n; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n; However, a working parser cannot be generated from them.\n;\n; Super set (SABNF) additions:\n; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n; e.g. &%d13 or &rule or !(A / B)\n; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n; u_name may be used as an element but no rule definition is given.\n; e.g. rule = A / u_myUdt\n; A = \"a\"\n; would be a valid grammar.\n; 3. Case-sensitive, single-quoted strings are accepted.\n; e.g. 'abc' would be equivalent to %d97.98.99\n; (kept for backward compatibility, but superseded by %s\"abc\") \n; New 12/26/2015\n; 4. Look-behind operators are accepted as element prefixes.\n; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n; e.g. &&%d13 or &&rule or !!(A / B)\n; 5. Back reference operators, i.e. \\rulename, are accepted.\n; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n; to match is a phrase previously matched by the rule 'rulename'.\n; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n; Back reference modifiers can be used to specify case and mode.\n; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n; 8. String end anchor, AEN(%$) matches the end of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n;\nFile = *(BlankLine / Rule / RuleError)\nBlankLine = *(%d32/%d9) [comment] LineEnd\nRule = RuleLookup owsp Alternation ((owsp LineEnd)\n / (LineEndError LineEnd))\nRuleLookup = RuleNameTest owsp DefinedAsTest\nRuleNameTest = RuleName/RuleNameError\nRuleName = alphanum\nRuleNameError = 1*(%d33-60/%d62-126)\nDefinedAsTest = DefinedAs / DefinedAsError\nDefinedAsError = 1*2%d33-126\nDefinedAs = IncAlt / Defined\nDefined = %d61\nIncAlt = %d61.47\nRuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\nLineEndError = 1*(%d32-126 / %d9 / LineContinue)\nAlternation = Concatenation *(owsp AltOp Concatenation)\nConcatenation = Repetition *(CatOp Repetition)\nRepetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\nModifier = (Predicate [RepOp])\n / RepOp\nPredicate = BkaOp\n / BknOp\n / AndOp\n / NotOp\nBasicElement = UdtOp\n / RnmOp\n / TrgOp\n / TbsOp\n / TlsOp\n / ClsOp\n / BkrOp\n / AbgOp\n / AenOp\n / ProsVal\nBasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\nGroup = GroupOpen Alternation (GroupClose / GroupError)\nGroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nGroupOpen = %d40 owsp\nGroupClose = owsp %d41\nOption = OptionOpen Alternation (OptionClose / OptionError)\nOptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nOptionOpen = %d91 owsp\nOptionClose = owsp %d93\nRnmOp = alphanum\nBkrOp = %d92 [bkrModifier] bkr-name\nbkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\ncs = '%s'\nci = '%i'\num = '%u'\npm = '%p'\nbkr-name = uname / ename / rname\nrname = alphanum\nuname = %d117.95 alphanum\nename = %d101.95 alphanum\nUdtOp = udt-empty\n / udt-non-empty\nudt-non-empty = %d117.95 alphanum\nudt-empty = %d101.95 alphanum\nRepOp = (rep-min StarOp rep-max)\n / (rep-min StarOp)\n / (StarOp rep-max)\n / StarOp\n / rep-min-max\nAltOp = %d47 owsp\nCatOp = wsp\nStarOp = %d42\nAndOp = %d38\nNotOp = %d33\nBkaOp = %d38.38\nBknOp = %d33.33\nAbgOp = %d37.94\nAenOp = %d37.36\nTrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\nTbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\nTlsOp = TlsCase TlsOpen TlsString TlsClose\nTlsCase = [\"%i\" / \"%s\"]\nTlsOpen = %d34\nTlsClose = %d34\nTlsString = *(%d32-33/%d35-126/StringTab)\nStringTab = %d9\nClsOp = ClsOpen ClsString ClsClose\nClsOpen = %d39\nClsClose = %d39\nClsString = *(%d32-38/%d40-126/StringTab)\nProsVal = ProsValOpen ProsValString ProsValClose\nProsValOpen = %d60\nProsValString = *(%d32-61/%d63-126/StringTab)\nProsValClose = %d62\nrep-min = rep-num\nrep-min-max = rep-num\nrep-max = rep-num\nrep-num = 1*(%d48-57)\ndString = dnum\nxString = xnum\nbString = bnum\nDec = (%d68/%d100)\nHex = (%d88/%d120)\nBin = (%d66/%d98)\ndmin = dnum\ndmax = dnum\nbmin = bnum\nbmax = bnum\nxmin = xnum\nxmax = xnum\ndnum = 1*(%d48-57)\nbnum = 1*%d48-49\nxnum = 1*(%d48-57 / %d65-70 / %d97-102)\n;\n; Basics\nalphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\nowsp = *space\nwsp = 1*space\nspace = %d32\n / %d9\n / comment\n / LineContinue\ncomment = %d59 *(%d32-126 / %d9)\nLineEnd = %d13.10\n / %d10\n / %d13\nLineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n"}}},"./node_modules/apg-js/src/apg-api/scanner-callbacks.js":(__unused_webpack_module,exports,__webpack_require__)=>{let ids=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),utils=__webpack_require__("./node_modules/apg-js/src/apg-lib/utilities.js");function semLine(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE?(data.endLength=0,data.textLength=0,data.invalidCount=0):data.lines.push({lineNo:data.lines.length,beginChar:phraseIndex,length:phraseCount,textLength:data.textLength,endType:data.endType,invalidChars:data.invalidCount}),ids.SEM_OK}function semLineText(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE&&(data.textLength=phraseCount),ids.SEM_OK}function semLastLine(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE?(data.endLength=0,data.textLength=0,data.invalidCount=0):data.strict?(data.lines.push({lineNo:data.lines.length,beginChar:phraseIndex,length:phraseCount,textLength:phraseCount,endType:"none",invalidChars:data.invalidCount}),data.errors.push({line:data.lineNo,char:phraseIndex+phraseCount,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(chars.push(10),data.lines.push({lineNo:data.lines.length,beginChar:phraseIndex,length:phraseCount+1,textLength:phraseCount,endType:"LF",invalidChars:data.invalidCount})),ids.SEM_OK}function semInvalid(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE&&data.errors.push({line:data.lineNo,char:phraseIndex,msg:`invalid character found '\\x${utils.charToHex(chars[phraseIndex])}'`}),ids.SEM_OK}function semEnd(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_POST&&(data.lineNo+=1),ids.SEM_OK}function semLF(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE&&(data.endType="LF",data.strict&&data.errors.push({line:data.lineNo,char:phraseIndex,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),ids.SEM_OK}function semCR(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE&&(data.endType="CR",data.strict&&data.errors.push({line:data.lineNo,char:phraseIndex,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),ids.SEM_OK}function semCRLF(state,chars,phraseIndex,phraseCount,data){return state===ids.SEM_PRE&&(data.endType="CRLF"),ids.SEM_OK}let callbacks=[];callbacks.line=semLine,callbacks["line-text"]=semLineText,callbacks["last-line"]=semLastLine,callbacks.invalid=semInvalid,callbacks.end=semEnd,callbacks.lf=semLF,callbacks.cr=semCR,callbacks.crlf=semCRLF,exports.callbacks=callbacks},"./node_modules/apg-js/src/apg-api/scanner-grammar.js":module=>{module.exports=function grammar(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=function toString(){return"file = *line [last-line]\nline = line-text end\nline-text = *(valid/invalid)\nlast-line = 1*(valid/invalid)\nvalid = %d32-126 / %d9\ninvalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\nend = CRLF / LF / CR\nCRLF = %d13.10\nLF = %d10\nCR = %d13\n"}}},"./node_modules/apg-js/src/apg-api/scanner.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exfn(chars,errors,strict,trace){let apglib=__webpack_require__("./node_modules/apg-js/src/apg-lib/node-exports.js"),grammar=new(__webpack_require__("./node_modules/apg-js/src/apg-api/scanner-grammar.js")),{callbacks}=__webpack_require__("./node_modules/apg-js/src/apg-api/scanner-callbacks.js"),lines=[],parser=new apglib.parser;if(parser.ast=new apglib.ast,parser.ast.callbacks=callbacks,trace){if("traceObject"!==trace.traceObject)throw TypeError("scanner.js: trace argument is not a trace object");parser.trace=trace}if(!0!==parser.parse(grammar,"file",chars).success){errors.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});return}return parser.ast.translate({lines,lineNo:0,errors,strict:!!strict}),lines}},"./node_modules/apg-js/src/apg-api/semantic-callbacks.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exfn(){let apglib=__webpack_require__("./node_modules/apg-js/src/apg-lib/node-exports.js"),id=apglib.ids,NameList=function NameList(){this.names=[],this.add=function add(name){let ret=-1;return -1===this.get(name)&&(ret={name,lower:name.toLowerCase(),index:this.names.length},this.names.push(ret)),ret},this.get=function get(name){let ret=-1,lower=name.toLowerCase();for(let i=0;i<this.names.length;i+=1)if(this.names[i].lower===lower){ret=this.names[i];break}return ret}},decnum=function decnum(chars,beg,len){let num=0;for(let i=beg;i<beg+len;i+=1)num=10*num+chars[i]-48;return num},binnum=function binnum(chars,beg,len){let num=0;for(let i=beg;i<beg+len;i+=1)num=2*num+chars[i]-48;return num},hexnum=function hexnum(chars,beg,len){let num=0;for(let i=beg;i<beg+len;i+=1){let digit=chars[i];if(digit>=48&&digit<=57)digit-=48;else if(digit>=65&&digit<=70)digit-=55;else if(digit>=97&&digit<=102)digit-=87;else throw Error("hexnum out of range");num=16*num+digit}return num};function semFile(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;if(state===id.SEM_PRE)data.ruleNames=new NameList,data.udtNames=new NameList,data.rules=[],data.udts=[],data.rulesLineMap=[],data.opcodes=[],data.altStack=[],data.topStack=null,data.topRule=null;else if(state===id.SEM_POST){let nameObj;data.rules.forEach(rule=>{rule.isBkr=!1,rule.opcodes.forEach(op=>{op.type===id.RNM&&(-1===(nameObj=data.ruleNames.get(op.index.name))?(data.errors.push({line:data.findLine(data.lines,op.index.phraseIndex,data.charsLength),char:op.index.phraseIndex,msg:`Rule name '${op.index.name}' used but not defined.`}),op.index=-1):op.index=nameObj.index)})}),data.udts.forEach(udt=>{udt.isBkr=!1}),data.rules.forEach(rule=>{rule.opcodes.forEach(op=>{op.type===id.BKR&&(rule.hasBkr=!0,-1!==(nameObj=data.ruleNames.get(op.index.name))?(data.rules[nameObj.index].isBkr=!0,op.index=nameObj.index):-1!==(nameObj=data.udtNames.get(op.index.name))?(data.udts[nameObj.index].isBkr=!0,op.index=data.rules.length+nameObj.index):(data.errors.push({line:data.findLine(data.lines,op.index.phraseIndex,data.charsLength),char:op.index.phraseIndex,msg:`Back reference name '${op.index.name}' refers to undefined rule or unamed UDT.`}),op.index=-1))})})}return ret}function semRule(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.altStack.length=0,data.topStack=null,data.rulesLineMap.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex})),ret}function semRuleLookup(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;if(state===id.SEM_PRE)data.ruleName="",data.definedas="";else if(state===id.SEM_POST){let ruleName;"="===data.definedas?-1===(ruleName=data.ruleNames.add(data.ruleName))?(data.definedas=null,data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`Rule name '${data.ruleName}' previously defined.`})):(data.topRule={name:ruleName.name,lower:ruleName.lower,opcodes:[],index:ruleName.index},data.rules.push(data.topRule),data.opcodes=data.topRule.opcodes):-1===(ruleName=data.ruleNames.get(data.ruleName))?(data.definedas=null,data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`Rule name '${data.ruleName}' for incremental alternate not previously defined.`})):(data.topRule=data.rules[ruleName.index],data.opcodes=data.topRule.opcodes)}return ret}function semAlternation(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;if(state===id.SEM_PRE)for(;;){if(null===data.definedas){ret=id.SEM_SKIP;break}if(null===data.topStack){if("="===data.definedas){data.topStack={alt:{type:id.ALT,children:[]},cat:null},data.altStack.push(data.topStack),data.opcodes.push(data.topStack.alt);break}data.topStack={alt:data.opcodes[0],cat:null},data.altStack.push(data.topStack);break}data.topStack={alt:{type:id.ALT,children:[]},cat:null},data.altStack.push(data.topStack),data.opcodes.push(data.topStack.alt);break}else state===id.SEM_POST&&(data.altStack.pop(),data.altStack.length>0?data.topStack=data.altStack[data.altStack.length-1]:data.topStack=null);return ret}function semConcatenation(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE?(data.topStack.alt.children.push(data.opcodes.length),data.topStack.cat={type:id.CAT,children:[]},data.opcodes.push(data.topStack.cat)):state===id.SEM_POST&&(data.topStack.cat=null),ret}function semRepetition(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&data.topStack.cat.children.push(data.opcodes.length),ret}function semOptionOpen(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.REP,min:0,max:1,char:phraseIndex}),ret}function semRuleName(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.ruleName=apglib.utils.charsToString(chars,phraseIndex,phraseCount)),ret}function semDefined(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.definedas="="),ret}function semIncAlt(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.definedas="=/"),ret}function semRepOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE?(data.min=0,data.max=1/0,data.topRep={type:id.REP,min:0,max:1/0},data.opcodes.push(data.topRep)):state===id.SEM_POST&&(data.min>data.max&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`repetition min cannot be greater than max: min: ${data.min}: max: ${data.max}`}),data.topRep.min=data.min,data.topRep.max=data.max),ret}function semRepMin(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.min=decnum(chars,phraseIndex,phraseCount)),ret}function semRepMax(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.max=decnum(chars,phraseIndex,phraseCount)),ret}function semRepMinMax(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.max=decnum(chars,phraseIndex,phraseCount),data.min=data.max),ret}function semAndOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.AND}),ret}function semNotOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.NOT}),ret}function semRnmOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.RNM,index:{phraseIndex,name:apglib.utils.charsToString(chars,phraseIndex,phraseCount)}}),ret}function semAbgOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.ABG}),ret}function semAenOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.AEN}),ret}function semBkaOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.BKA}),ret}function semBknOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.opcodes.push({type:id.BKN}),ret}function semBkrOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE?(data.ci=!0,data.cs=!1,data.um=!0,data.pm=!1):state===id.SEM_POST&&data.opcodes.push({type:id.BKR,bkrCase:!0===data.cs?id.BKR_MODE_CS:id.BKR_MODE_CI,bkrMode:!0===data.pm?id.BKR_MODE_PM:id.BKR_MODE_UM,index:{phraseIndex:data.bkrname.phraseIndex,name:apglib.utils.charsToString(chars,data.bkrname.phraseIndex,data.bkrname.phraseLength)}}),ret}function semBkrCi(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.ci=!0),ret}function semBkrCs(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.cs=!0),ret}function semBkrUm(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.um=!0),ret}function semBkrPm(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.pm=!0),ret}function semBkrName(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.bkrname={phraseIndex,phraseLength:phraseCount}),ret}function semUdtEmpty(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;if(state===id.SEM_POST){let name=apglib.utils.charsToString(chars,phraseIndex,phraseCount),udtName=data.udtNames.add(name);if(-1===udtName){if(-1===(udtName=data.udtNames.get(name)))throw Error("semUdtEmpty: name look up error")}else data.udts.push({name:udtName.name,lower:udtName.lower,index:udtName.index,empty:!0});data.opcodes.push({type:id.UDT,empty:!0,index:udtName.index})}return ret}function semUdtNonEmpty(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;if(state===id.SEM_POST){let name=apglib.utils.charsToString(chars,phraseIndex,phraseCount),udtName=data.udtNames.add(name);if(-1===udtName){if(-1===(udtName=data.udtNames.get(name)))throw Error("semUdtNonEmpty: name look up error")}else data.udts.push({name:udtName.name,lower:udtName.lower,index:udtName.index,empty:!1});data.opcodes.push({type:id.UDT,empty:!1,index:udtName.index,syntax:null,semantic:null})}return ret}function semTlsOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE&&(data.tlscase=!0),ret}function semTlsCase(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&phraseCount>0&&(83===chars[phraseIndex+1]||115===chars[phraseIndex+1])&&(data.tlscase=!1),ret}function semTlsString(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;if(state===id.SEM_POST){if(data.tlscase){let str=chars.slice(phraseIndex,phraseIndex+phraseCount);for(let i=0;i<str.length;i+=1)str[i]>=65&&str[i]<=90&&(str[i]+=32);data.opcodes.push({type:id.TLS,string:str})}else data.opcodes.push({type:id.TBS,string:chars.slice(phraseIndex,phraseIndex+phraseCount)})}return ret}function semClsOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(phraseCount<=2?data.opcodes.push({type:id.TLS,string:[]}):data.opcodes.push({type:id.TBS,string:chars.slice(phraseIndex+1,phraseIndex+phraseCount-1)})),ret}function semTbsOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE?data.tbsstr=[]:state===id.SEM_POST&&data.opcodes.push({type:id.TBS,string:data.tbsstr}),ret}function semTrgOp(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_PRE?(data.min=0,data.max=0):state===id.SEM_POST&&(data.min>data.max&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${data.min}: max: ${data.max}`}),data.opcodes.push({type:id.TRG,min:data.min,max:data.max})),ret}function semDmin(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.min=decnum(chars,phraseIndex,phraseCount)),ret}function semDmax(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.max=decnum(chars,phraseIndex,phraseCount)),ret}function semBmin(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.min=binnum(chars,phraseIndex,phraseCount)),ret}function semBmax(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.max=binnum(chars,phraseIndex,phraseCount)),ret}function semXmin(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.min=hexnum(chars,phraseIndex,phraseCount)),ret}function semXmax(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&(data.max=hexnum(chars,phraseIndex,phraseCount)),ret}function semDstring(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.tbsstr.push(decnum(chars,phraseIndex,phraseCount)),ret}function semBstring(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.tbsstr.push(binnum(chars,phraseIndex,phraseCount)),ret}function semXstring(state,chars,phraseIndex,phraseCount,data){let ret=id.SEM_OK;return state===id.SEM_POST&&data.tbsstr.push(hexnum(chars,phraseIndex,phraseCount)),ret}this.callbacks=[],this.callbacks.abgop=semAbgOp,this.callbacks.aenop=semAenOp,this.callbacks.alternation=semAlternation,this.callbacks.andop=semAndOp,this.callbacks.bmax=semBmax,this.callbacks.bmin=semBmin,this.callbacks.bkaop=semBkaOp,this.callbacks.bknop=semBknOp,this.callbacks.bkrop=semBkrOp,this.callbacks["bkr-name"]=semBkrName,this.callbacks.bstring=semBstring,this.callbacks.clsop=semClsOp,this.callbacks.ci=semBkrCi,this.callbacks.cs=semBkrCs,this.callbacks.um=semBkrUm,this.callbacks.pm=semBkrPm,this.callbacks.concatenation=semConcatenation,this.callbacks.defined=semDefined,this.callbacks.dmax=semDmax,this.callbacks.dmin=semDmin,this.callbacks.dstring=semDstring,this.callbacks.file=semFile,this.callbacks.incalt=semIncAlt,this.callbacks.notop=semNotOp,this.callbacks.optionopen=semOptionOpen,this.callbacks["rep-max"]=semRepMax,this.callbacks["rep-min"]=semRepMin,this.callbacks["rep-min-max"]=semRepMinMax,this.callbacks.repetition=semRepetition,this.callbacks.repop=semRepOp,this.callbacks.rnmop=semRnmOp,this.callbacks.rule=semRule,this.callbacks.rulelookup=semRuleLookup,this.callbacks.rulename=semRuleName,this.callbacks.tbsop=semTbsOp,this.callbacks.tlscase=semTlsCase,this.callbacks.tlsstring=semTlsString,this.callbacks.tlsop=semTlsOp,this.callbacks.trgop=semTrgOp,this.callbacks["udt-empty"]=semUdtEmpty,this.callbacks["udt-non-empty"]=semUdtNonEmpty,this.callbacks.xmax=semXmax,this.callbacks.xmin=semXmin,this.callbacks.xstring=semXstring}},"./node_modules/apg-js/src/apg-api/show-rules.js":module=>{module.exports=function exfn(){let thisFileName="show-rules.js";return function showRules(rulesIn=[],udtsIn=[],order="index"){let i;let thisFuncName="showRules",alphaArray=[],udtAlphaArray=[],indexArray=[],udtIndexArray=[],ruleCount=rulesIn.length,udtCount=udtsIn.length,str="RULE/UDT NAMES";function compRulesAlpha(left,right){return rulesIn[left].lower<rulesIn[right].lower?-1:rulesIn[left].lower>rulesIn[right].lower?1:0}function compUdtsAlpha(left,right){return udtsIn[left].lower<udtsIn[right].lower?-1:udtsIn[left].lower>udtsIn[right].lower?1:0}if(!(Array.isArray(rulesIn)&&rulesIn.length))throw Error(`${thisFileName}:${thisFuncName}: rules arg must be array with length > 0`);if(!Array.isArray(udtsIn))throw Error(`${thisFileName}:${thisFuncName}: udts arg must be array`);for(i=0;i<ruleCount;i+=1)indexArray.push(i);if((alphaArray=indexArray.slice(0)).sort(compRulesAlpha),udtCount){for(i=0;i<udtCount;i+=1)udtIndexArray.push(i);(udtAlphaArray=udtIndexArray.slice(0)).sort(compUdtsAlpha)}if(97===order.charCodeAt(0)){for(str+=" - alphabetical by rule/UDT name\n",i=0;i<ruleCount;i+=1)str+=`${i}: ${alphaArray[i]}: ${rulesIn[alphaArray[i]].name}
`;if(udtCount)for(i=0;i<udtCount;i+=1)str+=`${i}: ${udtAlphaArray[i]}: ${udtsIn[udtAlphaArray[i]].name}
`}else{for(str+=" - ordered by rule/UDT index\n",i=0;i<ruleCount;i+=1)str+=`${i}: ${rulesIn[i].name}
`;if(udtCount)for(i=0;i<udtCount;i+=1)str+=`${i}: ${udtsIn[i].name}
`}return str}}()},"./node_modules/apg-js/src/apg-api/syntax-callbacks.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exfn(){let topAlt;let thisFileName="syntax-callbacks.js: ",apglib=__webpack_require__("./node_modules/apg-js/src/apg-lib/node-exports.js"),id=apglib.ids;this.callbacks=[],this.callbacks.andop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.strict&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.basicelementerr=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:!1===topAlt.basicError&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Unrecognized SABNF element."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.clsclose=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:break;case id.NOMATCH:data.errors.push({line:data.findLine(data.lines,topAlt.clsOpen),char:topAlt.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),topAlt.clsOpen=null,topAlt.basicError=!0;break;case id.MATCH:data.strict&&data.errors.push({line:data.findLine(data.lines,topAlt.clsOpen),char:topAlt.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),topAlt.clsOpen=null;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.clsopen=function(result,chars,phraseIndex){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:topAlt.clsOpen=phraseIndex;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.clsstring=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:data.stringTabChar=!1;break;case id.EMPTY:case id.NOMATCH:break;case id.MATCH:!1!==data.stringTabChar&&data.errors.push({line:data.findLine(data.lines,data.stringTabChar),char:data.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.definedaserror=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Expected '=' or '=/'. Not found."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.file=function synFile(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:data.altStack=[],data.repCount=0;break;case id.EMPTY:data.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case id.MATCH:0===data.ruleCount&&data.errors.push({line:0,char:0,msg:"no rules defined"});break;case id.NOMATCH:throw Error(`${thisFileName}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.groupclose=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:break;case id.NOMATCH:data.errors.push({line:data.findLine(data.lines,topAlt.groupOpen),char:topAlt.groupOpen,msg:'Group "(...)" opened but not closed.'}),(topAlt=data.altStack.pop()).groupError=!0;break;case id.MATCH:topAlt=data.altStack.pop();break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.groupopen=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:topAlt={groupOpen:phraseIndex,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},data.altStack.push(topAlt);break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.lineenderror=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Unrecognized grammar element or characters."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.lineend=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:if(1===result.phraseLength&&data.strict){let end=13===chars[phraseIndex]?"CR":"LF";data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`Line end '${end}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.notop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.strict&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.optionclose=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:break;case id.NOMATCH:data.errors.push({line:data.findLine(data.lines,topAlt.optionOpen),char:topAlt.optionOpen,msg:'Option "[...]" opened but not closed.'}),(topAlt=data.altStack.pop()).optionError=!0;break;case id.MATCH:topAlt=data.altStack.pop();break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.optionopen=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:topAlt={groupOpen:null,groupError:!1,optionOpen:phraseIndex,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},data.altStack.push(topAlt);break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.prosvalclose=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:break;case id.NOMATCH:data.errors.push({line:data.findLine(data.lines,topAlt.prosValOpen),char:topAlt.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),topAlt.basicError=!0,topAlt.prosValOpen=null;break;case id.MATCH:data.errors.push({line:data.findLine(data.lines,topAlt.prosValOpen),char:topAlt.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),topAlt.prosValOpen=null;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.prosvalopen=function(result,chars,phraseIndex){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:topAlt.prosValOpen=phraseIndex;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.prosvalstring=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:data.stringTabChar=!1;break;case id.EMPTY:case id.NOMATCH:break;case id.MATCH:!1!==data.stringTabChar&&data.errors.push({line:data.findLine(data.lines,data.stringTabChar),char:data.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.repetition=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:break;case id.NOMATCH:case id.MATCH:data.repCount+=1;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.rule=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:data.altStack.length=0,topAlt={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},data.altStack.push(topAlt);break;case id.EMPTY:throw Error(`${thisFileName}synRule: EMPTY: rule cannot be empty`);case id.NOMATCH:break;case id.MATCH:data.ruleCount+=1;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.ruleerror=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.rulenameerror=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.stringtab=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.stringTabChar=phraseIndex;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.tlsclose=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:break;case id.NOMATCH:data.errors.push({line:data.findLine(data.lines,topAlt.tlsOpen),char:topAlt.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),topAlt.basicError=!0,topAlt.tlsOpen=null;break;case id.MATCH:topAlt.tlsOpen=null;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.tlsopen=function(result,chars,phraseIndex){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:topAlt.tlsOpen=phraseIndex;break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.tlsstring=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:data.stringTabChar=!1;break;case id.EMPTY:case id.NOMATCH:break;case id.MATCH:!1!==data.stringTabChar&&data.errors.push({line:data.findLine(data.lines,data.stringTabChar),char:data.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.udtop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:if(data.strict){let name=apglib.utils.charsToString(chars,phraseIndex,result.phraseLength);data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`UDT operator found(${name}) - strict ABNF specified.`})}break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.bkaop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.strict?data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Positive look-behind operator(&&) found - strict ABNF specified."}):data.lite&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Positive look-behind operator(&&) found - apg-lite specified."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.bknop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.strict?data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Negative look-behind operator(!!) found - strict ABNF specified."}):data.lite&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Negative look-behind operator(!!) found - apg-lite specified."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.bkrop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:if(data.strict){let name=apglib.utils.charsToString(chars,phraseIndex,result.phraseLength);data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`Back reference operator(${name}) found - strict ABNF specified.`})}else if(data.lite){let name=apglib.utils.charsToString(chars,phraseIndex,result.phraseLength);data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:`Back reference operator(${name}) found - apg-lite specified.`})}break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.abgop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.strict?data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Beginning of string anchor(%^) found - strict ABNF specified."}):data.lite&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"Beginning of string anchor(%^) found - apg-lite specified."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}},this.callbacks.aenop=function(result,chars,phraseIndex,data){switch(result.state){case id.ACTIVE:case id.EMPTY:case id.NOMATCH:break;case id.MATCH:data.strict?data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"End of string anchor(%$) found - strict ABNF specified."}):data.lite&&data.errors.push({line:data.findLine(data.lines,phraseIndex,data.charsLength),char:phraseIndex,msg:"End of string anchor(%$) found - apg-lite specified."});break;default:throw Error(`${thisFileName}synFile: unrecognized case.`)}}}},"./node_modules/apg-js/src/apg-conv-api/converter.js":(__unused_webpack_module,exports,__webpack_require__)=>{let{Buffer}=__webpack_require__("./node_modules/buffer/index.js"),trans=__webpack_require__("./node_modules/apg-js/src/apg-conv-api/transformers.js"),UTF8="UTF8",UTF16="UTF16",UTF16BE="UTF16BE",UTF16LE="UTF16LE",UTF32="UTF32",UTF32BE="UTF32BE",UTF32LE="UTF32LE",UINT7="UINT7",ASCII="ASCII",BINARY="BINARY",UINT8="UINT8",UINT16="UINT16",UINT16LE="UINT16LE",UINT16BE="UINT16BE",UINT32="UINT32",UINT32LE="UINT32LE",UINT32BE="UINT32BE",ESCAPED="ESCAPED",STRING="STRING",bom8=function bom8(src){src.type=UTF8;let buf=src.data;src.bom=0,buf.length>=3&&239===buf[0]&&187===buf[1]&&191===buf[2]&&(src.bom=3)},bom16=function bom16(src){let buf=src.data;switch(src.bom=0,src.type){case UTF16:src.type=UTF16BE,buf.length>=2&&(254===buf[0]&&255===buf[1]?src.bom=2:255===buf[0]&&254===buf[1]&&(src.type=UTF16LE,src.bom=2));break;case UTF16BE:if(src.type=UTF16BE,buf.length>=2){if(254===buf[0]&&255===buf[1])src.bom=2;else if(255===buf[0]&&254===buf[1])throw TypeError(`src type: "${UTF16BE}" specified but BOM is for "${UTF16LE}"`)}break;case UTF16LE:if(src.type=UTF16LE,buf.length>=0){if(254===buf[0]&&255===buf[1])throw TypeError(`src type: "${UTF16LE}" specified but BOM is for "${UTF16BE}"`);255===buf[0]&&254===buf[1]&&(src.bom=2)}break;default:throw TypeError(`UTF16 BOM: src type "${src.type}" unrecognized`)}},bom32=function bom32(src){let buf=src.data;switch(src.bom=0,src.type){case UTF32:src.type=UTF32BE,buf.length>=4&&(0===buf[0]&&0===buf[1]&&254===buf[2]&&255===buf[3]&&(src.bom=4),255===buf[0]&&254===buf[1]&&0===buf[2]&&0===buf[3]&&(src.type=UTF32LE,src.bom=4));break;case UTF32BE:if(src.type=UTF32BE,buf.length>=4&&(0===buf[0]&&0===buf[1]&&254===buf[2]&&255===buf[3]&&(src.bom=4),255===buf[0]&&254===buf[1]&&0===buf[2]&&0===buf[3]))throw TypeError(`src type: ${UTF32BE} specified but BOM is for ${UTF32LE}"`);break;case UTF32LE:if(src.type=UTF32LE,buf.length>=4){if(0===buf[0]&&0===buf[1]&&254===buf[2]&&255===buf[3])throw TypeError(`src type: "${UTF32LE}" specified but BOM is for "${UTF32BE}"`);255===buf[0]&&254===buf[1]&&0===buf[2]&&0===buf[3]&&(src.bom=4)}break;default:throw TypeError(`UTF32 BOM: src type "${src.type}" unrecognized`)}},validateSrc=function validateSrc(type,data){let ret=function getType(typeArg){let ret={type:"",base64:!1},result=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(typeArg);return result&&(result[2]&&(ret.type=result[2].toUpperCase()),result[1]&&(ret.base64=!0)),ret}(type.toUpperCase());if(ret.base64){if(ret.type===STRING)throw TypeError(`type: "${type} "BASE64:" prefix not allowed with type ${STRING}`);if(Buffer.isBuffer(data))ret.data=trans.base64.decode(data);else if("string"==typeof data){let buf=Buffer.from(data,"ascii");ret.data=trans.base64.decode(buf)}else throw TypeError(`type: "${type} unrecognized data type: typeof(data): ${typeof data}`)}else ret.data=data;switch(ret.type){case UTF8:bom8(ret);break;case UTF16:case UTF16BE:case UTF16LE:bom16(ret);break;case UTF32:case UTF32BE:case UTF32LE:bom32(ret);break;case UINT16:ret.type=UINT16BE;break;case UINT32:ret.type=UINT32BE;break;case ASCII:ret.type=UINT7;break;case BINARY:ret.type=UINT8;break;case UINT7:case UINT8:case UINT16LE:case UINT16BE:case UINT32LE:case UINT32BE:case STRING:case ESCAPED:break;default:throw TypeError(`type: "${type}" not recognized`)}if(ret.type===STRING){if("string"!=typeof ret.data)throw TypeError(`type: "${type}" but data is not a string`)}else if(!Buffer.isBuffer(ret.data))throw TypeError(`type: "${type}" but data is not a Buffer`);return ret},validateDst=function validateDst(type,chars){function getType(typeArg){let fix,rem;let ret={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(rem=typeArg,"CRLF:"===(fix=typeArg.slice(0,5))){ret.crlf=!0,rem=typeArg.slice(5);break}"LF:"===(fix=typeArg.slice(0,3))&&(ret.lf=!0,rem=typeArg.slice(3));break}return 1===(fix=rem.split(":")).length?ret.type=fix[0]:2===fix.length&&"BASE64"===fix[1]&&(ret.base64=!0,ret.type=fix[0]),ret}if(!Array.isArray(chars))throw TypeError(`dst chars: not array: "${typeof chars}`);if("string"!=typeof type)throw TypeError(`dst type: not string: "${typeof type}`);let ret=getType(type.toUpperCase());switch(ret.type){case UTF8:case UTF16BE:case UTF16LE:case UTF32BE:case UTF32LE:case UINT7:case UINT8:case UINT16LE:case UINT16BE:case UINT32LE:case UINT32BE:case ESCAPED:break;case STRING:if(ret.base64)throw TypeError(`":BASE64" suffix not allowed with type ${STRING}`);break;case ASCII:ret.type=UINT7;break;case BINARY:ret.type=UINT8;break;case UTF16:ret.type=UTF16BE;break;case UTF32:ret.type=UTF32BE;break;case UINT16:ret.type=UINT16BE;break;case UINT32:ret.type=UINT32BE;break;default:throw TypeError(`dst type unrecognized: "${type}" : must have form [crlf:|lf:]type[:base64]`)}return ret},encode=function encode(type,chars){switch(type){case UTF8:return trans.utf8.encode(chars);case UTF16BE:return trans.utf16be.encode(chars);case UTF16LE:return trans.utf16le.encode(chars);case UTF32BE:return trans.utf32be.encode(chars);case UTF32LE:return trans.utf32le.encode(chars);case UINT7:return trans.uint7.encode(chars);case UINT8:return trans.uint8.encode(chars);case UINT16BE:return trans.uint16be.encode(chars);case UINT16LE:return trans.uint16le.encode(chars);case UINT32BE:return trans.uint32be.encode(chars);case UINT32LE:return trans.uint32le.encode(chars);case STRING:return trans.string.encode(chars);case ESCAPED:return trans.escaped.encode(chars);default:throw TypeError(`encode type "${type}" not recognized`)}},decode=function decode(src){switch(src.type){case UTF8:return trans.utf8.decode(src.data,src.bom);case UTF16LE:return trans.utf16le.decode(src.data,src.bom);case UTF16BE:return trans.utf16be.decode(src.data,src.bom);case UTF32BE:return trans.utf32be.decode(src.data,src.bom);case UTF32LE:return trans.utf32le.decode(src.data,src.bom);case UINT7:return trans.uint7.decode(src.data);case UINT8:return trans.uint8.decode(src.data);case UINT16BE:return trans.uint16be.decode(src.data);case UINT16LE:return trans.uint16le.decode(src.data);case UINT32BE:return trans.uint32be.decode(src.data);case UINT32LE:return trans.uint32le.decode(src.data);case STRING:return trans.string.decode(src.data);case ESCAPED:return trans.escaped.decode(src.data);default:throw TypeError(`decode type "${src.type}" not recognized`)}};exports.decode=function exportsDecode(type,data){return decode(validateSrc(type,data))},exports.encode=function exportsEncode(type,chars){let c,buf;let dst=validateDst(type,chars);return dst.crlf?(c=trans.lineEnds.crlf(chars),buf=encode(dst.type,c)):dst.lf?(c=trans.lineEnds.lf(chars),buf=encode(dst.type,c)):buf=encode(dst.type,chars),dst.base64&&(buf=trans.base64.encode(buf)),buf},exports.convert=function convert(srcType,srcData,dstType){return exports.encode(dstType,exports.decode(srcType,srcData))}},"./node_modules/apg-js/src/apg-conv-api/transformers.js":(__unused_webpack_module,exports,__webpack_require__)=>{let{Buffer}=__webpack_require__("./node_modules/buffer/index.js"),ascii=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],base64codes=[];"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(char=>{base64codes.push(char.charCodeAt(0))}),exports.utf8={encode(chars){let bytes=[];return chars.forEach(char=>{if(char>=0&&char<=127)bytes.push(char);else if(char<=2047)bytes.push(192+(char>>6&31)),bytes.push(128+(63&char));else if(char<55296||char>57343&&char<=65535)bytes.push(224+(char>>12&15)),bytes.push(128+(char>>6&63)),bytes.push(128+(63&char));else if(char>=65536&&char<=1114111){let u=char>>16&31;bytes.push(240+(u>>2)),bytes.push(128+((3&u)<<4)+(char>>12&15)),bytes.push(128+(char>>6&63)),bytes.push(128+(63&char))}else throw RangeError(`utf8.encode: character out of range: char: ${char}`)}),Buffer.from(bytes)},decode(buf,bom){let c,b1,i1,i2,i3,inc;function bytes2(b1,b2){if((192&b2)!=128)return 4294967293;let x=((31&b1)<<6)+(63&b2);return x<128?4294967292:x}function bytes3(b1,b2,b3){if((192&b3)!=128||(192&b2)!=128)return 4294967293;let x=((15&b1)<<12)+((63&b2)<<6)+(63&b3);return x<2048?4294967292:x>=55296&&x<=57343?4294967294:x}function bytes4(b1,b2,b3,b4){if((192&b4)!=128||(192&b3)!=128||(192&b2)!=128)return 4294967293;let x=(((7&b1)<<2)+(b2>>4&3)<<16)+((15&b2)<<12)+((63&b3)<<6)+(63&b4);return x<65536?4294967292:x>1114111?4294967294:x}let len=buf.length,i=bom?3:0,chars=[];for(;i<len;){for(b1=buf[i],c=4294967295;;){if(b1>=0&&b1<=127){c=b1,inc=1;break}if((i1=i+1)<len&&b1>=194&&b1<=223){c=bytes2(b1,buf[i1]),inc=2;break}if((i2=i+2)<len&&b1>=224&&b1<=239){c=bytes3(b1,buf[i1],buf[i2]),inc=3;break}(i3=i+3)<len&&b1>=240&&b1<=244&&(c=bytes4(b1,buf[i1],buf[i2],buf[i3]),inc=4);break}if(c>1114111){let at=`byte[${i}]`;if(4294967295===c)throw RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${at}`);if(4294967293===c)throw RangeError(`utf8.decode: illegal trailing byte found at: ${at}`);if(4294967294===c)throw RangeError(`utf8.decode: code point out of range found at: ${at}`);if(4294967292===c)throw RangeError(`utf8.decode: non-shortest form found at: ${at}`);throw RangeError(`utf8.decode: unrecognized error found at: ${at}`)}chars.push(c),i+=inc}return chars}},exports.utf16be={encode(chars){let char,h,l;let bytes=[];for(let i=0;i<chars.length;i+=1)if((char=chars[i])>=0&&char<=55295||char>=57344&&char<=65535)bytes.push(char>>8&255),bytes.push(255&char);else if(char>=65536&&char<=1114111)h=55296+((l=char-65536)>>10),l=56320+(1023&l),bytes.push(h>>8&255),bytes.push(255&h),bytes.push(l>>8&255),bytes.push(255&l);else throw RangeError(`utf16be.encode: UTF16BE value out of range: char[${i}]: ${char}`);return Buffer.from(bytes)},decode(buf,bom){let c,inc,i1,i3,high,low;if(buf.length%2>0)throw RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${buf.length}`);let chars=[],len=buf.length,i=bom?2:0,j=0;for(;i<len;){for(;;){if((i1=i+1)<len){if((high=(buf[i]<<8)+buf[i1])<55296||high>57343){c=high,inc=2;break}if((i3=i+3)<len&&(low=(buf[i+2]<<8)+buf[i3],high<=56319&&low>=56320&&low<=57343)){c=65536+(high-55296<<10)+(low-56320),inc=4;break}}throw RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${i}]`)}chars[j++]=c,i+=inc}return chars}},exports.utf16le={encode(chars){let char,h,l;let bytes=[];for(let i=0;i<chars.length;i+=1)if((char=chars[i])>=0&&char<=55295||char>=57344&&char<=65535)bytes.push(255&char),bytes.push(char>>8&255);else if(char>=65536&&char<=1114111)h=55296+((l=char-65536)>>10),l=56320+(1023&l),bytes.push(255&h),bytes.push(h>>8&255),bytes.push(255&l),bytes.push(l>>8&255);else throw RangeError(`utf16le.encode: UTF16LE value out of range: char[${i}]: ${char}`);return Buffer.from(bytes)},decode(buf,bom){let c,inc,i1,i3,high,low;if(buf.length%2>0)throw RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${buf.length}`);let chars=[],len=buf.length,i=bom?2:0,j=0;for(;i<len;){for(;;){if((i1=i+1)<len){if((high=(buf[i1]<<8)+buf[i])<55296||high>57343){c=high,inc=2;break}if((i3=i+3)<len&&(low=(buf[i3]<<8)+buf[i+2],high<=56319&&low>=56320&&low<=57343)){c=65536+(high-55296<<10)+(low-56320),inc=4;break}}throw RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${i}]`)}chars[j++]=c,i+=inc}return chars}},exports.utf32be={encode(chars){let buf=Buffer.alloc(4*chars.length),i=0;return chars.forEach(char=>{if(char>=55296&&char<=57343||char>1114111)throw RangeError(`utf32be.encode: UTF32BE character code out of range: char[${i/4}]: ${char}`);buf[i++]=char>>24&255,buf[i++]=char>>16&255,buf[i++]=char>>8&255,buf[i++]=255&char}),buf},decode(buf,bom){if(buf.length%4>0)throw RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${buf.length}`);let chars=[],i=bom?4:0;for(;i<buf.length;i+=4){let char=(buf[i]<<24)+(buf[i+1]<<16)+(buf[i+2]<<8)+buf[i+3];if(char>=55296&&char<=57343||char>1114111)throw RangeError(`utf32be.decode: UTF32BE character code out of range: char[${i/4}]: ${char}`);chars.push(char)}return chars}},exports.utf32le={encode(chars){let buf=Buffer.alloc(4*chars.length),i=0;return chars.forEach(char=>{if(char>=55296&&char<=57343||char>1114111)throw RangeError(`utf32le.encode: UTF32LE character code out of range: char[${i/4}]: ${char}`);buf[i++]=255&char,buf[i++]=char>>8&255,buf[i++]=char>>16&255,buf[i++]=char>>24&255}),buf},decode(buf,bom){if(buf.length%4>0)throw RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${buf.length}`);let chars=[],i=bom?4:0;for(;i<buf.length;i+=4){let char=(buf[i+3]<<24)+(buf[i+2]<<16)+(buf[i+1]<<8)+buf[i];if(char>=55296&&char<=57343||char>1114111)throw RangeError(`utf32le.encode: UTF32LE character code out of range: char[${i/4}]: ${char}`);chars.push(char)}return chars}},exports.uint7={encode(chars){let buf=Buffer.alloc(chars.length);for(let i=0;i<chars.length;i+=1){if(chars[i]>127)throw RangeError(`uint7.encode: UINT7 character code out of range: char[${i}]: ${chars[i]}`);buf[i]=chars[i]}return buf},decode(buf){let chars=[];for(let i=0;i<buf.length;i+=1){if(buf[i]>127)throw RangeError(`uint7.decode: UINT7 character code out of range: byte[${i}]: ${buf[i]}`);chars[i]=buf[i]}return chars}},exports.uint8={encode(chars){let buf=Buffer.alloc(chars.length);for(let i=0;i<chars.length;i+=1){if(chars[i]>255)throw RangeError(`uint8.encode: UINT8 character code out of range: char[${i}]: ${chars[i]}`);buf[i]=chars[i]}return buf},decode(buf){let chars=[];for(let i=0;i<buf.length;i+=1)chars[i]=buf[i];return chars}},exports.uint16be={encode(chars){let buf=Buffer.alloc(2*chars.length),i=0;return chars.forEach(char=>{if(char>65535)throw RangeError(`uint16be.encode: UINT16BE character code out of range: char[${i/2}]: ${char}`);buf[i++]=char>>8&255,buf[i++]=255&char}),buf},decode(buf){if(buf.length%2>0)throw RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${buf.length}`);let chars=[];for(let i=0;i<buf.length;i+=2)chars.push((buf[i]<<8)+buf[i+1]);return chars}},exports.uint16le={encode(chars){let buf=Buffer.alloc(2*chars.length),i=0;return chars.forEach(char=>{if(char>65535)throw RangeError(`uint16le.encode: UINT16LE character code out of range: char[${i/2}]: ${char}`);buf[i++]=255&char,buf[i++]=char>>8&255}),buf},decode(buf){if(buf.length%2>0)throw RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${buf.length}`);let chars=[];for(let i=0;i<buf.length;i+=2)chars.push((buf[i+1]<<8)+buf[i]);return chars}},exports.uint32be={encode(chars){let buf=Buffer.alloc(4*chars.length),i=0;return chars.forEach(char=>{buf[i++]=char>>24&255,buf[i++]=char>>16&255,buf[i++]=char>>8&255,buf[i++]=255&char}),buf},decode(buf){if(buf.length%4>0)throw RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${buf.length}`);let chars=[];for(let i=0;i<buf.length;i+=4)chars.push((buf[i]<<24)+(buf[i+1]<<16)+(buf[i+2]<<8)+buf[i+3]);return chars}},exports.uint32le={encode(chars){let buf=Buffer.alloc(4*chars.length),i=0;return chars.forEach(char=>{buf[i++]=255&char,buf[i++]=char>>8&255,buf[i++]=char>>16&255,buf[i++]=char>>24&255}),buf},decode(buf){if(buf.length%4>0)throw RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${buf.length}`);let chars=[];for(let i=0;i<buf.length;i+=4)chars.push((buf[i+3]<<24)+(buf[i+2]<<16)+(buf[i+1]<<8)+buf[i]);return chars}},exports.string={encode:chars=>exports.utf16le.encode(chars).toString("utf16le"),decode:str=>exports.utf16le.decode(Buffer.from(str,"utf16le"),0)},exports.escaped={encode(chars){let bytes=[];for(let i=0;i<chars.length;i+=1){let char=chars[i];if(96===char)bytes.push(char),bytes.push(char);else if(10===char)bytes.push(char);else if(char>=32&&char<=126)bytes.push(char);else{let str="";if(char>=0&&char<=31)str+=`\`x${ascii[char]}`;else if(char>=127&&char<=255)str+=`\`x${ascii[char]}`;else if(char>=256&&char<=65535)str+=`\`u${ascii[char>>8&255]}${ascii[255&char]}`;else if(char>=65536&&char<=4294967295){str+="`u{";let digit=char>>24&255;digit>0&&(str+=ascii[digit]),str+=`${ascii[char>>16&255]+ascii[char>>8&255]+ascii[255&char]}}`}else throw Error("escape.encode(char): char > 0xffffffff not allowed");Buffer.from(str).forEach(b=>{bytes.push(b)})}}return Buffer.from(bytes)},decode(buf){let i1,ret,error;function isHex(hex){return hex>=48&&hex<=57||hex>=65&&hex<=70||hex>=97&&hex<=102}function getx(i,len,bufArg){let ret={char:null,nexti:i+2,error:!0};if(i+1<len&&isHex(bufArg[i])&&isHex(bufArg[i+1])){let str=String.fromCodePoint(bufArg[i],bufArg[i+1]);ret.char=parseInt(str,16),Number.isNaN(ret.char)||(ret.error=!1)}return ret}function getu(i,len,bufArg){let ret={char:null,nexti:i+4,error:!0};if(i+3<len&&isHex(bufArg[i])&&isHex(bufArg[i+1])&&isHex(bufArg[i+2])&&isHex(bufArg[i+3])){let str=String.fromCodePoint(bufArg[i],bufArg[i+1],bufArg[i+2],bufArg[i+3]);ret.char=parseInt(str,16),Number.isNaN(ret.char)||(ret.error=!1)}return ret}function getU(i,len,bufArg){let ret={char:null,nexti:i+4,error:!0},str="";for(;i<len&&isHex(bufArg[i]);)str+=String.fromCodePoint(bufArg[i]),i+=1;return ret.char=parseInt(str,16),125!==bufArg[i]||Number.isNaN(ret.char)||(ret.error=!1),ret.nexti=i+1,ret}let chars=[],len=buf.length,i=0;for(;i<len;){for(;;){if(error=!0,96!==buf[i]){chars.push(buf[i]),i+=1,error=!1;break}if((i1=i+1)>=len)break;if(96===buf[i1]){chars.push(96),i+=2,error=!1;break}if(120===buf[i1]){if((ret=getx(i1+1,len,buf)).error)break;chars.push(ret.char),i=ret.nexti,error=!1;break}if(117===buf[i1]){if(123===buf[i1+1]){if((ret=getU(i1+2,len,buf)).error)break;chars.push(ret.char),i=ret.nexti,error=!1;break}if((ret=getu(i1+1,len,buf)).error)break;chars.push(ret.char),i=ret.nexti,error=!1}break}if(error)throw Error(`escaped.decode: ill-formed escape sequence at buf[${i}]`)}return chars}},exports.lineEnds={crlf(chars){let lfchars=[],i=0;for(;i<chars.length;)switch(chars[i]){case 13:i+1<chars.length&&10===chars[i+1]?i+=2:i+=1,lfchars.push(13),lfchars.push(10);break;case 10:lfchars.push(13),lfchars.push(10),i+=1;break;default:lfchars.push(chars[i]),i+=1}return lfchars.length>0&&10!==lfchars[lfchars.length-1]&&(lfchars.push(13),lfchars.push(10)),lfchars},lf(chars){let lfchars=[],i=0;for(;i<chars.length;)switch(chars[i]){case 13:i+1<chars.length&&10===chars[i+1]?i+=2:i+=1,lfchars.push(10);break;case 10:lfchars.push(10),i+=1;break;default:lfchars.push(chars[i]),i+=1}return lfchars.length>0&&10!==lfchars[lfchars.length-1]&&lfchars.push(10),lfchars}},exports.base64={encode(buf){let i,j,n;if(0===buf.length)return Buffer.alloc(0);let tail=buf.length%3;tail=tail>0?3-tail:0;let units=(buf.length+tail)/3,base64=Buffer.alloc(4*units);tail>0&&(units-=1),i=0,j=0;for(let u=0;u<units;u+=1)n=(buf[i++]<<16)+(buf[i++]<<8)+buf[i++],base64[j++]=base64codes[n>>18&63],base64[j++]=base64codes[n>>12&63],base64[j++]=base64codes[n>>6&63],base64[j++]=base64codes[63&n];return 0===tail?base64:1===tail?(n=(buf[i++]<<16)+(buf[i]<<8),base64[j++]=base64codes[n>>18&63],base64[j++]=base64codes[n>>12&63],base64[j++]=base64codes[n>>6&63],base64[j]=base64codes[64],base64):2===tail?(n=buf[i]<<16,base64[j++]=base64codes[n>>18&63],base64[j++]=base64codes[n>>12&63],base64[j++]=base64codes[64],base64[j]=base64codes[64],base64):void 0},decode(codes){let i,j,n;function validate(buf){let chars=[],tail=0;for(let i=0;i<buf.length;i+=1){let char=buf[i];for(;32!==char&&9!==char&&10!==char&&13!==char;){if(char>=65&&char<=90){chars.push(char-65);break}if(char>=97&&char<=122){chars.push(char-71);break}if(char>=48&&char<=57){chars.push(char+4);break}if(43===char){chars.push(62);break}if(47===char){chars.push(63);break}if(61===char){chars.push(64),tail+=1;break}throw RangeError(`base64.decode: invalid character buf[${i}]: ${char}`)}}if(chars.length%4>0)throw RangeError(`base64.decode: string length not integral multiple of 4: ${chars.length}`);switch(tail){case 0:break;case 1:if(64!==chars[chars.length-1])throw RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==chars[chars.length-1]||64!==chars[chars.length-2])throw RangeError("base64.decode: two tail characters found: not last characters");break;default:throw RangeError(`base64.decode: more than two tail characters found: ${tail}`)}return{tail,buf:Buffer.from(chars)}}if(0===codes.length)return Buffer.alloc(0);let val=validate(codes),{tail}=val,base64=val.buf,units=base64.length/4,buf=Buffer.alloc(3*units-tail);tail>0&&(units-=1),j=0,i=0;for(let u=0;u<units;u+=1)n=(base64[i++]<<18)+(base64[i++]<<12)+(base64[i++]<<6)+base64[i++],buf[j++]=n>>16&255,buf[j++]=n>>8&255,buf[j++]=255&n;return 1===tail&&(n=(base64[i++]<<18)+(base64[i++]<<12)+(base64[i]<<6),buf[j++]=n>>16&255,buf[j]=n>>8&255),2===tail&&(n=(base64[i++]<<18)+(base64[i++]<<12),buf[j]=n>>16&255),buf},toString(buf){if(buf.length%4>0)throw RangeError(`base64.toString: input buffer length not multiple of 4: ${buf.length}`);let str="",lineLen=0;function buildLine(c1,c2,c3,c4){switch(lineLen){case 76:str+=`\r
${c1}${c2}${c3}${c4}`,lineLen=4;break;case 75:str+=`${c1}\r
${c2}${c3}${c4}`,lineLen=3;break;case 74:str+=`${c1+c2}\r
${c3}${c4}`,lineLen=2;break;case 73:str+=`${c1+c2+c3}\r
${c4}`,lineLen=1;break;default:str+=c1+c2+c3+c4,lineLen+=4}}function validate(c){return c>=65&&c<=90||c>=97&&c<=122||c>=48&&c<=57||43===c||47===c||61===c}for(let i=0;i<buf.length;i+=4){for(let j=i;j<i+4;j+=1)if(!validate(buf[j]))throw RangeError(`base64.toString: buf[${j}]: ${buf[j]} : not valid base64 character code`);buildLine(String.fromCharCode(buf[i]),String.fromCharCode(buf[i+1]),String.fromCharCode(buf[i+2]),String.fromCharCode(buf[i+3]))}return str}}},"./node_modules/apg-js/src/apg-lib/ast.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exportsAst(){let id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),utils=__webpack_require__("./node_modules/apg-js/src/apg-lib/utilities.js"),that=this,rules=null,udts=null,chars=null,nodeCount=0,nodesDefined=[],nodeCallbacks=[],stack=[],records=[];function indent(n){let ret="";for(let i=0;i<n;i+=1)ret+=" ";return ret}this.callbacks=[],this.astObject="astObject",this.init=function init(rulesIn,udtsIn,charsIn){let i;stack.length=0,records.length=0,nodesDefined.length=0,nodeCount=0,rules=rulesIn,udts=udtsIn,chars=charsIn;let list=[];for(i=0;i<rules.length;i+=1)list.push(rules[i].lower);for(i=0;i<udts.length;i+=1)list.push(udts[i].lower);for(i=0,nodeCount=rules.length+udts.length;i<nodeCount;i+=1)nodesDefined[i]=!1,nodeCallbacks[i]=null;for(let index in that.callbacks){let lower=index.toLowerCase();if((i=list.indexOf(lower))<0)throw Error(`ast.js: init: node '${index}' not a rule or udt name`);"function"==typeof that.callbacks[index]&&(nodesDefined[i]=!0,nodeCallbacks[i]=that.callbacks[index]),!0===that.callbacks[index]&&(nodesDefined[i]=!0)}},this.ruleDefined=function ruleDefined(index){return!1!==nodesDefined[index]},this.udtDefined=function udtDefined(index){return!1!==nodesDefined[rules.length+index]},this.down=function down(callbackIndex,name){let thisIndex=records.length;return stack.push(thisIndex),records.push({name,thisIndex,thatIndex:null,state:id.SEM_PRE,callbackIndex,phraseIndex:null,phraseLength:null,stack:stack.length}),thisIndex},this.up=function up(callbackIndex,name,phraseIndex,phraseLength){let thisIndex=records.length,thatIndex=stack.pop();return records.push({name,thisIndex,thatIndex,state:id.SEM_POST,callbackIndex,phraseIndex,phraseLength,stack:stack.length}),records[thatIndex].thatIndex=thisIndex,records[thatIndex].phraseIndex=phraseIndex,records[thatIndex].phraseLength=phraseLength,thisIndex},this.translate=function translate(data){let callback,record;for(let i=0;i<records.length;i+=1)callback=nodeCallbacks[(record=records[i]).callbackIndex],record.state===id.SEM_PRE?null!==callback&&callback(id.SEM_PRE,chars,record.phraseIndex,record.phraseLength,data)===id.SEM_SKIP&&(i=record.thatIndex):null!==callback&&callback(id.SEM_POST,chars,record.phraseIndex,record.phraseLength,data)},this.setLength=function setLength(length){records.length=length,length>0?stack.length=records[length-1].stack:stack.length=0},this.getLength=function getLength(){return records.length},this.toXml=function toSml(modeArg){let display=utils.charsToDec,caption="decimal integer character codes";if("string"==typeof modeArg&&modeArg.length>=3){let mode=modeArg.slice(0,3).toLowerCase();"asc"===mode?(display=utils.charsToAscii,caption="ASCII for printing characters, hex for non-printing"):"hex"===mode?(display=utils.charsToHex,caption="hexadecimal integer character codes"):"uni"===mode&&(display=utils.charsToUnicode,caption="Unicode UTF-32 integer character codes")}let xml="",depth=0;return xml+=`<?xml version="1.0" encoding="utf-8"?>
<root nodes="${records.length/2}" characters="${chars.length}">
<!-- input string, ${caption} -->
`+indent(depth+2)+display(chars)+"\n",records.forEach(rec=>{rec.state===id.SEM_PRE?(depth+=1,xml+=indent(depth)+`<node name="${rec.name}" index="${rec.phraseIndex}" length="${rec.phraseLength}">
`+indent(depth+2)+display(chars,rec.phraseIndex,rec.phraseLength)+"\n"):(xml+=indent(depth)+`</node><!-- name="${rec.name}" -->
`,depth-=1)}),xml+="</root>\n"},this.phrases=function phrases(){let i,record;let obj={};for(i=0;i<records.length;i+=1)(record=records[i]).state===id.SEM_PRE&&(Array.isArray(obj[record.name])||(obj[record.name]=[]),obj[record.name].push({index:record.phraseIndex,length:record.phraseLength}));return obj}}},"./node_modules/apg-js/src/apg-lib/circular-buffer.js":module=>{module.exports=function exportsCircularBuffer(){let itemIndex=-1,maxListSize=0;this.init=function init(size){if("number"!=typeof size||size<=0)throw Error("circular-buffer.js: init: circular buffer size must an integer > 0");maxListSize=Math.ceil(size),itemIndex=-1},this.increment=function increment(){return((itemIndex+=1)+maxListSize)%maxListSize},this.maxSize=function maxSize(){return maxListSize},this.items=function items(){return itemIndex+1},this.getListIndex=function getListIndex(item){return -1===itemIndex||item<0||item>itemIndex||itemIndex-item>=maxListSize?-1:(item+maxListSize)%maxListSize},this.forEach=function forEach(fn){if(-1!==itemIndex){if(itemIndex<maxListSize){for(let i=0;i<=itemIndex;i+=1)fn(i,i);return}for(let i=itemIndex-maxListSize+1;i<=itemIndex;i+=1)fn((i+maxListSize)%maxListSize,i)}}}},"./node_modules/apg-js/src/apg-lib/emitcss.js":module=>{module.exports=function emittcss(){return"/* This file automatically generated by jsonToless() and LESS. */\n.apg-mono {\n font-family: monospace;\n}\n.apg-active {\n font-weight: bold;\n color: #000000;\n}\n.apg-match {\n font-weight: bold;\n color: #264BFF;\n}\n.apg-empty {\n font-weight: bold;\n color: #0fbd0f;\n}\n.apg-nomatch {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-lh-match {\n font-weight: bold;\n color: #1A97BA;\n}\n.apg-lb-match {\n font-weight: bold;\n color: #5F1687;\n}\n.apg-remainder {\n font-weight: bold;\n color: #999999;\n}\n.apg-ctrl-char {\n font-weight: bolder;\n font-style: italic;\n font-size: 0.6em;\n}\n.apg-line-end {\n font-weight: bold;\n color: #000000;\n}\n.apg-error {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-phrase {\n color: #000000;\n background-color: #8caae6;\n}\n.apg-empty-phrase {\n color: #0fbd0f;\n}\ntable.apg-state {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th,\ntable.apg-state td {\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th:nth-last-child(2),\ntable.apg-state td:nth-last-child(2) {\n text-align: right;\n}\ntable.apg-state caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-stats {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats th,\ntable.apg-stats td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace th,\ntable.apg-trace td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace th:last-child,\ntable.apg-trace th:nth-last-child(2),\ntable.apg-trace td:last-child,\ntable.apg-trace td:nth-last-child(2) {\n text-align: left;\n}\ntable.apg-grammar {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-grammar th,\ntable.apg-grammar td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar th:last-child,\ntable.apg-grammar td:last-child {\n text-align: left;\n}\ntable.apg-rules {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-rules th,\ntable.apg-rules td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules a {\n color: #003399 !important;\n}\ntable.apg-rules a:hover {\n color: #8caae6 !important;\n}\ntable.apg-attrs {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-attrs th,\ntable.apg-attrs td {\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs th:nth-child(1),\ntable.apg-attrs th:nth-child(2),\ntable.apg-attrs th:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs td:nth-child(1),\ntable.apg-attrs td:nth-child(2),\ntable.apg-attrs td:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs a {\n color: #003399 !important;\n}\ntable.apg-attrs a:hover {\n color: #8caae6 !important;\n}\n"}},"./node_modules/apg-js/src/apg-lib/identifiers.js":module=>{module.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}},"./node_modules/apg-js/src/apg-lib/node-exports.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports={ast:__webpack_require__("./node_modules/apg-js/src/apg-lib/ast.js"),circular:__webpack_require__("./node_modules/apg-js/src/apg-lib/circular-buffer.js"),ids:__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),parser:__webpack_require__("./node_modules/apg-js/src/apg-lib/parser.js"),stats:__webpack_require__("./node_modules/apg-js/src/apg-lib/stats.js"),trace:__webpack_require__("./node_modules/apg-js/src/apg-lib/trace.js"),utils:__webpack_require__("./node_modules/apg-js/src/apg-lib/utilities.js"),emitcss:__webpack_require__("./node_modules/apg-js/src/apg-lib/emitcss.js"),style:__webpack_require__("./node_modules/apg-js/src/apg-lib/style.js")}},"./node_modules/apg-js/src/apg-lib/parser.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function parser(){let opExecute,charsBegin,charsLength,charsEnd,lookAround;let id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),utils=__webpack_require__("./node_modules/apg-js/src/apg-lib/utilities.js"),thisFileName="parser.js: ",thisThis=this;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let opcodes=null,chars=null,treeDepth=0,maxTreeDepth=0,nodeHits=0,ruleCallbacks=null,udtCallbacks=null,rules=null,udts=null,syntaxData=null,maxMatched=0,limitTreeDepth=1/0,limitNodeHits=1/0,evaluateRule=function evaluateRule(ruleIndex,phraseIndex,sysData){let functionName=`${thisFileName}evaluateRule(): `;if(ruleIndex>=rules.length)throw Error(`${functionName}rule index: ${ruleIndex} out of range`);if(phraseIndex>=charsEnd)throw Error(`${functionName}phrase index: ${phraseIndex} out of range`);let{length}=opcodes;opcodes.push({type:id.RNM,index:ruleIndex}),opExecute(length,phraseIndex,sysData),opcodes.pop()},evaluateUdt=function(udtIndex,phraseIndex,sysData){let functionName=`${thisFileName}evaluateUdt(): `;if(udtIndex>=udts.length)throw Error(`${functionName}udt index: ${udtIndex} out of range`);if(phraseIndex>=charsEnd)throw Error(`${functionName}phrase index: ${phraseIndex} out of range`);let{length}=opcodes;opcodes.push({type:id.UDT,empty:udts[udtIndex].empty,index:udtIndex}),opExecute(length,phraseIndex,sysData),opcodes.pop()},clear=function(){treeDepth=0,maxTreeDepth=0,nodeHits=0,maxMatched=0,lookAround=[{lookAround:id.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],rules=null,udts=null,chars=null,charsBegin=0,charsLength=0,charsEnd=0,ruleCallbacks=null,udtCallbacks=null,syntaxData=null,opcodes=null},backRef=function(){let stack=[],copy=function(){let top=stack[stack.length-1],obj={};for(let name in top)obj[name]=top[name];return obj};this.push=function push(){stack.push(copy())},this.pop=function pop(lengthArg){let length=lengthArg;if(length||(length=stack.length-1),length<1||length>stack.length)throw Error(`${thisFileName}backRef.pop(): bad length: ${length}`);return stack.length=length,stack[stack.length-1]},this.length=function length(){return stack.length},this.savePhrase=function savePhrase(name,index,length){stack[stack.length-1][name]={phraseIndex:index,phraseLength:length}},this.getPhrase=function(name){return stack[stack.length-1][name]},function(){let obj={};rules.forEach(rule=>{rule.isBkr&&(obj[rule.lower]=null)}),udts.length>0&&udts.forEach(udt=>{udt.isBkr&&(obj[udt.lower]=null)}),stack.push(obj)}()},systemData=function systemData(){let thisData=this;this.state=id.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=lookAround[lookAround.length-1],this.uFrame=new backRef,this.pFrame=new backRef,this.evaluateRule=evaluateRule,this.evaluateUdt=evaluateUdt,this.refresh=function refresh(){thisData.state=id.ACTIVE,thisData.phraseLength=0,thisData.lookAround=lookAround[lookAround.length-1]}},lookAroundValue=function lookAroundValue(){return lookAround[lookAround.length-1]},inLookAround=function inLookAround(){return lookAround.length>1},initializeAst=function(){let functionName=`${thisFileName}initializeAst(): `;for(;;){if(void 0===thisThis.ast){thisThis.ast=null;break}if(null===thisThis.ast)break;if("astObject"!==thisThis.ast.astObject)throw Error(`${functionName}ast object not recognized`);break}null!==thisThis.ast&&thisThis.ast.init(rules,udts,chars)},initializeTrace=function(){let functionName=`${thisFileName}initializeTrace(): `;for(;;){if(void 0===thisThis.trace){thisThis.trace=null;break}if(null===thisThis.trace)break;if("traceObject"!==thisThis.trace.traceObject)throw Error(`${functionName}trace object not recognized`);break}null!==thisThis.trace&&thisThis.trace.init(rules,udts,chars)},initializeStats=function(){let functionName=`${thisFileName}initializeStats(): `;for(;;){if(void 0===thisThis.stats){thisThis.stats=null;break}if(null===thisThis.stats)break;if("statsObject"!==thisThis.stats.statsObject)throw Error(`${functionName}stats object not recognized`);break}null!==thisThis.stats&&thisThis.stats.init(rules,udts)},initializeGrammar=function(grammar){let functionName=`${thisFileName}initializeGrammar(): `;if(!grammar)throw Error(`${functionName}grammar object undefined`);if("grammarObject"!==grammar.grammarObject)throw Error(`${functionName}bad grammar object`);rules=grammar.rules,udts=grammar.udts},initializeStartRule=function(startRule){let functionName=`${thisFileName}initializeStartRule(): `,start=null;if("number"==typeof startRule){if(startRule>=rules.length)throw Error(`${functionName}start rule index too large: max: ${rules.length}: index: ${startRule}`);start=startRule}else if("string"==typeof startRule){let lower=startRule.toLowerCase();for(let i=0;i<rules.length;i+=1)if(lower===rules[i].lower){start=rules[i].index;break}if(null===start)throw Error(`${functionName}start rule name '${startRule}' not recognized`)}else throw Error(`${functionName}type of start rule '${typeof startRule}' not recognized`);return start},initializeInputChars=function initializeInputChars(inputArg,begArg,lenArg){let functionName=`${thisFileName}initializeInputChars(): `,input=inputArg,beg=begArg,len=lenArg;if(void 0===input)throw Error(`${functionName}input string is undefined`);if(null===input)throw Error(`${functionName}input string is null`);if("string"==typeof input)input=utils.stringToChars(input);else if(!Array.isArray(input))throw Error(`${functionName}input string is not a string or array`);if(input.length>0&&"number"!=typeof input[0])throw Error(`${functionName}input string not an array of integers`);if("number"!=typeof beg)beg=0;else if((beg=Math.floor(beg))<0||beg>input.length)throw Error(`${functionName}input beginning index out of range: ${beg}`);if("number"!=typeof len)len=input.length-beg;else if((len=Math.floor(len))<0||len>input.length-beg)throw Error(`${functionName}input length out of range: ${len}`);chars=input,charsEnd=(charsBegin=beg)+(charsLength=len)},initializeCallbacks=function(){let i,func;let functionName=`${thisFileName}initializeCallbacks(): `;for(i=0,ruleCallbacks=[],udtCallbacks=[];i<rules.length;i+=1)ruleCallbacks[i]=null;for(i=0;i<udts.length;i+=1)udtCallbacks[i]=null;let list=[];for(i=0;i<rules.length;i+=1)list.push(rules[i].lower);for(i=0;i<udts.length;i+=1)list.push(udts[i].lower);for(let index in thisThis.callbacks){if((i=list.indexOf(index.toLowerCase()))<0)throw Error(`${functionName}syntax callback '${index}' not a rule or udt name`);if((func=thisThis.callbacks[index])||(func=null),"function"==typeof func||null===func)i<rules.length?ruleCallbacks[i]=func:udtCallbacks[i-rules.length]=func;else throw Error(`${functionName}syntax callback[${index}] must be function reference or 'false' (false/null/undefined/etc.)`)}for(i=0;i<udts.length;i+=1)if(null===udtCallbacks[i])throw Error(`${functionName}all UDT callbacks must be defined. UDT callback[${udts[i].lower}] not a function reference`)};this.setMaxTreeDepth=function(depth){if("number"!=typeof depth||(limitTreeDepth=Math.floor(depth))<=0)throw Error(`parser: max tree depth must be integer > 0: ${depth}`)},this.setMaxNodeHits=function(hits){if("number"!=typeof hits||(limitNodeHits=Math.floor(hits))<=0)throw Error(`parser: max node hits must be integer > 0: ${hits}`)};let privateParse=function(grammar,startRuleArg,callbackData){let success;let functionName=`${thisFileName}parse(): `;initializeGrammar(grammar);let startRule=initializeStartRule(startRuleArg);initializeCallbacks(),initializeTrace(),initializeStats(),initializeAst();let sysData=new systemData;switch(null!=callbackData&&(syntaxData=callbackData),opcodes=[{type:id.RNM,index:startRule}],opExecute(0,charsBegin,sysData),opcodes=null,sysData.state){case id.ACTIVE:throw Error(`${functionName}final state should never be 'ACTIVE'`);case id.NOMATCH:success=!1;break;case id.EMPTY:case id.MATCH:success=sysData.phraseLength===charsLength;break;default:throw Error("unrecognized state")}return{success,state:sysData.state,length:charsLength,matched:sysData.phraseLength,maxMatched,maxTreeDepth,nodeHits,inputLength:chars.length,subBegin:charsBegin,subEnd:charsEnd,subLength:charsLength}};this.parseSubstring=function parseSubstring(grammar,startRule,inputChars,inputIndex,inputLength,callbackData){return clear(),initializeInputChars(inputChars,inputIndex,inputLength),privateParse(grammar,startRule,callbackData)},this.parse=function parse(grammar,startRule,inputChars,callbackData){return clear(),initializeInputChars(inputChars,0,inputChars.length),privateParse(grammar,startRule,callbackData)};let opALT=function(opIndex,phraseIndex,sysData){let op=opcodes[opIndex];for(let i=0;i<op.children.length&&(opExecute(op.children[i],phraseIndex,sysData),sysData.state===id.NOMATCH);i+=1);},opCAT=function(opIndex,phraseIndex,sysData){let success,astLength,catCharIndex,catPhrase;let op=opcodes[opIndex],ulen=sysData.uFrame.length(),plen=sysData.pFrame.length();thisThis.ast&&(astLength=thisThis.ast.getLength()),success=!0,catCharIndex=phraseIndex,catPhrase=0;for(let i=0;i<op.children.length;i+=1){if(opExecute(op.children[i],catCharIndex,sysData),sysData.state===id.NOMATCH){success=!1;break}catCharIndex+=sysData.phraseLength,catPhrase+=sysData.phraseLength}success?(sysData.state=0===catPhrase?id.EMPTY:id.MATCH,sysData.phraseLength=catPhrase):(sysData.state=id.NOMATCH,sysData.phraseLength=0,sysData.uFrame.pop(ulen),sysData.pFrame.pop(plen),thisThis.ast&&thisThis.ast.setLength(astLength))},opREP=function(opIndex,phraseIndex,sysData){let astLength,repCharIndex,repPhrase,repCount;let op=opcodes[opIndex];if(0===op.max){sysData.state=id.EMPTY,sysData.phraseLength=0;return}repCharIndex=phraseIndex,repPhrase=0,repCount=0;let ulen=sysData.uFrame.length(),plen=sysData.pFrame.length();for(thisThis.ast&&(astLength=thisThis.ast.getLength());!(repCharIndex>=charsEnd)&&(opExecute(opIndex+1,repCharIndex,sysData),sysData.state!==id.NOMATCH&&sysData.state!==id.EMPTY&&(repCount+=1,repPhrase+=sysData.phraseLength,repCharIndex+=sysData.phraseLength,repCount!==op.max)););sysData.state===id.EMPTY?(sysData.state=0===repPhrase?id.EMPTY:id.MATCH,sysData.phraseLength=repPhrase):repCount>=op.min?(sysData.state=0===repPhrase?id.EMPTY:id.MATCH,sysData.phraseLength=repPhrase):(sysData.state=id.NOMATCH,sysData.phraseLength=0,sysData.uFrame.pop(ulen),sysData.pFrame.pop(plen),thisThis.ast&&thisThis.ast.setLength(astLength))},validateRnmCallbackResult=function(rule,sysData,charsLeft,down){if(sysData.phraseLength>charsLeft){let str=`${thisFileName}opRNM(${rule.name}): callback function error: `;throw Error(str+=`sysData.phraseLength: ${sysData.phraseLength} must be <= remaining chars: ${charsLeft}`)}switch(sysData.state){case id.ACTIVE:if(!0!==down)throw Error(`${thisFileName}opRNM(${rule.name}): callback function return error. ACTIVE state not allowed.`);break;case id.EMPTY:sysData.phraseLength=0;break;case id.MATCH:0===sysData.phraseLength&&(sysData.state=id.EMPTY);break;case id.NOMATCH:sysData.phraseLength=0;break;default:throw Error(`${thisFileName}opRNM(${rule.name}): callback function return error. Unrecognized return state: ${sysData.state}`)}},opRNM=function(opIndex,phraseIndex,sysData){let astLength,astDefined,savedOpcodes,ulen,plen,saveFrame;let op=opcodes[opIndex],rule=rules[op.index],callback=ruleCallbacks[rule.index],notLookAround=!inLookAround();if(notLookAround&&((astDefined=thisThis.ast&&thisThis.ast.ruleDefined(op.index))&&(astLength=thisThis.ast.getLength(),thisThis.ast.down(op.index,rules[op.index].name)),ulen=sysData.uFrame.length(),plen=sysData.pFrame.length(),sysData.uFrame.push(),sysData.pFrame.push(),saveFrame=sysData.pFrame,sysData.pFrame=new backRef),null===callback)savedOpcodes=opcodes,opcodes=rule.opcodes,opExecute(0,phraseIndex,sysData),opcodes=savedOpcodes;else{let charsLeft=charsEnd-phraseIndex;sysData.ruleIndex=rule.index,callback(sysData,chars,phraseIndex,syntaxData),validateRnmCallbackResult(rule,sysData,charsLeft,!0),sysData.state===id.ACTIVE&&(savedOpcodes=opcodes,opcodes=rule.opcodes,opExecute(0,phraseIndex,sysData),opcodes=savedOpcodes,sysData.ruleIndex=rule.index,callback(sysData,chars,phraseIndex,syntaxData),validateRnmCallbackResult(rule,sysData,charsLeft,!1))}notLookAround&&(astDefined&&(sysData.state===id.NOMATCH?thisThis.ast.setLength(astLength):thisThis.ast.up(op.index,rule.name,phraseIndex,sysData.phraseLength)),sysData.pFrame=saveFrame,sysData.state===id.NOMATCH?(sysData.uFrame.pop(ulen),sysData.pFrame.pop(plen)):rule.isBkr&&(sysData.pFrame.savePhrase(rule.lower,phraseIndex,sysData.phraseLength),sysData.uFrame.savePhrase(rule.lower,phraseIndex,sysData.phraseLength)))},validateUdtCallbackResult=function(udt,sysData,charsLeft){if(sysData.phraseLength>charsLeft){let str=`${thisFileName}opUDT(${udt.name}): callback function error: `;throw Error(str+=`sysData.phraseLength: ${sysData.phraseLength} must be <= remaining chars: ${charsLeft}`)}switch(sysData.state){case id.ACTIVE:throw Error(`${thisFileName}opUDT(${udt.name}): callback function return error. ACTIVE state not allowed.`);case id.EMPTY:if(!1===udt.empty)throw Error(`${thisFileName}opUDT(${udt.name}): callback function return error. May not return EMPTY.`);sysData.phraseLength=0;break;case id.MATCH:if(0===sysData.phraseLength){if(!1===udt.empty)throw Error(`${thisFileName}opUDT(${udt.name}): callback function return error. May not return EMPTY.`);sysData.state=id.EMPTY}break;case id.NOMATCH:sysData.phraseLength=0;break;default:throw Error(`${thisFileName}opUDT(${udt.name}): callback function return error. Unrecognized return state: ${sysData.state}`)}},opUDT=function(opIndex,phraseIndex,sysData){let astLength,astIndex,astDefined,ulen,plen,saveFrame;let op=opcodes[opIndex],udt=udts[op.index];sysData.UdtIndex=udt.index;let notLookAround=!inLookAround();notLookAround&&((astDefined=thisThis.ast&&thisThis.ast.udtDefined(op.index))&&(astIndex=rules.length+op.index,astLength=thisThis.ast.getLength(),thisThis.ast.down(astIndex,udt.name)),ulen=sysData.uFrame.length(),plen=sysData.pFrame.length(),sysData.uFrame.push(),sysData.pFrame.push(),saveFrame=sysData.pFrame,sysData.pFrame=new backRef);let charsLeft=charsEnd-phraseIndex;udtCallbacks[op.index](sysData,chars,phraseIndex,syntaxData),validateUdtCallbackResult(udt,sysData,charsLeft),notLookAround&&(astDefined&&(sysData.state===id.NOMATCH?thisThis.ast.setLength(astLength):thisThis.ast.up(astIndex,udt.name,phraseIndex,sysData.phraseLength)),sysData.pFrame=saveFrame,sysData.state===id.NOMATCH?(sysData.uFrame.pop(ulen),sysData.pFrame.pop(plen)):udt.isBkr&&(sysData.pFrame.savePhrase(udt.lower,phraseIndex,sysData.phraseLength),sysData.uFrame.savePhrase(udt.lower,phraseIndex,sysData.phraseLength)))},opAND=function(opIndex,phraseIndex,sysData){lookAround.push({lookAround:id.LOOKAROUND_AHEAD,anchor:phraseIndex,charsEnd,charsLength}),charsEnd=chars.length,charsLength=chars.length-charsBegin,opExecute(opIndex+1,phraseIndex,sysData);let pop=lookAround.pop();switch(charsEnd=pop.charsEnd,charsLength=pop.charsLength,sysData.phraseLength=0,sysData.state){case id.EMPTY:case id.MATCH:sysData.state=id.EMPTY;break;case id.NOMATCH:sysData.state=id.NOMATCH;break;default:throw Error(`opAND: invalid state ${sysData.state}`)}},opNOT=function(opIndex,phraseIndex,sysData){lookAround.push({lookAround:id.LOOKAROUND_AHEAD,anchor:phraseIndex,charsEnd,charsLength}),charsEnd=chars.length,charsLength=chars.length-charsBegin,opExecute(opIndex+1,phraseIndex,sysData);let pop=lookAround.pop();switch(charsEnd=pop.charsEnd,charsLength=pop.charsLength,sysData.phraseLength=0,sysData.state){case id.EMPTY:case id.MATCH:sysData.state=id.NOMATCH;break;case id.NOMATCH:sysData.state=id.EMPTY;break;default:throw Error(`opNOT: invalid state ${sysData.state}`)}},opTRG=function(opIndex,phraseIndex,sysData){let op=opcodes[opIndex];sysData.state=id.NOMATCH,phraseIndex<charsEnd&&op.min<=chars[phraseIndex]&&chars[phraseIndex]<=op.max&&(sysData.state=id.MATCH,sysData.phraseLength=1)},opTBS=function(opIndex,phraseIndex,sysData){let i;let op=opcodes[opIndex],len=op.string.length;if(sysData.state=id.NOMATCH,phraseIndex+len<=charsEnd){for(i=0;i<len;i+=1)if(chars[phraseIndex+i]!==op.string[i])return;sysData.state=id.MATCH,sysData.phraseLength=len}},opTLS=function(opIndex,phraseIndex,sysData){let i,code;let op=opcodes[opIndex];sysData.state=id.NOMATCH;let len=op.string.length;if(0===len){sysData.state=id.EMPTY;return}if(phraseIndex+len<=charsEnd){for(i=0;i<len;i+=1)if((code=chars[phraseIndex+i])>=65&&code<=90&&(code+=32),code!==op.string[i])return;sysData.state=id.MATCH,sysData.phraseLength=len}},opABG=function(opIndex,phraseIndex,sysData){sysData.state=id.NOMATCH,sysData.phraseLength=0,sysData.state=0===phraseIndex?id.EMPTY:id.NOMATCH},opAEN=function(opIndex,phraseIndex,sysData){sysData.state=id.NOMATCH,sysData.phraseLength=0,sysData.state=phraseIndex===chars.length?id.EMPTY:id.NOMATCH},opBKR=function(opIndex,phraseIndex,sysData){let i,code,lmcode,lower;let op=opcodes[opIndex];sysData.state=id.NOMATCH,lower=op.index<rules.length?rules[op.index].lower:udts[op.index-rules.length].lower;let frame=op.bkrMode===id.BKR_MODE_PM?sysData.pFrame.getPhrase(lower):sysData.uFrame.getPhrase(lower),insensitive=op.bkrCase===id.BKR_MODE_CI;if(null===frame)return;let lmIndex=frame.phraseIndex,len=frame.phraseLength;if(0===len){sysData.state=id.EMPTY;return}if(phraseIndex+len<=charsEnd){if(insensitive){for(i=0;i<len;i+=1)if(code=chars[phraseIndex+i],lmcode=chars[lmIndex+i],code>=65&&code<=90&&(code+=32),lmcode>=65&&lmcode<=90&&(lmcode+=32),code!==lmcode)return;sysData.state=id.MATCH,sysData.phraseLength=len}else for(i=0;i<len;i+=1)if((code=chars[phraseIndex+i])!==(lmcode=chars[lmIndex+i]))return;sysData.state=id.MATCH,sysData.phraseLength=len}},opBKA=function(opIndex,phraseIndex,sysData){switch(lookAround.push({lookAround:id.LOOKAROUND_BEHIND,anchor:phraseIndex}),opExecute(opIndex+1,phraseIndex,sysData),lookAround.pop(),sysData.phraseLength=0,sysData.state){case id.EMPTY:case id.MATCH:sysData.state=id.EMPTY;break;case id.NOMATCH:sysData.state=id.NOMATCH;break;default:throw Error(`opBKA: invalid state ${sysData.state}`)}},opBKN=function(opIndex,phraseIndex,sysData){switch(lookAround.push({lookAround:id.LOOKAROUND_BEHIND,anchor:phraseIndex}),opExecute(opIndex+1,phraseIndex,sysData),lookAround.pop(),sysData.phraseLength=0,sysData.state){case id.EMPTY:case id.MATCH:sysData.state=id.NOMATCH;break;case id.NOMATCH:sysData.state=id.EMPTY;break;default:throw Error(`opBKN: invalid state ${sysData.state}`)}},opCATBehind=function(opIndex,phraseIndex,sysData){let success,astLength,catCharIndex,catMatched;let op=opcodes[opIndex],ulen=sysData.uFrame.length(),plen=sysData.pFrame.length();thisThis.ast&&(astLength=thisThis.ast.getLength()),success=!0,catCharIndex=phraseIndex,catMatched=0;for(let i=op.children.length-1;i>=0;i-=1)if(opExecute(op.children[i],catCharIndex,sysData),catCharIndex-=sysData.phraseLength,catMatched+=sysData.phraseLength,sysData.state===id.NOMATCH){success=!1;break}success?(sysData.state=0===catMatched?id.EMPTY:id.MATCH,sysData.phraseLength=catMatched):(sysData.state=id.NOMATCH,sysData.phraseLength=0,sysData.uFrame.pop(ulen),sysData.pFrame.pop(plen),thisThis.ast&&thisThis.ast.setLength(astLength))},opREPBehind=function(opIndex,phraseIndex,sysData){let astLength,repCharIndex,repPhrase,repCount;let op=opcodes[opIndex];repCharIndex=phraseIndex,repPhrase=0,repCount=0;let ulen=sysData.uFrame.length(),plen=sysData.pFrame.length();for(thisThis.ast&&(astLength=thisThis.ast.getLength());!(repCharIndex<=0)&&(opExecute(opIndex+1,repCharIndex,sysData),sysData.state!==id.NOMATCH&&sysData.state!==id.EMPTY&&(repCount+=1,repPhrase+=sysData.phraseLength,repCharIndex-=sysData.phraseLength,repCount!==op.max)););sysData.state===id.EMPTY?(sysData.state=0===repPhrase?id.EMPTY:id.MATCH,sysData.phraseLength=repPhrase):repCount>=op.min?(sysData.state=0===repPhrase?id.EMPTY:id.MATCH,sysData.phraseLength=repPhrase):(sysData.state=id.NOMATCH,sysData.phraseLength=0,sysData.uFrame.pop(ulen),sysData.pFrame.pop(plen),thisThis.ast&&thisThis.ast.setLength(astLength))},opTRGBehind=function(opIndex,phraseIndex,sysData){let op=opcodes[opIndex];if(sysData.state=id.NOMATCH,sysData.phraseLength=0,phraseIndex>0){let char=chars[phraseIndex-1];op.min<=char&&char<=op.max&&(sysData.state=id.MATCH,sysData.phraseLength=1)}},opTBSBehind=function(opIndex,phraseIndex,sysData){let i;let op=opcodes[opIndex];sysData.state=id.NOMATCH;let len=op.string.length,beg=phraseIndex-len;if(beg>=0){for(i=0;i<len;i+=1)if(chars[beg+i]!==op.string[i])return;sysData.state=id.MATCH,sysData.phraseLength=len}},opTLSBehind=function(opIndex,phraseIndex,sysData){let char;let op=opcodes[opIndex];sysData.state=id.NOMATCH;let len=op.string.length;if(0===len){sysData.state=id.EMPTY;return}let beg=phraseIndex-len;if(beg>=0){for(let i=0;i<len;i+=1)if((char=chars[beg+i])>=65&&char<=90&&(char+=32),char!==op.string[i])return;sysData.state=id.MATCH,sysData.phraseLength=len}},opBKRBehind=function(opIndex,phraseIndex,sysData){let i,code,lmcode,lower;let op=opcodes[opIndex];sysData.state=id.NOMATCH,sysData.phraseLength=0,lower=op.index<rules.length?rules[op.index].lower:udts[op.index-rules.length].lower;let frame=op.bkrMode===id.BKR_MODE_PM?sysData.pFrame.getPhrase(lower):sysData.uFrame.getPhrase(lower),insensitive=op.bkrCase===id.BKR_MODE_CI;if(null===frame)return;let lmIndex=frame.phraseIndex,len=frame.phraseLength;if(0===len){sysData.state=id.EMPTY,sysData.phraseLength=0;return}let beg=phraseIndex-len;if(beg>=0){if(insensitive){for(i=0;i<len;i+=1)if(code=chars[beg+i],lmcode=chars[lmIndex+i],code>=65&&code<=90&&(code+=32),lmcode>=65&&lmcode<=90&&(lmcode+=32),code!==lmcode)return;sysData.state=id.MATCH,sysData.phraseLength=len}else for(i=0;i<len;i+=1)if((code=chars[beg+i])!==(lmcode=chars[lmIndex+i]))return;sysData.state=id.MATCH,sysData.phraseLength=len}};opExecute=function opExecuteFunc(opIndex,phraseIndex,sysData){let ret=!0,op=opcodes[opIndex];if((nodeHits+=1)>limitNodeHits)throw Error(`parser: maximum number of node hits exceeded: ${limitNodeHits}`);if((treeDepth+=1)>maxTreeDepth&&(maxTreeDepth=treeDepth)>limitTreeDepth)throw Error(`parser: maximum parse tree depth exceeded: ${limitTreeDepth}`);if(sysData.refresh(),null!==thisThis.trace){let lk=lookAroundValue();thisThis.trace.down(op,sysData.state,phraseIndex,sysData.phraseLength,lk.anchor,lk.lookAround)}if(lookAround[lookAround.length-1].lookAround===id.LOOKAROUND_BEHIND)switch(op.type){case id.ALT:opALT(opIndex,phraseIndex,sysData);break;case id.CAT:opCATBehind(opIndex,phraseIndex,sysData);break;case id.REP:opREPBehind(opIndex,phraseIndex,sysData);break;case id.RNM:opRNM(opIndex,phraseIndex,sysData);break;case id.UDT:opUDT(opIndex,phraseIndex,sysData);break;case id.AND:opAND(opIndex,phraseIndex,sysData);break;case id.NOT:opNOT(opIndex,phraseIndex,sysData);break;case id.TRG:opTRGBehind(opIndex,phraseIndex,sysData);break;case id.TBS:opTBSBehind(opIndex,phraseIndex,sysData);break;case id.TLS:opTLSBehind(opIndex,phraseIndex,sysData);break;case id.BKR:opBKRBehind(opIndex,phraseIndex,sysData);break;case id.BKA:opBKA(opIndex,phraseIndex,sysData);break;case id.BKN:opBKN(opIndex,phraseIndex,sysData);break;case id.ABG:opABG(opIndex,phraseIndex,sysData);break;case id.AEN:opAEN(opIndex,phraseIndex,sysData);break;default:ret=!1}else switch(op.type){case id.ALT:opALT(opIndex,phraseIndex,sysData);break;case id.CAT:opCAT(opIndex,phraseIndex,sysData);break;case id.REP:opREP(opIndex,phraseIndex,sysData);break;case id.RNM:opRNM(opIndex,phraseIndex,sysData);break;case id.UDT:opUDT(opIndex,phraseIndex,sysData);break;case id.AND:opAND(opIndex,phraseIndex,sysData);break;case id.NOT:opNOT(opIndex,phraseIndex,sysData);break;case id.TRG:opTRG(opIndex,phraseIndex,sysData);break;case id.TBS:opTBS(opIndex,phraseIndex,sysData);break;case id.TLS:opTLS(opIndex,phraseIndex,sysData);break;case id.BKR:opBKR(opIndex,phraseIndex,sysData);break;case id.BKA:opBKA(opIndex,phraseIndex,sysData);break;case id.BKN:opBKN(opIndex,phraseIndex,sysData);break;case id.ABG:opABG(opIndex,phraseIndex,sysData);break;case id.AEN:opAEN(opIndex,phraseIndex,sysData);break;default:ret=!1}if(!inLookAround()&&phraseIndex+sysData.phraseLength>maxMatched&&(maxMatched=phraseIndex+sysData.phraseLength),null!==thisThis.stats&&thisThis.stats.collect(op,sysData),null!==thisThis.trace){let lk=lookAroundValue();thisThis.trace.up(op,sysData.state,phraseIndex,sysData.phraseLength,lk.anchor,lk.lookAround)}return treeDepth-=1,ret}}},"./node_modules/apg-js/src/apg-lib/stats.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function statsFunc(){let totals;let id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),utils=__webpack_require__("./node_modules/apg-js/src/apg-lib/utilities.js"),style=__webpack_require__("./node_modules/apg-js/src/apg-lib/style.js"),rules=[],udts=[],stats=[],ruleStats=[],udtStats=[];this.statsObject="statsObject";let sortAlpha=function sortAlpha(lhs,rhs){return lhs.lower<rhs.lower?-1:lhs.lower>rhs.lower?1:0},sortHits=function sortHits(lhs,rhs){return lhs.total<rhs.total?1:lhs.total>rhs.total?-1:sortAlpha(lhs,rhs)},sortIndex=function sortIndex(lhs,rhs){return lhs.index<rhs.index?-1:lhs.index>rhs.index?1:0},EmptyStat=function EmptyStat(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},clear=function clear(){stats.length=0,totals=new EmptyStat,stats[id.ALT]=new EmptyStat,stats[id.CAT]=new EmptyStat,stats[id.REP]=new EmptyStat,stats[id.RNM]=new EmptyStat,stats[id.TRG]=new EmptyStat,stats[id.TBS]=new EmptyStat,stats[id.TLS]=new EmptyStat,stats[id.UDT]=new EmptyStat,stats[id.AND]=new EmptyStat,stats[id.NOT]=new EmptyStat,stats[id.BKR]=new EmptyStat,stats[id.BKA]=new EmptyStat,stats[id.BKN]=new EmptyStat,stats[id.ABG]=new EmptyStat,stats[id.AEN]=new EmptyStat,ruleStats.length=0;for(let i=0;i<rules.length;i+=1)ruleStats.push({empty:0,match:0,nomatch:0,total:0,name:rules[i].name,lower:rules[i].lower,index:rules[i].index});if(udts.length>0){udtStats.length=0;for(let i=0;i<udts.length;i+=1)udtStats.push({empty:0,match:0,nomatch:0,total:0,name:udts[i].name,lower:udts[i].lower,index:udts[i].index})}},incStat=function incStat(stat,state){switch(stat.total+=1,state){case id.EMPTY:stat.empty+=1;break;case id.MATCH:stat.match+=1;break;case id.NOMATCH:stat.nomatch+=1;break;default:throw Error(`stats.js: collect(): incStat(): unrecognized state: ${state}`)}},displayRow=function displayRow(name,stat){return`<tr><td class="${style.CLASS_ACTIVE}">${name}</td><td class="${style.CLASS_EMPTY}">${stat.empty}</td><td class="${style.CLASS_MATCH}">${stat.match}</td><td class="${style.CLASS_NOMATCH}">${stat.nomatch}</td><td class="${style.CLASS_ACTIVE}">${stat.total}</td></tr>
`},displayOpsOnly=function displayOpsOnly(){return""+(displayRow("ALT",stats[id.ALT])+displayRow("CAT",stats[id.CAT])+displayRow("REP",stats[id.REP])+displayRow("RNM",stats[id.RNM])+displayRow("TRG",stats[id.TRG])+displayRow("TBS",stats[id.TBS])+displayRow("TLS",stats[id.TLS])+displayRow("UDT",stats[id.UDT])+displayRow("AND",stats[id.AND])+displayRow("NOT",stats[id.NOT])+displayRow("BKR",stats[id.BKR])+displayRow("BKA",stats[id.BKA])+displayRow("BKN",stats[id.BKN])+displayRow("ABG",stats[id.ABG])+displayRow("AEN",stats[id.AEN])+displayRow("totals",totals))},displayRules=function displayRules(){let html="";html+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>\n";for(let i=0;i<rules.length;i+=1)ruleStats[i].total>0&&(html+=`<tr><td class="${style.CLASS_ACTIVE}">${ruleStats[i].name}</td><td class="${style.CLASS_EMPTY}">${ruleStats[i].empty}</td><td class="${style.CLASS_MATCH}">${ruleStats[i].match}</td><td class="${style.CLASS_NOMATCH}">${ruleStats[i].nomatch}</td><td class="${style.CLASS_ACTIVE}">${ruleStats[i].total}</td></tr>
`);if(udts.length>0){html+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n<tr><th>udts</th><th></th><th></th><th></th><th></th></tr>\n";for(let i=0;i<udts.length;i+=1)udtStats[i].total>0&&(html+=`<tr><td class="${style.CLASS_ACTIVE}">${udtStats[i].name}</td><td class="${style.CLASS_EMPTY}">${udtStats[i].empty}</td><td class="${style.CLASS_MATCH}">${udtStats[i].match}</td><td class="${style.CLASS_NOMATCH}">${udtStats[i].nomatch}</td><td class="${style.CLASS_ACTIVE}">${udtStats[i].total}</td></tr>
`)}return html};this.validate=function validate(name){let ret=!1;return"string"==typeof name&&"stats"===name&&(ret=!0),ret},this.init=function init(inputRules,inputUdts){rules=inputRules,udts=inputUdts,clear()},this.collect=function collect(op,result){incStat(totals,result.state,result.phraseLength),incStat(stats[op.type],result.state,result.phraseLength),op.type===id.RNM&&incStat(ruleStats[op.index],result.state,result.phraseLength),op.type===id.UDT&&incStat(udtStats[op.index],result.state,result.phraseLength)},this.toHtml=function toHtml(type,caption){let html="";for(html+=`<table class="${style.CLASS_STATS}">
`,"string"==typeof caption&&(html+=`<caption>${caption}</caption>
`),html+=`<tr><th class="${style.CLASS_ACTIVE}">ops</th>
<th class="${style.CLASS_EMPTY}">EMPTY</th>
<th class="${style.CLASS_MATCH}">MATCH</th>
<th class="${style.CLASS_NOMATCH}">NOMATCH</th>
<th class="${style.CLASS_ACTIVE}">totals</th></tr>
`;;){if(null==type||"ops"===type){html+=displayOpsOnly();break}if("index"===type){ruleStats.sort(sortIndex),udtStats.length>0&&udtStats.sort(sortIndex),html+=displayOpsOnly()+displayRules();break}if("hits"===type){ruleStats.sort(sortHits),udtStats.length>0&&udtStats.sort(sortIndex),html+=displayOpsOnly()+displayRules();break}"alpha"===type&&(ruleStats.sort(sortAlpha),udtStats.length>0&&udtStats.sort(sortAlpha),html+=displayOpsOnly()+displayRules());break}return html+"</table>\n"},this.toHtmlPage=function toHtmlPage(type,caption,title){return utils.htmlToPage(this.toHtml(type,caption),title)}}},"./node_modules/apg-js/src/apg-lib/style.js":module=>{module.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}},"./node_modules/apg-js/src/apg-lib/trace.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function exportTrace(){let utils=__webpack_require__("./node_modules/apg-js/src/apg-lib/utilities.js"),style=__webpack_require__("./node_modules/apg-js/src/apg-lib/style.js"),circular=new(__webpack_require__("./node_modules/apg-js/src/apg-lib/circular-buffer.js")),id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),thisFileName="trace.js: ",that=this,records=[],maxRecords=5e3,lastRecord=-1,filteredRecords=0,treeDepth=0,recordStack=[],chars=null,rules=null,udts=null,operatorFilter=[],ruleFilter=[],PHRASE_END=`<span class="${style.CLASS_LINEEND}">•</span>`,PHRASE_CONTINUE=`<span class="${style.CLASS_LINEEND}">…</span>`,PHRASE_EMPTY=`<span class="${style.CLASS_EMPTY}">𝜺</span>`,initOperatorFilter=function(){let setOperators=function(set){operatorFilter[id.ALT]=set,operatorFilter[id.CAT]=set,operatorFilter[id.REP]=set,operatorFilter[id.TLS]=set,operatorFilter[id.TBS]=set,operatorFilter[id.TRG]=set,operatorFilter[id.AND]=set,operatorFilter[id.NOT]=set,operatorFilter[id.BKR]=set,operatorFilter[id.BKA]=set,operatorFilter[id.BKN]=set,operatorFilter[id.ABG]=set,operatorFilter[id.AEN]=set},items=0;for(let name in that.filter.operators)items+=1;if(0===items){setOperators(!1);return}for(let name in that.filter.operators){let upper=name.toUpperCase();if("<ALL>"===upper){setOperators(!0);return}if("<NONE>"===upper){setOperators(!1);return}}for(let name in setOperators(!1),that.filter.operators){let upper=name.toUpperCase();if("ALT"===upper)operatorFilter[id.ALT]=!0===that.filter.operators[name];else if("CAT"===upper)operatorFilter[id.CAT]=!0===that.filter.operators[name];else if("REP"===upper)operatorFilter[id.REP]=!0===that.filter.operators[name];else if("AND"===upper)operatorFilter[id.AND]=!0===that.filter.operators[name];else if("NOT"===upper)operatorFilter[id.NOT]=!0===that.filter.operators[name];else if("TLS"===upper)operatorFilter[id.TLS]=!0===that.filter.operators[name];else if("TBS"===upper)operatorFilter[id.TBS]=!0===that.filter.operators[name];else if("TRG"===upper)operatorFilter[id.TRG]=!0===that.filter.operators[name];else if("BKR"===upper)operatorFilter[id.BKR]=!0===that.filter.operators[name];else if("BKA"===upper)operatorFilter[id.BKA]=!0===that.filter.operators[name];else if("BKN"===upper)operatorFilter[id.BKN]=!0===that.filter.operators[name];else if("ABG"===upper)operatorFilter[id.ABG]=!0===that.filter.operators[name];else if("AEN"===upper)operatorFilter[id.AEN]=!0===that.filter.operators[name];else throw Error(`${thisFileName}initOpratorFilter: '${name}' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`)}},initRuleFilter=function(){let items,i;let setRules=function(set){operatorFilter[id.RNM]=set,operatorFilter[id.UDT]=set;let count=rules.length+udts.length;ruleFilter.length=0;for(let i=0;i<count;i+=1)ruleFilter.push(set)},list=[];for(i=0;i<rules.length;i+=1)list.push(rules[i].lower);for(i=0;i<udts.length;i+=1)list.push(udts[i].lower);for(let name in ruleFilter.length=0,items=0,that.filter.rules)items+=1;if(0===items){setRules(!0);return}for(let name in that.filter.rules){let lower=name.toLowerCase();if("<all>"===lower){setRules(!0);return}if("<none>"===lower){setRules(!1);return}}for(let name in setRules(!1),operatorFilter[id.RNM]=!0,operatorFilter[id.UDT]=!0,that.filter.rules){let lower=name.toLowerCase();if((i=list.indexOf(lower))<0)throw Error(`${thisFileName}initRuleFilter: '${name}' not a valid rule or udt name`);ruleFilter[i]=!0===that.filter.rules[name]}};this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(max,last){if(lastRecord=-1,"number"==typeof max&&max>0)maxRecords=Math.ceil(max);else{maxRecords=0;return}"number"==typeof last&&(lastRecord=Math.floor(last))<0&&(lastRecord=-1)},this.getMaxRecords=function(){return maxRecords},this.getLastRecord=function(){return lastRecord},this.init=function(rulesIn,udtsIn,charsIn){records.length=0,recordStack.length=0,filteredRecords=0,treeDepth=0,chars=charsIn,rules=rulesIn,udts=udtsIn,initOperatorFilter(),initRuleFilter(),circular.init(maxRecords)};let filterOps=function(op){return op.type===id.RNM?!!operatorFilter[op.type]&&!!ruleFilter[op.index]:op.type===id.UDT?!!operatorFilter[op.type]&&!!ruleFilter[rules.length+op.index]:operatorFilter[op.type]},filterRecords=function(record){return -1===lastRecord||record<=lastRecord};this.down=function(op,state,offset,length,anchor,lookAround){filterRecords(filteredRecords)&&filterOps(op)&&(recordStack.push(filteredRecords),records[circular.increment()]={dirUp:!1,depth:treeDepth,thisLine:filteredRecords,thatLine:void 0,opcode:op,state,phraseIndex:offset,phraseLength:length,lookAnchor:anchor,lookAround},filteredRecords+=1,treeDepth+=1)},this.up=function(op,state,offset,length,anchor,lookAround){if(filterRecords(filteredRecords)&&filterOps(op)){let thisLine=filteredRecords,thatLine=recordStack.pop(),thatRecord=circular.getListIndex(thatLine);-1!==thatRecord&&(records[thatRecord].thatLine=thisLine),treeDepth-=1,records[circular.increment()]={dirUp:!0,depth:treeDepth,thisLine,thatLine,opcode:op,state,phraseIndex:offset,phraseLength:length,lookAnchor:anchor,lookAround},filteredRecords+=1}};let toTreeObj=function(){let root,node,parent,record,branchesIncomplete;function nodeOpcode(node,opcode){let name,casetype,modetype;if(opcode)switch(node.op={id:opcode.type,name:utils.opcodeToString(opcode.type)},node.opData=void 0,opcode.type){case id.RNM:node.opData=rules[opcode.index].name;break;case id.UDT:node.opData=udts[opcode.index].name;break;case id.BKR:name=opcode.index<rules.length?rules[opcode.index].name:udts[opcode.index-rules.length].name,casetype=opcode.bkrCase===id.BKR_MODE_CI?"%i":"%s",modetype=opcode.bkrMode===id.BKR_MODE_UM?"%u":"%p",node.opData=`\\\\${casetype}${modetype}${name}`;break;case id.TLS:node.opData=[];for(let i=0;i<opcode.string.length;i+=1)node.opData.push(opcode.string[i]);break;case id.TBS:node.opData=[];for(let i=0;i<opcode.string.length;i+=1)node.opData.push(opcode.string[i]);break;case id.TRG:case id.REP:node.opData=[opcode.min,opcode.max];break;default:throw Error("unrecognized opcode")}else node.op={id:void 0,name:void 0},node.opData=void 0}function nodePhrase(state,index,length){return state===id.MATCH?{index,length}:state===id.NOMATCH||state===id.EMPTY?{index,length:0}:null}let nodeId=-1;function nodeDown(parent,record,depth){let node={id:nodeId++,branch:-1,parent,up:!1,down:!1,depth,children:[]};return record?(node.down=!0,node.state={id:record.state,name:utils.stateToString(record.state)},node.phrase=null,nodeOpcode(node,record.opcode)):(node.state={id:void 0,name:void 0},node.phrase=nodePhrase(),nodeOpcode(node,void 0)),node}function nodeUp(node,record){record&&(node.up=!0,node.state={id:record.state,name:utils.stateToString(record.state)},node.phrase=nodePhrase(record.state,record.phraseIndex,record.phraseLength),node.down||nodeOpcode(node,record.opcode))}let leafNodes=0,depth=-1,branchCount=1;function walk(node){if(depth+=1,node.branch=branchCount,depth>treeDepth&&(treeDepth=depth),0===node.children.length)leafNodes+=1;else for(let i=0;i<node.children.length;i+=1)i>0&&(branchCount+=1),node.children[i].leftMost=!1,node.children[i].rightMost=!1,node.leftMost&&(node.children[i].leftMost=0===i),node.rightMost&&(node.children[i].rightMost=i===node.children.length-1),walk(node.children[i]);depth-=1}function display(node,offset){let name;let obj={};if(obj.id=node.id,obj.branch=node.branch,obj.leftMost=node.leftMost,obj.rightMost=node.rightMost,name=node.state.name?node.state.name:"ACTIVE",obj.state={id:node.state.id,name},name=node.op.name?node.op.name:"?",obj.op={id:node.op.id,name},"string"==typeof node.opData)obj.opData=node.opData;else if(Array.isArray(node.opData)){obj.opData=[];for(let i=0;i<node.opData.length;i+=1)obj.opData[i]=node.opData[i]}else obj.opData=void 0;node.phrase?obj.phrase={index:node.phrase.index,length:node.phrase.length}:obj.phrase=null,obj.depth=node.depth,obj.children=[];for(let i=0;i<node.children.length;i+=1){let c=i!==node.children.length-1;obj.children[i]=display(node.children[i],offset,c)}return obj}let branch=[],firstRecord=!0,dummy=nodeDown(null,null,-1);for(branch.push(dummy),node=dummy,circular.forEach(lineIndex=>{if(record=records[lineIndex],firstRecord&&(firstRecord=!1,record.depth>0)){let num=record.dirUp?record.depth+1:record.depth;for(let i=0;i<num;i+=1)parent=node,node=nodeDown(node,null,i),branch.push(node),parent.children.push(node)}record.dirUp?(nodeUp(node=branch.pop(),record),node=branch[branch.length-1]):(parent=node,node=nodeDown(node,record,record.depth),branch.push(node),parent.children.push(node))});branch.length>1;)nodeUp(node=branch.pop(),null);if(0===dummy.children.length)throw Error("trace.toTree(): parse tree has no nodes");if(0===branch.length)throw Error("trace.toTree(): integrity check: dummy root node disappeared?");let prev=root=dummy.children[0];for(;root&&!root.down&&!root.up;)prev=root,root=root.children[0];(root=prev).leftMost=!0,root.rightMost=!0,walk(root),root.branch=0;let obj={};obj.string=[];for(let i=0;i<chars.length;i+=1)obj.string[i]=chars[i];obj.rules=[];for(let i=0;i<rules.length;i+=1)obj.rules[i]=rules[i].name;obj.udts=[];for(let i=0;i<udts.length;i+=1)obj.udts[i]=udts[i].name;return obj.id={},obj.id.ALT={id:id.ALT,name:"ALT"},obj.id.CAT={id:id.CAT,name:"CAT"},obj.id.REP={id:id.REP,name:"REP"},obj.id.RNM={id:id.RNM,name:"RNM"},obj.id.TLS={id:id.TLS,name:"TLS"},obj.id.TBS={id:id.TBS,name:"TBS"},obj.id.TRG={id:id.TRG,name:"TRG"},obj.id.UDT={id:id.UDT,name:"UDT"},obj.id.AND={id:id.AND,name:"AND"},obj.id.NOT={id:id.NOT,name:"NOT"},obj.id.BKR={id:id.BKR,name:"BKR"},obj.id.BKA={id:id.BKA,name:"BKA"},obj.id.BKN={id:id.BKN,name:"BKN"},obj.id.ABG={id:id.ABG,name:"ABG"},obj.id.AEN={id:id.AEN,name:"AEN"},obj.id.ACTIVE={id:id.ACTIVE,name:"ACTIVE"},obj.id.MATCH={id:id.MATCH,name:"MATCH"},obj.id.EMPTY={id:id.EMPTY,name:"EMPTY"},obj.id.NOMATCH={id:id.NOMATCH,name:"NOMATCH"},obj.treeDepth=treeDepth,obj.leafNodes=leafNodes,branchesIncomplete=root.down?root.up?"none":"right":root.up?"left":"both",obj.branchesIncomplete=branchesIncomplete,obj.tree=display(root,root.depth,!1),obj};this.toTree=function(stringify){let obj=toTreeObj();return stringify?JSON.stringify(obj):obj},this.toHtmlPage=function(mode,caption,title){return utils.htmlToPage(this.toHtml(mode,caption),title)};let htmlHeader=function(mode,caption){let modeName;switch(mode){case 16:modeName="hexadecimal";break;case 10:modeName="decimal";break;case 8:modeName="ASCII";break;case 32:modeName="UNICODE";break;default:throw Error(`${thisFileName}htmlHeader: unrecognized mode: ${mode}`)}let header="";return header+=`<p>display mode: ${modeName}</p>
<table class="${style.CLASS_TRACE}">
`,"string"==typeof caption&&(header+=`<caption>${caption}</caption>`),header};this.indent=function(depth){let html="";for(let i=0;i<depth;i+=1)html+=".";return html};let displayTrg=function(mode,op){let html="";if(op.type===id.TRG){if(16===mode||32===mode){let hex=op.min.toString(16).toUpperCase();hex.length%2!=0&&(hex=`0${hex}`),html+=(16===mode?"%x":"U+")+hex,(hex=op.max.toString(16).toUpperCase()).length%2!=0&&(hex=`0${hex}`),html+=`–${hex}`}else html=`%d${op.min.toString(10)}–${op.max.toString(10)}`}return html},displayRep=function(mode,op){let html="";if(op.type===id.REP){if(16===mode){let hex=op.min.toString(16).toUpperCase();hex.length%2!=0&&(hex=`0${hex}`),html=`x${hex}`,op.max<1/0?(hex=op.max.toString(16).toUpperCase()).length%2!=0&&(hex=`0${hex}`):hex="inf",html+=`–${hex}`}else html=op.max<1/0?`${op.min.toString(10)}–${op.max.toString(10)}`:`${op.min.toString(10)}–inf`}return html},displayTbs=function(mode,op){let html="";if(op.type===id.TBS){let len=Math.min(op.string.length,10);if(16===mode||32===mode){html+=16===mode?"%x":"U+";for(let i=0;i<len;i+=1){let hex;i>0&&(html+="."),(hex=op.string[i].toString(16).toUpperCase()).length%2!=0&&(hex=`0${hex}`),html+=hex}}else{html="%d";for(let i=0;i<len;i+=1)i>0&&(html+="."),html+=op.string[i].toString(10)}len<op.string.length&&(html+=PHRASE_CONTINUE)}return html},displayTls=function(mode,op){let html="";if(op.type===id.TLS){let len=Math.min(op.string.length,5);if(16===mode||10===mode){let charu,charl,base;16===mode?(html="%x",base=16):(html="%d",base=10);for(let i=0;i<len;i+=1)i>0&&(html+="."),(charl=op.string[i])>=97&&charl<=122?(charu=charl-32,html+=`${charu.toString(base)}/${charl.toString(base)}`.toUpperCase()):charl>=65&&charl<=90?(charu=charl,charl+=32,html+=`${charu.toString(base)}/${charl.toString(base)}`.toUpperCase()):html+=charl.toString(base).toUpperCase();len<op.string.length&&(html+=PHRASE_CONTINUE)}else{html='"';for(let i=0;i<len;i+=1)html+=utils.asciiChars[op.string[i]];len<op.string.length&&(html+=PHRASE_CONTINUE),html+='"'}}return html},subPhrase=function(mode,charsArg,index,length,prev){if(0===length)return"";let phrase="",comma=prev?",":"";switch(mode){case 16:phrase=comma+utils.charsToHex(charsArg,index,length);break;case 10:if(prev)return`,${utils.charsToDec(charsArg,index,length)}`;phrase=comma+utils.charsToDec(charsArg,index,length);break;case 32:phrase=utils.charsToUnicode(charsArg,index,length);break;default:phrase=utils.charsToAsciiHtml(charsArg,index,length)}return phrase},displayBehind=function(mode,charsArg,state,index,length,anchor){let beg1,len1,beg2,len2,html="",lastchar=PHRASE_END,spanBehind=`<span class="${style.CLASS_LOOKBEHIND}">`,spanRemainder=`<span class="${style.CLASS_REMAINDER}">`,spanend="</span>",prev=!1;switch(state){case id.EMPTY:html+=PHRASE_EMPTY;case id.NOMATCH:case id.MATCH:case id.ACTIVE:len1=anchor-(beg1=index-length),beg2=anchor,len2=charsArg.length-beg2;break;default:throw Error("unrecognized state")}return lastchar=PHRASE_END,len1>80?(len1=80,lastchar=PHRASE_CONTINUE,len2=0):len1+len2>80&&(lastchar=PHRASE_CONTINUE,len2=80-len1),len1>0&&(html+=spanBehind+subPhrase(mode,charsArg,beg1,len1,prev)+spanend,prev=!0),len2>0&&(html+=spanRemainder+subPhrase(mode,charsArg,beg2,len2,prev)+spanend),html+lastchar},displayForward=function(mode,charsArg,state,index,length,spanAhead){let beg1,len1,beg2,len2,html="",lastchar=PHRASE_END,spanRemainder=`<span class="${style.CLASS_REMAINDER}">`,spanend="</span>",prev=!1;switch(state){case id.EMPTY:html+=PHRASE_EMPTY;case id.NOMATCH:case id.ACTIVE:beg1=index,len1=0,beg2=index,len2=charsArg.length-beg2;break;case id.MATCH:beg1=index,beg2=index+(len1=length),len2=charsArg.length-beg2;break;default:throw Error("unrecognized state")}return lastchar=PHRASE_END,len1>80?(len1=80,lastchar=PHRASE_CONTINUE,len2=0):len1+len2>80&&(lastchar=PHRASE_CONTINUE,len2=80-len1),len1>0&&(html+=spanAhead+subPhrase(mode,charsArg,beg1,len1,prev)+spanend,prev=!0),len2>0&&(html+=spanRemainder+subPhrase(mode,charsArg,beg2,len2,prev)+spanend),html+lastchar},htmlTable=function(mode){let thisLine,thatLine,lookAhead,lookBehind,lookAround,anchor;if(null===rules)return"";let html="";return html+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th><th>operator</th><th>phrase</th></tr>\n",circular.forEach(lineIndex=>{let line=records[lineIndex];switch(thisLine=line.thisLine,thatLine=void 0!==line.thatLine?line.thatLine:"--",lookAhead=!1,lookBehind=!1,lookAround=!1,line.lookAround===id.LOOKAROUND_AHEAD&&(lookAhead=!0,lookAround=!0,anchor=line.lookAnchor),(line.opcode.type===id.AND||line.opcode.type===id.NOT)&&(lookAhead=!0,lookAround=!0,anchor=line.phraseIndex),line.lookAround===id.LOOKAROUND_BEHIND&&(lookBehind=!0,lookAround=!0,anchor=line.lookAnchor),(line.opcode.type===id.BKA||line.opcode.type===id.BKN)&&(lookBehind=!0,lookAround=!0,anchor=line.phraseIndex),html+=`<tr><td>${thisLine}</td><td>${thatLine}</td><td>${line.phraseIndex}</td><td>${line.phraseLength}</td><td>${line.depth}</td><td>`,line.state){case id.ACTIVE:html+=`<span class="${style.CLASS_ACTIVE}">↓ </span>`;break;case id.MATCH:html+=`<span class="${style.CLASS_MATCH}">↑M</span>`;break;case id.NOMATCH:html+=`<span class="${style.CLASS_NOMATCH}">↑N</span>`;break;case id.EMPTY:html+=`<span class="${style.CLASS_EMPTY}">↑E</span>`;break;default:html+=`<span class="${style.CLASS_ACTIVE}">--</span>`}if(html+="</td><td>"+that.indent(line.depth),lookAhead?html+=`<span class="${style.CLASS_LOOKAHEAD}">`:lookBehind&&(html+=`<span class="${style.CLASS_LOOKBEHIND}">`),html+=utils.opcodeToString(line.opcode.type),line.opcode.type===id.RNM&&(html+=`(${rules[line.opcode.index].name}) `),line.opcode.type===id.BKR){let casetype=line.opcode.bkrCase===id.BKR_MODE_CI?"%i":"%s",modetype=line.opcode.bkrMode===id.BKR_MODE_UM?"%u":"%p";html+=`(\\${casetype}${modetype}${rules[line.opcode.index].name}) `}(line.opcode.type===id.UDT&&(html+=`(${udts[line.opcode.index].name}) `),line.opcode.type===id.TRG&&(html+=`(${displayTrg(mode,line.opcode)}) `),line.opcode.type===id.TBS&&(html+=`(${displayTbs(mode,line.opcode)}) `),line.opcode.type===id.TLS&&(html+=`(${displayTls(mode,line.opcode)}) `),line.opcode.type===id.REP&&(html+=`(${displayRep(mode,line.opcode)}) `),lookAround&&(html+="</span>"),html+="</td><td>",lookBehind)?html+=displayBehind(mode,chars,line.state,line.phraseIndex,line.phraseLength,anchor):lookAhead?html+=displayForward(mode,chars,line.state,line.phraseIndex,line.phraseLength,`<span class="${style.CLASS_LOOKAHEAD}">`):html+=displayForward(mode,chars,line.state,line.phraseIndex,line.phraseLength,`<span class="${style.CLASS_MATCH}">`),html+="</td></tr>\n"}),html+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th><th>operator</th><th>phrase</th></tr>\n</table>\n"};this.toHtml=function(modearg,caption){let mode=8;if("string"==typeof modearg&&modearg.length>=3){let modein=modearg.toLowerCase().slice(0,3);"hex"===modein?mode=16:"dec"===modein?mode=10:"uni"===modein&&(mode=32)}return htmlHeader(mode,caption)+htmlTable(mode)+""+`</table>
<p class="${style.CLASS_MONOSPACE}">legend:<br>
(a) - line number<br>
(b) - matching line number<br>
(c) - phrase offset<br>
(d) - phrase length<br>
(e) - tree depth<br>
(f) - operator state<br>
- <span class="${style.CLASS_ACTIVE}">↓</span> phrase opened<br>
- <span class="${style.CLASS_MATCH}">↑M</span> phrase matched<br>
- <span class="${style.CLASS_EMPTY}">↑E</span> empty phrase matched<br>
- <span class="${style.CLASS_NOMATCH}">↑N</span> phrase not matched<br>
operator - ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>†</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>‡</sup><br>
phrase - up to 80 characters of the phrase being matched<br>
- <span class="${style.CLASS_MATCH}">matched characters</span><br>
- <span class="${style.CLASS_LOOKAHEAD}">matched characters in look ahead mode</span><br>
- <span class="${style.CLASS_LOOKBEHIND}">matched characters in look behind mode</span><br>
- <span class="${style.CLASS_REMAINDER}">remainder characters(not yet examined by parser)</span><br>
- <span class="${style.CLASS_CTRLCHAR}">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br>
- ${PHRASE_EMPTY} empty string<br>
- ${PHRASE_END} end of input string<br>
- ${PHRASE_CONTINUE} input string display truncated<br>
</p>
<p class="${style.CLASS_MONOSPACE}">
<sup>†</sup>original ABNF operators:<br>
ALT - alternation<br>
CAT - concatenation<br>
REP - repetition<br>
RNM - rule name<br>
TRG - terminal range<br>
TLS - terminal literal string (case insensitive)<br>
TBS - terminal binary string (case sensitive)<br>
<br>
<sup>‡</sup>super set SABNF operators:<br>
UDT - user-defined terminal<br>
AND - positive look ahead<br>
NOT - negative look ahead<br>
BKA - positive look behind<br>
BKN - negative look behind<br>
BKR - back reference<br>
ABG - anchor - begin of input string<br>
AEN - anchor - end of input string<br>
</p>
`}}},"./node_modules/apg-js/src/apg-lib/utilities.js":(__unused_webpack_module,exports,__webpack_require__)=>{let style=__webpack_require__("./node_modules/apg-js/src/apg-lib/style.js"),converter=__webpack_require__("./node_modules/apg-js/src/apg-conv-api/converter.js"),emitCss=__webpack_require__("./node_modules/apg-js/src/apg-lib/emitcss.js"),id=__webpack_require__("./node_modules/apg-js/src/apg-lib/identifiers.js"),thisFileName="utilities.js: ",getBounds=function(length,begArg,len){let end;let beg=begArg;for(;;){if(length<=0){beg=0,end=0;break}if("number"!=typeof beg){beg=0,end=length;break}if(beg>=length){beg=length,end=length;break}if("number"!=typeof len){end=length;break}(end=beg+len)>length&&(end=length);break}return{beg,end}};function isUnicode(char){return(!(char>=55296)||!(char<=57343))&&!(char>1114111)}exports.htmlToPage=function(html,titleArg){let title;if("string"!=typeof html)throw Error(`${thisFileName}htmlToPage: input HTML is not a string`);return title="string"!=typeof titleArg?"htmlToPage":titleArg,`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>${title}</title>
<style>
`+emitCss()+"</style>\n</head>\n<body>\n"+`<p>${new Date}</p>
`+html+"</body>\n</html>\n"},exports.parserResultToHtml=function(result,caption){let success,state,cap=null;"string"==typeof caption&&""!==caption&&(cap=caption),success=!0===result.success?`<span class="${style.CLASS_MATCH}">true</span>`:`<span class="${style.CLASS_NOMATCH}">false</span>`,state=result.state===id.EMPTY?`<span class="${style.CLASS_EMPTY}">EMPTY</span>`:result.state===id.MATCH?`<span class="${style.CLASS_MATCH}">MATCH</span>`:result.state===id.NOMATCH?`<span class="${style.CLASS_NOMATCH}">NOMATCH</span>`:`<span class="${style.CLASS_NOMATCH}">unrecognized</span>`;let html="";return html+=`<table class="${style.CLASS_STATE}">
`,cap&&(html+=`<caption>${cap}</caption>
`),html+=`<tr><th>state item</th><th>value</th><th>description</th></tr>
<tr><td>parser success</td><td>${success}</td>
<td><span class="${style.CLASS_MATCH}">true</span> if the parse succeeded,
<span class="${style.CLASS_NOMATCH}">false</span> otherwise<br><i>NOTE: for success, entire string must be matched</i></td></tr>
<tr><td>parser state</td><td>${state}</td>
<td><span class="${style.CLASS_EMPTY}">EMPTY</span>, <span class="${style.CLASS_MATCH}">MATCH</span> or
<span class="${style.CLASS_NOMATCH}">NOMATCH</span></td></tr>
<tr><td>string length</td><td>${result.length}</td><td>length of the input (sub)string</td></tr>
<tr><td>matched length</td><td>${result.matched}</td><td>number of input string characters matched</td></tr>
<tr><td>max matched</td><td>${result.maxMatched}</td><td>maximum number of input string characters matched</td></tr>
<tr><td>max tree depth</td><td>${result.maxTreeDepth}</td><td>maximum depth of the parse tree reached</td></tr>
<tr><td>node hits</td><td>${result.nodeHits}</td><td>number of parse tree node hits (opcode function calls)</td></tr>
<tr><td>input length</td><td>${result.inputLength}</td><td>length of full input string</td></tr>
<tr><td>sub-string begin</td><td>${result.subBegin}</td><td>sub-string first character index</td></tr>
<tr><td>sub-string end</td><td>${result.subEnd}</td><td>sub-string end-of-string index</td></tr>
<tr><td>sub-string length</td><td>${result.subLength}</td><td>sub-string length</td></tr>
</table>
`},exports.charsToString=function(chars,phraseIndex,phraseLength){let beg,end;if("number"==typeof phraseIndex){if(phraseIndex>=chars.length)return"";beg=phraseIndex<0?0:phraseIndex}else beg=0;if("number"==typeof phraseLength){if(phraseLength<=0)return"";end=phraseLength>chars.length-beg?chars.length:beg+phraseLength}else end=chars.length;return beg<end?converter.encode("UTF16LE",chars.slice(beg,end)).toString("utf16le"):""},exports.stringToChars=function(string){return converter.decode("STRING",string)},exports.opcodeToString=function(type){let ret="unknown";switch(type){case id.ALT:ret="ALT";break;case id.CAT:ret="CAT";break;case id.RNM:ret="RNM";break;case id.UDT:ret="UDT";break;case id.AND:ret="AND";break;case id.NOT:ret="NOT";break;case id.REP:ret="REP";break;case id.TRG:ret="TRG";break;case id.TBS:ret="TBS";break;case id.TLS:ret="TLS";break;case id.BKR:ret="BKR";break;case id.BKA:ret="BKA";break;case id.BKN:ret="BKN";break;case id.ABG:ret="ABG";break;case id.AEN:ret="AEN";break;default:throw Error("unrecognized opcode")}return ret},exports.stateToString=function(state){let ret="unknown";switch(state){case id.ACTIVE:ret="ACTIVE";break;case id.MATCH:ret="MATCH";break;case id.EMPTY:ret="EMPTY";break;case id.NOMATCH:ret="NOMATCH";break;default:throw Error("unrecognized state")}return ret},exports.asciiChars=["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","SO","SI","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US"," ","!",""","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","DEL"],exports.charToHex=function(char){let ch=char.toString(16).toUpperCase();switch(ch.length){case 1:case 3:case 7:ch=`0${ch}`;break;case 2:case 6:ch=`00${ch}`;break;case 4:break;case 5:ch=`000${ch}`;break;default:throw Error("unrecognized option")}return ch},exports.charsToDec=function(chars,beg,len){let ret="";if(!Array.isArray(chars))throw Error(`${thisFileName}charsToDec: input must be an array of integers`);let bounds=getBounds(chars.length,beg,len);if(bounds.end>bounds.beg){ret+=chars[bounds.beg];for(let i=bounds.beg+1;i<bounds.end;i+=1)ret+=`,${chars[i]}`}return ret},exports.charsToHex=function(chars,beg,len){let ret="";if(!Array.isArray(chars))throw Error(`${thisFileName}charsToHex: input must be an array of integers`);let bounds=getBounds(chars.length,beg,len);if(bounds.end>bounds.beg){ret+=`\\x${exports.charToHex(chars[bounds.beg])}`;for(let i=bounds.beg+1;i<bounds.end;i+=1)ret+=`,\\x${exports.charToHex(chars[i])}`}return ret},exports.charsToHtmlEntities=function(chars,beg,len){let ret="";if(!Array.isArray(chars))throw Error(`${thisFileName}charsToHex: input must be an array of integers`);let bounds=getBounds(chars.length,beg,len);if(bounds.end>bounds.beg)for(let i=bounds.beg;i<bounds.end;i+=1)ret+=`&#x${chars[i].toString(16)};`;return ret},exports.charsToUnicode=function(chars,beg,len){let ret="";if(!Array.isArray(chars))throw Error(`${thisFileName}charsToUnicode: input must be an array of integers`);let bounds=getBounds(chars.length,beg,len);if(bounds.end>bounds.beg)for(let i=bounds.beg;i<bounds.end;i+=1)isUnicode(chars[i])?ret+=`&#${chars[i]};`:ret+=` U+${exports.charToHex(chars[i])}`;return ret},exports.charsToJsUnicode=function(chars,beg,len){let ret="";if(!Array.isArray(chars))throw Error(`${thisFileName}charsToJsUnicode: input must be an array of integers`);let bounds=getBounds(chars.length,beg,len);if(bounds.end>bounds.beg){ret+=`\\u${exports.charToHex(chars[bounds.beg])}`;for(let i=bounds.beg+1;i<bounds.end;i+=1)ret+=`,\\u${exports.charToHex(chars[i])}`}return ret},exports.charsToAscii=function(chars,beg,len){let ret="";if(!Array.isArray(chars))throw Error(`${thisFileName}charsToAscii: input must be an array of integers`);let bounds=getBounds(chars.length,beg,len);for(let i=bounds.beg;i<bounds.end;i+=1){let char=chars[i];char>=32&&char<=126?ret+=String.fromCharCode(char):ret+=`\\x${exports.charToHex(char)}`}return ret},exports.charsToAsciiHtml=function(chars,beg,len){let char;if(!Array.isArray(chars))throw Error(`${thisFileName}charsToAsciiHtml: input must be an array of integers`);let html="",bounds=getBounds(chars.length,beg,len);for(let i=bounds.beg;i<bounds.end;i+=1)(char=chars[i])<32||127===char?html+=`<span class="${style.CLASS_CTRLCHAR}">${exports.asciiChars[char]}</span>`:char>127?html+=`<span class="${style.CLASS_CTRLCHAR}">U+${exports.charToHex(char)}</span>`:html+=exports.asciiChars[char];return html},exports.stringToAsciiHtml=function(str){let chars=converter.decode("STRING",str);return this.charsToAsciiHtml(chars)}},"./node_modules/@blockaid/ppom_release/package.json":module=>{"use strict";module.exports={rE:"1.5.3"}}}]);
//# sourceMappingURL=2941.30125e30.iframe.bundle.js.map