Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class AI013103decoder extends AI013x0xDecoder {
AI013103decoder(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
protected int a(int i) {
return i;
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
protected void b(StringBuilder sb, int i) {
sb.append("(3103)");
}
}

View File

@@ -0,0 +1,25 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.common.BitArray;
import com.thoughtworks.xstream.XStream;
/* loaded from: classes.dex */
final class AI01320xDecoder extends AI013x0xDecoder {
AI01320xDecoder(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
protected int a(int i) {
return i < 10000 ? i : i - XStream.PRIORITY_VERY_HIGH;
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
protected void b(StringBuilder sb, int i) {
if (i < 10000) {
sb.append("(3202)");
} else {
sb.append("(3203)");
}
}
}

View File

@@ -0,0 +1,27 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class AI01392xDecoder extends AI01decoder {
AI01392xDecoder(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
public String c() throws NotFoundException, FormatException {
if (b().h() < 48) {
throw NotFoundException.getNotFoundInstance();
}
StringBuilder sb = new StringBuilder();
a(sb, 8);
int a = a().a(48, 2);
sb.append("(392");
sb.append(a);
sb.append(')');
sb.append(a().a(50, (String) null).b());
return sb.toString();
}
}

View File

@@ -0,0 +1,35 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class AI01393xDecoder extends AI01decoder {
AI01393xDecoder(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
public String c() throws NotFoundException, FormatException {
if (b().h() < 48) {
throw NotFoundException.getNotFoundInstance();
}
StringBuilder sb = new StringBuilder();
a(sb, 8);
int a = a().a(48, 2);
sb.append("(393");
sb.append(a);
sb.append(')');
int a2 = a().a(50, 10);
if (a2 / 100 == 0) {
sb.append('0');
}
if (a2 / 10 == 0) {
sb.append('0');
}
sb.append(a2);
sb.append(a().a(60, (String) null).b());
return sb.toString();
}
}

View File

@@ -0,0 +1,67 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class AI013x0x1xDecoder extends AI01weightDecoder {
private final String c;
private final String d;
AI013x0x1xDecoder(BitArray bitArray, String str, String str2) {
super(bitArray);
this.c = str2;
this.d = str;
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
protected int a(int i) {
return i % 100000;
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AI01weightDecoder
protected void b(StringBuilder sb, int i) {
sb.append('(');
sb.append(this.d);
sb.append(i / 100000);
sb.append(')');
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
public String c() throws NotFoundException {
if (b().h() != 84) {
throw NotFoundException.getNotFoundInstance();
}
StringBuilder sb = new StringBuilder();
a(sb, 8);
b(sb, 48, 20);
c(sb, 68);
return sb.toString();
}
private void c(StringBuilder sb, int i) {
int a = a().a(i, 16);
if (a == 38400) {
return;
}
sb.append('(');
sb.append(this.c);
sb.append(')');
int i2 = a % 32;
int i3 = a / 32;
int i4 = (i3 % 12) + 1;
int i5 = i3 / 12;
if (i5 / 10 == 0) {
sb.append('0');
}
sb.append(i5);
if (i4 / 10 == 0) {
sb.append('0');
}
sb.append(i4);
if (i2 / 10 == 0) {
sb.append('0');
}
sb.append(i2);
}
}

View File

@@ -0,0 +1,22 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
abstract class AI013x0xDecoder extends AI01weightDecoder {
AI013x0xDecoder(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
public String c() throws NotFoundException {
if (b().h() != 60) {
throw NotFoundException.getNotFoundInstance();
}
StringBuilder sb = new StringBuilder();
a(sb, 5);
b(sb, 45, 15);
return sb.toString();
}
}

View File

@@ -0,0 +1,22 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class AI01AndOtherAIs extends AI01decoder {
AI01AndOtherAIs(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
public String c() throws NotFoundException, FormatException {
StringBuilder sb = new StringBuilder();
sb.append("(01)");
int length = sb.length();
sb.append(a().a(4, 4));
a(sb, 8, length);
return a().a(sb, 48);
}
}

View File

@@ -0,0 +1,44 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
abstract class AI01decoder extends AbstractExpandedDecoder {
AI01decoder(BitArray bitArray) {
super(bitArray);
}
private static void b(StringBuilder sb, int i) {
int i2 = 0;
for (int i3 = 0; i3 < 13; i3++) {
int charAt = sb.charAt(i3 + i) - '0';
if ((i3 & 1) == 0) {
charAt *= 3;
}
i2 += charAt;
}
int i4 = 10 - (i2 % 10);
sb.append(i4 != 10 ? i4 : 0);
}
final void a(StringBuilder sb, int i) {
sb.append("(01)");
int length = sb.length();
sb.append('9');
a(sb, i, length);
}
final void a(StringBuilder sb, int i, int i2) {
for (int i3 = 0; i3 < 4; i3++) {
int a = a().a((i3 * 10) + i, 10);
if (a / 100 == 0) {
sb.append('0');
}
if (a / 10 == 0) {
sb.append('0');
}
sb.append(a);
}
b(sb, i2);
}
}

View File

@@ -0,0 +1,28 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
abstract class AI01weightDecoder extends AI01decoder {
AI01weightDecoder(BitArray bitArray) {
super(bitArray);
}
protected abstract int a(int i);
protected abstract void b(StringBuilder sb, int i);
final void b(StringBuilder sb, int i, int i2) {
int a = a().a(i, i2);
b(sb, a);
int a2 = a(a);
int i3 = 100000;
for (int i4 = 0; i4 < 5; i4++) {
if (a2 / i3 == 0) {
sb.append('0');
}
i3 /= 10;
}
sb.append(a2);
}
}

View File

@@ -0,0 +1,69 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
public abstract class AbstractExpandedDecoder {
private final BitArray a;
private final GeneralAppIdDecoder b;
AbstractExpandedDecoder(BitArray bitArray) {
this.a = bitArray;
this.b = new GeneralAppIdDecoder(bitArray);
}
protected final GeneralAppIdDecoder a() {
return this.b;
}
protected final BitArray b() {
return this.a;
}
public abstract String c() throws NotFoundException, FormatException;
public static AbstractExpandedDecoder a(BitArray bitArray) {
if (bitArray.a(1)) {
return new AI01AndOtherAIs(bitArray);
}
if (!bitArray.a(2)) {
return new AnyAIDecoder(bitArray);
}
int a = GeneralAppIdDecoder.a(bitArray, 1, 4);
if (a == 4) {
return new AI013103decoder(bitArray);
}
if (a == 5) {
return new AI01320xDecoder(bitArray);
}
int a2 = GeneralAppIdDecoder.a(bitArray, 1, 5);
if (a2 == 12) {
return new AI01392xDecoder(bitArray);
}
if (a2 == 13) {
return new AI01393xDecoder(bitArray);
}
switch (GeneralAppIdDecoder.a(bitArray, 1, 7)) {
case 56:
return new AI013x0x1xDecoder(bitArray, "310", "11");
case 57:
return new AI013x0x1xDecoder(bitArray, "320", "11");
case 58:
return new AI013x0x1xDecoder(bitArray, "310", "13");
case 59:
return new AI013x0x1xDecoder(bitArray, "320", "13");
case 60:
return new AI013x0x1xDecoder(bitArray, "310", "15");
case 61:
return new AI013x0x1xDecoder(bitArray, "320", "15");
case 62:
return new AI013x0x1xDecoder(bitArray, "310", "17");
case 63:
return new AI013x0x1xDecoder(bitArray, "320", "17");
default:
throw new IllegalStateException("unknown decoder: ".concat(String.valueOf(bitArray)));
}
}
}

View File

@@ -0,0 +1,17 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class AnyAIDecoder extends AbstractExpandedDecoder {
AnyAIDecoder(BitArray bitArray) {
super(bitArray);
}
@Override // com.google.zxing.oned.rss.expanded.decoders.AbstractExpandedDecoder
public String c() throws NotFoundException, FormatException {
return a().a(new StringBuilder(), 5);
}
}

View File

@@ -0,0 +1,24 @@
package com.google.zxing.oned.rss.expanded.decoders;
/* loaded from: classes.dex */
final class BlockParsedResult {
private final DecodedInformation a;
private final boolean b;
BlockParsedResult(boolean z) {
this(null, z);
}
DecodedInformation a() {
return this.a;
}
boolean b() {
return this.b;
}
BlockParsedResult(DecodedInformation decodedInformation, boolean z) {
this.b = z;
this.a = decodedInformation;
}
}

View File

@@ -0,0 +1,48 @@
package com.google.zxing.oned.rss.expanded.decoders;
/* loaded from: classes.dex */
final class CurrentParsingState {
private int a = 0;
private State b = State.NUMERIC;
private enum State {
NUMERIC,
ALPHA,
ISO_IEC_646
}
CurrentParsingState() {
}
int a() {
return this.a;
}
void b(int i) {
this.a = i;
}
boolean c() {
return this.b == State.ISO_IEC_646;
}
void d() {
this.b = State.ALPHA;
}
void e() {
this.b = State.ISO_IEC_646;
}
void f() {
this.b = State.NUMERIC;
}
void a(int i) {
this.a += i;
}
boolean b() {
return this.b == State.ALPHA;
}
}

View File

@@ -0,0 +1,19 @@
package com.google.zxing.oned.rss.expanded.decoders;
/* loaded from: classes.dex */
final class DecodedChar extends DecodedObject {
private final char b;
DecodedChar(int i, char c) {
super(i);
this.b = c;
}
char b() {
return this.b;
}
boolean c() {
return this.b == '$';
}
}

View File

@@ -0,0 +1,34 @@
package com.google.zxing.oned.rss.expanded.decoders;
/* loaded from: classes.dex */
final class DecodedInformation extends DecodedObject {
private final String b;
private final int c;
private final boolean d;
DecodedInformation(int i, String str) {
super(i);
this.b = str;
this.d = false;
this.c = 0;
}
String b() {
return this.b;
}
int c() {
return this.c;
}
boolean d() {
return this.d;
}
DecodedInformation(int i, String str, int i2) {
super(i);
this.d = true;
this.c = i2;
this.b = str;
}
}

View File

@@ -0,0 +1,34 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.FormatException;
/* loaded from: classes.dex */
final class DecodedNumeric extends DecodedObject {
private final int b;
private final int c;
DecodedNumeric(int i, int i2, int i3) throws FormatException {
super(i);
if (i2 < 0 || i2 > 10 || i3 < 0 || i3 > 10) {
throw FormatException.getFormatInstance();
}
this.b = i2;
this.c = i3;
}
int b() {
return this.b;
}
int c() {
return this.c;
}
boolean d() {
return this.b == 10;
}
boolean e() {
return this.c == 10;
}
}

View File

@@ -0,0 +1,14 @@
package com.google.zxing.oned.rss.expanded.decoders;
/* loaded from: classes.dex */
abstract class DecodedObject {
private final int a;
DecodedObject(int i) {
this.a = i;
}
final int a() {
return this.a;
}
}

View File

@@ -0,0 +1,84 @@
package com.google.zxing.oned.rss.expanded.decoders;
import com.google.zxing.NotFoundException;
/* loaded from: classes.dex */
final class FieldParser {
private static final Object a = new Object();
private static final Object[][] b = {new Object[]{"00", 18}, new Object[]{"01", 14}, new Object[]{"02", 14}, new Object[]{"10", a, 20}, new Object[]{"11", 6}, new Object[]{"12", 6}, new Object[]{"13", 6}, new Object[]{"15", 6}, new Object[]{"17", 6}, new Object[]{"20", 2}, new Object[]{"21", a, 20}, new Object[]{"22", a, 29}, new Object[]{"30", a, 8}, new Object[]{"37", a, 8}, new Object[]{"90", a, 30}, new Object[]{"91", a, 30}, new Object[]{"92", a, 30}, new Object[]{"93", a, 30}, new Object[]{"94", a, 30}, new Object[]{"95", a, 30}, new Object[]{"96", a, 30}, new Object[]{"97", a, 30}, new Object[]{"98", a, 30}, new Object[]{"99", a, 30}};
private static final Object[][] c = {new Object[]{"240", a, 30}, new Object[]{"241", a, 30}, new Object[]{"242", a, 6}, new Object[]{"250", a, 30}, new Object[]{"251", a, 30}, new Object[]{"253", a, 17}, new Object[]{"254", a, 20}, new Object[]{"400", a, 30}, new Object[]{"401", a, 30}, new Object[]{"402", 17}, new Object[]{"403", a, 30}, new Object[]{"410", 13}, new Object[]{"411", 13}, new Object[]{"412", 13}, new Object[]{"413", 13}, new Object[]{"414", 13}, new Object[]{"420", a, 20}, new Object[]{"421", a, 15}, new Object[]{"422", 3}, new Object[]{"423", a, 15}, new Object[]{"424", 3}, new Object[]{"425", 3}, new Object[]{"426", 3}};
private static final Object[][] d = {new Object[]{"310", 6}, new Object[]{"311", 6}, new Object[]{"312", 6}, new Object[]{"313", 6}, new Object[]{"314", 6}, new Object[]{"315", 6}, new Object[]{"316", 6}, new Object[]{"320", 6}, new Object[]{"321", 6}, new Object[]{"322", 6}, new Object[]{"323", 6}, new Object[]{"324", 6}, new Object[]{"325", 6}, new Object[]{"326", 6}, new Object[]{"327", 6}, new Object[]{"328", 6}, new Object[]{"329", 6}, new Object[]{"330", 6}, new Object[]{"331", 6}, new Object[]{"332", 6}, new Object[]{"333", 6}, new Object[]{"334", 6}, new Object[]{"335", 6}, new Object[]{"336", 6}, new Object[]{"340", 6}, new Object[]{"341", 6}, new Object[]{"342", 6}, new Object[]{"343", 6}, new Object[]{"344", 6}, new Object[]{"345", 6}, new Object[]{"346", 6}, new Object[]{"347", 6}, new Object[]{"348", 6}, new Object[]{"349", 6}, new Object[]{"350", 6}, new Object[]{"351", 6}, new Object[]{"352", 6}, new Object[]{"353", 6}, new Object[]{"354", 6}, new Object[]{"355", 6}, new Object[]{"356", 6}, new Object[]{"357", 6}, new Object[]{"360", 6}, new Object[]{"361", 6}, new Object[]{"362", 6}, new Object[]{"363", 6}, new Object[]{"364", 6}, new Object[]{"365", 6}, new Object[]{"366", 6}, new Object[]{"367", 6}, new Object[]{"368", 6}, new Object[]{"369", 6}, new Object[]{"390", a, 15}, new Object[]{"391", a, 18}, new Object[]{"392", a, 15}, new Object[]{"393", a, 18}, new Object[]{"703", a, 30}};
private static final Object[][] e = {new Object[]{"7001", 13}, new Object[]{"7002", a, 30}, new Object[]{"7003", 10}, new Object[]{"8001", 14}, new Object[]{"8002", a, 20}, new Object[]{"8003", a, 30}, new Object[]{"8004", a, 30}, new Object[]{"8005", 6}, new Object[]{"8006", 18}, new Object[]{"8007", a, 30}, new Object[]{"8008", a, 12}, new Object[]{"8018", 18}, new Object[]{"8020", a, 25}, new Object[]{"8100", 6}, new Object[]{"8101", 10}, new Object[]{"8102", 2}, new Object[]{"8110", a, 70}, new Object[]{"8200", a, 70}};
static String a(String str) throws NotFoundException {
if (str.isEmpty()) {
return null;
}
if (str.length() < 2) {
throw NotFoundException.getNotFoundInstance();
}
String substring = str.substring(0, 2);
for (Object[] objArr : b) {
if (objArr[0].equals(substring)) {
return objArr[1] == a ? b(2, ((Integer) objArr[2]).intValue(), str) : a(2, ((Integer) objArr[1]).intValue(), str);
}
}
if (str.length() < 3) {
throw NotFoundException.getNotFoundInstance();
}
String substring2 = str.substring(0, 3);
for (Object[] objArr2 : c) {
if (objArr2[0].equals(substring2)) {
return objArr2[1] == a ? b(3, ((Integer) objArr2[2]).intValue(), str) : a(3, ((Integer) objArr2[1]).intValue(), str);
}
}
for (Object[] objArr3 : d) {
if (objArr3[0].equals(substring2)) {
return objArr3[1] == a ? b(4, ((Integer) objArr3[2]).intValue(), str) : a(4, ((Integer) objArr3[1]).intValue(), str);
}
}
if (str.length() < 4) {
throw NotFoundException.getNotFoundInstance();
}
String substring3 = str.substring(0, 4);
for (Object[] objArr4 : e) {
if (objArr4[0].equals(substring3)) {
return objArr4[1] == a ? b(4, ((Integer) objArr4[2]).intValue(), str) : a(4, ((Integer) objArr4[1]).intValue(), str);
}
}
throw NotFoundException.getNotFoundInstance();
}
private static String b(int i, int i2, String str) throws NotFoundException {
String substring = str.substring(0, i);
int i3 = i2 + i;
if (str.length() < i3) {
i3 = str.length();
}
String substring2 = str.substring(i, i3);
String str2 = "(" + substring + ')' + substring2;
String a2 = a(str.substring(i3));
if (a2 == null) {
return str2;
}
return str2 + a2;
}
private static String a(int i, int i2, String str) throws NotFoundException {
if (str.length() >= i) {
String substring = str.substring(0, i);
int i3 = i2 + i;
if (str.length() >= i3) {
String substring2 = str.substring(i, i3);
String str2 = "(" + substring + ')' + substring2;
String a2 = a(str.substring(i3));
if (a2 == null) {
return str2;
}
return str2 + a2;
}
throw NotFoundException.getNotFoundInstance();
}
throw NotFoundException.getNotFoundInstance();
}
}

View File

@@ -0,0 +1,372 @@
package com.google.zxing.oned.rss.expanded.decoders;
import androidx.recyclerview.widget.ItemTouchHelper;
import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.common.BitArray;
/* loaded from: classes.dex */
final class GeneralAppIdDecoder {
private final BitArray a;
private final CurrentParsingState b = new CurrentParsingState();
private final StringBuilder c = new StringBuilder();
GeneralAppIdDecoder(BitArray bitArray) {
this.a = bitArray;
}
private DecodedInformation b() throws FormatException {
BlockParsedResult d;
boolean b;
do {
int a = this.b.a();
if (this.b.b()) {
d = a();
b = d.b();
} else if (this.b.c()) {
d = c();
b = d.b();
} else {
d = d();
b = d.b();
}
if (!(a != this.b.a()) && !b) {
break;
}
} while (!b);
return d.a();
}
private DecodedNumeric c(int i) throws FormatException {
int i2 = i + 7;
if (i2 > this.a.h()) {
int a = a(i, 4);
return a == 0 ? new DecodedNumeric(this.a.h(), 10, 10) : new DecodedNumeric(this.a.h(), a - 1, 10);
}
int a2 = a(i, 7) - 8;
return new DecodedNumeric(i2, a2 / 11, a2 % 11);
}
private BlockParsedResult d() throws FormatException {
while (i(this.b.a())) {
DecodedNumeric c = c(this.b.a());
this.b.b(c.a());
if (c.d()) {
return new BlockParsedResult(c.e() ? new DecodedInformation(this.b.a(), this.c.toString()) : new DecodedInformation(this.b.a(), this.c.toString(), c.c()), true);
}
this.c.append(c.b());
if (c.e()) {
return new BlockParsedResult(new DecodedInformation(this.b.a(), this.c.toString()), true);
}
this.c.append(c.c());
}
if (f(this.b.a())) {
this.b.d();
this.b.a(4);
}
return new BlockParsedResult(false);
}
private boolean e(int i) {
int i2;
if (i + 1 > this.a.h()) {
return false;
}
for (int i3 = 0; i3 < 5 && (i2 = i3 + i) < this.a.h(); i3++) {
if (i3 == 2) {
if (!this.a.a(i + 2)) {
return false;
}
} else if (this.a.a(i2)) {
return false;
}
}
return true;
}
private boolean f(int i) {
int i2;
if (i + 1 > this.a.h()) {
return false;
}
for (int i3 = 0; i3 < 4 && (i2 = i3 + i) < this.a.h(); i3++) {
if (this.a.a(i2)) {
return false;
}
}
return true;
}
private boolean g(int i) {
int a;
if (i + 5 > this.a.h()) {
return false;
}
int a2 = a(i, 5);
if (a2 < 5 || a2 >= 16) {
return i + 6 <= this.a.h() && (a = a(i, 6)) >= 16 && a < 63;
}
return true;
}
private boolean h(int i) {
int a;
if (i + 5 > this.a.h()) {
return false;
}
int a2 = a(i, 5);
if (a2 >= 5 && a2 < 16) {
return true;
}
if (i + 7 > this.a.h()) {
return false;
}
int a3 = a(i, 7);
if (a3 < 64 || a3 >= 116) {
return i + 8 <= this.a.h() && (a = a(i, 8)) >= 232 && a < 253;
}
return true;
}
private boolean i(int i) {
if (i + 7 > this.a.h()) {
return i + 4 <= this.a.h();
}
int i2 = i;
while (true) {
int i3 = i + 3;
if (i2 >= i3) {
return this.a.a(i3);
}
if (this.a.a(i2)) {
return true;
}
i2++;
}
}
String a(StringBuilder sb, int i) throws NotFoundException, FormatException {
String str = null;
while (true) {
DecodedInformation a = a(i, str);
String a2 = FieldParser.a(a.b());
if (a2 != null) {
sb.append(a2);
}
String valueOf = a.d() ? String.valueOf(a.c()) : null;
if (i == a.a()) {
return sb.toString();
}
i = a.a();
str = valueOf;
}
}
private BlockParsedResult c() throws FormatException {
while (h(this.b.a())) {
DecodedChar b = b(this.b.a());
this.b.b(b.a());
if (b.c()) {
return new BlockParsedResult(new DecodedInformation(this.b.a(), this.c.toString()), true);
}
this.c.append(b.b());
}
if (d(this.b.a())) {
this.b.a(3);
this.b.f();
} else if (e(this.b.a())) {
if (this.b.a() + 5 < this.a.h()) {
this.b.a(5);
} else {
this.b.b(this.a.h());
}
this.b.d();
}
return new BlockParsedResult(false);
}
int a(int i, int i2) {
return a(this.a, i, i2);
}
static int a(BitArray bitArray, int i, int i2) {
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
if (bitArray.a(i + i4)) {
i3 |= 1 << ((i2 - i4) - 1);
}
}
return i3;
}
DecodedInformation a(int i, String str) throws FormatException {
this.c.setLength(0);
if (str != null) {
this.c.append(str);
}
this.b.b(i);
DecodedInformation b = b();
if (b != null && b.d()) {
return new DecodedInformation(this.b.a(), this.c.toString(), b.c());
}
return new DecodedInformation(this.b.a(), this.c.toString());
}
private DecodedChar b(int i) throws FormatException {
char c;
int a = a(i, 5);
if (a == 15) {
return new DecodedChar(i + 5, '$');
}
if (a >= 5 && a < 15) {
return new DecodedChar(i + 5, (char) ((a + 48) - 5));
}
int a2 = a(i, 7);
if (a2 >= 64 && a2 < 90) {
return new DecodedChar(i + 7, (char) (a2 + 1));
}
if (a2 >= 90 && a2 < 116) {
return new DecodedChar(i + 7, (char) (a2 + 7));
}
switch (a(i, 8)) {
case 232:
c = '!';
break;
case 233:
c = '\"';
break;
case 234:
c = '%';
break;
case 235:
c = '&';
break;
case 236:
c = '\'';
break;
case 237:
c = '(';
break;
case 238:
c = ')';
break;
case 239:
c = '*';
break;
case 240:
c = '+';
break;
case 241:
c = ',';
break;
case 242:
c = '-';
break;
case 243:
c = '.';
break;
case 244:
c = '/';
break;
case 245:
c = ':';
break;
case 246:
c = ';';
break;
case 247:
c = '<';
break;
case 248:
c = '=';
break;
case 249:
c = '>';
break;
case ItemTouchHelper.Callback.DEFAULT_SWIPE_ANIMATION_DURATION /* 250 */:
c = '?';
break;
case 251:
c = '_';
break;
case 252:
c = ' ';
break;
default:
throw FormatException.getFormatInstance();
}
return new DecodedChar(i + 8, c);
}
private BlockParsedResult a() {
while (g(this.b.a())) {
DecodedChar a = a(this.b.a());
this.b.b(a.a());
if (a.c()) {
return new BlockParsedResult(new DecodedInformation(this.b.a(), this.c.toString()), true);
}
this.c.append(a.b());
}
if (d(this.b.a())) {
this.b.a(3);
this.b.f();
} else if (e(this.b.a())) {
if (this.b.a() + 5 < this.a.h()) {
this.b.a(5);
} else {
this.b.b(this.a.h());
}
this.b.e();
}
return new BlockParsedResult(false);
}
private boolean d(int i) {
int i2 = i + 3;
if (i2 > this.a.h()) {
return false;
}
while (i < i2) {
if (this.a.a(i)) {
return false;
}
i++;
}
return true;
}
private DecodedChar a(int i) {
char c;
int a = a(i, 5);
if (a == 15) {
return new DecodedChar(i + 5, '$');
}
if (a >= 5 && a < 15) {
return new DecodedChar(i + 5, (char) ((a + 48) - 5));
}
int a2 = a(i, 6);
if (a2 >= 32 && a2 < 58) {
return new DecodedChar(i + 6, (char) (a2 + 33));
}
switch (a2) {
case 58:
c = '*';
break;
case 59:
c = ',';
break;
case 60:
c = '-';
break;
case 61:
c = '.';
break;
case 62:
c = '/';
break;
default:
throw new IllegalStateException("Decoding invalid alphanumeric value: ".concat(String.valueOf(a2)));
}
return new DecodedChar(i + 6, c);
}
}