summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/foundation/wrappers')
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/apple-silicon.js13
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/bag.js1126
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/cached-bag.js82
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client-ordering.js43
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client.js204
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/console.js18
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/host.js64
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/localization.js437
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/properties.js74
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/storage.js22
-rw-r--r--node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/wrapper.js6
11 files changed, 2089 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/apple-silicon.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/apple-silicon.js
new file mode 100644
index 0000000..4371e77
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/apple-silicon.js
@@ -0,0 +1,13 @@
+import { makeMetatype } from "@jet/environment/util/metatype";
+import * as serverData from "../../foundation/json-parsing/server-data";
+import { Wrapper } from "./wrapper";
+export class AppleSiliconWrapper extends Wrapper {
+ get isSupportEnabled() {
+ return serverData.isDefinedNonNull(this.implementation) && this.implementation.isSupportEnabled;
+ }
+ get isRosettaAvailable() {
+ return serverData.isDefinedNonNull(this.implementation) && this.implementation.isRosettaAvailable;
+ }
+}
+AppleSiliconWrapper.type = makeMetatype("app-store:as-wrapper");
+//# sourceMappingURL=apple-silicon.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/bag.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/bag.js
new file mode 100644
index 0000000..ad76b76
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/bag.js
@@ -0,0 +1,1126 @@
+/**
+ * Created by km on 1/9/17.
+ */
+import { isSome } from "@jet/environment";
+import { makeMetatype } from "@jet/environment/util/metatype";
+import * as serverData from "../json-parsing/server-data";
+import { Wrapper } from "./wrapper";
+import { CachedBag } from "./cached-bag";
+export class BagWrapper extends Wrapper {
+ constructor(bag, host) {
+ super(new CachedBag(bag));
+ this.underlyingBag = bag;
+ }
+ /// The boolean for whether today ad medium lockup screenshots are enabled
+ get todayAdMediumLockupScreenshotEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("today-ad-medium-lockup-screenshots-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get todayAdMediumLockupScreenshotAnimationEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("today-ad-medium-lockup-screenshots-animation-enabled")) !== null && _a !== void 0 ? _a : true;
+ }
+ /// The URL for the trending searches endpoint.
+ get trendingSearchesURL() {
+ return this.implementation.url("trending-searches");
+ }
+ /// The URL for the search hints endpoint.
+ get searchHintsURL() {
+ return this.implementation.url("searchHints");
+ }
+ /// The URL for fetching a personalized review
+ get personalizedUserReviewURL() {
+ return this.implementation.url("personalizedUserReviewUrl");
+ }
+ /// The boolean for whether personalized reviews are enabled
+ get personalizedUserReviewEnabled() {
+ return this.implementation.boolean("personalizedUserReviewEnabled");
+ }
+ /// The URL for posting tap-to-rate requests.
+ get userRateURL() {
+ return this.implementation.url("p2-application-user-rate-content");
+ }
+ /// The URL for posting write review requests.
+ get writeReviewURL() {
+ return this.implementation.url("p2-application-user-write-review");
+ }
+ /// The base URL for accessory rooms
+ get accessoryRoomURL() {
+ return this.implementation.url("p2-accessory-room");
+ }
+ /// The URL for passbook main room
+ get passbookMainURL() {
+ return this.implementation.url("passbook");
+ }
+ /// The URL for library-link room
+ get libraryLinkURL() {
+ return this.implementation.url("library-link");
+ }
+ /// The metrics configuration for mt-metrics kit integration
+ get metricsConfiguration() {
+ return serverData.asJSONData(this.implementation.dictionary("metrics"));
+ }
+ // When the metrics payment topic is enabled the clientId and userId are on a separate namespace.
+ get metricsPaymentNamespaceEnabled() {
+ if (serverData.isNullOrEmpty(this.metricsPaymentTopic)) {
+ return false;
+ }
+ const identifiers = serverData.asJSONData(this.implementation.dictionary("metrics-identifiers"));
+ const metricsNameSpace = serverData.asDictionary(identifiers, "APPSTORE_PAYMENTS_ENGAGEMENT");
+ const metricsClientIdSpace = serverData.asDictionary(identifiers, "APPSTORE_PAYMENTS_ENGAGEMENT_CLIENT");
+ return (isSome(metricsNameSpace) &&
+ metricsNameSpace.length !== 0 &&
+ isSome(metricsClientIdSpace) &&
+ metricsClientIdSpace.length !== 0);
+ }
+ // The Payment topic if one is provided by the bag. Otherwise the default one will be used
+ get metricsPaymentTopic() {
+ var _a, _b;
+ if (preprocessor.GAMES_TARGET) {
+ return (_a = serverData.asString(this.metricsConfiguration, "topics.GAMES_PAYMENTS_ENGAGEMENT_TOPIC")) !== null && _a !== void 0 ? _a : null;
+ }
+ else {
+ return (_b = serverData.asString(this.metricsConfiguration, "topics.APPSTORE_PAYMENTS_ENGAGEMENT_TOPIC")) !== null && _b !== void 0 ? _b : null;
+ }
+ }
+ // Whether the personalization user id has been inlcuded in the metrics identifiers bag entry
+ get personalizationUserIdEnabled() {
+ const identifiers = serverData.asJSONData(this.implementation.dictionary("metrics-identifiers"));
+ const personalizationIdNameSpace = serverData.asDictionary(identifiers, "APPSTORE_PERSONALIZATION");
+ return isSome(personalizationIdNameSpace) && Object.keys(personalizationIdNameSpace).length !== 0;
+ }
+ /// The language for the users storefront
+ get language() {
+ return this.implementation.string("language");
+ }
+ /// The language for media API
+ get mediaApiLanguage() {
+ const languageTag = this.implementation.string("language-tag");
+ if (languageTag) {
+ return languageTag;
+ }
+ return this.implementation.string("language");
+ }
+ /// The URL for terms and conditions page
+ get termsAndConditionsURL() {
+ return this.implementation.url("p2-service-terms-url");
+ }
+ /// whether we should send iAd data as a post request
+ get usePostForAppStoreSearch() {
+ return this.implementation.boolean("usePostForAppStoreSearch");
+ }
+ /// Whether or not monetary gifting is enabled.
+ get isMonetaryGiftingEnabled() {
+ return this.implementation.boolean("isBuyingScheduledGiftCertificateEnabled");
+ }
+ /// The URL for Account Top-Up in the finance sheet.
+ get accountTopUpURL() {
+ return this.implementation.url("AddFundsUrl");
+ }
+ /// The title for Account Top-Up in the finance sheet.
+ get accountTopUpTitle() {
+ return this.implementation.string("account-top-up-title");
+ }
+ /// Whether or not content gifting is enabled.
+ get isContentGiftingEnabled() {
+ return this.implementation.boolean("isScheduledGiftingEnabled");
+ }
+ /// The URL for buy button metadata.
+ get buyButtonMetadataURL() {
+ return this.implementation.url("personalized-buy-buttons/software");
+ }
+ /// Whether or not the current storefront supports the TV App.
+ get isTVAppEnabled() {
+ return this.implementation.boolean("uvSearch/nowplaying-enabled");
+ }
+ /// the url to send people to to email support
+ get emailSupportLinkURL() {
+ return this.implementation.url("supportLinkUrl");
+ }
+ /// The URL to report a review item helpful or not.
+ get voteUrl() {
+ return this.implementation.url("voteUrl");
+ }
+ /// Enables the Review Summary module
+ get enableReviewSummarization() {
+ return this.implementation.boolean("enable-review-summarization");
+ }
+ /// Provides configuration for Review Summary Report A Concern
+ get reviewSummaryReportConcernData() {
+ return serverData.asJSONData(this.implementation.dictionary("review-summarization-report-concern"));
+ }
+ /// The URL to report a concern about a review item.
+ get reportConcernUrl() {
+ return this.implementation.url("reportConcernUrl");
+ }
+ /// The explanation for the report a concern screen for a review.
+ get reportConcernExplanation() {
+ return this.implementation.string("reportConcernExplanation");
+ }
+ /// An array of reasons for reporting a concern for a review.
+ get reportConcernReasons() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("reportConcernReasons")));
+ }
+ /// The boolean that enables report a problem.
+ get reportProblemEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("product-page-report-problem-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// The bag key that stores the report a problem URL.
+ get productPageReportProblemURL() {
+ return this.implementation.string("product-page-report-problem-url");
+ }
+ /// The string array of adamIDs of SAD apps with subscriptions.
+ get productPageReportProblemSADSubscriptionArray() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("product-page-report-problem-sad-subscriptions")));
+ }
+ /// The string array of second party apps to not show the report a problem link for.
+ /// We have added the array of IDs while we wait for bag key support. Removal is tracked by rdar://82606581 (Remove array of second party app ids from JS bag.)
+ get productPageReportProblemSecondPartyAppArray() {
+ const secondPartyAppArray = serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("product-page-report-problem-second-party-apps")));
+ const defaultSecondPartyAppArray = [
+ "1473505534",
+ "1416238567",
+ "640199958",
+ "1529498570",
+ "915061776",
+ "1130498044",
+ "1070072560",
+ ];
+ if (serverData.isNullOrEmpty(secondPartyAppArray)) {
+ return defaultSecondPartyAppArray;
+ }
+ return secondPartyAppArray;
+ }
+ /// The URL to create a new account.
+ get createAccountUrl() {
+ var _a;
+ return ((_a = this.implementation.url("createAccountUrl")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/signupWizard");
+ }
+ get mediaCountryCode() {
+ return this.implementation.string("countryCode");
+ }
+ get mediaHost() {
+ return this.implementation.url("apps-media-api-host");
+ }
+ mediaEdgeHost(objectGraph) {
+ // The key has different type for AppStoreComponents
+ // see <rdar://71290056>.
+ if (objectGraph.host.clientIdentifier === "com.apple.appstorecomponentsd") {
+ return this.implementation.url("apps-media-api-edge-host");
+ }
+ else {
+ return this.implementation.string("apps-media-api-edge-host");
+ }
+ }
+ get mediaAPICatalogMixedShouldUseEdge() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-media-api-catalog-mixed-should-use-edge")) !== null && _a !== void 0 ? _a : false;
+ }
+ get mediaEdgeSearchHost() {
+ return this.implementation.string("apps-media-api-search-edge-host");
+ }
+ get mediaPreviewHost() {
+ return this.implementation.string("apps-media-api-preview-host");
+ }
+ get mediaRealmHost() {
+ return this.implementation.string("notification-settings-media-api-host");
+ }
+ get edgeEndpoints() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("apps-media-api-edge-end-points")));
+ }
+ get mediaAdvertRequestLimit() {
+ var _a;
+ return (_a = this.implementation.double("apps-media-api-search-ads-limit")) !== null && _a !== void 0 ? _a : 4;
+ }
+ get searchSortOptions() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("searchSortOptions")));
+ }
+ get ageBands() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("ageBands")));
+ }
+ get redirectUrlWhitelistedQueryParams() {
+ let params = serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("processRedirectUrl/whitelistedQueryParams")));
+ if (serverData.isNullOrEmpty(params)) {
+ params = [
+ "affC",
+ "adId",
+ "advp",
+ "at",
+ "ct",
+ "itsct",
+ "itscg",
+ "itscc",
+ "itcCt",
+ "its_qt",
+ "ls",
+ "partnerId",
+ "pt",
+ "qtkid",
+ "uo",
+ ];
+ }
+ return params;
+ }
+ get redirectUrlEndpoint() {
+ var _a;
+ return ((_a = this.implementation.string("processRedirectUrl/endpoint")) !== null && _a !== void 0 ? _a : "https://itunes.apple.com/WebObjects/MZStoreServices.woa/wa/processRedirectUrl");
+ }
+ get aristotleParentAppAdamId() {
+ var _a;
+ return (_a = this.implementation.string("aristotle-app-id")) !== null && _a !== void 0 ? _a : "383941000";
+ }
+ /// The AdamId of the App Store app which owns the IAP for Arcade subscriptions
+ get arcadeAppAdamId() {
+ return this.implementation.string("app-store-app-id");
+ }
+ /// The product family of the Arcade subscription IAP. This is for multiple IAPs for the same service not family sharing.
+ get arcadeProductFamilyId() {
+ var _a;
+ return (_a = this.implementation.string("arcade-iap-family-id")) !== null && _a !== void 0 ? _a : this.implementation.string("ocelot-iap-family-id");
+ }
+ /// The Identifier (developer supplied reverse dns style name) of the IAP for Arcade subscriptions
+ get arcadeProductId() {
+ var _a;
+ return ((_a = this.implementation.string("arcade-iap-offer-name")) !== null && _a !== void 0 ? _a : this.implementation.string("ocelot-iap-offer-name"));
+ }
+ /// The percentage of users that will see the Arcade category bar See All Games uplift.
+ get arcadeCategoryBarSAGUpliftDisplayRate() {
+ var _a;
+ return (_a = this.implementation.double("arcade-category-bar-see-all-games-display-rate")) !== null && _a !== void 0 ? _a : 0.0;
+ }
+ get isArcadeEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("arcade-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get isAppsGroupingTagsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-groupings-tags-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get isAppsProductPageTagsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-product-page-tags-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get isAppsSlpTagsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-slp-tags-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get searchResultsLearnMoreEditorialId() {
+ return this.implementation.string("transparencyLawEditorialItemId");
+ }
+ /// An array containing a mapping of system app bundle IDs and adam IDs.
+ get systemApps() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("hideableSystemApps")));
+ }
+ /// An array containing a mapping of system app bundle IDs and adam IDs
+ /// Should only be used for watchOS as a temporary fix for rdar://100234873
+ get nonDeletableSystemApps() {
+ const apps = serverData.asJSONValue(this.implementation.array("nonDeletableSystemApps"));
+ if (serverData.isDefinedNonNullNonEmpty(apps)) {
+ return serverData.asArrayOrEmpty(apps);
+ }
+ else {
+ return [
+ { "id": 1635387927, "bundle-id": "com.apple.Depth" },
+ { "id": 1635862301, "bundle-id": "com.apple.Mandrake" },
+ { "id": 1584216343, "bundle-id": "com.apple.findmy.finddevices" },
+ { "id": 1584215960, "bundle-id": "com.apple.NanoWorldClock" },
+ { "id": 1584215812, "bundle-id": "com.apple.HeartRate" },
+ { "id": 1584215851, "bundle-id": "com.apple.SessionTrackerApp" },
+ { "id": 1146562108, "bundle-id": "com.apple.NanoPhone" },
+ { "id": 1146560473, "bundle-id": "com.apple.MobileSMS" },
+ { "id": 1584215428, "bundle-id": "com.apple.NanoPhotos" },
+ { "id": 1459455352, "bundle-id": "com.apple.DeepBreathing" },
+ { "id": 1067456176, "bundle-id": "com.apple.NanoCompass.watchkitapp" }, // Compass
+ ];
+ }
+ }
+ /// The standard tabs for the current storefront.
+ get tabsStandard() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("tabs/standard")));
+ }
+ // URL to sub-in for deep links specifying the watch category. Note that this can be a multiplexing url.
+ get watchAppsGroupingURL() {
+ var _a;
+ return ((_a = this.implementation.url("watchAppsGrouping")) !== null && _a !== void 0 ? _a : "https://apps.apple.com/WebObjects/MZStore.woa/wa/viewFeature?id=1472048385");
+ }
+ get requireAgeVerification() {
+ return this.implementation.boolean("requireAgeVerification");
+ }
+ get ageRatingLearnMoreEditorialItemId() {
+ return this.implementation.string("ageRatingLearnMoreEditorialItemId");
+ }
+ get appleSiliconMacUnverifiedBadgeEditorialItemId() {
+ return this.implementation.string("appleSiliconMacUnverifiedBadgeEditorialItemId");
+ }
+ get safariExtensionsGroupingURL() {
+ return this.implementation.url("safariExtensionsGrouping");
+ }
+ get familySubscriptionsLearnMoreEditorialItemId() {
+ return this.implementation.string("familySubscriptionsLearnMoreEditorialItemId");
+ }
+ get dynamicUIRegexStrings() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("commerce-ui-urls/dynamic-url-patterns")));
+ }
+ get financeUIRegexStrings() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("commerce-ui-urls/url-patterns")));
+ }
+ get webViewRegexStrings() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("commerce-ui-urls/v2-url-patterns")));
+ }
+ get arcadePreOrderUpsellLimitSeconds() {
+ var _a;
+ return (_a = this.implementation.double("arcadePreOrderUpsellLimitSeconds")) !== null && _a !== void 0 ? _a : 86400;
+ }
+ get recentlyPlayedGamesWindowInSeconds() {
+ var _a;
+ return (_a = this.implementation.double("recentlyPlayedGamesWindowInSeconds")) !== null && _a !== void 0 ? _a : 7776000; // 90 days
+ }
+ get gamesFriendsPlayedWindowInSeconds() {
+ var _a;
+ return (_a = this.implementation.integer("games-friends-played-window-in-seconds")) !== null && _a !== void 0 ? _a : 15778800; // Half a year
+ }
+ get enableComingSoonToggle() {
+ return this.implementation.boolean("enableComingSoonToggle");
+ }
+ /// Whether or not to show the app acessibility labels
+ get enableAppAccessibilityLabels() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-app-accessibility-labels")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether or not to show the app privacy labels
+ get enablePrivacyNutritionLabels() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-privacy-nutrition-labels")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether or not to show the seller info
+ get enableSellerInfo() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-seller-info")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether or not to show the seller ICP annotation
+ get enableSellerICPAnnotation() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-seller-icp")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether to display enhanced category features (bar, breakout, and swoosh) on apps and games tabs
+ get enableFeaturedCategoriesOnGroupings() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-featured-categories-on-groupings")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether to display enhanced category bricks on apps and games tabs
+ get enableCategoryBricksOnGroupings() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-category-bricks-on-groupings")) !== null && _a !== void 0 ? _a : false;
+ }
+ get arcadeOfferEditorialItemId() {
+ return this.implementation.string("arcadeOfferEditorialItemId");
+ }
+ get sponsoredSearchODMLTimeout() {
+ var _a;
+ return (_a = this.implementation.double("sponsored-search-odml-timeout")) !== null && _a !== void 0 ? _a : 3;
+ }
+ get isSearchLandingAdsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("isSearchLandingAdsEnabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get isLLMSearchTagsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-search-tags-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get searchLandingAdFetchTimeout() {
+ var _a;
+ return (_a = this.implementation.double("search-landing-ad-fetch-timeout")) !== null && _a !== void 0 ? _a : 0.175;
+ }
+ // Time that SLP needs to be offscreen for it to be refreshed in seconds.
+ get searchLandingPageOffscreenRefreshInterval() {
+ var _a;
+ return (_a = this.implementation.double("search-landing-offscreen-refresh-interval-in-seconds")) !== null && _a !== void 0 ? _a : 60; // default is minute
+ }
+ // Time to delay the data fetch for SLP when refreshing
+ get searchLandingPageRefreshUpdateDelayInterval() {
+ var _a;
+ return (_a = this.implementation.double("search-landing-page-update-delay-interval-in-seconds")) !== null && _a !== void 0 ? _a : 0.3; // default is 0.3s
+ }
+ get appPrivacyLearnMoreEditorialItemId() {
+ return this.implementation.string("appPrivacyLearnMoreEditorialItemId");
+ }
+ // The editorial id for the article page showing the transparency info for ratings and reviews
+ get ratingsAndReviewsLearnMoreEditorialId() {
+ return this.implementation.string("ratings-and-reviews-learn-more-editorial-item-id");
+ }
+ // The editorial id for the article page showing info about the review summary
+ get reviewSummarizationLearnMoreEditorialItemId() {
+ return this.implementation.string("review-summarization-learn-more-editorial-item-id");
+ }
+ /// An array containing a list of app bundle IDs and adam IDs for apps that should not display
+ /// any app privacy shelves
+ get suppressedPrivacyAppIds() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("suppressedPrivacyLabels")));
+ }
+ /// An array containing a list of app bundle IDs and adam IDs for apps that should not display
+ /// any app accessibility shelves
+ get suppressedAccessibilityAppIds() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("suppressed-accessibility-labels")));
+ }
+ get appPrivacyDefinitionsEditorialItemId() {
+ return this.implementation.string("appPrivacyDefinitionsEditorialItemId");
+ }
+ // The EI ID for the web's category tabs shown in the sidebar
+ get webNavigationCategoryTabsEditorialItemId() {
+ return this.implementation.string("web-navigation-category-tabs-editorial-item-id");
+ }
+ /// The percentage of users that will see a live preview of the widget in the Widget Gallery
+ get todayWidgetLivePreviewRolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("todayWidgetLivePreviewRolloutRate")) !== null && _a !== void 0 ? _a : 1.0;
+ }
+ /// The percentage of users that will see the new carousel item styles under Hero 3.0
+ get hero3RolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("arcade-hero-shelf-tagline-style-rollout-rate")) !== null && _a !== void 0 ? _a : 1.0;
+ }
+ /// The percentage of users that will see the trial enrolled (subscriber) tab
+ get arcadeTrialEnrolledStateRate() {
+ var _a;
+ return (_a = this.implementation.double("arcade-trial-enrolled-state-rate")) !== null && _a !== void 0 ? _a : 0.0;
+ }
+ get marketingItemSelectionTimeout() {
+ var _a;
+ return (_a = this.implementation.double("marketing-item-selection-timeout")) !== null && _a !== void 0 ? _a : 1.0;
+ }
+ /// Whether or not to enable app events
+ get enableAppEvents() {
+ var _a;
+ return (_a = this.implementation.boolean("enableAppEvents")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether or not product page variants is enabled (feature-gate)
+ get enableProductPageVariants() {
+ var _a;
+ return (_a = this.implementation.boolean("enableProductPageVariants")) !== null && _a !== void 0 ? _a : false;
+ }
+ get enableArcadeTrialEligibleBadging() {
+ return this.implementation.boolean("enable-arcade-trial-eligible-badging");
+ }
+ /// The duration we should use for the hero carousel auto scrolling
+ get heroCarouselAutoScrollDuration() {
+ var _a;
+ return (_a = this.implementation.double("heroCarouselAutoScrollDuration")) !== null && _a !== void 0 ? _a : 7.0;
+ }
+ /// Enable additional JS logging for Product Page Variants
+ get enableAdditionalLoggingForPPV() {
+ var _a;
+ return (_a = this.implementation.boolean("enableAdditionalLoggingForPPV")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether or not to enable on device personalization
+ get enableOnDevicePersonalization() {
+ const enableOnDevicePersonalization = this.implementation.boolean("enable-on-device-personalization");
+ if (serverData.isNull(enableOnDevicePersonalization)) {
+ return true;
+ }
+ return enableOnDevicePersonalization;
+ }
+ /// Whether or not automatic page refreshing is enabled
+ get enableAutomaticPageRefresh() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-automatic-page-refresh")) !== null && _a !== void 0 ? _a : true;
+ }
+ /// Rollout rate for smart stack suggestions for the today widget.
+ get widgetSuggestionsFromTodayTabRolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("today-widget-suggestions-from-today-tab-rollout-rate")) !== null && _a !== void 0 ? _a : 1.0;
+ }
+ /// The upper bound for how many extra minutes we delay the smart stack from suggesting the Today Widget (to protect MAPI).
+ get todayWidgetSmartStackJitterMinutes() {
+ var _a;
+ return (_a = this.implementation.double("today-widget-smart-stack-jitter-minutes")) !== null && _a !== void 0 ? _a : 45;
+ }
+ get enableSystemAppReviews() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-system-app-reviews")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether or not CPPs are enabled for Search Ads.
+ get enableCPPInSearchAds() {
+ return this.implementation.boolean("enableCPPsInSearchAds") || false;
+ }
+ get cancelPreorderItemSrv() {
+ return (this.implementation.url("cancelPreorderItemSrv") || "https://buy.itunes.apple.com/commerce/preorders/cancel");
+ }
+ get getCancellablePreorderItemsSrv() {
+ return (this.implementation.url("getCancellablePreorderItemsSrv") ||
+ "https://buy.itunes.apple.com/commerce/preorders/cancellable");
+ }
+ /// An array of the enabled ad placements.
+ get enabledAdPlacements() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("enabled-ad-placements")));
+ }
+ /// A dictionary of timeout values for the ad placements.
+ get adPlacementTimeouts() {
+ return serverData.asDictionary(serverData.asJSONData(this.implementation.dictionary("ad-placement-timeouts")));
+ }
+ /// The editorial story ID for In App Purchases
+ get inAppPurchasesLearnMoreEditorialItemId() {
+ return this.implementation.string("in-app-purchases-learn-more-editorial-item-id");
+ }
+ /// Determines whether external purchases are enabled.
+ get enableExternalPurchases() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-external-purchase")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// An array of the enabled external purchases placements
+ get enabledExternalPurchasesPlacements() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("enabled-external-purchase-placements")));
+ }
+ /// The editorial item ID for the external purchases story
+ get externalPurchasesLearnMoreEditorialItemId() {
+ return this.implementation.string("external-purchase-learn-more-editorial-item-id");
+ }
+ /// The editorial item ID for the external browser story
+ get externalBrowserLearnMoreEditorialItemId() {
+ return this.implementation.string("external-browser-learn-more-editorial-item-id");
+ }
+ /// The SharePlay groupings url
+ get sharePlayAppsEditorialItemId() {
+ return this.implementation.string("share-play-apps-editorial-item-id");
+ }
+ /// Determines whether to show the icon on the external purchases product page banner
+ get externalPurchasesIncludeProductPageBannerIcon() {
+ var _a;
+ return (_a = this.implementation.boolean("external-purchase-product-page-banner-include-icon")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Determines whether to use a variant of the external purchases product page annotation copy
+ get externalPurchasesProductPageAnnotationVariant() {
+ return this.implementation.string("external-purchase-product-page-annotation-variant");
+ }
+ /// Tells us whether we want new events for ODJ to be enabled or not.
+ get newEventsForODJAreEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("new-events-for-odj-are-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ get defaultChart() {
+ return serverData.asJSONData(this.implementation.dictionary("default-chart"));
+ }
+ // The url to display the user account
+ get accountUrl() {
+ var _a;
+ return ((_a = this.implementation.url("accountUrl")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/accountSummary");
+ }
+ // The url to display the user account
+ get redeemUrl() {
+ var _a;
+ return ((_a = this.implementation.url("redeemUrl")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/redeemLandingPage");
+ }
+ // The url to display the user account
+ get charityUrl() {
+ var _a;
+ return ((_a = this.implementation.url("charityUrl")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/buyCharityGiftWizard");
+ }
+ // The url to display the manage subs page
+ get manageSubscriptionsUrl() {
+ var _a;
+ return ((_a = this.implementation.url("manageSubscriptionsUrl")) !== null && _a !== void 0 ? _a : "https://finance-app.itunes.apple.com/subscriptions/manage?context=deeplink");
+ }
+ // The url to display the manage subs page
+ get manageSubscriptionsV2Url() {
+ var _a;
+ return ((_a = this.implementation.url("manageSubscriptionsV2Url")) !== null && _a !== void 0 ? _a : "https://apps.mzstatic.com/content/54a1317a0ad442d3965d64ef6bfaae1c/");
+ }
+ /// The language value to use for ad language content filtering.
+ /// This may not necessarily match the user's language setting - in some regions ads are required
+ /// to be localized to the country's primary language, regardless of the user's own preferences.
+ get adsOverrideLanguage() {
+ return this.implementation.string("ads-override-language");
+ }
+ /// The percentage of users that will see the controller recommended or required treatment
+ /// (as opposed to supported) on supported platforms.
+ get gameControllerRecommendedRolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("game-controller-recommended-rollout-rate")) !== null && _a !== void 0 ? _a : 0;
+ }
+ /// The ID of the editorial item that provides information about game controllers.
+ get gameControllerLearnMoreEditorialItemId() {
+ return this.implementation.string("game-controller-learn-more-editorial-item-id");
+ }
+ /// The ID of the editorial item that provides information about spatial controllers.
+ get spatialControlsLearnMoreEditorialItemId() {
+ return this.implementation.string("spatial-controllers-learn-more-editorial-item-id");
+ }
+ // Whether the user can use MAPI based search focus
+ get mediaAPISearchFocusEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-search-focus-suggestions-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Indicates whether the Search Landing Page supports the V2 protocol
+ get supportsSearchLandingPageV2() {
+ var _a;
+ return (_a = this.implementation.boolean("supports-apps-slp-v2")) !== null && _a !== void 0 ? _a : false;
+ }
+ get enableSearchLandingPageV2ByTreatment() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-apps-slp-v2-by-treatment")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// The percentage of users that will see the new Search Landing Page V2 protocol
+ get searchLandingPageV2RolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("apps-slp-v2-rollout-rate")) !== null && _a !== void 0 ? _a : 0;
+ }
+ /// The percentage of users that will see the Today tab Arcade personalization
+ get todayTabArcadePersonalizationRate() {
+ var _a;
+ return (_a = this.implementation.double("today-tab-arcade-personalization-rate")) !== null && _a !== void 0 ? _a : 0;
+ }
+ /// Whether to enable extending supported Game Center features.
+ get gameCenterExtendSupportedFeatures() {
+ var _a;
+ return (_a = this.implementation.boolean("game-center-extend-supported-features")) !== null && _a !== void 0 ? _a : false;
+ }
+ get adPlacementEligibleSlotPositions() {
+ const eligibleSlotPositions = serverData.asJSONData(this.implementation.dictionary("ad-placement-eligible-slot-positions"));
+ if (serverData.isDefinedNonNullNonEmpty(eligibleSlotPositions)) {
+ return eligibleSlotPositions;
+ }
+ return {
+ "today": [
+ {
+ shelfIdentifier: "0",
+ slot: 0,
+ },
+ {
+ shelfIdentifier: "0",
+ slot: 1,
+ },
+ ],
+ "product-page-ymal": [
+ {
+ shelfIdentifier: "customers-also-bought-apps",
+ slot: 0,
+ },
+ ],
+ };
+ }
+ // The url to display the manage preorders page
+ get managePreordersUrl() {
+ var _a;
+ return (_a = this.implementation.url("preordersUrl")) !== null && _a !== void 0 ? _a : "https://finance-app.itunes.apple.com/preorders";
+ }
+ // A url to modify the user's account.
+ get modifyAccount() {
+ var _a;
+ return ((_a = this.implementation.url("modifyAccount")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/accountSummary");
+ }
+ // The url to display the purchase history page
+ get purchaseHistoryUrl() {
+ return this.implementation.url("purchaseHistoryUrl");
+ }
+ // The url to display the ratings and reviews page
+ get ratingsReviewsUrl() {
+ var _a;
+ return ((_a = this.implementation.url("ratingsReviewsUrl")) !== null && _a !== void 0 ? _a : "https://apps.mzstatic.com/content/54a1317a0ad442d3965d64ef6bfaae1c/ratings-reviews");
+ }
+ // A url to sign up for a new account.
+ get signup() {
+ var _a;
+ return ((_a = this.implementation.url("signup")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/signupWizard");
+ }
+ // The landing page to redeem a code.
+ get redeemCodeLanding() {
+ var _a;
+ return ((_a = this.implementation.url("redeemCodeLanding")) !== null && _a !== void 0 ? _a : "https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/redeemLandingPage");
+ }
+ /// The bag key that stores the generic report a problem URL.
+ get reportProblemUrl() {
+ return this.implementation.string("reportProblemUrl");
+ }
+ // Whether the app store should allow unrestricted arcade tab badging by server side marketing journeys
+ get unrestrictedServerSideTabBadging() {
+ var _a;
+ return (_a = this.implementation.boolean("unrestricted-server-side-tab-badging")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether all users should receive the "condensed" today ad.
+ get todayAdCondensedEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("today-ad-condensed-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether to enable bin-compat checks for the visionOS App Store
+ get enableVisionAppStoreBinCompatChecks() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-vision-app-store-bincompat-checks")) !== null && _a !== void 0 ? _a : false;
+ }
+ // The ID for an editorial page containing Safari Extensions
+ get safariExtensionsEditorialPageId() {
+ return this.implementation.url("safari-extensions-editorial-page-id");
+ }
+ /// The ID of the editorial item to show when deeplinking to buddy onboarding
+ get buddyOnboardingEditorialItemId() {
+ return this.implementation.string("buddy-onboarding-editorial-item-id");
+ }
+ // Whether click events should be sent for the friends playing shelf on the product page
+ get productPageFriendsPlayingClickEventsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("product-page-friends-playing-click-events-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ // ID of the editorial item to show for more information about the "High Motion" annotation.
+ get highMotionLearnMoreEditorialItemId() {
+ return this.implementation.string("high-motion-learn-more-editorial-item-id");
+ }
+ // The speed of the river in the medium lockup with screenshots ad.
+ // This is temporary, and only for testing purposes.
+ get todayAdMediumLockupScreenshotsRiverSpeed() {
+ return this.implementation.double("today-ad-medium-lockup-screenshots-river-speed");
+ }
+ // Collection ID of the game categories for Arcade download/starter pack onboarding.
+ get arcadeDownloadPackCategoriesCollectionId() {
+ return this.implementation.string("arcade-download-packs-onboarding-collection-id");
+ }
+ // Time interval in seconds where Arcade download pack shelf is visible after user has gone through the onboarding flow.
+ get arcadeDownloadPackShelfTTLInSeconds() {
+ var _a;
+ return (_a = this.implementation.integer("arcade-starter-pack-ttl-in-seconds")) !== null && _a !== void 0 ? _a : 0;
+ }
+ // The feature flag as whether or not we should display IAP offers (eg winback offers).
+ get enableOfferItems() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-winback-offers")) !== null && _a !== void 0 ? _a : false;
+ }
+ // The host for App Distribution Media API requests.
+ get appDistributionMediaAPIHost() {
+ return this.implementation.string("app-distribution-media-api-host");
+ }
+ // The language tag to use for App Distribution Media API requests.
+ get appDistributionLanguageTag() {
+ return this.implementation.string("app-distribution-language-tag");
+ }
+ // Whether App Distribution is supported.
+ get supportsAppDistribution() {
+ var _a;
+ return (_a = this.implementation.boolean("supports-app-distribution")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether Arcade download/starter pack onboarding should be triggered after Arcade purchase from the page offer button.
+ // When Mercury supports this flow the flag should be disabled.
+ get arcadeDownloadPackPostSubscribeTrigger() {
+ var _a;
+ return (_a = this.implementation.boolean("arcade-download-packs-post-subscribe-trigger")) !== null && _a !== void 0 ? _a : true;
+ }
+ // The feature flag as whether or not we should display contingent offers.
+ get enableContingentOffers() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-contingent-offers")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// The percentage of users that will see Arcade packs onboarding experience.
+ get arcadeDownloadPackRolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("arcade-download-packs-rollout-rate")) !== null && _a !== void 0 ? _a : 0;
+ }
+ // Whether to enable including the Vision platform in fetch requests
+ get enableVisionPlatform() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-vision-platform")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Dictionary containing the use cases that are supported for mixed media requests.
+ get supportedMixedMediaRequestUsecases() {
+ var _a;
+ return ((_a = serverData.asDictionary(serverData.asJSONData(this.implementation.dictionary("supported-mixed-media-request-usecases")))) !== null && _a !== void 0 ? _a : {});
+ }
+ // Whether the page and click events are enabled for Arcade download pack.
+ get arcadeDownloadPacksMetricsEventsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("arcade-download-packs-metrics-events-enabled")) !== null && _a !== void 0 ? _a : true;
+ }
+ // Whether the impression events are enabled for Arcade download pack.
+ get arcadeDownloadPacksImpressionEventsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("arcade-download-packs-impression-events-enabled")) !== null && _a !== void 0 ? _a : true;
+ }
+ /// The learn more EI ID for when purchasing a visionOS only app on iOS
+ get visionOnlyAppLearnMoreEditorialItemId() {
+ return this.implementation.string("vision-only-app-learn-more-editorial-item-id");
+ }
+ // Whether Arcade download pack onboarding will be shown after successful CIP carrier link.
+ get arcadeDownloadPacksCIPDeeplinkIntegrationEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("arcade-download-packs-cip-deeplink-trigger")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether Arcade download pack onboarding will be shown after Hardware upsell successful purchase.
+ // Only for tab badge upsell.
+ get arcadeDownloadPacksHardwareTabBadgeUpsellIntegrationEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("arcade-download-packs-hw-tabbadge-trigger")) !== null && _a !== void 0 ? _a : false;
+ }
+ // A URL that links to the About the App Store website
+ get aboutAppStoreUrl() {
+ return this.implementation.string("about-app-store-url");
+ }
+ // The EI ID for the About In App Purchases article
+ get aboutInAppPurchasesEditorialItemId() {
+ return this.implementation.string("about-in-app-purchases-editorial-item-id");
+ }
+ // A URL that links to the Request A Refund website
+ get requestARefundUrl() {
+ return this.implementation.string("request-a-refund-url");
+ }
+ // Whether the personalized recommendations toggle should be displayed in the personalized
+ // recommendations screen.
+ get personalizedRecommendationsToggleEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-personalized-recommendations-toggle")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether we should be using metricsId exclusively and remove DSID in events
+ get metricsIdMigrationEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("metrics-id-migration-enabled")) !== null && _a !== void 0 ? _a : true;
+ }
+ // Whether natural language search is enabled for all features, e.g. What's New, Bubble Tip, Hints, and Results.
+ get isNaturalLanguageSearchEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-natural-language-search-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether natural language search is partially enabled, e.g. Bubble Tip and Results only, excludes What's New and Hints.
+ get isNaturalLanguageSearchResultsEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("apps-natural-language-search-results-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether we should be using metricsId exclusively and remove DSID in events
+ get metricsIdentifiersShouldCache() {
+ var _a;
+ return (_a = this.implementation.boolean("metrics-identifiers-should-cache")) !== null && _a !== void 0 ? _a : true;
+ }
+ // A URL that links to the Change Your Payment Method support article
+ get changePaymentMethodUrl() {
+ return this.implementation.string("change-payment-method-url");
+ }
+ // The EI ID for the Information about the French App Store article
+ get aboutFrenchAppStoreEditorialItemId() {
+ return this.implementation.string("about-app-store-editorial-item-id");
+ }
+ // A bag override which can disable product page on demand shelf fetching if necessary, without
+ // a JS release
+ get isOnDemandShelfFetchingEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("on-demand-product-shelf-fetching-enabled")) !== null && _a !== void 0 ? _a : true;
+ }
+ // A bag override which can enable the addition of the dsId field to metrics events in the case of
+ // missing userId
+ get isMetricsUserIdFallbackEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("metrics-user-id-fallback-enabled")) !== null && _a !== void 0 ? _a : false;
+ }
+ // A bag override which can enable the addition of the alt_ab2_data field to metrics events in the case of
+ // missing ab2_data
+ get isMetricsAb2DataFallbackEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("metrics-ab2data-fallback-enabled")) !== null && _a !== void 0 ? _a : !preprocessor.GAMES_TARGET;
+ }
+ /// Whether or not to enable on device reco reordering. Default to true while in dev.
+ get enableRecoOnDeviceReordering() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-on-device-reco-reordering")) !== null && _a !== void 0 ? _a : false;
+ }
+ // The EI IDs for any Vision Pro ribbon bar items
+ get ribbonBarVisionEditorialItemIds() {
+ return serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("ribbon-bar-vision-editorial-item-ids")));
+ }
+ // The IDs for any EIs that should be filtered from search results
+ get searchFilterEditorialItemIds() {
+ const array = serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("search-filter-editorial-item-ids")));
+ return new Set(array);
+ }
+ // The ID for the accessibility learn more EI on the product page
+ get accessibilityLearnMoreEditorialItemId() {
+ return this.implementation.string("accessibility-learn-more-editorial-item-id");
+ }
+ /// Whether discovery content based on ownership of a Vision Pro device is enabled
+ get enableDeviceDrivenDiscoveryContent() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-device-driven-discovery-content")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Whether to show install size for apps on the product page
+ get enableProductPageInstallSize() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-product-page-install-size")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether we show the prerendered icon artwork
+ get enableIconArtwork() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-icon-artwork")) !== null && _a !== void 0 ? _a : false;
+ }
+ // The rollout rate associated with `enable-icon-artwork`
+ get iconArtworkRolloutRate() {
+ var _a;
+ return (_a = this.implementation.double("icon-artwork-rollout-rate")) !== null && _a !== void 0 ? _a : 0.0;
+ }
+ // Whether the new age rating system should be used
+ get enableUpdatedAgeRatings() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-app-store-age-ratings")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether age rating should be sent to MAPI to filter returned content
+ get enableAgeRatingFilter() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-age-rating-filter")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether two-phase buy is enabled. This is expected to always be false, and only exists
+ // as an escape hatch.
+ get enableTwoPhaseOfferConfirmation() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-two-phase-offer-confirmation")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// Determines whether to use a variant of the external purchases product page banner text copy
+ get externalPurchasesProductPageBannerTextVariant() {
+ return this.implementation.string("external-purchase-product-page-banner-text-variant");
+ }
+ /// Describes the variant of the external purchases product page banner icon to use
+ get externalPurchasesProductPageBannerIconVariant() {
+ return this.implementation.string("external-purchase-product-page-banner-icon-variant");
+ }
+ /** ******* GameStoreKit *********/
+ // A default maximum number of games used for query events & updates.
+ get maxGamesForFetchingEvents() {
+ var _a;
+ return (_a = this.implementation.integer("max-games-for-fetching-events")) !== null && _a !== void 0 ? _a : 30;
+ }
+ // The mock home feed url for testing
+ get mockHomeFeedURL() {
+ return this.implementation.string("mock-home-feed-url");
+ }
+ // Disable play-together endpoint
+ get disablePlayTogetherEndpoint() {
+ var _a;
+ return (_a = this.implementation.boolean("disable-play-together-endpoint")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Metrics topic for the current bundle.
+ get metricsTopic() {
+ var _a, _b;
+ if (preprocessor.GAMES_TARGET) {
+ const defaultTopic = "xp_amp_gc_cs";
+ const metricsTopic = (_a = serverData.asString(this.metricsConfiguration, "topics.GAMES_CLICKSTREAM_TOPIC")) !== null && _a !== void 0 ? _a : null;
+ return metricsTopic !== null && metricsTopic !== void 0 ? metricsTopic : defaultTopic;
+ }
+ else {
+ const defaultTopic = "xp_ase_appstore_ue";
+ return (_b = this.implementation.string("metrics_topic")) !== null && _b !== void 0 ? _b : defaultTopic;
+ }
+ }
+ // A default collectionID of the game recommendations for arcade subscriber.
+ get playTogetherGameRecommendationsArcade() {
+ var _a;
+ return (_a = this.implementation.string("play-together-arcade-game-recommendations")) !== null && _a !== void 0 ? _a : "1803255513";
+ }
+ // A default collectionID of the game recommendations for users with no arcade subscription.
+ get playTogetherGameRecommendationsNonArcade() {
+ var _a;
+ return (_a = this.implementation.string("play-together-non-arcade-game-recommendations")) !== null && _a !== void 0 ? _a : "1804480915";
+ }
+ /// A collectionID of arcade game recommendations for multiplayer activity
+ get multiplayerActivityGameRecommendationsArcade() {
+ var _a;
+ return (_a = this.implementation.string("multiplayer-activity-arcade-game-recommendations")) !== null && _a !== void 0 ? _a : "1821553042";
+ }
+ /// A collectionID of non-arcade game recommendations for multiplayer activity
+ get multiplayerActivityGameRecommendationsNonArcade() {
+ var _a;
+ return (_a = this.implementation.string("multiplayer-activity-non-arcade-game-recommendations")) !== null && _a !== void 0 ? _a : "1821553152";
+ }
+ // Whether to show the Subscriber Access Arcade Badge
+ get showArcadeSubscriberAccessBadge() {
+ var _a;
+ return (_a = this.implementation.boolean("show-arcade-subscriber-access-badge")) !== null && _a !== void 0 ? _a : false;
+ }
+ // Whether to show the Non-Subscriber Arcade Badge
+ get showArcadeNonSubscriberBadge() {
+ var _a;
+ return (_a = this.implementation.boolean("show-arcade-non-subscriber-badge")) !== null && _a !== void 0 ? _a : false;
+ }
+ /// The URL for the learn more link on the Cross Use Consent screen.
+ get gamesCrossUseConsentLearnMoreURL() {
+ return this.implementation.string("games-crossuse-consent-learn-more-url");
+ }
+ /// The duration for the auto advance interval for the Play Now feed hero carousel
+ get gamesPlayNowHeroCarouselAutoAdvanceInterval() {
+ var _a;
+ return (_a = this.implementation.double("games-play-now-hero-carousel-auto-advance-interval")) !== null && _a !== void 0 ? _a : 10.0;
+ }
+ /// The max duration for the auto advance interval for the Play Now feed hero carousel
+ get gamesPlayNowHeroCarouselAutoAdvanceMaxInterval() {
+ var _a;
+ return (_a = this.implementation.double("games-play-now-hero-carousel-auto-advance-max-interval")) !== null && _a !== void 0 ? _a : 30.0;
+ }
+ /// The duration for the auto advance interval for the Editorial hero carousel
+ get gamesEditorialHeroCarouselAutoAdvanceInterval() {
+ var _a;
+ return (_a = this.implementation.double("games-editorial-hero-carousel-auto-advance-interval")) !== null && _a !== void 0 ? _a : 10.0;
+ }
+ /// The max duration for the auto advance interval for the Editorial hero carousel
+ get gamesEditorialHeroCarouselAutoAdvanceMaxInterval() {
+ var _a;
+ return (_a = this.implementation.double("games-editorial-hero-carousel-auto-advance-max-interval")) !== null && _a !== void 0 ? _a : 30.0;
+ }
+ get enablePreviewPlatformForWeb() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-preview-platform-for-web")) !== null && _a !== void 0 ? _a : false;
+ }
+ // How long to look back for completed challenges to show in active challenges shelf
+ get completedChallengesInActiveShelfTimeThreshold() {
+ var _a;
+ return (_a = this.implementation.integer("completed-challenges-in-active-shelf-time-threshold")) !== null && _a !== void 0 ? _a : 86400; // default to 1 day
+ }
+ // Whether we should request for a review when we have a chance.
+ get requestReviewEnabled() {
+ var _a;
+ return (_a = this.implementation.boolean("request-review-enabled")) !== null && _a !== void 0 ? _a : true;
+ }
+ // The minimum number of app launches before we consider requesting for a review.
+ get requestReviewMinAppLaunchCount() {
+ var _a;
+ return (_a = this.implementation.integer("request-review-min-app-launch-count")) !== null && _a !== void 0 ? _a : 15;
+ }
+ // The minimum number of game launches from the app before we consider requesting a review.
+ get requestReviewMinGameLaunchCount() {
+ var _a;
+ return (_a = this.implementation.integer("request-review-min-game-launch-count")) !== null && _a !== void 0 ? _a : 5;
+ }
+ // Whether we should request licenses in product information
+ get enableLicenses() {
+ var _a;
+ return (_a = this.implementation.boolean("enable-licenses")) !== null && _a !== void 0 ? _a : false;
+ }
+ // The number of apps to display in the chart detail screen.
+ get chartDetailPageItemCount() {
+ var _a;
+ return (_a = this.implementation.integer("chart-detail-page-item-count")) !== null && _a !== void 0 ? _a : 25;
+ }
+ /// https://quip-apple.com/G5EGABrSh1YO#temp:C:UdDa344becf5aac473db8085f35a
+ /// URL query parameters that are permitted to be included in the pageUrl field of page metrics events.
+ get metricsAllowedListURLParams() {
+ let params = serverData.asArrayOrEmpty(serverData.asJSONValue(this.implementation.array("metrics-allowed-list-url-params")));
+ if (serverData.isNullOrEmpty(params)) {
+ params = [
+ "itsct",
+ "itscg",
+ "itcCt",
+ "ct",
+ "pt",
+ "advp",
+ "mttn3pid",
+ "mttnagencyid",
+ "mttncc",
+ "mttnpid",
+ "mttnsiteid",
+ "mttnsub1",
+ "mttnsub2",
+ "mttnsubad",
+ "mttnsubkw",
+ "mttnsubplmnt",
+ "id",
+ "term",
+ "salableAdamId",
+ "ign-itscg",
+ "ign-itsct",
+ "utm_campaign",
+ "clusterId",
+ ];
+ }
+ return params;
+ }
+}
+BagWrapper.type = makeMetatype("app-store:bag-wrapper");
+//# sourceMappingURL=bag.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/cached-bag.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/cached-bag.js
new file mode 100644
index 0000000..e7ac2db
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/cached-bag.js
@@ -0,0 +1,82 @@
+import { isSome } from "@jet/environment";
+import { Wrapper } from "./wrapper";
+/**
+ * A bag wrapper that implements caching. All accessed values are cached until this object is reinitialized via rebootstrap or recreated.
+ *
+ */
+export class CachedBag extends Wrapper {
+ constructor() {
+ super(...arguments);
+ /**
+ * A cache of entries
+ *
+ * Note that `Opt<T>` values which are nil are stored, representing that the bag has no value for a key, which
+ * is coalesced in the JS. This prevents infinite cache misses when the bag has no value for a key, resulting in
+ * unnecessary calls to the native client
+ */
+ this.cache = {};
+ }
+ registerBagKeys(keys) {
+ this.implementation.registerBagKeys(keys);
+ }
+ string(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.string(key);
+ });
+ }
+ double(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.double(key);
+ });
+ }
+ integer(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.integer(key);
+ });
+ }
+ boolean(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.boolean(key);
+ });
+ }
+ array(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.array(key);
+ });
+ }
+ dictionary(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.dictionary(key);
+ });
+ }
+ url(key, forceDisableCache = false) {
+ return this.fromCache(key, forceDisableCache, () => {
+ return this.implementation.url(key);
+ });
+ }
+ /**
+ * Returns a cached value if possible to do so, otherwise uses the closure to fetch a new value which is cached and returned
+ *
+ * @param key The key on which to cache
+ * @param forceDisableCache Disables the cache to ensure a fresh value from the bag
+ * @param fetchValue A closure to fetch new values with
+ * @returns A previously or newly cached value
+ */
+ fromCache(key, forceDisableCache = false, fetchValue) {
+ if (forceDisableCache) {
+ return fetchValue();
+ }
+ else {
+ const cacheEntry = this.cache[key];
+ if (isSome(cacheEntry)) {
+ return cacheEntry.value;
+ }
+ else {
+ const newValue = fetchValue();
+ this.cache[key] = { value: newValue };
+ return newValue;
+ }
+ }
+ }
+}
+//# sourceMappingURL=cached-bag.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client-ordering.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client-ordering.js
new file mode 100644
index 0000000..683d81c
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client-ordering.js
@@ -0,0 +1,43 @@
+/**
+ * Created by dersu on 6/23/17.
+ */
+import { makeMetatype } from "@jet/environment/util/metatype";
+import { Wrapper } from "./wrapper";
+export class ClientOrderingWrapper extends Wrapper {
+ async orderedVisibleIAPs(appBundleId, defaultOrdering, defaultVisibleIdentifiers, spotlightIdentifier) {
+ return await new Promise((resolve, reject) => {
+ // Collections that are parameters over the bridge cannot have `nil` constituents on the other side, so we
+ // should make sure we don't give such inputs or else we'll crash the app.
+ const cleanedDefaultOrdering = defaultOrdering.filter((item) => {
+ return item !== null && item !== undefined;
+ });
+ const cleanedDefaultVisibleIdentifiers = defaultVisibleIdentifiers.filter((item) => {
+ return item !== null && item !== undefined;
+ });
+ this.implementation.orderedVisibleIAPs(appBundleId, cleanedDefaultOrdering, cleanedDefaultVisibleIdentifiers, spotlightIdentifier, (ordering, error) => {
+ if (error) {
+ reject(error);
+ }
+ else {
+ resolve(ordering);
+ }
+ });
+ });
+ }
+ async visibilityForIAPs(productMap) {
+ return await new Promise((resolve, reject) => {
+ this.implementation.visibilityForIAPs(productMap, (visibilities, error) => {
+ if (error) {
+ // Do not reject; we should gracefully fail, since this ordering
+ // data isn't strictly necessary to render search results.
+ resolve({});
+ }
+ else {
+ resolve(visibilities);
+ }
+ });
+ });
+ }
+}
+ClientOrderingWrapper.type = makeMetatype("app-store:client-ordering-wrapper");
+//# sourceMappingURL=client-ordering.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client.js
new file mode 100644
index 0000000..5a53dac
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/client.js
@@ -0,0 +1,204 @@
+/**
+ * Created by Pete Hare on 2/7/17.
+ */
+import { makeMetatype } from "@jet/environment/util/metatype";
+import { Size } from "../../api/models/base";
+import * as serverData from "../json-parsing/server-data";
+import { Wrapper } from "./wrapper";
+// region API
+/**
+ * Client identifier for the App Store.
+ */
+export const appStoreIdentifier = "com.apple.AppStore" /* ClientIdentifier.AppStore */;
+/**
+ * Client identifier for the Bridge (Watch) store.
+ */
+export const watchIdentifier = "com.apple.AppStore.BridgeStoreExtension" /* ClientIdentifier.AppStore_BridgeStoreExtension */;
+/**
+ * Client identifier for the iMessages store.
+ */
+export const messagesIdentifier = "com.apple.MobileSMS" /* ClientIdentifier.MobileSMS */;
+/**
+ * Client identifier for the arcade app.
+ */
+export const arcadeIdentifier = "com.apple.Arcade" /* ClientIdentifier.Arcade */;
+/**
+ * Client identifier indicating ATV.
+ */
+export const tvIdentifier = "com.apple.TVAppStore" /* ClientIdentifier.TVAppStore */;
+/**
+ * Client identifier for the Arcade launch repair SubscribePageExtension (iOS).
+ */
+export const productPageExtensionIdentifier = "com.apple.AppStore.ProductPageExtension" /* ClientIdentifier.AppStore_ProductPageExtension */;
+/**
+ * Client identifier for the Arcade launch repair SubscribePageExtension (iOS).
+ */
+export const subscribePageExtensionIdentifier = "com.apple.AppStore.SubscribePageExtension" /* ClientIdentifier.AppStore_SubscribePageExtension */;
+export class ClientWrapper extends Wrapper {
+ get buildType() {
+ return this.implementation.buildType;
+ }
+ // This is only supported in Luckier client builds from AppStoreJet 11.1.7 & GamesUI 2.1.5 onwards. Any previous
+ // clients will return undefined.
+ get buildVersion() {
+ return this.implementation.buildVersion;
+ }
+ get deviceType() {
+ return this.implementation.deviceType;
+ }
+ get guid() {
+ return this.implementation.guid;
+ }
+ get isActivityAvailable() {
+ return this.implementation.isActivityAvailable;
+ }
+ get isElectrocardiogramInstallationAllowed() {
+ return this.implementation.isElectrocardiogramInstallationAllowed;
+ }
+ get isScandiumInstallationAllowed() {
+ return this.implementation.isScandiumInstallationAllowed;
+ }
+ get isSidepackingEnabled() {
+ return this.implementation.isSidepackingEnabled;
+ }
+ get isTinkerWatch() {
+ return this.implementation.isTinkerWatch;
+ }
+ get screenCornerRadius() {
+ return this.implementation.screenCornerRadius;
+ }
+ get screenSize() {
+ return Size.fromNativeSize(this.implementation.screenSize);
+ }
+ get storefrontIdentifier() {
+ return this.implementation.storefrontIdentifier;
+ }
+ get supportsHEIF() {
+ return this.implementation.supportsHEIF;
+ }
+ get thinnedApplicationVariantIdentifier() {
+ return this.implementation.thinnedApplicationVariantIdentifier;
+ }
+ get isMandrakeSupported() {
+ return this.implementation.isMandrakeSupported;
+ }
+ get isCharonSupported() {
+ return this.implementation.isCharonSupported;
+ }
+ get isIconArtworkCapable() {
+ return this.implementation.isIconArtworkCapable;
+ }
+ get maxAppContentRating() {
+ return this.implementation.maxAppContentRating;
+ }
+ get hostBundleId() {
+ return this.implementation.hostBundleId;
+ }
+ isPairedSystemVersionAtLeast(version) {
+ var _a, _b, _c;
+ return (_c = (_b = (_a = this.implementation).isPairedSystemVersionAtLeast) === null || _b === void 0 ? void 0 : _b.call(_a, version)) !== null && _c !== void 0 ? _c : false;
+ }
+ deletableSystemAppCanBeInstalledOnWatchWithBundleID(bundleId) {
+ return this.implementation.deletableSystemAppCanBeInstalledOnWatchWithBundleID(bundleId);
+ }
+ deviceHasCapabilities(capabilities) {
+ return this.implementation.deviceHasCapabilities(capabilities);
+ }
+ deviceHasCapabilitiesIncludingCompatibilityCheckIsVisionOSCompatibleIOSApp(capabilities, supportsVisionOSCompatibleIOSBinary) {
+ if (this.isPad && capabilities.includes("healthkit")) {
+ // Workaround for: rdar://116905381 (J517/21C16: Unable to download AC Wellness even though App Store page says its compatible with my iPad)
+ return false;
+ }
+ return this.implementation.deviceHasCapabilitiesIncludingCompatibilityCheckIsVisionOSCompatibleIOSApp(capabilities, supportsVisionOSCompatibleIOSBinary);
+ }
+ isActivePairedWatchSystemVersionAtLeastMajorVersionMinorVersionPatchVersion(majorVersion, minorVersion, patchVersion) {
+ return this.implementation.isActivePairedWatchSystemVersionAtLeastMajorVersionMinorVersionPatchVersion(majorVersion, minorVersion, patchVersion);
+ }
+ canDevicePerformAppActionWithAppCapabilities(appAction, appCapabilities) {
+ return this.implementation.canDevicePerformAppActionWithAppCapabilities(appAction, appCapabilities);
+ }
+ isAutomaticDownloadingEnabled() {
+ return this.implementation.isAutomaticDownloadingEnabled();
+ }
+ isAuthorizedForUserNotifications() {
+ return this.implementation.isAuthorizedForUserNotifications();
+ }
+ /**
+ * Check whether the active paired device's OS is below a given version.
+ */
+ isActivePairedWatchSystemVersionBelow(version) {
+ // We want to use isActivePairedWatchSystemVersionAtLeastMajorVersionMinorVersionPatchVersion
+ // rather than isPairedSystemVersionAtLeast here, as the latter is only available from YukonB onwards
+ const versionComponents = version.split(".");
+ const majorVersion = serverData.asNumber(versionComponents[0]) || 0;
+ const minorVersion = serverData.asNumber(versionComponents[1]) || 0;
+ const patchVersion = serverData.asNumber(versionComponents[2]) || 0;
+ return !this.implementation.isActivePairedWatchSystemVersionAtLeastMajorVersionMinorVersionPatchVersion(majorVersion, minorVersion, patchVersion);
+ }
+ /** Returns `true` for phone-factor iOS devices. */
+ get isPhone() {
+ return this.deviceType === "phone";
+ }
+ /** Returns `true` for pad-factor iOS devices. */
+ get isPad() {
+ return this.deviceType === "pad";
+ }
+ /**
+ * Returns `true` for iOS devices.
+ *
+ * Note: this property might be replaced with a build-time macro in "production"
+ */
+ get isiOS() {
+ return this.isPhone || this.isPad;
+ }
+ /**
+ * Returns `true` for Mac devices
+
+ * Note: this property might be replaced with a build-time macro in "production"
+ */
+ get isMac() {
+ return this.deviceType === "mac";
+ }
+ /**
+ * Returns `true` for TV devices.
+
+ * Note: this property might be replaced with a build-time macro in "production"
+ */
+ get isTV() {
+ return this.deviceType === "tv";
+ }
+ /**
+ * Returns `true` for Watch devices.
+
+ * Note: this property might be replaced with a build-time macro in "production"
+ */
+ get isWatch() {
+ return this.deviceType === "watch";
+ }
+ /**
+ * Returns `true` for Vision devices.
+ *
+ * Note: this property might be replaced with a build-time macro in "production"
+ */
+ get isVision() {
+ return this.deviceType === "vision";
+ }
+ /**
+ * Returns `true` for the Web
+ *
+ * Note: this property might be replaced with a build-time macro in "production"
+ */
+ get isWeb() {
+ return this.deviceType === "web";
+ }
+ get isCompanionVisionApp() {
+ return this.hostBundleId === "com.apple.visionproapp";
+ }
+ /** Returns the list of remote identifiers to download any purchases to. */
+ get remoteDownloadIdentifiers() {
+ return this.implementation.remoteDownloadIdentifiers;
+ }
+}
+ClientWrapper.type = makeMetatype("app-store:client-wrapper");
+// endregion
+//# sourceMappingURL=client.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/console.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/console.js
new file mode 100644
index 0000000..1bbfac0
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/console.js
@@ -0,0 +1,18 @@
+import { makeMetatype } from "@jet/environment/util/metatype";
+import { Wrapper } from "./wrapper";
+export class ConsoleWrapper extends Wrapper {
+ info(...args) {
+ return this.implementation.info(...args);
+ }
+ error(...args) {
+ return this.implementation.error(...args);
+ }
+ log(...args) {
+ return this.implementation.log(...args);
+ }
+ warn(...args) {
+ return this.implementation.warn(...args);
+ }
+}
+ConsoleWrapper.type = makeMetatype("app-store:console-wrapper");
+//# sourceMappingURL=console.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/host.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/host.js
new file mode 100644
index 0000000..001a1e3
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/host.js
@@ -0,0 +1,64 @@
+import { makeMetatype } from "@jet/environment/util/metatype";
+import { Wrapper } from "./wrapper";
+export class HostWrapper extends Wrapper {
+ get clientIdentifier() {
+ return this.implementation.clientIdentifier;
+ }
+ get clientVersion() {
+ return this.implementation.clientVersion;
+ }
+ get deviceLocalizedModel() {
+ return this.implementation.deviceLocalizedModel;
+ }
+ get deviceModel() {
+ return this.implementation.deviceModel;
+ }
+ get deviceModelFamily() {
+ return this.implementation.deviceModelFamily;
+ }
+ get devicePhysicalModel() {
+ return this.implementation.devicePhysicalModel;
+ }
+ get deviceMarketingFamilyName() {
+ return this.implementation.deviceMarketingFamilyName;
+ }
+ get osBuild() {
+ return this.implementation.osBuild;
+ }
+ get platform() {
+ return this.implementation.platform;
+ }
+ isOSAtLeast(majorVersion, minorVersion, patchVersion) {
+ return this.implementation.isOSAtLeast(majorVersion, minorVersion, patchVersion);
+ }
+ /** Returns `true` for iOS host. */
+ get isiOS() {
+ return this.platform === "iOS";
+ }
+ /** Returns `true` for macOS host. */
+ get isMac() {
+ return this.platform === "macOS";
+ }
+ /** Returns `true` for tvOS host. */
+ get isTV() {
+ return this.platform === "tvOS";
+ }
+ /** Returns `true` for watchOS host. */
+ get isWatch() {
+ return this.platform === "watchOS";
+ }
+ /** Returns `true` for web host. */
+ get isWeb() {
+ return this.platform === "web";
+ }
+ /** Returns `true` for Windows host. */
+ get isWindows() {
+ return this.platform === "Windows";
+ }
+ /** Returns `true` for visionOS host. */
+ get isVision() {
+ return this.platform === "xrOS";
+ }
+}
+HostWrapper.type = makeMetatype("app-store:host-wrapper");
+//# sourceMappingURL=host.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/localization.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/localization.js
new file mode 100644
index 0000000..d7e0ee8
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/localization.js
@@ -0,0 +1,437 @@
+import { makeMetatype } from "@jet/environment/util/metatype";
+import { AmpLocalization } from "../amp-localization/amp-localization";
+import { isNullOrEmpty } from "../json-parsing/server-data";
+import { Wrapper } from "./wrapper";
+import { isSome } from "@jet/environment/types/optional";
+import * as validation from "@jet/environment/json/validation";
+/**
+ * Wrapper around an object or `Localization` type.
+ * The wrapped object is implemented as part of a native app.
+ */
+export class LocalizationWrapper extends Wrapper {
+ constructor(loc, objectGraph) {
+ super(loc);
+ /**
+ * Path to localization file.
+ * The path is set when the localization file is loaded
+ * for the first time.
+ */
+ this.locFile = null;
+ /**
+ * Instance of `AMPLocalization` providing server-side
+ * values for localized stirngs.
+ */
+ this.ampLoc = new AmpLocalization();
+ /**
+ * Localization strings cache.
+ * Cache and reuse values returned by
+ * wrapped `Localization` implementation.
+ */
+ this.LOC_STRING_CACHE = {};
+ this.objectGraph = objectGraph;
+ }
+ /**
+ * Returns the wrapped localization's identifier.
+ */
+ get identifier() {
+ return this.implementation.identifier;
+ }
+ /**
+ * Returns the wrapped localization's safe identifier.
+ */
+ get safeIdentifier() {
+ return this.implementation.identifier.split("_")[0];
+ }
+ // endregion
+ // region Localization
+ /**
+ * Localizes a string replacing placehoders in key with values in the parameters dictionary
+ * @param key The loc key to look up
+ * @param params Parameters to replace in the loc string
+ * @return The localized string
+ */
+ string(key, defaultValue) {
+ return this.implementation.string(key);
+ }
+ /**
+ * Localizes a string, and logs & throws an error if the key is a screamer.
+ * @param key The loc key to look up
+ * @return The localized string
+ */
+ tryString(key) {
+ const value = this.implementation.string(key);
+ if (value === key || value === `**${key}**`) {
+ validation.context("tryString", () => {
+ validation.unexpectedType("coercedValue", "Localization key", key, null);
+ });
+ throw new Error(`No value exists for localization key '${key}'`);
+ }
+ return value;
+ }
+ /**
+ * Localizes a string, and logs an error if the key is a screamer.
+ * @param key The loc key to look up
+ * @param fallback The fallback value for unlocalized keys, e.g. English value
+ * @return The localized string
+ */
+ stringWithFallback(key, fallback) {
+ const value = this.implementation.string(key);
+ return value === `**AppStore.${key}**` ? fallback : value;
+ }
+ /**
+ * Localizes a string using a preferred locale.
+ *
+ * The implementation of this function is similar to `string(key:)` above, but with the option
+ * to prefer a particular locale. If one is provided, we augment the lookup key in the cache
+ * with the `locale` value. If one is not provided, we fallback to `string(key:)`. This makes it
+ * much easier to use this function directly, in place of `string(key:)` where necessary.
+
+ * @param objectGraph The object graph, used to forward this call on if the required native function is unavailable.
+ * Can be removed for 2023.
+ * @param key The loc key to look up.
+ * @param locale The preferred locale to use for look up. Falls back to default, if unavailable.
+ * @param defaultValue A default value to use if nothing is found.
+ */
+ stringForPreferredLocale(objectGraph, key, locale, defaultValue) {
+ if (isNullOrEmpty(locale)) {
+ return this.string(key, defaultValue);
+ }
+ const cacheKey = `${key}_${locale}`;
+ let value = this.LOC_STRING_CACHE[cacheKey];
+ if (!value) {
+ value = this.implementation.stringForPreferredLocale(key, locale);
+ if (value && value !== key) {
+ this.LOC_STRING_CACHE[cacheKey] = value;
+ }
+ else {
+ const serverValue = this.ampLoc.localize(key);
+ if (serverValue !== key) {
+ value = serverValue;
+ }
+ else if (defaultValue) {
+ value = defaultValue;
+ }
+ else {
+ value = key;
+ }
+ }
+ }
+ return value;
+ }
+ /**
+ * Localize with appropriate plural form based on the count.
+ *
+ * Some languages have more plural forms than others.
+ * The full set of categories is "zero", "one", "two", "few", "many", and "other".
+ *
+ * The base loc key is used for "other" (the default).
+ * Otherwise the category is appended to the base loc key with a "." separator.
+ *
+ * http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
+ * http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
+ * http://unicode.org/repos/cldr/trunk/specs/ldml/tr35-numbers.html#Language_Plural_Rules
+ *
+ * English loc keys
+ * key = "@@count@@ dogs"; // default, aka "plural"
+ * key.zero = "no dogs"; // used when count is 0
+ * key.one = "@@count@@ dog"; // used when count is 1, aka "singular"
+ *
+ * @param key base loc key
+ * @param count number used to determine the plural form
+ * @param params (optional) substitution keys and values, "count" will be added if it's not already present
+ * @return localized string
+ */
+ stringWithCount(key, count, params) {
+ let value = this.implementation.stringWithCount(key, count);
+ if (!value || value === key) {
+ const serverValue = this.ampLoc.localizeWithCount(this.objectGraph, key, count, params);
+ if (serverValue) {
+ value = serverValue;
+ }
+ }
+ return value;
+ }
+ /**
+ * A variation of `stringWithCount` that supports multiple plural forms.
+ * @param key base loc key
+ * @param counts numbers used to determine the plural forms
+ * @param params (optional) substitution keys and values, "count" will be added if it's not already present
+ * @return localized string
+ */
+ stringWithCounts(key, counts, params) {
+ return this.implementation.stringWithCounts(key, counts);
+ }
+ /**
+ * Converts a string into its uppercased form.
+ * @param value The string to apply the uppercase to.
+ * @returns {string} The loacle-specific, uppercased form of the string. If for whatever reason the upper-casing cannot
+ * be applied, this function simply returns the input value.
+ */
+ uppercased(value) {
+ if (!value) {
+ return null;
+ }
+ return value.toLocaleUpperCase(this.safeIdentifier);
+ }
+ /**
+ * Converts a number into a localized string
+ *
+ * @param n The number to convert
+ * @param decimalPlaces The number of decimal places to include.
+ * @return {string} The localized version of the number
+ */
+ decimal(n, decimalPlaces) {
+ let value = this.implementation.decimal(n, decimalPlaces);
+ if (!value) {
+ if (typeof n === "number") {
+ value = `* ${n.toString()} *`;
+ }
+ else {
+ value = this.nullString();
+ }
+ }
+ return value;
+ }
+ /**
+ * Converts a number of bytes into a localized file size string
+ *
+ * @param bytes The number of bytes to convert
+ * @return The localized file size string
+ */
+ fileSize(bytes) {
+ let value = this.implementation.fileSize(bytes);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ /**
+ * Converts a number of bytes into a localized file size string
+ *
+ * @param count The number of bytes to convert
+ * @return The localized file size string
+ */
+ formattedCount(count) {
+ let value = this.implementation.formattedCount(count);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ /**
+ * Converts a number into a formatted string representation using the preferred locale identifier.
+ *
+ * @param count The number to format.
+ * @param locale The locale identifier to prefer for lookup.
+ * @return The localized string.
+ */
+ formattedCountForPreferredLocale(objectGraph, count, locale) {
+ if (isNullOrEmpty(locale)) {
+ return this.formattedCount(count);
+ }
+ let value = this.implementation.formattedCountForPreferredLocale(count, locale);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ /**
+ * Converts a date into a time ago label, showing how long ago
+ * the date occurred
+ *
+ * @param date The date object to convert
+ * @param context The context in which the date should be formatted
+ * @return The localized string representing the amount of time that has passed
+ */
+ timeAgoWithContext(date, context) {
+ let value = this.implementation.timeAgoWithContext(date, context);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ /**
+ * Converts a date into a localized date string using the provided format
+ *
+ * @param format The format string describing how the date should be formatted
+ * @param date The date object to convert
+ * @return The localized string representing the date
+ */
+ formatDate(format, date) {
+ let value = this.implementation.formatDate(format, date);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ formatDateWithContext(format, date, context) {
+ let value = this.implementation.formatDateWithContext(format, date, context);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ formatDateInSentence(sentence, format, date) {
+ let value = this.implementation.formatDateInSentence(sentence, format, date);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ /**
+ * Converts a date into a relative date, showing how long ago
+ * the date occurred
+ *
+ * @param date The date object to convert
+ * @return The localized string representing the amount of time that has passed
+ */
+ relativeDate(date) {
+ let value = this.implementation.relativeDate(date);
+ if (!value) {
+ value = this.nullString();
+ }
+ return value;
+ }
+ formatDuration(value, unit) {
+ let result = this.implementation.formatDuration(value, unit);
+ if (!result) {
+ result = this.nullString();
+ }
+ return result;
+ }
+ // endregion
+ // region Private Methods
+ /**
+ * Applies a new localization file and localization dictionary as the new set of localizations
+ *
+ * @param file The file name of the file that is loaded
+ * @param localizations The localizations dictionary to use
+ * @param locale Current normalized locale which includes language code
+ */
+ applyLocalizations(file, localizations, locale) {
+ if (this.isLocFileLoaded(file)) {
+ return;
+ }
+ this.locFile = file;
+ // The first 2 characters of normalized locale are the language code.
+ this.ampLoc.updateLocalizationData(localizations, locale.slice(0, 2));
+ }
+ /**
+ * Checks if the named loc file is already loaded
+ * @param file The file name to check
+ * @return {boolean} True or false depending on whether the file name is loaded
+ */
+ isLocFileLoaded(file) {
+ return this.locFile === file;
+ }
+ /**
+ * Normalizes the given bag language into a locale.
+ * @param language The language to normalize.
+ * @param storefrontIdentifier The storefront identifier to use.
+ * @return A locale to use.
+ */
+ normalizedLocale(objectGraph, language, storefrontIdentifier) {
+ language = language.toLowerCase();
+ switch (language) {
+ case "yue-hant": {
+ // Country code from the bag is not available in JS, so we use the storefront.
+ const macauStoreFrontIdentifier = objectGraph.props.asString("macauStorefrontIdentifier");
+ if (typeof storefrontIdentifier === "string" &&
+ typeof macauStoreFrontIdentifier === "string" &&
+ storefrontIdentifier.indexOf(macauStoreFrontIdentifier) !== -1) {
+ return "zh-ma";
+ }
+ else {
+ return "zh-hk";
+ }
+ }
+ default:
+ return language;
+ }
+ }
+ nullString() {
+ return "* null *";
+ }
+ // endregion
+ // region API
+ /**
+ * Loads the localizations from the JetPack.
+ */
+ load(objectGraph) {
+ // Sanity check
+ if (objectGraph.bag.language === undefined || objectGraph.bag.language === null) {
+ throw new Error("Bag language is not available. Unable to load localizations.");
+ }
+ const locale = this.normalizedLocale(objectGraph, objectGraph.bag.language, objectGraph.client.storefrontIdentifier);
+ const locName = `local/${locale}`;
+ // Load localizations if needed
+ if (!this.isLocFileLoaded(locName)) {
+ const localizations = objectGraph.props.asDictionary(`localizations.${locale}`);
+ if (localizations !== undefined && localizations !== null) {
+ this.applyLocalizations(locName, localizations, locale);
+ }
+ else {
+ // Fallback to english
+ const fallbackLocalizations = objectGraph.props.asDictionary(`localizations.en-us`);
+ if (fallbackLocalizations !== undefined && fallbackLocalizations !== null) {
+ this.applyLocalizations(locName, fallbackLocalizations, locale);
+ }
+ }
+ }
+ }
+ /**
+ * Returns the localized name for the provided device type.
+ * The company policy seems to be to always use the branded,
+ * non-localized text, but this is just-in-case.
+ * @returns {string} The display name for the device.
+ */
+ deviceDisplayName(objectGraph) {
+ if (objectGraph.client.isVision && isSome(objectGraph.host.deviceMarketingFamilyName)) {
+ return objectGraph.host.deviceMarketingFamilyName;
+ }
+ if (objectGraph.host.deviceLocalizedModel) {
+ return objectGraph.host.deviceLocalizedModel;
+ }
+ // TODO: <rdar://problem/33575833> Jet: Remove brand loc fallbacks
+ switch (objectGraph.client.deviceType) {
+ case "phone":
+ const localizedPhoneName = this.string("IPHONE_BRAND_NAME");
+ if (localizedPhoneName === "IPHONE_BRAND_NAME") {
+ return "iPhone";
+ }
+ return localizedPhoneName;
+ case "pad":
+ const localizedPadName = this.string("IPAD_BRAND_NAME");
+ if (localizedPadName === "IPAD_BRAND_NAME") {
+ return "iPad";
+ }
+ return localizedPadName;
+ case "tv":
+ const localizedTvName = this.string("APPLE_TV_BRAND_NAME");
+ if (localizedTvName === "APPLE_TV_BRAND_NAME") {
+ return "Apple\u00a0TV";
+ }
+ return localizedTvName;
+ case "watch":
+ const localizedWatchName = this.string("APPLE_WATCH_BRAND_NAME");
+ if (localizedWatchName === "APPLE_WATCH_BRAND_NAME") {
+ return "Apple\u00a0Watch";
+ }
+ return localizedWatchName;
+ case "mac":
+ const localizedMacName = this.string("MAC_BRAND_NAME");
+ if (localizedMacName === "MAC_BRAND_NAME") {
+ return "Mac";
+ }
+ return localizedMacName;
+ default:
+ return null;
+ }
+ }
+}
+// region Properties
+/**
+ * Localization wrapper metatype to use with object graph.
+ */
+LocalizationWrapper.type = makeMetatype("app-store:loc-wrapper");
+//# sourceMappingURL=localization.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/properties.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/properties.js
new file mode 100644
index 0000000..fa8b4e1
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/properties.js
@@ -0,0 +1,74 @@
+/**
+ * Created by keithpk on 4/2/17.
+ */
+import { makeMetatype } from "@jet/environment/util/metatype";
+import * as serverData from "../json-parsing/server-data";
+import { Wrapper } from "./wrapper";
+export class PropertiesWrapper extends Wrapper {
+ /**
+ * Returns the raw underlying value for the key path
+ * @param path The path of the property to lookup
+ * @return {JSONValue | null} The resulting value or null
+ */
+ value(path) {
+ return serverData.traverse(this.implementation, path);
+ }
+ /**
+ * Returns whether a property is enabled or not. This also
+ * looks in the clientFeatures key as well for client-enabled
+ * features
+ *
+ * @param key The key to look up
+ * @return {boolean} The boolean result or false if no value was found for the key
+ */
+ enabled(key) {
+ const propertyValue = this.value(key);
+ if (typeof propertyValue !== "undefined") {
+ return Boolean(propertyValue);
+ }
+ return Boolean(this.implementation.clientFeatures[key]);
+ }
+ /**
+ * Syntactic sugar for !enabled(key).
+ *
+ * @param key The key to look up
+ * @return {boolean} The boolean result or true if no value was found for the key
+ */
+ isNotEnabled(key) {
+ return !this.enabled(key);
+ }
+ /**
+ * Returns the value of the path coerced as a dictionary
+ * @param path The path to look up
+ * @return {JSONData|null} The dictionary or null if not found
+ */
+ asDictionary(path) {
+ return serverData.asDictionary(this.implementation, path);
+ }
+ /**
+ * Returns the value of the path coerced as a string
+ * @param path The path to look up
+ * @return {string|null} The string or null if not found
+ */
+ asString(path) {
+ return serverData.asString(this.implementation, path);
+ }
+ /**
+ * Returns the value of the path coerced as a number
+ * @param path The path to look up
+ * @return {string|null} The number or null if not found
+ */
+ asNumber(path) {
+ return serverData.asNumber(this.implementation, path);
+ }
+ /**
+ * Returns the value of the path coerced as an array
+ * @param path The path to look up
+ * @return {string|null} The array or empty if not found
+ */
+ asArray(path) {
+ return serverData.asArrayOrEmpty(this.implementation, path);
+ }
+}
+PropertiesWrapper.type = makeMetatype("app-store:props-wrapper");
+//# sourceMappingURL=properties.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/storage.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/storage.js
new file mode 100644
index 0000000..2643e0d
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/storage.js
@@ -0,0 +1,22 @@
+/**
+ * Creates and returns a mock Storage object.
+ * @return A new mock Storage object.
+ */
+import { makeMetatype } from "@jet/environment/util/metatype";
+import { Wrapper } from "./wrapper";
+export class StorageWrapper extends Wrapper {
+ retrieveString(key) {
+ const value = this.implementation.retrieveString(key);
+ if ((value === null || value === void 0 ? void 0 : value.length) > 0 && value !== "<null>") {
+ return value;
+ }
+ else {
+ return null;
+ }
+ }
+ storeString(key, value) {
+ this.implementation.storeString(value, key); // flip is deliberate.
+ }
+}
+StorageWrapper.type = makeMetatype("app-store:storage-wrapper");
+//# sourceMappingURL=storage.js.map \ No newline at end of file
diff --git a/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/wrapper.js b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/wrapper.js
new file mode 100644
index 0000000..f03e835
--- /dev/null
+++ b/node_modules/@jet-app/app-store/tmp/src/foundation/wrappers/wrapper.js
@@ -0,0 +1,6 @@
+export class Wrapper {
+ constructor(implementation) {
+ this.implementation = implementation;
+ }
+}
+//# sourceMappingURL=wrapper.js.map \ No newline at end of file