package com.airbnb.deeplinkdispatch; import com.airbnb.deeplinkdispatch.base.MatchIndex; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import o.C14881gav; import o.C14957gcv; import o.gdP; /* loaded from: classes.dex */ public final class SchemeHostAndPath { private final List matchList; private final DeepLinkUri uri; public SchemeHostAndPath(DeepLinkUri deepLinkUri) { C14957gcv.e(deepLinkUri, ""); this.uri = deepLinkUri; byte[] bytes = MatchIndex.ROOT_VALUE.getBytes(gdP.a); C14957gcv.c(bytes, ""); UrlElement urlElement = new UrlElement((byte) 1, bytes); String scheme = deepLinkUri.scheme(); C14957gcv.c((Object) scheme, ""); byte[] bytes2 = scheme.getBytes(gdP.a); C14957gcv.c(bytes2, ""); UrlElement urlElement2 = new UrlElement((byte) 2, bytes2); String encodedHost = deepLinkUri.encodedHost(); C14957gcv.c((Object) encodedHost, ""); byte[] bytes3 = encodedHost.getBytes(gdP.a); C14957gcv.c(bytes3, ""); UrlElement[] urlElementArr = {urlElement, urlElement2, new UrlElement((byte) 4, bytes3)}; C14957gcv.e(urlElementArr, ""); C14957gcv.e(urlElementArr, ""); List asList = Arrays.asList(urlElementArr); C14957gcv.c(asList, ""); List list = asList; List encodedPathSegments = deepLinkUri.encodedPathSegments(); C14957gcv.c(encodedPathSegments, ""); List list2 = encodedPathSegments; C14957gcv.e(list2, ""); ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10); for (String str : list2) { C14957gcv.c((Object) str, ""); byte[] bytes4 = str.getBytes(gdP.a); C14957gcv.c(bytes4, ""); arrayList.add(new UrlElement((byte) 8, bytes4)); } this.matchList = C14881gav.e(list, arrayList); } public final DeepLinkUri getUri() { return this.uri; } public final List getMatchList() { return this.matchList; } }