(str2)
| 49339 | }; |
| 49340 | function encodedReplacer(match) { |
| 49341 | return EncodedLookup[match]; |
| 49342 | } |
| 49343 | var STATE_KEY = 0; |
| 49344 | var STATE_VALUE = 1; |
| 49345 | var STATE_CHARSET = 2; |
| 49346 | var STATE_LANG = 3; |
| 49347 | function parseParams(str2) { |
| 49348 | const res = []; |
| 49349 | let state2 = STATE_KEY; |
| 49350 | let charset = ""; |
| 49351 | let inquote = false; |
| 49352 | let escaping = false; |
| 49353 | let p4 = 0; |
| 49354 | let tmp = ""; |
| 49355 | const len = str2.length; |
| 49356 | for (var i3 = 0; i3 < len; ++i3) { |
| 49357 | const char = str2[i3]; |
| 49358 | if (char === "\\" && inquote) { |
| 49359 | if (escaping) { |
| 49360 | escaping = false; |
| 49361 | } else { |
| 49362 | escaping = true; |
| 49363 | continue; |
| 49364 | } |
| 49365 | } else if (char === '"') { |
| 49366 | if (!escaping) { |
| 49367 | if (inquote) { |
| 49368 | inquote = false; |
| 49369 | state2 = STATE_KEY; |
| 49370 | } else { |
| 49371 | inquote = true; |
| 49372 | } |
| 49373 | continue; |
| 49374 | } else { |
| 49375 | escaping = false; |
| 49376 | } |
| 49377 | } else { |
| 49378 | if (escaping && inquote) { |
| 49379 | tmp += "\\"; |
| 49380 | } |
| 49381 | escaping = false; |
| 49382 | if ((state2 === STATE_CHARSET || state2 === STATE_LANG) && char === "'") { |
| 49383 | if (state2 === STATE_CHARSET) { |
| 49384 | state2 = STATE_LANG; |
| 49385 | charset = tmp.substring(1); |
| 49386 | } else { |
| 49387 | state2 = STATE_VALUE; |
| 49388 | } |
| 49389 | tmp = ""; |
| 49390 | continue; |
| 49391 | } else if (state2 === STATE_KEY && (char === "*" || char === "=") && res.length) { |
| 49392 | state2 = char === "*" ? STATE_CHARSET : STATE_VALUE; |
| 49393 | res[p4] = [tmp, void 0]; |
| 49394 | tmp = ""; |
| 49395 | continue; |
| 49396 | } else if (!inquote && char === ";") { |
| 49397 | state2 = STATE_KEY; |
| 49398 | if (charset) { |
no test coverage detected