{"version":3,"sources":["../node_modules/browser-pack/_prelude.js","Views/Blocks/CallToActionBlock/ColumnCallToAction.js","Views/Blocks/CardBlock/Index.js","Views/Blocks/CardDeckBlock/Index.js","Views/Blocks/CareersBlock/Index.js","Views/Blocks/CatalogSliderBlock/IconWithLabelSlider.js","Views/Blocks/CourtesyAccountsBlock/Index.js","Views/Blocks/GettingStartedBlock/Index.js","Views/Blocks/ImageBlock/Index.js","Views/Blocks/ImportProductBlock/Index.js","Views/Blocks/RecentPurchasesBlock/Index.js","Views/Blocks/RotatingHeroBlock/Index.js","Views/Blocks/SliderBlock/SliderBlock.js","Views/Blocks/UniversityCourseListBlock/Index.js","Views/Blocks/UniversityScheduleBlock/Index.js","Views/Pages/AccountImpersonationPage/Index.js","Views/Pages/AccountPreferencesPage/Index.js","Views/Pages/AddressesPage/Index.js","Views/Pages/AlternateChoicesAdminPage/Index.js","Views/Pages/BackInStockSubscriptionPage/Index.js","Views/Pages/CSRApproveNewUserPage/Index.js","Views/Pages/CSRAssignAccountsPage/Results.js","Views/Pages/CSRCreateUserPage/Index.js","Views/Pages/CSRViewQuoteDetailsPage/Results.js","Views/Pages/CatalogEntry/Index.js","Views/Pages/CatalogEntry/_Parts.js","Views/Pages/CatalogPage/Index.js","Views/Pages/CheckoutPage/Index.js","Views/Pages/CourtesyAccountPage/Index.js","Views/Pages/CustomCatalogPage/Index.js","Views/Pages/CustomGLPage/Index.js","Views/Pages/CustomSearchSynonymsAdminPlugin/Index.js","Views/Pages/CustomerAdminPage/Index.js","Views/Pages/CustomerDashboardPage/Index.js","Views/Pages/FavoritesPage/Index.js","Views/Pages/InvoicesPage/Index.js","Views/Pages/InvoicesPage/_ApplyCredits.js","Views/Pages/LoginPage/Index.js","Views/Pages/OrderConfirmationPage/Index.js","Views/Pages/OrderDetailsPage/Index.js","Views/Pages/OrderHistoryPage/Index.js","Views/Pages/PaymentProvidersPage/Index.js","Views/Pages/ProductComparePage/Index.js","Views/Pages/PunchoutOrderRequestReviewPage/Index.js","Views/Pages/PunchoutSetupPage/Results.js","Views/Pages/QuickOrderPage/Index.js","Views/Pages/QuoteApprovalPage/Index.js","Views/Pages/QuoteConfirmationPage/Index.js","Views/Pages/QuotesPage/Approval.js","Views/Pages/QuotesPage/Edit.js","Views/Pages/QuotesPage/Index.js","Views/Pages/RSMViewAccountsPage/Index.js","Views/Pages/RecentPurchasesPage/Index.js","Views/Pages/RegistrationPage/Index.js","Views/Pages/ResourceContentLinksAdminPage/Edit.js","Views/Pages/ResourceContentLinksAdminPage/Index.js","Views/Pages/SDSDownloadPage/Index.js","Views/Pages/SearchResultsPage/Index.js","Views/Pages/SearchResultsPage/Ref/Index.js","Views/Pages/ShoppingCartPage/Index.js","Views/Pages/ShoppingListPage/Create.js","Views/Pages/ShoppingListPage/Edit.js","Views/Pages/ShoppingListPage/Index.js","Views/Pages/SpecialOrderHistoryPage/Index.js","Views/Pages/SpecialOrderPage/Index.js","Views/Pages/StatementsPage/Index.js","Views/Pages/TradeShowBoothListingPage/index.js","Views/Pages/UniversityCheckoutPage/Index.js","Views/Pages/UniversityInstructorPage/Index.js","Views/Pages/UniversityOrderDetailPage/Index.js","Views/Pages/UniversityOrderPage/Index.js","Views/Pages/WarrantyProcessingPage/Index.js","Views/Shared/Components/AccountChooser/AccountChooser.js","Views/Shared/Components/AddProductModal/Index.js","Views/Shared/Components/BackInStockSubscriptionModal/BackInStockSubscriptionModal.js","Views/Shared/Components/Footer/_Footer.js","Views/Shared/Components/Header/Header.js","Views/Shared/Components/MiniShoppingCart/MiniShoppingCartWrapper.js","Views/Shared/Components/MyAccountLeftNavigation/MyAccountLeftNav.js","Views/Shared/Components/ShippingAddressSelector/ShippingAddressSelector.js","Views/Shared/_AddRemoveFavorite.js","Views/Shared/_CreateTransactionModal.js","Views/Shared/_CreateWalletModals.js","Views/Shared/_EmailAFriendModal.js","Views/Shared/_Layout.js","Views/Shared/_ProductCarousel.js","wwwroot/global/ButtonAnimatorLibrary.js","wwwroot/global/CheckboxAnimatorLibrary.js","wwwroot/global/Context.js","wwwroot/global/FavoritesLibrary.js","wwwroot/global/GeneralLibrary.js","wwwroot/global/LinkAnimatorLibrary.js","wwwroot/global/LogMessagesLibrary.js","wwwroot/global/MobileCardLibrary.js","wwwroot/global/PaymentLibrary.js","wwwroot/global/ProductCompareLibrary.js","wwwroot/global/ProductLinksLibrary.js","wwwroot/global/ProductListManager.js","wwwroot/global/QuickOrderLibrary.js","wwwroot/global/RecentPurchasesLibrary.js","wwwroot/global/SearchLibrary.js","wwwroot/global/SharedApiLibrary.js","wwwroot/global/ShoppingCartLibrary.js","wwwroot/global/ShoppingListLibrary.js","wwwroot/global/SizeSort.js"],"names":[],"mappings":"AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACljBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACleA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzkCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC31BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/vBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/nBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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gPSAnJztcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBqb2JzRGF0YSArPSAnPGRpdiBjbGFzcz1cImpvYi1saXN0aW5nLWNvbnRhaW5lclwiPjxkaXYgY2xhc3M9XCJqb2ItaXRlbS10aXRsZSBqb2ItdGl0bGUtY29sdW1uIGNvbC14cy00XCI+PGEgaHJlZj1cIic7XHJcbiAgICAgICAgICAgICAgICBqb2JzRGF0YSArPSB2YWx1ZS5kaXNwbGF5VXJsICsgJ1wiPicgK1xyXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlLnRpdGxlICsgJzwvYT48YnIgLz4nICtcclxuICAgICAgICAgICAgICAgICAgICBjb252ZXJ0RGF0ZSh2YWx1ZS5wdWJsaXNoZWREYXRlKSArXHJcbiAgICAgICAgICAgICAgICAgICAgaGlyZURlcHQgK1xyXG4gICAgICAgICAgICAgICAgICAgICc8L2Rpdj48ZGl2IGNsYWFzcz1cImxvY2F0aW9uLWNvbHVtblwiPicgK1xyXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlLmpvYkxvY2F0aW9uLmxvY2F0aW9uRGlzcGxheU5hbWUgK1xyXG4gICAgICAgICAgICAgICAgICAgICc8L2Rpdj48L2Rpdj4nO1xyXG5cclxuICAgICAgICAgICAgICAgIGhpcmVEZXB0ID0gJyc7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgLy9JTlNFUlRJTkcgUk9XUyBJTlRPIFRBQkxFXHJcbiAgICAgICAgICAgIGpRdWVyeSgnI2pvYlJvd3MnKS5hcHBlbmQoam9ic0RhdGEpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfTtcclxufVxyXG5cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeSggZG9jdW1lbnQgKS5yZWFkeSggZnVuY3Rpb24oKVxyXG57XHJcbiAgICBuZXcgQ29tcG9uZW50KCkuaW5pdCgpO1xyXG59KTtcclxuIiwiXHJcbmZ1bmN0aW9uIENvbXBvbmVudCgpXHJcbntcclxuICAgIHZhciBuYW1lc3BhY2UgPSAnLkNoYWR3ZWxsLUJsb2Nrcy1JY29uV2l0aExhYmVsU2xpZGVyJztcclxuXHJcbiAgICB0aGlzLmluaXQgPSBmdW5jdGlvbigpXHJcbiAgICB7XHJcbiAgICAgICAgaWYgKCBqUXVlcnkoIG5hbWVzcGFjZSApLmxlbmd0aCA8IDEgKVxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8tLS0tLSBJbml0IHBvcHVsYXIgY2F0ZWdvcmllcyBjYXJvdXNlbFxyXG4gICAgICAgIGpRdWVyeSggJy5jYXRhbG9naWNvbmxhYmVsc2xpZGVyJyAsIG5hbWVzcGFjZSApLm93bENhcm91c2VsKFxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgbmF2ICAgICAgICA6IGZhbHNlICxcclxuICAgICAgICAgICAgbG9vcCAgICAgICA6IGZhbHNlICxcclxuICAgICAgICAgICAgZG90cyAgICAgICA6IHRydWUgICxcclxuICAgICAgICAgICAgcmVzcG9uc2l2ZSA6XHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgIDAgOiB7IGl0ZW1zIDogMSB9ICxcclxuICAgICAgICAgICAgICAgICAzNTAgOiB7IGl0ZW1zIDogMiB9ICxcclxuICAgICAgICAgICAgICAgICA1MDAgOiB7IGl0ZW1zIDogMyB9ICxcclxuICAgICAgICAgICAgICAgICA3MDAgOiB7IGl0ZW1zIDogNCB9ICxcclxuICAgICAgICAgICAgICAgIDEwMDAgOiB7IGl0ZW1zIDogNiB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH07XHJcbn1cclxuXHJcblxyXG4vLy0tLS0tIFdoZW4gcGFnZSBsb2Fkc1xyXG5qUXVlcnkoIGRvY3VtZW50ICkucmVhZHkoIGZ1bmN0aW9uKClcclxue1xyXG4gICAgbmV3IENvbXBvbmVudCgpLmluaXQoKTtcclxufSk7XHJcbiIsImZ1bmN0aW9uIENvbXBvbmVudCgpIHtcclxuICAgIHZhciBuYW1lc3BhY2UgPSAnLkNoYWR3ZWxsLUJsb2Nrcy1Db3VydGVzeUFjY291bnRzQmxvY2snO1xyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLy0tLS0tIEluaXQga2VuZG8gZ3JpZFxyXG4gICAgICAgIGpRdWVyeSgnLmdyaWQnLCBuYW1lc3BhY2UpLmtlbmRvR3JpZChcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgZGF0YVNvdXJjZTpcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiB3aW5kb3cuYWNjb3VudHMsXHJcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hOlxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkczpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50TmFtZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWNjb3VudE51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ3JlYXRlZERhdGU6IHsgdHlwZTogXCJkYXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTYWxlc3BlcnNvbk5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN1Ym1pdHRlZFVzZXI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ29tbWVudHM6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNhbGVzUGFkU3VibWlzc2lvbkRhdGU6IHsgdHlwZTogXCJkYXRlXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNvbHVtbnM6XHJcbiAgICAgICAgICAgICAgICAgICAgW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0FjY291bnROYW1lJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3Rpb25PcGVyYXRvcjogXCJjb250YWluc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkFjY291bnQgTmFtZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnQWNjb3VudE51bWJlcicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogXCJjb250YWluc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0aW9uT3BlcmF0b3I6IFwiY29udGFpbnNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJBY2NvdW50IE51bWJlclwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnQ3JlYXRlZERhdGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0OiBcInswOmR9XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogXCJjb250YWluc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0aW9uT3BlcmF0b3I6IFwiY29udGFpbnNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJDcmVhdGVkIERhdGVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1NhbGVzcGVyc29uTmFtZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3Rpb25PcGVyYXRvcjogXCJjb250YWluc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIlNhbGVzIFBlcnNvbiBOYW1lXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdTdWJtaXR0ZWRVc2VyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNlbGw6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3I6IFwiY29udGFpbnNcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VnZ2VzdGlvbk9wZXJhdG9yOiBcImNvbnRhaW5zXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiU3VibWl0dGVkIFVzZXJcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1N0YXR1cycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogXCJjb250YWluc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0aW9uT3BlcmF0b3I6IFwiY29udGFpbnNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJTdGF0dXNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdDb21tZW50cycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2VsbDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogXCJjb250YWluc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWdnZXN0aW9uT3BlcmF0b3I6IFwiY29udGFpbnNcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJDb21tZW50c1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnU2FsZXNQYWRTdWJtaXNzaW9uRGF0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQ6IFwiezA6ZH1cIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Z2dlc3Rpb25PcGVyYXRvcjogXCJjb250YWluc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIlNhbGVzUGFkIERhdGVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBtb2RlOiBcInJvd1wiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc29ydGFibGU6IHRydWVcclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcbn1cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJ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2xhc3M9XCJmYWlsZWQtaXRlbXMtY29udGFpbmVyXCI+PGg0PlJlYXNvbjogJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICArIGkuRmFpbGVkTWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICArICc8L2g0Pjx0YWJsZSBjbGFzcz1cInRhYmxlIHRhYmxlLXNtXCI+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICArICc8dGhlYWQ+PHRyPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHRoPlNrdTwvdGg+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICArICc8dGg+UXVhbnRpdHk8L3RoPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHRoPkNvbGxlY3Rpb248L3RoPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHRoPkN1c3RvbWVyPC90aD4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJzx0aD5QYXJlbnQ8L3RoPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgKyAnPC90cj48L3RoZWFkPic7XHJcbiAgICAgICAgICAgICAgICAgICAgaS5JdGVtcy5mb3JFYWNoKGZ1bmN0aW9uKHgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmFpbGVkSFRNTCArPSAnPHRyPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJzx0ZD4nICsgeC5Ta3UgKyAnPC90ZD4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8dGQ+JyArIHguUXVhbnRpdHkgKyAnPC90ZD4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8dGQ+JyArIHguQ29sbGVjdGlvbk5hbWUgKyAnPC90ZD4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8dGQ+JyArIHguQ3VzdG9tZXIgKyAnPC90ZD4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8dGQ+JyArIHguQ3VzdG9tZXJQYXJlbnQgKyAnPC90ZD4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8L3RyPic7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZmFpbGVkSFRNTCArPSAnPC90YWJsZT48L2Rpdj4nO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcjc2hvdy1mYWlsZWQtcHJvZHVjdCcsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcjaW1wb3J0LWZhaWxlZC1tZXNzYWdlJywgbmFtZXNwYWNlKVxyXG4gICAgICAgICAgICAgICAgICAgIC5oaWRlKClcclxuICAgICAgICAgICAgICAgICAgICAuaHRtbChmYWlsZWRIVE1MKVxyXG4gICAgICAgICAgICAgICAgICAgIC8vLmh0bWwoJzx0YWJsZSBjbGFzcz1cInRhYmxlLXNtXCI+JyArIGZhaWxlZEhUTUwgKyAnPC90YWJsZT4nKVxyXG4gICAgICAgICAgICAgICAgICAgIC5mYWRlSW4oJ3Nsb3cnKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnI3Nob3ctZmFpbGVkLXByb2R1Y3QnLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlSW1wb3J0UHJvZHVjdHMoZSkge1xyXG4gICAgICAgICAgICB2YXIgZmlsZSA9IGUudGFyZ2V0LmZpbGVzWzBdO1xyXG4gICAgICAgICAgICBpZiAoZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgdXBkYXRlSW1wb3J0U3RhdHVzKGZpbGUubmFtZSwgaW1wb3J0TWVzc2FnZVBhcnNpbmdFeGNlbCk7XHJcbiAgICAgICAgICAgICAgICBwYXJzZUV4Y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JrYm9vayA9IFhMU1gucmVhZChkYXRhLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2JpbmFyeSdcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHByZXBhcmUgcmVzdWx0c1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlc3VsdHMgPSBbXTtcclxuICAgICAgICAgICAgICAgIHZhciBjb3VudGVyID0gMDtcclxuICAgICAgICAgICAgICAgIHZhciBjYW5jZWwgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgICAgICB3b3JrYm9vay5TaGVldE5hbWVzLmZvckVhY2goZnVuY3Rpb24gKHNoZWV0TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBYTF9yb3dfb2JqZWN0ID0gWExTWC51dGlscy5zaGVldF90b19yb3dfb2JqZWN0X2FycmF5KHdvcmtib29rLlNoZWV0c1tzaGVldE5hbWVdKTtcclxuICAgICAgICAgICAgICAgICAgICBYTF9yb3dfb2JqZWN0LmZvckVhY2goZnVuY3Rpb24gKG9iaikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudGVyKys7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb3VudGVyID4gcHJvZHVjdEltcG9ydExpbWl0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJbXBvcnRTdGF0dXMoZmlsZS5uYW1lLCBpbXBvcnRNZXNzYWdlTGltaXRFeGNlZWRlZCArIHByb2R1Y3RJbXBvcnRMaW1pdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYW5jZWwgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRzLnB1c2gob2JqKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgcmVzdWx0cyAmIGNhbGwgdGhlIGNhbGxiYWNrIG1ldGhvZFxyXG4gICAgICAgICAgICAgICAgZXhjZWxGaWxlTmFtZSA9IGZpbGUubmFtZTtcclxuICAgICAgICAgICAgICAgIGV4Y2VsSXRlbXMgPSByZXN1bHRzO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrICYmICFjYW5jZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgcmVhZGVyLm9uZXJyb3IgPSBmdW5jdGlvbiAoZXgpIHtcclxuICAgICAgICAgICAgICAgIHVwZGF0ZUltcG9ydFN0YXR1cyhpbXBvcnRNZXNzYWdlRmFpbGVkKTtcclxuICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgIHJlYWRlci5yZWFkQXNCaW5hcnlTdHJpbmcoZmlsZSk7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgZnVuY3Rpb24gcGFyc2VFeGNlbFJlc3VsdHMoKSB7XHJcblxyXG4gICAgICAgICAgICAvLyB2YWxpZGF0ZSBleGNlbCBpdGVtc1xyXG4gICAgICAgICAgICBpZiAoIWV4Y2VsSXRlbXMgfHwgZXhjZWxJdGVtcy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHVwZGF0ZUltcG9ydFN0YXR1cyhleGNlbEZpbGVOYW1lLCBpbXBvcnRNZXNzYWdlSW52YWxpZERhdGEpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBkZXRlcm1pbmUgY29sdW1uc1xyXG4gICAgICAgICAgICB2YXIgY3VzdG9tZXJLZXkgPSBudWxsO1xyXG4gICAg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RlciBhbmQgbm90IGEgcm93XHJcbiAgICAgICAgICAgICAgICBpZiAoIWlzSGVhZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZpcnN0SXRlbSA9IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkoZXhjZWxJdGVtc1swXSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZpcnN0SXRlbVtza3VLZXldID0gc2t1S2V5O1xyXG4gICAgICAgICAgICAgICAgICAgIGV4Y2VsSXRlbXMudW5zaGlmdChmaXJzdEl0ZW0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGF0dGVtcHQgdG8gZmluZCB0aGUgbWF0Y2hpbmcgUVRZIGtleSBiYXNlZCBvbiB0aGUgcHJlLWRlZmluZWQga2V5c1xyXG4gICAgICAgICAgICAgICAgdmFyIGZpbmRRdHlLZXkgPSBrZXlzLmZpbHRlcihmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtUXVhbnRpdHlLZXlzLmluY2x1ZGVzKGkudG9Mb3dlckNhc2UoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgnXycsICcnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgnICcsICcnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgnIycsICcnKSk7XHJcbiAgICAgICAgICAgICAgICB9KVswXTtcclxuICAgICAgICAgICAgICAgIHF0eUtleSA9IGtleXNba2V5cy5pbmRleE9mKGZpbmRRdHlLZXkpXTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBhdHRlbXB0IHRvIGZpbmQgdGhlIG1hdGNoaW5nIFNLVSBrZXkgYmFzZWQgb24gdGhlIHByZS1kZWZpbmVkIGtleXNcclxuICAgICAgICAgICAgICAgIHZhciBmaW5kU2t1S2V5ID0ga2V5cy5maWx0ZXIoZnVuY3Rpb24gKGkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbU51bWJlcktleXMuaW5jbHVkZXMoaS50b0xvd2VyQ2FzZSgpLnJlcGxhY2UoJ18nLCAnJykucmVwbGFjZSgnICcsICcnKS5yZXBsYWNlKCcjJywgJycpKTtcclxuICAgICAgICAgICAgICAgIH0pWzBdO1xyXG4gICAgICAgICAgICAgICAgc2t1S2V5ID0ga2V5c1trZXlzLmluZGV4T2YoZmluZFNrdUtleSldO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGF0dGVtcHQgdG8gZmluZCB0aGUgbWF0Y2hpbmcgY29sbGVjdGlvbiBrZXkgYmFzZWQgb24gdGhlIHByZS1kZWZpbmVkIGtleXNcclxuICAgICAgICAgICAgICAgIHZhciBmaW5kQ29sbGVjdGlvbktleSA9IGtleXMuZmlsdGVyKGZ1bmN0aW9uIChpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbGxlY3Rpb25LZXlzLmluY2x1ZGVzKGkudG9Mb3dlckNhc2UoKS5yZXBsYWNlKCdfJywgJycpLnJlcGxhY2UoJyAnLCAnJykucmVwbGFjZSgnIycsICcnKSk7XHJcbiAgICAgICAgICAgICAgICB9KVswXTtcclxuICAgICAgICAgICAgICAgIGNvbGxlY3Rpb25LZXkgPSBrZXlzW2tleXMuaW5kZXhPZihmaW5kQ29sbGVjdGlvbktleSldO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGF0dGVtcHQgdG8gZmluZCB0aGUgbWF0Y2hpbmcgY3VzdG9tZXIga2V5IGJhc2VkIG9uIHByZS1kZWZpbmVkIGtleXNcclxuICAgICAgICAgICAgICAgIHZhciBmaW5kQ3VzdG9tZXJLZXkgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgaWYgKGFsbG93Q3VzdG9tZXJDb2x1bW4pIHtcclxuICAgICAgICAgICAgICAgICAgICBmaW5kQ3VzdG9tZXJLZXkgPSBrZXlzLmZpbHRlcihmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VzdG9tZXJLZXlzLmluY2x1ZGVzKGkudG9Mb3dlckNhc2UoKS5yZXBsYWNlKCdfJywgJycpLnJlcGxhY2UoJyAnLCAnJykucmVwbGFjZSgnIycsICcnKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSlbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tZXJLZXkgPSBrZXlzW2tleXMuaW5kZXhPZihmaW5kQ3VzdG9tZXJLZXkpXTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBpZiBubyBrZXlzIHdlcmUgZm91bmQsIHRoZW4gcHJvbXB0IHRoZSB1c2VyIHRvIHNlbGVjdCB0aGUgY29ycmVjdCBrZXlzXHJcbiAgICAgICAgICAgICAgICBpZiAoIXNrdUtleSB8fCAhcXR5S2V5IHx8ICFjb2xsZWN0aW9uS2V5IHx8IChhbGxvd0N1c3RvbWVyQ29sdW1uICYmICFjdXN0b21lcktleSkpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gYnVpbGQgU0tVIG9wdGlvbnMgbGlzdFxyXG4gICAgICAgICAgICAgICAgICAgIHZhciBzZWxlY3RTa3VPcHRpb25zID0gJzxvcHRpb24gdmFsdWU9XCJcIj48L29wdGlvbj4nO1xyXG4gICAgICAgICAgICAgICAgICAgIGtleXMuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzZWxlY3RlZCA9IChza3VLZXkgPT09IGtleSkgPyAnIHNlbGVjdGVkJyA6ICcnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RTa3VPcHRpb25zICs9ICc8b3B0aW9uIHZhbHVlPVwiJyArIGtleSArICdcIicgKyBzZWxlY3RlZCArICc+JyArIGtleSArICc8L29wdGlvbj4nO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI3NlbGVjdC1za3UtY29sdW1uJywgbmFtZXNwYWNlKS5odG1sKHNlbGVjdFNrdU9wdGlvbnMpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBidWlsZCBRVFkgb3B0aW9ucyBsaXN0XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlbGVjdFFUWU9wdGlvbnMgPSAnPG9wdGlvbiB2YWx1ZT1cIk5BXCI+Ti9BPC9vcHRpb24+JztcclxuICAgICAgICAgICAgICAgICAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWQgPSAocXR5S2V5ID09PSBrZXkpID8gJyBzZWxlY3RlZCcgOiAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0UVRZT3B0aW9ucyArPSAnPG9wdGlvbiB2YWx1ZT1cIicgKyBrZXkgKyAnXCIgJyArIHNlbGVjdGVkICsgJz4nICsga2V5ICsgJzwvb3B0aW9uPic7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjc2VsZWN0LXF0eS1jb2x1bW4nLCBuYW1lc3BhY2UpLmh0bWwoc2VsZWN0UVRZT3B0aW9ucyk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGJ1aWxkIENPTExFQ1RJT04gb3B0aW9ucyBsaXN0XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNlbGVjdENvbGxlY3Rpb25PcHRpb25zID0gJzxvcHRpb24gdmFsdWU9XCJOQVwiPk4vQTwvb3B0aW9uPic7XHJcbiAgICAgICAgICAgICAgICAgICAga2V5cy5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlbGVjdGVkID0gKGNvbGxlY3Rpb25LZXkgPT09IGtleSkgPyAnIHNlbGVjdGVkJyA6ICcnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RDb2xsZWN0aW9uT3B0aW9ucyArPSAnPG9wdGlvbiB2YWx1ZT1cIicgKyBrZXkgKyAnXCIgJyArIHNlbGVjdGVkICsgJz4nICsga2V5ICsgJzwvb3B0aW9uPic7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjc2VsZWN0LWNvbGxlY3Rpb24tY29sdW1uJywgbmFtZXNwYWNlKS5odG1sKHNlbGVjdENvbGxlY3Rpb25PcHRpb25zKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gYnVpbGQgQ1VTVE9NRVIgb3B0aW9ucyBsaXN0XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFsbG93Q3VzdG9tZXJDb2x1bW4pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlbGVjdEN1c3RvbWVyT3B0aW9ucyA9ICc8b3B0aW9uIHZhbHVlPVwiTkFcIj5OL0E8L29wdGlvbj4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlbGVjdGVkID0gKGN1c3RvbWVyS2V5ID09PSBrZXkpID8gJyBzZWxlY3RlZCcgOiAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdEN1c3RvbWVyT3B0aW9ucyArPSAnPG9wdGlvbiB2YWx1ZT1cIicgKyBrZXkgKyAnXCIgJyArIHNlbGVjdGVkICsgJz4nICsga2V5ICsgJzwvb3B0aW9uPic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNzZWxlY3QtY3VzdG9tZXItY29sdW1uJywgbmFtZXNwYWNlKS5odG1sKHNlbGVjdEN1c3RvbWVyT3B0aW9ucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBidWlsZCBkYXRhIHByZXZpZXdcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5leGNlbC1maWxlLW5hbWUnLCBuYW1lc3BhY2UpLmh0bWwoZXhjZWxGaWxlTmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGFIdG1sID0gJzxkaXYgY2xhc3M9XCJ0YWJsZS1yZXNwb25zaXZlXCI+PHRhYmxlIGNsYXNzPVwidGFibGVcIj48dGhlYWQ+PHRyPic7XHJcbiAgICAgICAgICAgICAgICAgICAga2V5cy5mb3JFYWNoKGZ1bmN0aW9uIChpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFIdG1sICs9ICc8dGg+JyArIGkgKyAnPC90aD4nO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFIdG1sICs9ICc8L3RyPjwvdGhlYWQ+PHRib2R5Pic7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRvcEZpdmUgPSBleGNlbEl0ZW1zLnNsaWNlKDAsIDUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRvcEZpdmUuZm9yRWFjaChmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhSHRtbCArPSAnPHRyPic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleXMuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhSHRtbCArPSAnPHRkPicgKyBpW2tleV0gKyAnPC90ZD4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YUh0bWwgKz0gJzwvdHI+JztcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhSHRtbCArPSAnPC90Ym9keT48L3RhYmxlPjwvZGl2Pic7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjY29sdW1ucy1waWNrZXItZGF0YS1wcmV2aWV3JywgbmFtZXNwYWNlKS5odG1sKGRhdGFIdG1sKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gc2hvdyB0aGUgbW9kYWxcclxuICAgICAgICAgICAgICAgICAgICAkKCcjY29sdW1uLXBpY2tlci1tb2RhbCcsIG5hbWVzcGFjZSkubW9kYWwoJ3Nob3cnKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGFkZFJlc3VsdHNUb0NvbGxlY3Rpb25zKHNrdUtleSwgcXR5S2V5LCBjb2xsZWN0aW9uS2V5LCBjdXN0b21lcktleSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBhZGRSZXN1bHRzVG9Db2xsZWN0aW9ucyhza3VLZXksIHF0eUtleSwgY29sbGVjdGlvbktleSwgY3VzdG9tZXJLZXkpIHtcclxuXHJcbiAgICAgICAgICAgIHVwZGF0ZUltcG9ydFN0YXR1cyhleGNlbEZpbGVOYW1lLCBpbXBvcnRNZXNzYWdlVXBkYXRpbmdMaXN0KTtcclxuXHJcbiAgICAgICAgICAgIC8vIGxvY2sgY29udHJvbHMgd2hpbGUgdXBkYXRpbmdcclxuICAgICAgICAgICAgLy8gIGxvY2tDb250cm9scyh0cnVlKTsgIC8vIHRvZG86IHVjb21tZW50XHJcblxyXG4gICAgICAgICAgICAvLyBjcmVhdGUgcmVzdWx0c1xyXG4gICAgICAgICAgICB2YXIgcmVzdWx0cyA9IFtdO1xyXG4gICAgICAgICAgICBleGNlbEl0ZW1zLmZvckVhY2goZnVuY3Rpb24gKGkpIHtcclxuICAgICAgICAgICAgICAgIHZhciBza3UgPSBpW3NrdUtleV07XHJcbiAgICAgICAgICAgICAgICB2YXIgcXR5ID0gaVtxdHlLZXldIHx8IDE7XHJcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGlbY29sbGVjdGlvbktleV07XHJcbiAgICAgICAgICAgICAgICB2YXIgY3VzdG9tZXIgPSBpW2N1c3RvbWVyS2V5XTtcclxuICAgICAgICAgICAgICAgIGlmIChpc05hTihxdHkpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcXR5ID0gMTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJlc3VsdHMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgc2t1OiBza3UsXHJcbiAgICAgICAgICAgICAgICAgICAgcXVhbnRpdHk6IHF0eSxcclxuICAgICAgICAgICAgICAgICAgICBjb2xsZWN0aW9uTmFtZTogbGlzdCxcclxuICAgICAgICAgICAgICAgICAgICBjdXN0b21lcjogY3VzdG9tZXJcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIC8vIGNyZWF0ZSByZXF1ZXN0XHJcbiAgICAgICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXHJcbiAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy5tb2RlbC5JbXBvcnRFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgICAgICBDb2xsZWN0aW9uVHlwZTogY29sbGVjdGlvblR5cGUsXHJcbiAgICAgICAgICAgICAgICAgICAgSXNNdWx0aXBsZUN1c3RvbWVyczogYWxsb3dDdXN0b21lckNvbHVtbixcclxuICAgICAgICAgICAgICAgICAgICBJdGVtczogcmVzdWx0c1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHhockZpZWxkczpcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyByZWZyZXNoIHRoZSBwcm9kdWN0cyB3aXRoIHRoZSByZXN1bHRzXHJcbiAgICAgICAgICAgICAgICAvLyB1cGRhdGVQcm9kdWN0cyhkYXRhLlNob3BwaW5nTGlzdC5JdGVtcyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGltcG9ydCBzdGF0dXMgJiBzaG93IGFueSBwcm9kdWN0cyB0aGF0IGZhaWxlZFxyXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuU3VjY2VzcyA9PT0gZmFsc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJbXBvcnRTdGF0dXMoZXhjZWxGaWxlTmFtZSwgaW1wb3J0TWVzc2FnZUZhaWxlZCwgZGF0YS5GYWlsZWRJdGVtcyk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGRhdGEuRmFpbGVkSXRlbXMgJiYgZGF0YS5GYWlsZWRJdGVtcy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSW1wb3J0U3RhdHVzKGV4Y2VsRmlsZU5hbWUsIGltcG9ydE1lc3NhZ2VQYXJ0aWFsU3VjY2VzcywgZGF0YS5GYWlsZWRJdGVtcyk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUltcG9ydFN0YXR1cyhleGNlbEZpbGVOYW1lLCBpbXBvcnRNZXNzYWdlU3VjY2Vzcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdW5sb2NrIGNvbnRyb2xzXHJcbiAgICAgICAgICAgICAgICAvLyBsb2NrQ29udHJvbHMoZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGNsZWFyIGlucHV0XHJcbiAgICAgICAgICAgICAgICBleGNlbEl0ZW1zID0gW107XHJcbiAgICAgICAgICAgICAgICBleGNlbEZpbGVOYW1lID0gbnVsbDtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoJ1VuYWJsZSB0byBhZGQgcHJvZHVjdChzKSBmcm9tIGZpbGUgXCInICsgZXhjZWxGaWxlTmFtZSArICdcIiB0byBjb2xsZWN0aW9uKHMpJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGltcG9ydCBzdGF0dXNcclxuICAgICAgICAgICAgICAgIHVwZGF0ZUltcG9ydFN0YXR1cyhleGNlbEZpbGVOYW1lLCBpbXBvcnRNZXNzYWdlRmFpbGVkKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyB1bmxvY2sgY29udHJvbHNcclxuICAgICAgICAgICAgICAgIC8vIGxvY2tDb250cm9scyhmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY2xlYXIgaW5wdXRcclxuICAgICAgICAgICAgICAgIGV4Y2VsSXRlbXMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGV4Y2VsRmlsZU5hbWUgPSBudWxsO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGxvY2tDb250cm9scyhsb2NrKSB7XHJcbiAgICAgICAgICAgIGpRdWVyeSgnLmZvcm0tY29udHJvbCcsIG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zdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBEZXNjcmlwdGlvbjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIElzRmF2b3JpdGU6IHsgdHlwZTogXCJib29sXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUXVhbnRpdHlQdXJjaGFzZWQ6IHsgdHlwZTogXCJpbnRlZ2VyXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTGFzdE9yZGVyOiB7IHR5cGU6IFwiZGF0ZVwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFVybDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExhc3RQcmljZTogeyB0eXBlOiBcImRlY2ltYWxcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBDYXRlZ29yeTogeyB0eXBlOiBcInN0cmluZ1wiIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdyb3VwOiB7XHJcbiAgICAgICAgICAgICAgICBmaWVsZDogXCJDYXRlZ29yeVwiLFxyXG4gICAgICAgICAgICAgICAgZGlyOiBcImFzY1wiXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0S2VuZG9HcmlkKCkge1xyXG4gICAgICAgICRrZW5kb0dyaWQgPSAkKCcjZ3JpZCcsIG5hbWVzcGFjZSkua2VuZG9HcmlkKHtcclxuICAgICAgICAgICAgZGF0YVNvdXJjZTogZGF0YVNvdXJjZSxcclxuICAgICAgICAgICAgc29ydGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIHNjcm9sbGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIGNvbHVtbnM6IFtcclxuICAgICAgICAgICAgIC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xhcHNlIGlmIHVzZXIgaGFzbid0IHB1cnBvc2VseSBleHBhbmRlZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JpZC5jb2xsYXBzZUdyb3VwKHRoaXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGNvdW50XHJcbiAgICAgICAgICAgICAgICBzaG93Q291bnRPZkl0ZW1zSW5EYXRhU291cmNlKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gYmluZCBmYXZvcml0ZSBidXR0b25zXHJcbiAgICAgICAgICAgICAgICBiaW5kRmF2b3JpdGVzKCk7XHJcblxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSkuZGF0YShcImtlbmRvR3JpZFwiKTtcclxuXHJcbiAgICAgICAgLy8gY2xpY2thYmxlIGdyb3VwIGhlYWRlcnMgdG8gZXhwYW5kIC8gY29sbGFwc2VcclxuICAgICAgICAkKG5hbWVzcGFjZSkub24oXCJjbGlja1wiLCBcIi5rLWdyb3VwaW5nLXJvd1wiLCBmdW5jdGlvbiAoZSkge1xyXG5cclxuICAgICAgICAgICAgJChlLnRhcmdldCkuZmluZChcIi5rLWljb25cIikuY2xpY2soKTtcclxuICAgICAgICAgICAgdmFyIGdyb3VwTmFtZSA9ICQoZS50YXJnZXQpLmZpbmQoJy5rLXJlc2V0JykudGV4dCgpO1xyXG4gICAgICAgICAgICBpZiAoZ3JvdXBOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICBVcGRhdGVFeHBhbmRlZEdyb3Vwcyhncm91cE5hbWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICQoJy5rLWljb24nKS5jbGljayhmdW5jdGlvbiAoKSB7ICAvL1VwZGF0ZSBleHBhbmRlZCBncm91cHMgb25DbGljayBvZiB0aGUgYXJyb3cuIElzIG5vdCBmaXJlZCBpZiB0aGUgaGVhZGVyIHRleHQgaXMgY2xpY2tlZC5cclxuICAgICAgICAgICAgdmFyIGdyb3VwTmFtZSA9ICQodGhpcykucGFyZW50KCkudGV4dCgpO1xyXG4gICAgICAgICAgICBpZiAoZ3JvdXBOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICBVcGRhdGVFeHBhbmRlZEdyb3Vwcyhncm91cE5hbWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIFVwZGF0ZUV4cGFuZGVkR3JvdXBzKGdyb3VwTmFtZSkge1xyXG4gICAgICAgIHZhciBmb3VuZEluZGV4ID0gaXNHcm91cE5hbWVJbkV4cGFuZGVkR3JvdXBzKGdyb3VwTmFtZSk7XHJcbiAgICAgICAgaWYgKGZvdW5kSW5kZXggPiAtMSkge1xyXG4gICAgICAgICAgICBleHBhbmRlZEdyb3Vwcy5zcGxpY2UoZm91bmRJbmRleCwgMSk7XHJcbiAgICAgICAgfSBlbHNlIHsgZXhwYW5kZWRHcm91cHMucHVzaChncm91cE5hbWUpOyB9XHJcbiAgICB9XHJcbiAgICBmdW5jdGlvbiBpc0dyb3VwTmFtZUluRXhwYW5kZWRHcm91cHMoZ3JvdXBOYW1lKSB7XHJcbiAgICAgICAgdmFyIGZvdW5kSW5kZXggPSAtMTtcclxuICAgICAgICBpZiAoZXhwYW5kZWRHcm91cHMpIHtcclxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBleHBhbmRlZEdyb3Vwcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGV4cGFuZGVkR3JvdXBzW2ldID09PSBncm91cE5hbWUpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3VuZEluZGV4ID0gaTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZm91bmRJbmRleDtcclxuICAgIH1cclxuICAgIGZ1bmN0aW9uIGluaXRIYW5kbGVycygpIHtcclxuXHJcbiAgICAgICAgLy90b2dnbGUgdGhlIHZpZXcgaWNvbnNcclxuICAgICAgICBqUXVlcnkoJy50b2dnbGUtY2F0ZWdvcnktb24sIC50b2dnbGUtY2F0ZWdvcnktb2ZmJywgbmFtZXNwYWNlKS5vbignY2xpY2snLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIHZhciB0b2dnbGVPbiA9ICQodGhpcykuZGF0YSgndG9nZ2xlLW9uJyk7XHJcbiAgICAgICAgICAgIHRvZ2dsZUdyb3VwQnlDYXRlZ29yeSh0b2dnbGVPbik7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIHByZXZpZXcgaXRlbSBjbGlja2VkXHJcbiAgICAgICAgJChuYW1lc3BhY2UpLm9uKCdjbGljaycsICcucHJldmlldy1pdGVtJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB2YXIgY29kZSA9ICQodGhpcykuZGF0YSgnY29kZScpO1xyXG4gICAgICAgICAgICAvLyBzZXQgbW9kYWwgdmFsdWVzXHJcbiAgICAgICAgICAgIGpRdWVyeSgnaW5wdXRbIG5hbWU9bW9kYWxwcm9kdWN0aWQgICBdJywgbmFtZXNwYWNlKS5hdHRyKCd2YWx1ZScsIGNvZGUpO1xyXG4gICAgICAgICAgICAvLyBzaG93IHByb2R1Y3QgcHJldmlldyBtb2RhbFxyXG4gICAgICAgICAgICBqUXVlcnkoJyNwcm9kdWN0LXByZXZpZXctbW9kYWwnLCBuYW1lc3BhY2UpLm1vZGFsKCdzaG93Jyk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGhhbmRsZSBtb2RhbCBwcm9kdWN0IHByZXZpZXdcclxuICAgICAgICAkKCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsJywgbmFtZXNwYWNlKS5vbignc2hvdy5icy5tb2RhbCcsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgalF1ZXJ5KCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsIC5zcGlubmVyJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuYWpheC1jb250ZW50JywgbmFtZXNwYWNlKS5lbXB0eSgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBoYW5kbGUgbW9kYWwgcHJvZHVjdCBwcmV2aWV3IGNvbnRlbnRcclxuICAgICAgICAkKCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsJywgbmFtZXNwYWNlKS5vbignc2hvd24uYnMubW9kYWwnLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBwaWQgPSBqUXVlcnkoJ2lucHV0WyBuYW1lPW1vZGFscHJvZHVjdGlkICAgXScsIG5hbWVzcGFjZSkuYXR0cigndmFsdWUnKTtcclxuICAgICAgICAgICAgJC5hamF4KFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cucHJvZHVjdERldGFpbHNFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiB7IGNvZGU6IHBpZCB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsIC5zcGlubmVyJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuYWpheC1jb250ZW50JywgbmFtZXNwYWNlKS5odG1sKGRhdGEuaHRtbCkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9kdWN0TGlua3NMaWJyYXJ5LmluaXRMaW5rcyh0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvZHVjdExpbmtzTGlicmFyeS5sb2FkU2hvcHBpbmdMaXN0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuc3Bpbm5lcicsIG5hbWVzcGFjZSkuaGlkZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gRGVmaW5pbmcgYSBjdXN0b20gZmlsdGVyIGZ1bmN0aW9uXHJcbiAgICAgICAgZnVuY3Rpb24gbXlGaWx0ZXIoZWxtKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAoZWxtICE9IG51bGwgJiYgZWxtICE9PSBmYWxzZSAmJiBlbG0gIT09IFwiXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaGFuZGxlIHNlYXJjaFxyXG4gICAgICAgICQoJyNyZWNlbnQtcHVyY2hhc2VzLXNlYXJjaCcsIG5hbWVzcGFjZSkub24oJ2tleXVwJywgbGlicmFyeS5kZWJvdW5jZShmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICB2YXIgc2VhcmNoID0gJCh0aGlzKS52YWwoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChzZWFyY2gubGVuZ3RoIDw9IDApIHtcclxuICAgICAgICAgICAgICAgIGNsZWFyRmlsdGVyKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgc3BsaXRTdHJpbmcgPSBzZWFyY2gucmVwbGFjZSgvXFxzezIsfS9nLCAnICcpLnNwbGl0KCcgJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIGZpbHRlcmVkID0gc3BsaXRTdHJpbmcuZmlsdGVyKG15RmlsdGVyKTtcclxuICAgICAgICAgICAgICAgIGlzRmlsdGVyZWQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgdmFyIGZpbHRlcnMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGZpbHRlcmVkLmZvckVhY2goZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzLnB1c2goeyBmaWVsZDogXCJDb2RlXCIsIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsIHZhbHVlOiBpdGVtIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcnMucHVzaCh7IGZpZWxkOiBcIkRlc2NyaXB0aW9uXCIsIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsIHZhbHVlOiBpdGVtIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgZGF0YVNvdXJjZS5maWx0ZXIoe1xyXG4gICAgICAgICAgICAgICAgICAgIGxvZ2ljOiBcIm9yXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZmlsdGVyczogZmlsdGVyc1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LCA1MDApKTtcclxuXHJcbiAgICAgICAgLy8gaGFuZGxlIGNsZWFyIHNlYXJjaFxyX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Vnb3J5LW9mZiBpJywgbmFtZXNwYWNlKS5yZW1vdmVDbGFzcygnYWN0aXZlJykuYWRkQ2xhc3MoJ2luYWN0aXZlJyk7XHJcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgJGtlbmRvR3JpZC5kYXRhU291cmNlLmdyb3VwKFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkNhdGVnb3J5XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcjogXCJhc2NcIlxyXG4gICAgICAgICAgICAgICAgICAgIH1dKTtcclxuICAgICAgICAgICAgICAgIHRvZ2dsZVZpc2libGVDb2x1bW5zKCk7XHJcbiAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICAgICAgfSwgNTApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBoYW5kbGVBZGRUb0NhcnQoZSkge1xyXG4gICAgICAgIGlmIChlKSB7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIGFkZCB0byBjYXJ0ICYgZ2V0IG1lc3NhZ2VcclxuICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICB2YXIgbXNnID0gJy4uLic7XHJcbiAgICAgICAgdmFyIGNvZGUgPSBqUXVlcnkodGhpcykuZGF0YSgnY29kZScpO1xyXG4gICAgICAgIHZhciBhY2NvdW50SWQgPSB3aW5kb3cudXNlckFjY291bnRJZDtcclxuXHJcbiAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignQWRkaW5nLi4uJywgYnV0dG9uKTtcclxuXHJcbiAgICAgICAgLy8gY2FsbCBzaG9wcGluZyBjYXJ0IGFwaVxyXG4gICAgICAgIFNob3BwaW5nQ2FydEFwaS5hZGRJdGVtVG9DYXJ0KGFjY291bnRJZCwgY29kZSwgMSxcclxuICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJBZGRlZCFcIik7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRXJyb3IhXCIpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBoYW5kbGVBZGRUb1F1aWNrT3JkZXIoZSkge1xyXG4gICAgICAgIGlmIChlKSB7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIGFkZCB0byBxdWljayBvcmRlciAmIGdldCBtZXNzYWdlXHJcbiAgICAgICAgdmFyIGJ1dHRvbiA9ICQodGhpcyk7XHJcbiAgICAgICAgdmFyIG1zZyA9ICcuLi4nO1xyXG4gICAgICAgIHZhciBjb2RlID0galF1ZXJ5KHRoaXMpLmRhdGEoJ2NvZGUnKTtcclxuICAgICAgICB2YXIgYWNjb3VudElkID0gd2luZG93LnVzZXJBY2NvdW50SWQ7XHJcbiAgICAgICAgdmFyIHF1YW50aXR5ID0gMTtcclxuXHJcbiAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignQWRkaW5nLi4uJywgYnV0dG9uKTtcclxuXHJcbiAgIC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AgICAgICAgJGtlbmRvR3JpZC5oaWRlQ29sdW1uKGluZGV4KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZi5uYW1lID09PSAnQ2F0ZWdvcnknKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzR3JvdXBlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAka2VuZG9HcmlkLmhpZGVDb2x1bW4oaW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRrZW5kb0dyaWQuc2hvd0NvbHVtbihpbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAka2VuZG9HcmlkLnNob3dDb2x1bW4oaW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIEhpZGUgTGFzdCBQcmljZSBjb2x1bW4gaWYgbm90IGEgQ2hhZHdlbGwgRW1wbG95ZWVcclxuICAgICAgICBpZiAoIXdpbmRvdy5pc0NoYWR3ZWxsRW1wbG95ZWUgfHwgaXNNb2JpbGUpIHtcclxuICAgICAgICAgICAgJGtlbmRvR3JpZC5oaWRlQ29sdW1uKDQpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICRrZW5kb0dyaWQuc2hvd0NvbHVtbig0KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmIChqUXVlcnkobmFtZXNwYWNlKS5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGluaXREYXRhU291cmNlKCk7XHJcbiAgICAgICAgaW5pdEtlbmRvR3J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RHY0KCk7XHJcblxyXG4gICAgICAgIGlmIChlbmFibGVEZWxldGUpIHtcclxuXHJcbiAgICAgICAgICAgIHZhciBkZWxldGVCdXR0b25IdG1sID1cclxuICAgICAgICAgICAgICAgICc8aW5wdXQgY2xhc3M9XCJidG4gYnRuLXNtIGJ0bi1kYW5nZXIgZGVsZXRlLXJlbWluZC1lbWFpbCBjb2wtc20tMSBkaXNwbGF5LW5vbmVcIiB0eXBlPVwiYnV0dG9uXCIgdmFsdWU9XCJEZWxldGVcIiBkYXRhLWlkPVwiJyArXHJcbiAgICAgICAgICAgICAgICByb3dJZCArXHJcbiAgICAgICAgICAgICAgICAnXCIgLz4nO1xyXG5cclxuICAgICAgICAgICAgcmV0dXJuICc8dHIgZGF0YS1pZD1cIicgKyByb3dJZCArICdcIj48dGQ+JyArXHJcbiAgICAgICAgICAgICAgICAnPHN0cm9uZz5FbWFpbDo8L3N0cm9uZz4nICtcclxuICAgICAgICAgICAgICAgICc8ZGl2IGNsYXNzPVwicm93IG5vLWd1dHRlcnNcIj4nICtcclxuICAgICAgICAgICAgICAgICc8ZGl2IGNsYXNzPVwiY29sLXNtLTZcIiA+PGlucHV0IHR5cGU9XCJ0ZXh0XCIgIGNsYXNzPVwiZm9ybS1jb250cm9sXCIgbmFtZT1cImVtYWlsXCIgcGxhY2Vob2xkZXI9XCJSZW1pbmRlciBFbWFpbFwiIC8+PC9kaXY+ICcgKyBkZWxldGVCdXR0b25IdG1sICtcclxuICAgICAgICAgICAgICAgICc8L3RkID48L3RyID4gJztcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gJzx0ciBkYXRhLWlkPVwiJyArIHJvd0lkICsgJ1wiPjx0ZD4nXHJcbiAgICAgICAgICAgICAgICArICc8c3Ryb25nPkVtYWlsOjwvc3Ryb25nPidcclxuICAgICAgICAgICAgICAgICsgJzxkaXYgY2xhc3M9XCJyb3cgbm8tZ3V0dGVyc1wiPidcclx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IHRib2R5JywgbmFtZXNwYWNlKS5hcHBlbmQobmV3Um93KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBoYW5kbGVDb25maXJtT25DbGljaygpIHtcclxuXHJcbiAgICAgICAgJCgnI3JlbWluZE1lLW1vZGFsLWZvcm0nLCBuYW1lc3BhY2UpLnZhbGlkYXRlKHtcclxuXHJcbiAgICAgICAgICAgIHN1Ym1pdEhhbmRsZXI6IGZ1bmN0aW9uIChmKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdG9nZ2xlIGxvYWRpbmdcclxuICAgICAgICAgICAgICAgIHRvZ2dsZUxvYWRpbmcodHJ1ZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIG1vZGVsID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIENsYXNzQ29kZTogcmVtaW5kZXJDb2RlLFxyXG4gICAgICAgICAgICAgICAgICAgIENvdXJzZUNvZGU6IHJlbWluZENvdXJzZUNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgRW1haWxzOiBnZXRSZW1pbmRlckVtYWlsc0FycmF5KClcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPSAkLmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgIHVybDogcmVnaXN0ZXJFbWFpbHNGb3JSZW1pbmRlclVybCxcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogbW9kZWwsXHJcbiAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBzdWNjZXNzXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuaXNTdWNjZXNzID09PSB0cnVlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAkKFwiLmVycm9yLW1lc3NhZ2VzXCIpLmhpZGUoXCJoaWRlXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkU3VjY2Vzc01lc3NhZ2UoJy5zdWNjZXNzLW1lc3NhZ2UnLCBuYW1lc3BhY2UsIFwiWW91ciByZW1pbmRlciByZXF1ZXN0IGhhcyBiZWVuIHJlY2VpdmVkIHN1Y2Nlc3NmdWxseSFcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0b2dnbGUgbG9hZGluZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsb3NlIG1vZGFsIGF1dG9tYXRpY2FsbHkgYWZ0ZXIgeCBtYW55IHNlY29uZHNcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChcIiNyZW1pbmQtbWUtbW9kYWwgLCAuZXJyb3ItbWVzc2FnZXNcIikubW9kYWwoXCJoaWRlXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJChcIi5zdWNjZXNzLW1lc3NhZ2VcIikuaGlkZShcImhpZGVcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgMzAwMCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAkKFwiI2VtYWlsLWxpc3QsIC5lbWFpbC1idXR0b25cIikuc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hvdyBlcnJvcnNcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuZW1haWxFcnJvcnMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5lbWFpbEVycm9ycy5mb3JFYWNoKGZ1bmN0aW9uIChhcnJheUl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoJy5lcnJvci1tZXNzYWdlcycsIG5hbWVzcGFjZSwgYXJyYXlJdGVtLmVycm9yKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRvZ2dsZSBsb2FkaW5nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uIChlcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYWxMaWJyYXJ5LmFkZEVycm9yTWVzc2FnZSgnLmVycm9yLW1lc3NhZ2VzJywgbmFtZXNwYWNlLCBcIlVuaXZlcnNpdHkgcmVtaW5kIGRhdGEgbm90IGFibGUgdG8gc3VibWl0LlwiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gaGF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FyIGZpbHRlciA9IG51bGw7XHJcbiAgICAgICAgaWYgKGN1cnJlbnRGaWx0ZXJzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgZmlsdGVyID0gY3VycmVudEZpbHRlcnMuZmluZChmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS5maWVsZCA9PT0gZmllbGQgJiYgaXRlbS5vcGVyYXRvciA9PT0gb3BlcmF0b3I7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaWYgdmFsdWUgaXMgbnVsbCBvciB1bmRlZmluZWQsIHRoZW4gcmVtb3ZlIHRoZSBmaWx0ZXIgZnJvbSB0aGUgbGlzdCBieSBpdCdzIGZpZWxkXHJcbiAgICAgICAgaWYgKHZhbHVlID09PSBudWxsIHx8IHZhbHVlID09PSAnJykge1xyXG4gICAgICAgICAgICBpZiAoZmlsdGVyKSB7XHJcbiAgICAgICAgICAgICAgICBjdXJyZW50RmlsdGVycy5zcGxpY2UoY3VycmVudEZpbHRlcnMuaW5kZXhPZihmaWx0ZXIpLCAxKTtcclxuICAgICAgICAgICAgICAgIGFwcGx5RmlsdGVycygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIGlmIHRoZSBmaWx0ZXIgYWxyZWFkeSBleGlzdHMsIHRoZW4gcmVwbGFjZSBpdCdzIHZhbHVlIHdpdGggdGhlIG5ldyB2YWx1ZSwgZWxzZSBhZGQgdGhlIGZpbHRlclxyXG4gICAgICAgIGlmIChmaWx0ZXIpIHtcclxuICAgICAgICAgICAgZmlsdGVyLnZhbHVlID0gdmFsdWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgY3VycmVudEZpbHRlcnMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBmaWVsZDogZmllbGQsXHJcbiAgICAgICAgICAgICAgICBvcGVyYXRvcjogb3BlcmF0b3IsXHJcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWVcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBhcHBseSB0aGUgZmlsdGVyc1xyXG4gICAgICAgIGFwcGx5RmlsdGVycygpO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldERhdGVGaWx0ZXIoKSB7XHJcbiAgICAgICAgdmFyIGRhdGVGaWx0ZXIgPSBudWxsO1xyXG5cclxuICAgICAgICBpZiAoZGF0ZVN0YXJ0ICYmIGRhdGVFbmQpIHtcclxuICAgICAgICAgICAgZGF0ZUZpbHRlciA9IHtcclxuICAgICAgICAgICAgICAgIGxvZ2ljOiAnb3InLFxyXG4gICAgICAgICAgICAgICAgZmlsdGVyczogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbG9naWM6ICdhbmQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdEYXlPbmUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiAnZ3RlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZGF0ZVN0YXJ0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnRGF5T25lJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogJ2x0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGRhdGVFbmRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dpYzogJ2FuZCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcnM6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0RheVR3bycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3I6ICdpc25vdG51bGwnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRlU3RhcnRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdEYXlUd28nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiAnZ3RlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZGF0ZVN0YXJ0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnRGF5VHdvJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogJ2x0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGRhdGVFbmRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSBpZiAoZGF0ZVN0YXJ0KSB7XHJcbiAgICAgICAgICAgIGRhdGVGaWx0ZXIgPSB7XHJcbiAgICAgICAgICAgICAgICBsb2dpYzogJ29yJyxcclxuICAgICAgICAgICAgICAgIGZpbHRlcnM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnRGF5T25lJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3I6ICdndGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZGF0ZVN0YXJ0XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2ljOiAnYW5kJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyczogW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnRGF5VHdvJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogJ2lzbm90bnVsbCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGRhdGVTdGFydFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0RheVR3bycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3I6ICdndGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRlU3RhcnRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSBpZiAoZGF0ZUVuZCkge1xyXG4gICAgICAgICAgICBkYXRlRmlsdGVyID0ge1xyXG4gICAgICAgICAgICAgICAgbG9naWM6ICdvcicsXHJcbiAgICAgICAgICAgICAgICBmaWx0ZXJzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0RheU9uZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiAnbHRlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGRhdGVFbmRcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbG9naWM6ICdhbmQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdEYXlUd28nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiAnaXNub3RudWxsJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZGF0ZUVuZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0RheVR3bycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3I6ICdsdGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRlRW5kXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBkYXRlRmlsdGVyO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGFwcGx5RmlsdGVycygpIHtcclxuICAgICAgICAvLyBnZXQgZGF0YSBzb3VyY2VcclxuICAgICAgICB2YXIgZGF0YVNvdXJjZSA9IGpRdWVyeSgnI2xpc3QtdmlldycsIG5hbWVzcGFjZSkuZGF0YSgna2VuZG9MaXN0VmlldycpLmRhdGFTb3VyY2U7XHJcblxyXG4gICAgICAgIC8vIGdldCBkYXRlIGZpbHRlclxyXG4gICAgICAgIHZhciBkYXRlRmlsdGVyID0gZ2V0RGF0ZUZpbHRlcigpO1xyXG5cclxuICAgICAgICAvLyBidWlsZCBkYXRhU291cmNlIGZpbHRlclxyXG4gICAgICAgIHZhciBkYXRhU291cmNlRmlsdGVyID0ge1xyXG4gICAgICAgICAgICBsb2dpYzogJ2FuZCcsXHJcbiAgICAgICAgICAgIGZpbHRlcnM6IFtdXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgLy8gYWRkIGN1cnJlbnQgZmlsdGVycyBpZiBub3QgbnVsbFxyXG4gICAgICAgIGlmIChjdXJyZW50RmlsdGVycyAmJiBjdXJyZW50RmlsdGVycy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY3VycmVudEZpbHRlcnMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGRhdGFTb3VyY2VGaWx0ZXIuZmlsdGVycy5wdXNoKGN1cnJlbnRGaWx0ZXJzW2ldKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1c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hdHNMZWZ0ICsgXCIuXCIpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBzZXQgcmVnaXN0ZXIgbm93IGJ1dHRvbnMgdG8gZGlzYWJsZWRcclxuICAgICAgICB0b2dnbGVSZWdpc3Rlck5vd0J1dHRvbnNFbmFibGVkKGZhbHNlKTtcclxuXHJcbiAgICAgICAgdmFyIHJlcXVlc3QgPSBqUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgIHVybDogYWRkVG9DYXJ0VXJsLFxyXG4gICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICBjb2RlOiBjb2RlLFxyXG4gICAgICAgICAgICAgICAgc2VhdHM6IHNlYXRzXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHhockZpZWxkczpcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgIC8vIG5hdmlnYXRlIHRvIHRoZSBjaGVja291dCBwYWdlXHJcbiAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5ocmVmID0gY2hlY2tvdXRQYWdlVXJsO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKGVycikge1xyXG5cclxuICAgICAgICAgICAgYWRkQ2xhc3NFcnJvck1lc3NhZ2UoY29kZSwgZ2VuZXJpY0Vycm9yTWVzc2FnZSk7XHJcblxyXG4gICAgICAgICAgICAvLyBzZXQgcmVnaXN0ZXIgbm93IGJ1dHRvbnMgdG8gZW5hYmxlZFxyXG4gICAgICAgICAgICB0b2dnbGV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G8tZW5kLWRhdGUnLCBuYW1lc3BhY2UpLmtlbmRvRGF0ZVBpY2tlcih7XHJcbiAgICAgICAgICAgIGNoYW5nZTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGRhdGUgPSB0aGlzLnZhbHVlKCk7XHJcbiAgICAgICAgICAgICAgICBkYXRlRW5kID0gZGF0ZTtcclxuICAgICAgICAgICAgICAgIGFwcGx5RmlsdGVycygpO1xyXG4gICAgICAgICAgICAgICAgdG9nZ2xlRGF0ZUNsZWFyQnV0dG9ucygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgLy8gLS0tLS0gSW5pdCBDbGFzc2VzIFtLZW5kb0xpc3RWaWV3XVxyXG4gICAgICAgIGpRdWVyeSgnI2xpc3QtdmlldycsIG5hbWVzcGFjZSkua2VuZG9MaXN0Vmlldyh7XHJcbiAgICAgICAgICAgIGRhdGFTb3VyY2U6IHtcclxuICAgICAgICAgICAgICAgIGRhdGE6IHdpbmRvdy5tb2RlbC5DbGFzc2VzLFxyXG4gICAgICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDYW5vbmljYWxVcmw6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2xhc3NEZXRhaWxzOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIENsYXNzRmx5ZXJVcmw6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2xhc3NIb3N0ZWRCeTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDbGFzc0hvc3RlZEJ5T3RoZXI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2xhc3NIb3N0ZWRCeVVybDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDbGFzc05hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2xhc3NDb2RlOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbnRlbnRBc3NldHNJRDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb3Vyc2VDb2RlOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvdXJzZU5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVnaXN0cmF0aW9uT3BlbjogeyB0eXBlOiBcImRhdGVcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSXNSZWdpc3RyYXRpb25PcGVuOiB7IHR5cGU6IFwiYm9vbFwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBEYXlPbmU6IHsgdHlwZTogXCJkYXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIERheU9uZUVuZFRpbWU6IHsgdHlwZTogXCJkYXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIERheVR3bzogeyB0eXBlOiBcImRhdGVcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgRGF5VHdvRW5kVGltZTogeyB0eXBlOiBcImRhdGVcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTG9jYXRpb25BZGRyZXNzMTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbkFkZHJlc3MyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIExvY2F0aW9uQ2l0eTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbk5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTG9jYXRpb25TdGF0ZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvblppcENvZGU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTm9Gb2xsb3c6IHsgdHlwZTogXCJib29sXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vSW5kZXg6IHsgdHlwZTogXCJib29sXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9mZmVyZWRJblNwYW5pc2g6IHsgdHlwZTogXCJib29sXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9wZW5HcmFwaEltYWdlOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNFT1NpdGVtYXBzOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIENsYXNzVXJsOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIERheU9uZVRpbWVEaXNwbGF5OiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIERheVR3b1RpbWVEaXNwbGF5OiB7IHR5cGU6IFwic3RyaW5nXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNvcnQ6IFt7IGZpZWxkOiAnTG9jYXRpb25TdGF0ZScsIGRpcjogJ2FzYycgfSwgeyBmaWVsZDogJ0RheU9uZScsIGRpcjogJ2FzYycgfV1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgdGVtcGxhdGU6IGtlbmRvLnRlbXBsYXRlKGpRdWVyeSgnI2xpc3QtdGVtcGxhdGUnLCBuYW1lc3BhY2UpLmh0bWwoKSksXHJcbiAgICAgICAgICAgIGRhdGFCb3VuZDogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgIC8vLS0tLS0gRGlzcGxheSBzY2hlZHVsZSBjb250ZW50XHJcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5zY2hlZHVsZS13YWl0aW5nJywgbmFtZXNwYWNlKS5mYWRlT3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuc2NoZWR1bGUtY29udGVudCcsIG5hbWVzcGFjZSkuZmFkZUluKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9LCAyNTApO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG5cclxuICAgICAgICAvLyAtLS0tLSBSZWdpc3RlciBFdmVudFxyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpLm9uKCdjbGljaycsICcucmVnaXN0ZXItbm93JywgaGFuZGxlUmVnaXN0ZXJOb3dPbkNsaWNrKTtcclxuXHJcbiAgICAgICAgLy8gLS0tLS0gUmVtaW5kIE1lIEV2ZW50XHJcbiAgICAgICAgalF1ZXJ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QWNjb3VudHNFbmRwb2ludCcsIG5hbWVzcGFjZSkudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBcImpzb25cIixcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBWYWx1ZTogeyBmcm9tOiBcIlZhbHVlXCIsIHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgU29ydE5hbWU6IHsgZnJvbTogXCJTb3J0TmFtZVwiLCB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnROdW1iZXI6IHsgZnJvbTogXCJBY2NvdW50TnVtYmVyXCIsIHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUGFyZW50Q29tcGFueTogeyBmcm9tOiBcIlBhcmVudENvbXBhbnlcIiwgdHlwZTogXCJzdHJpbmdcIiB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gbG9hZEtlbmRvR3JpZCgpIHtcclxuICAgICAgICAka2VuZG9HcmlkID0gJChcIiNhY2NvdW50LWdyaWRcIikua2VuZG9HcmlkKHtcclxuICAgICAgICAgICAgZGF0YVNvdXJjZTogZGF0YVNvdXJjZSxcclxuICAgICAgICAgICAgY29sdW1uczogW1xyXG4gICAgICAgICAgICAgICAgeyBmaWVsZDogXCJTb3J0TmFtZVwiLCB0aXRsZTogYWNjb3VudE5hbWVMYWJlbCB9LFxyXG4gICAgICAgICAgICAgICAgeyBmaWVsZDogXCJBY2NvdW50TnVtYmVyXCIsIHRpdGxlOiBhY2NvdW50TnVtYmVyTGFiZWwgfSxcclxuICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwiUGFyZW50Q29tcGFueVwiLCB0aXRsZTogcGFyZW50Q29tcGFueUxhYmVsIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGdldEltcGVyc29uYXRlQnV0dG9uLFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxNTBcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBpcyB0aGUgbmV3IGNhcmQgY29sdW1uIGZvciBtb2JpbGUgdmlld3NcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJBY2NvdW50KHMpXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGdldE1vYmlsZVRlbXBsYXRlLFxyXG4gICAgICAgICAgICAgICAgICAgIGhpZGRlbjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBuYW1lOiBcIk1vYmlsZS1UZW1wbGF0ZVwiXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIF1cclxuICAgICAgICB9KS5kYXRhKCdrZW5kb0dyaWQnKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRNb2JpbGVUZW1wbGF0ZShkYXRhSXRlbSkge1xyXG4gICAgICAgIHZhciBodG1sID0gJzxkaXYgY2xhc3M9XCJtb2JpbGUtaXRlbXNcIj4nO1xyXG4gICAgICAgIGh0bWwgKz0gJzxkaXY+PHN0cm9uZz5BY2NvdW50IE5hbWU6IDwvc3Ryb25nPicgKyBkYXRhSXRlbS5Tb3J0TmFtZSArICc8L2Rpdj4nO1xyXG4gICAgICAgIGh0bW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5kbGUgcmVzZXQgaW1wZXJzb25hdGlvblxyXG4gICAgICAgICQoJy5idG4tc3RvcC1pbXBlcnNvbmF0aW5nJywgbmFtZXNwYWNlKS5vbignY2xpY2snLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgdmFyIHJldHVyblVybCA9IHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZTtcclxuXHJcbiAgICAgICAgICAgIC8vIENhbGwgdGhlIHJlc2V0SW1wZXJzb25hdGlvbiBtZXRob2QgZnJvbSBTaGFyZWRBcGlMaWJyYXJ5XHJcbiAgICAgICAgICAgIFNoYXJlZEFwaS5yZXNldEltcGVyc29uYXRpb24ocmV0dXJuVXJsKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gaGFuZGxlIGltcGVyc29uYXRlIGFjY291bnRcclxuICAgICAgICAkKG5hbWVzcGFjZSkub24oJ3N1Ym1pdCcsICcuaW1wZXJzb25hdGUtYWNjb3VudC1mb3JtJywgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICAvLyBHZXQgdGhlIGlucHV0IGZyb20gdGhlIGNsaWNrZWQgZm9ybVxyXG4gICAgICAgICAgICB2YXIgaWQgPSAkKHRoaXMpLmZpbmQoJ2lucHV0W25hbWU9XCJDb250YWN0SWRcIl0nKS52YWwoKTtcclxuICAgICAgICAgICAgdmFyIHJldHVyblVybCA9IHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZTtcclxuICAgICAgICAgICAgdmFyIGJ1dHRvbiA9ICQodGhpcykuZmluZCgnYnV0dG9uW3R5cGU9XCJzdWJtaXRcIl0nKTtcclxuXHJcbiAgICAgICAgICAgIC8vIENhbGwgdGhlIGltcGVyc29uYXRlQWNjb3VudCBtZXRob2QgZnJvbSBTaGFyZWRBcGlMaWJyYXJ5XHJcbiAgICAgICAgICAgIFNoYXJlZEFwaS5pbXBlcnNvbmF0ZUFjY291bnQoaWQsIHJldHVyblVybCxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignJywgYnV0dG9uKTtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkNvdWxkIG5vdCBpbXBlcnNvbmF0ZSBhY2NvdW50XCIpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIC0tLS0tIEhhbmRsZSBmaWx0ZXIgdGV4dFxyXG4gICAgICAgICRmaWx0ZXJUZXh0Lm9uKCdpbnB1dCcsIGxpYnJhcnkuZGVib3VuY2UoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VhcmNoVGV4dCA9IGpRdWVyeSh0aGlzKS52YWwoKS50b0xvd2VyQ2FzZSgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHNlYXJjaFRleHQubGVuZ3RoID49IDMpIHtcclxuICAgICAgICAgICAgICAgIC8vIENsZWFyIHByZXZpb3VzIGRhdGFcclxuICAgICAgICAgICAgICAgIGRhdGFTb3VyY2UuZGF0YShbXSk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gYW5pbWF0ZSBidXR0b25cclxuICAgICAgICAgICAgICAgIHZhciBidXR0b24gPSAkKCcjZmlsdGVyLWFjY291bnRzJywgbmFtZXNwYWNlKTtcclxuICAgICAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignU2VhcmNoaW5nLi4uJywgYnV0dG9uKTtcclxuXHJcblxyXG4gICAgICAgICAgICAgICAgLy8gZGV0ZXJtaW5lIGlmIHNlYXJjaCB0ZXh0IGlzIGEgbnVtYmVyIG9yIG5vdFxyXG4gICAgICAgICAgICAgICAgdmFyIGFjY291bnROYW1lID0gJyc7XHJcbiAgICAgICAgICAgICAgICB2YXIgYWNjb3VudE51bWJlciA9ICcnO1xyXG4gICAgICAgICAgICAgICAgaWYgKGlzTmFOKHNlYXJjaFRleHQpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWNjb3VudE5hbWUgPSBzZWFyY2hUZXh0O1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBhY2NvdW50TnVtYmVyID0gc2VhcmNoVGV4dDtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBTaGFyZWRBcGkuZmlsdGVyQWNjb3VudHMoYWNjb3VudE5hbWUsIGFjY291bnROdW1iZXIsICcnLFxyXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChhY2NvdW50cykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWNjb3VudHMgPT0gbnVsbCB8fCBhY2NvdW50cy5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIk5vIHJlc3VsdHMgZm91bmRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhU291cmNlLmRhdGEoW10pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJGb3VuZCFcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiBTb3J0TmFtZSBhbHJlYWR5IGV4aXN0cyBpbiBkYXRhc291cmNlLiBJZiB5ZXMsIHNraXAgdGhhdCByZWNvcmRcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0aW5nRGF0YSA9IGRhdGFTb3VyY2UuZGF0YSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgYWNjb3VudHMuZm9yRWFjaChmdW5jdGlvbiAoYWNjb3VudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0cyA9IGV4aXN0aW5nRGF0YS5zb21lKGZ1bmN0aW9uIChleGlzdGluZykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBleGlzdGluZy5WYWx1ZSA9PT0gYWNjb3VudC5WYWx1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWV4aXN0cykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nRGF0YS5wdXNoKGFjY291bnQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVNvdXJjZS5kYXRhKFtdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJFcnJvciFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZXJyb3IoZXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LCAyNTApKTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBDbGVhciBidXR0b25cclxuICAgICAgICBqUXVlcnkoJyNjbGVhckZpbHRlcicsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLm9uKCdjbGljaycsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAkKCcjZmlsdGVyVGV4dCcsIG5hbWVzcGFjZSkudmFsKCcnKTtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhU291cmNlLnJlYWQoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBsaXN0ZW4gZm9yIGRpc3BsYXkgc2l6ZSBjaGFuZ2VcclxuICAgICAgICAkKHdpbmRvdykub24oJ3Jlc2l6ZSBvcmllbnRhdGlvbmNoYW5nZScsIGxpYnJhcnkuZGVib3VuY2UoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB0b2dnbGVWaXNpYmxlQ29sdW1ucygpO1xyXG4gICAgICAgIH0sIDEwMCkpO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHRvZ2dsZVZpc2libGVDb2x1bW5zKCkge1xyXG4gICAgICAgIC8vIGdldCBwYXJlbnQgY29udGFpbmVyIHNpemVcclxuICAgICAgICB2YXIgY3VycmVudFdpZHRoID0gJChuYW1lc3BhY2UpLndpZHRoKCk7XHJcblxyXG4gICAgICAgIC8vIGNoZWNrIGlmIG1vYmlsZSBkaXNwbGF5XHJcbiAgICAgICAgdmFyIGlzTW9iaWxlID0gY3VycmVudFdpZHRoIDw9IG1vYmlsZUJyZWFrcG9pbnQ7XHJcblxyXG4gICAgICAgIC8vIGxvb3AgY29sdW1uc1xyXG4gICAgICAgICRrZW5kb0dyaWQuY29sdW1ucy5mb3JFYWNoKGZ1bmN0aW9uIChmLCBpbmRleCkge1xyXG4gICAgICAgICAgICBpZiAoaXNNb2JpbGUpIHtcclxuICAgICAgICAgICAgICAgIGlmIChmLm5hbWUgPT09ICdNb2JpbGUtVGVtcGxhdGUnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGtlbmRvR3JpZC5zaG93Q29sdW1uKGluZGV4KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGtlbmRvR3JpZC5oaWRlQ29sdW1uKGluZGV4KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmIChmLm5hbWUgPT09ICdNb2JpbGUtVGVtcGxhdGUnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGtlbmRvR3JpZC5oaWRlQ29sdW1uKGluZGV4KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGtlbmRvR3JpZC5zaG93Q29sdW1uKGluZGV4KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBsb2FkRGF0YVNvdXJjZSgpO1xyXG4gICAgICAgIGxvYWRLZW5kb0dyaWQoKTtcclxuICAgICAgICBpbml0SGFuZGxlcnMoKTtcclxuICAgICAgICB0b2dnbGVWaXNpYmxlQ29sdW1ucygpO1xyXG4gICAgfTtcclxufTtcclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2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heEV4ZW1wdFZhbHVlO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICB2YXIgYWNjb3VudERhdGEgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEZpZWxkczogbW9kZWwsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIElzUE9SZXF1aXJlZDogcG9SZXF1aXJlZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTmV3UE9SZXF1aXJlZDogbmV3UG9SZXF1aXJlZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQWNjZXB0c0JhY2tPcmRlcnM6IGFjY2VwdHNCYWNrT3JkZXJzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXdBY2NlcHRzQmFja09yZGVyczogbmV3QWNjZXB0c0JhY2tPcmRlcnMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIElzQ2VydGlmaWVkOiBjZXJ0aWZpZWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5ld0NlcnRpZmllZDogbmV3Q2VydGlmaWVkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBJc0JpbGxDb21wbGV0ZTogYmlsbENvbXBsZXRlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXdCaWxsQ29tcGxldGU6IG5ld0JpbGxDb21wbGV0ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgVGF4RXhlbXB0OiB0YXhFeGVtcHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5ld1RheEV4ZW1wdDogbmV3VGF4RXhlbXB0VmFsdWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcHJvdmVyRW1haWwxOiBlbWFpbE9uZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTmV3QXBwcm92ZXJFbWFpbDE6IG5ld0VtYWlsT25lLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBBcHByb3ZlckVtYWlsMjogZW1haWxUd28sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5ld0FwcHJvdmVyRW1haWwyOiBuZXdFbWFpbFR3byxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTnVtYmVyT2ZVbml0czogbnVtYmVyT2ZVbml0cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTmV3TnVtYmVyT2ZVbml0czogbmV3TnVtYmVyT2ZVbml0cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQXBwcm92YWxUaHJlc2hvbGQxOiB0aHJlc2hvbGQxLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXdBcHByb3ZhbFRocmVzaG9sZDE6IG5ld1RocmVzaG9sZDEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcHJvdmFsVGhyZXNob2xkMjogdGhyZXNob2xkMixcclxuICAgICAgICAgICAgICAgICAgICAgICAgTmV3QXBwcm92YWxUaHJlc2hvbGQyOiBuZXdUaHJlc2hvbGQyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBQdXJjaGFzZU9yZGVyTGltaXQ6IG9yZGVyTGltaXQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5ld1B1cmNoYXNlT3JkZXJMaW1pdDogbmV3T3JkZXJMaW1pdCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgWWVhckJ1aWx0OiB5ZWFyQnVpbHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5ld1llYXJCdWlsdDogbmV3WWVhckJ1aWx0LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBGaXJzdENlcnRpZmllZFBlcnNvbk5hbWU6IGZpcnN0Q2VydGlmaWVkUGVyc29uTmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTmV3Rmlyc3RDZXJ0aWZpZWRQZXJzb25OYW1lOiBuZXdGaXJzdENlcnRpZmllZFBlcnNvbk5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFNlY29uZENlcnRpZmllZFBlcnNvbk5hbWU6IHNlY29uZENlcnRpZmllZFBlcnNvbk5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5ld1NlY29uZENlcnRpZmllZFBlcnNvbk5hbWU6IG5ld1NlY29uZENlcnRpZmllZFBlcnNvbk5hbWVcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBjcmVhdGUgdGhlIHJlcXVlc3RcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9ICQuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogd2luZG93Lm1vZGVsLlBvc3RGb3JtVXJsLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBhY2NvdW50RGF0YSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBoYW5kbGUgc3VjY2Vzc1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSA9PT0gdHJ1ZSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNhY2NvdW50LXByZWZlcmVuY2UtbW9kYWwnKS5tb2RhbCgnaGlkZScpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNob3cgc3VjY2VzcyBtZXNzYWdlIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkU3VjY2Vzc01lc3NhZ2UoJy5zdWNjZXNzLW1lc3NhZ2UnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbC5SZXF1ZXN0U3VjY2Vzc01lc3NhZ2UpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE5lZWQgdG8gcmVmcmVzaCB0aGUgcGFnZSBiZWNhdXNlIGluc2lkZSB0aGUgbW9kYWwgd2UgYXJlIHJlcXVlc3RpbmcgdGhlIGFjY291bnQgZGF0YSBub3Qgc2F2aW5nIVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAyMDAwKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoJy5lcnJvci1tZXNzYWdlcycsIG5hbWVzcGFjZSwgbW9kZWwuR2VuZXJpY0Vycm9yTWVzc2FnZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBlcnJvclxyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKCcuZXJyb3ItbWVzc2FnZXMnLCBuYW1lc3BhY2UsIG1vZGVsLkdlbmVyaWNFcnJvck1lc3NhZ2U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1xyXG4gICAge1xyXG4gICAgICAgIHZhciBiaWxsaW5nQWRkcmVzc0VuZHBvaW50ID0gJCgnI2JpbGxpbmctYWRkcmVzcy1lbmRwb2ludCcpLnZhbCgpO1xyXG4gICAgICAgIHZhciB1cGRhdGVTaGlwcGluZ0FkZHJlc3NFbmRwb2ludCA9ICQoJyN1cGRhdGUtc2hpcHBpbmctYWRkcmVzcy1lbmRwb2ludCcpLnZhbCgpO1xyXG5cclxuICAgICAgICBqUXVlcnkoICcjYmlsbGluZy1hZGRyZXNzLWZvcm0nLCBuYW1lc3BhY2UgKS52YWxpZGF0ZShcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgLy8tLS0tLSBTYXZlIGJpbGxpbmcgYWRkcmVzc1xyXG4gICAgICAgICAgICAgICAgc3VibWl0SGFuZGxlcjogZnVuY3Rpb24oIGZvcm0gKVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB1c2VySWQgPSBqUXVlcnkoICdpbnB1dFsgbmFtZT11aWQgXScsIG5hbWVzcGFjZSApLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBhZGRyZXNzMSA9IGpRdWVyeSggJyNCaWxsaW5nQWRkcmVzczEnLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgYWRkcmVzczIgPSBqUXVlcnkoICcjQmlsbGluZ0FkZHJlc3MyJywgbmFtZXNwYWNlICkudmFsKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNpdHkgPSBqUXVlcnkoICcjQmlsbGluZ0NpdHknLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgc3RhdGUgPSBqUXVlcnkoICcjQmlsbGluZ1N0YXRlJywgbmFtZXNwYWNlICkudmFsKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHppcCA9IGpRdWVyeSggJyNCaWxsaW5nWmlwJywgbmFtZXNwYWNlICkudmFsKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvdW50cnkgPSBqUXVlcnkoICcjQmlsbGluZ0NvdW50cnknLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgYWRkcmVzc2lkID0galF1ZXJ5KCAnI0JpbGxpbmdBZGRyZXNzSWQnLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUxOiBhZGRyZXNzMSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZTI6IGFkZHJlc3MyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjaXR5OiBjaXR5LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZTogc3RhdGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvc3RhbGNvZGU6IHppcCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY291bnRyeTogY291bnRyeSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc2lkOiBhZGRyZXNzaWRcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogYmlsbGluZ0FkZHJlc3NFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogZGF0YSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0gKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5kb25lKCBmdW5jdGlvbigpXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdFBhZ2UoKTtcclxuICAgICAgICAgICAgICAgICAgICB9ICk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbCggZnVuY3Rpb24oIGRhdGEgKVxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCAnI2JpbGxpbmctYWRkcmVzcy1mb3JtIC5lcnJvci1tZXNzYWdlJywgbmFtZXNwYWNlICkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSApO1xyXG5cclxuICAgICAgICAvLy0tLS0tIFNhdmUgc2hpcHBpbmcgYWRkcmVzc1xyXG4gICAgICAgIGpRdWVyeSggJyNzaGlwcGluZy1hZGRyZXNzLWZvcm0nLCBuYW1lc3BhY2UgKS52YWxpZGF0ZShcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgc3VibWl0SGFuZGxlcjogZnVuY3Rpb24oIGZvcm0gKVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB1c2VySWQgPSBqUXVlcnkoICdpbnB1dFsgbmFtZT11aWQgXScsIG5hbWVzcGFjZSApLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBhZGRyZXNzMSA9IGpRdWVyeSggJyNTaGlwcGluZ0FkZHJlc3MxJywgbmFtZXNwYWNlICkudmFsKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGFkZHJlc3MyID0galF1ZXJ5KCAnI1NoaXBwaW5nQWRkcmVzczInLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgY2l0eSA9IGpRdWVyeSggJyNTaGlwcGluZ0NpdHknLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgc3RhdGUgPSBqUXVlcnkoICcjU2hpcHBpbmdTdGF0ZScsIG5hbWVzcGFjZSApLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB6aXAgPSBqUXVlcnkoICcjU2hpcHBpbmdaaXAnLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgY291bnRyeSA9IGpRdWVyeSggJyNTaGlwcGluZ0NvdW50cnknLCBuYW1lc3BhY2UgKS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaXNkZWZhdWx0ID0galF1ZXJ5KCcjU2hpcHBpbmdJc0RlZmF1bHQnLCBuYW1lc3BhY2UpLnByb3AoJ2NoZWNrZWQnKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgYWRkcmVzc2lkID0galF1ZXJ5KCcjU2hpcHBpbmdBZGRyZXNzSWQnLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZTE6IGFkZHJlc3MxLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lMjogYWRkcmVzczIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNpdHk6IGNpdHksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOiBzdGF0ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcG9zdGFsY29kZTogemlwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudHJ5OiBjb3VudHJ5LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpc2RlZmF1bHQ6IGlzZGVmYXVsdCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkcmVzc2lkOiBhZGRyZXNzaWRcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogdXBkYXRlU2hpcHBpbmdBZGRyZXNzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9ICk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZSggZnVuY3Rpb24oKVxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3RQYWdlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSApO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LmZhaWwoIGZ1bmN0aW9uKCBkYXRhIClcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSggJyNzaGlwcGluZy1hZGRyZXNzLWZvcm0gLmVycm9yLW1lc3NhZ2UnLCBuYW1lc3BhY2UgKS5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9ICk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIGZ1bmN0aW9uIGluaXRIYW5kbGVycygpXHJcbiAgICB7XHJcbiAgICAgICAgdmFyIHVwZGF0ZURlZmF1bHRTaGlwcGluZ0FkZHJl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dHIoICdpc2NoZWNrZWQnICk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9ICk7XHJcblxyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBkZWZhdWx0IHNoaXBwaW5nIGFkZHJlc3NcclxuICAgICAgICBqUXVlcnkoICcuZGVmYXVsdC1zaGlwcGluZy1hZGRyZXNzJywgbmFtZXNwYWNlICkuY2xpY2soIGZ1bmN0aW9uKClcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIHZhciB1c2VySWQgPSBqUXVlcnkoICdpbnB1dFsgbmFtZT11aWQgXScsIG5hbWVzcGFjZSApLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgYWRkcklkID0galF1ZXJ5KCB0aGlzICkuZGF0YSggJ3NoaXBwaW5nYWRkcmVzc2lkJyApO1xyXG4gICAgICAgICAgICB2YXIgY2hlY2tlZCA9IGpRdWVyeSggdGhpcyApLmlzKCAnOmNoZWNrZWQnICk7XHJcblxyXG4gICAgICAgICAgICBpZiAoIGNoZWNrZWQgKVxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgICAgICBuZXdhZGRyZXNzaWQ6IGFkZHJJZFxyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KCB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVwZGF0ZURlZmF1bHRTaGlwcGluZ0FkZHJlc3NFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiBkYXRhLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9ICk7XHJcblxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5kb25lKCBmdW5jdGlvbigpXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3RQYWdlKCk7XHJcbiAgICAgICAgICAgICAgICB9ICk7XHJcblxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5mYWlsKCBmdW5jdGlvbiggZGF0YSApXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCB0aGlzICkucGFyZW50KCkuc2libGluZ3MoICcuZXJyb3ItbWVzc2FnZScgKS5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICB9ICk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9ICk7XHJcblxyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBlZGl0IGFkZHJlc3MgYnV0dG9uc1xyXG4gICAgICAgIGpRdWVyeSggJy5hZGRyZXNzLWNvbnRhaW5lciBidXR0b24nLCBuYW1lc3BhY2UgKS5jbGljayggZnVuY3Rpb24oKVxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgdmFyIHBhcmVudCA9IGpRdWVyeSggdGhpcyApLnBhcmVudCgpO1xyXG5cclxuICAgICAgICAgICAgLy8tLS0tLSBQdWxsIGRhdGEgZnJvbSB0YWJsZSBuZWFyZXN0IHRoZSBjbGlja2VkIGJ1dHRvblxyXG4gICAgICAgICAgICB2YXIgYWRkcmVzczEgPSBwYXJlbnQuZmluZCggJ3RhYmxlIC5hZGRyZXNzMScgKS50ZXh0KCk7XHJcbiAgICAgICAgICAgIHZhciBhZGRyZXNzMiA9IHBhcmVudC5maW5kKCAndGFibGUgLmFkZHJlc3MyJyApLnRleHQoKTtcclxuICAgICAgICAgICAgdmFyIGNpdHkgPSBwYXJlbnQuZmluZCggJ3RhYmxlIC5jaXR5JyApLnRleHQoKTtcclxuICAgICAgICAgICAgdmF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ICAgICAgIHNrdTogeyB0eXBlOiBcInN0cmluZ1wiLCBlZGl0YWJsZTogdHJ1ZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogeyB0eXBlOiBcIm51bWJlclwiLCBlZGl0YWJsZTogZmFsc2UgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGluaXRHcmlkKCkge1xyXG4gICAgICAgIHZhciBncmlkID0gJChcIiNncmlkXCIpLmtlbmRvR3JpZCh7XHJcbiAgICAgICAgICAgIGRhdGFTb3VyY2U6IGRhdGFTb3VyY2UsXHJcbiAgICAgICAgICAgIHNjcm9sbGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIGVkaXRhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwic2t1XCIsIHRpdGxlOiBcIlNLVSAjXCIsIHdpZHRoOiBcIjEwMFwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcInBvc2l0aW9uXCIsIHRpdGxlOiBcIlBvc2l0aW9uXCIsIHdpZHRoOiBcIjEwMFwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJzxpbnB1dCB0eXBlPVwiYnV0dG9uXCIgY2xhc3M9XCJidG4gYnRuLWRhbmdlciByZW1vdmUtc2t1LWJ1dHRvblwiIHZhbHVlPVwiUmVtb3ZlXCIgZGF0YS11aWQ9XCInICsgZS51aWQgKyAnXCIgIC8+JztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIF1cclxuICAgICAgICB9KS5kYXRhKFwia2VuZG9HcmlkXCIpO1xyXG5cclxuICAgICAgICBncmlkLnRhYmxlLmtlbmRvU29ydGFibGUoe1xyXG4gICAgICAgICAgICBmaWx0ZXI6IFwiPnRib2R5ID50clwiLFxyXG4gICAgICAgICAgICBoaW50OiAkLm5vb3AsXHJcbiAgICAgICAgICAgIGN1cnNvcjogXCJtb3ZlXCIsXHJcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyOiBmdW5jdGlvbiAoZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnQuY2xvbmUoKS5hZGRDbGFzcyhcImstc3RhdGUtaG92ZXJcIikuY3NzKFwib3BhY2l0eVwiLCAwLjY1KTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY29udGFpbmVyOiBcIiNncmlkIHRib2R5XCIsXHJcbiAgICAgICAgICAgIGNoYW5nZTogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgIHZhciBza2lwID0gZ3JpZC5kYXRhU291cmNlLnNraXAoKSxcclxuICAgICAgICAgICAgICAgICAgICBvbGRJbmRleCA9IGUub2xkSW5kZXggKyBza2lwLFxyXG4gICAgICAgICAgICAgICAgICAgIG5ld0luZGV4ID0gZS5uZXdJbmRleCArIHNraXAsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGdyaWQuZGF0YVNvdXJjZS5kYXRhKCksXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YUl0ZW0gPSBncmlkLmRhdGFTb3VyY2UuZ2V0QnlVaWQoZS5pdGVtLmRhdGEoXCJ1aWRcIikpO1xyXG5cclxuICAgICAgICAgICAgICAgIGdyaWQuZGF0YVNvdXJjZS5yZW1vdmUoZGF0YUl0ZW0pO1xyXG4gICAg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hY2Nlc3MgcmVjb3JkIHVzaW5nIGZvciBsb29wIC0gaGVyZSBpIGlzIHZhbHVlIGZyb20gbG9vcFxyXG4gICAgICAgICAgICB2YXIgZmlyc3RJdGVtID0gJCgnI2dyaWQnKS5kYXRhKCkua2VuZG9HcmlkLmRhdGFTb3VyY2UuZGF0YSgpW2ldO1xyXG5cclxuICAgICAgICAgICAgLy8vL3NldCBjb2wgcG9zaXRpb24gdmFsdWVcclxuICAgICAgICAgICAgZmlyc3RJdGVtW1wicG9zaXRpb25cIl0gPSBjb3VudDtcclxuICAgICAgICAgICAgY291bnQrKztcclxuXHJcbiAgICAgICAgICAgIC8vLy9yZWZyZXNoIHRoZSBncmlkXHJcbiAgICAgICAgICAgICQoJyNncmlkJykuZGF0YSgna2VuZG9HcmlkJykucmVmcmVzaCgpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXROZXdSb3dNb2RlbChza3UsIHBvc2l0aW9uKSB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgc2t1OiBza3UsXHJcbiAgICAgICAgICAgIHBvc2l0aW9uOiBwb3NpdGlvblxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gZ2V0RW50ZXJlZFNrdXMoKSB7XHJcbiAgICAgICAgdmFyIGRhdGEgPSBkYXRhU291cmNlLmRhdGEoKTtcclxuICAgICAgICByZXR1cm4gZGF0YS5tYXAoZnVuY3Rpb24gKGYpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIHNrdTogZi5za3UsXHJcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjogZi5wb3NpdGlvblxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIENvbmZpZ3VyZUZvcm0oZSkge1xyXG4gICAgICAgICRmb3JtLmhpZGUoKTtcclxu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vbiB0byB1cGRhdGUgcG9zaXRpb25cclxuICAgICAgICAgICAgdXBkYXRlUG9zaXRpb24oKTtcclxuXHJcbiAgICAgICAgICAgIGVycm9yTWVzc2FnZSArPSAnPC91bD4nO1xyXG4gICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoJy5lcnJvci1tZXNzYWdlcycsIG5hbWVzcGFjZSwgZXJyb3JNZXNzYWdlKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gbG9hZFJlbGF0aW9uc2hpcHNUb0Zvcm0oKSB7XHJcbiAgICAgICAgdG9nZ2xlU3Bpbm5lcih0cnVlKTtcclxuXHJcbiAgICAgICAgLy8gYnVpbGQgdGhlIG1vZGVsXHJcbiAgICAgICAgdmFyIG1vZGVsID0ge1xyXG4gICAgICAgICAgICBza3U6ICRsb29rdXBTa3UudmFsKCksXHJcbiAgICAgICAgICAgIHJlbGF0aW9uc2hpcFR5cGU6ICRyZWxhdGlvbnNoaXBUeXBlLnZhbCgpXHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBwb3N0IGRhdGEgdG8gY29udHJvbGxlciAmIGdldCBza3VzIHJlbGF0aW9uc2hpcHNcclxuICAgICAgICB2YXIgcmVxdWVzdCA9ICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogd2luZG93Lmxvb2t1cFVybCxcclxuICAgICAgICAgICAgZGF0YTogbW9kZWwsXHJcbiAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgIGRhdGFUeXBlOiAnSlNPTidcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gb24gc3VjY2VzczogbG9hZCBkYXRhIHRvIGZvcm1cclxuICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgLy8gaWYgZGF0YSBpcyB2YWxpZCwgbG9hZCBpdCB0byBvdXIgZm9ybVxyXG4gICAgICAgICAgICAkZm9ybS5zaG93KCk7XHJcbiAgICAgICAgICAgIGlmIChkYXRhICE9IG51bGwpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzaG93IGRhdGEgaW4gZ3JpZFxyXG4gICAgICAgICAgICAgICAgdmFyIHNrdWRhdGEgPSBkYXRhLlNrdXM7XHJcbiAgICAgICAgICAgICAgICB2YXIgZ3JpZEl0ZW1zID0gc2t1ZGF0YS5tYXAoZnVuY3Rpb24gKGYpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBza3U6IGYuU2t1LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogZi5Qb3NpdGlvblxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgZGF0YVNvdXJjZS5kYXRhKGdyaWRJdGVtcyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy9zZXQgUmVsYXRpb25zaGlwIFR5cGVcclxuICAgICAgICAgICAgICAgIGlmIChkYXRhLlJlbGF0aW9uc2hpcFR5cGUgPT0gJ0FsdGVybmF0ZSBDb2xvcnMgYW5kL29yIFNpemVzJykge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmFsdGVybmF0ZS1wcm9kdWN0cy1mYWNldHMnKS5zaG93KCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vc2V0IFJlbGF0aW9uc2hpcCBUeXBlXHJcbiAgICAgICAgICAgICAgICAgICAgJChcIiNSZWxhdGlvbnNoaXBUeXBlXCIpLnByb3AoXCJzZWxlY3RlZEluZGV4XCIsIDEpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBtYXAgY2hlY2tib3hlc1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuVXNlV2lkdGggPT09IHRydWUgPyAkKFwiI1VzZVdpZH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AgICAgICAgICAgICAgICAgIGRhdGEuVXNlSFAgPT09IHRydWUgPyAkKCcjVXNlSFAnKS5wcm9wKCdjaGVja2VkJywgdHJ1ZSkgOiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLlVzZU1GRCA9PT0gdHJ1ZSA/ICQoXCIjVXNlTUZEXCIpLnByb3AoJ2NoZWNrZWQnLCB0cnVlKSA6IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuVXNlT0QgPT09IHRydWUgPyAkKCcjVXNlT0QnKS5wcm9wKCdjaGVja2VkJywgdHJ1ZSkgOiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLlVzZVNoYXBlID09PSB0cnVlID8gJChcIiNVc2VTaGFwZVwiKS5wcm9wKCdjaGVja2VkJywgdHJ1ZSkgOiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLlVzZVNpemUgPT09IHRydWUgPyAkKCcjVXNlU2l6ZScpLnByb3AoJ2NoZWNrZWQnLCB0cnVlKSA6IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuVXNlVG9uID09PSB0cnVlID8gJChcIiNVc2VUb25cIikucHJvcCgnY2hlY2tlZCcsIHRydWUpIDogZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5Vc2VUeXBlID09PSB0cnVlID8gJCgnI1VzZVR5cGUnKS5wcm9wKCdjaGVja2VkJywgdHJ1ZSkgOiBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5Vc2VDb2xvcnMgPT09IHRydWUgPyAkKCcjVXNlQ29sb3JzJykucHJvcCgnY2hlY2tlZCcsIHRydWUpIDogZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvL1JlbGF0ZWQgUHJvZHVjdHNcclxuICAgICAgICAgICAgICAgICAgIC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ICAgICAgICAgICAgICAgaXRlbV9pZDogalF1ZXJ5KHRoaXMpLmRhdGEoJ2NvZGUnKSxcclxuICAgICAgICAgICAgICAgICAgICBpdGVtX25hbWU6IGpRdWVyeSh0aGlzKS5kYXRhKCdpdGVtTmFtZScpLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGV4OiBjb3VudCxcclxuICAgICAgICAgICAgICAgICAgICBxdWFudGl0eTogMVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBsaWJyYXJ5LnRyYWNrR2FFdmVudFRvRGF0YUxheWVyKFwicmVtb3ZlX2Zyb21fYmFja29yZGVyX3N1YnNjcmlwdGlvblwiLCB0cmFja2VkSXRlbXMsIG51bGwsIFwiaXRlbXNfcmVtb3ZlX2JhY2tvcmRlclwiKTtcclxuICAgICAgICAgICAgalF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgIHVybDogZGVsZXRlU3Vic2NyaXB0aW9uRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiB7IFN1YnNjcmlwdGlvbklkczogc3Vic2NyaXB0aW9ucyB9LFxyXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyByZWZyZXNoIGxpbmVzXHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcbn1cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24gKCkge1xyXG4gICAgbmV3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AgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IHtcclxuICAgICAgICAgICAgICAgICAgICB0cmFuc3BvcnQ6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhZDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBnZXRBc3NpZ25tZW50c0ZvclVzZXJQYWdlZEVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6IFwiSlNPTlwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlck1hcDogZnVuY3Rpb24gKG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb3J0RmllbGQgPSAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb3J0RGlyID0gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucz8uc29ydCAmJiBvcHRpb25zLnNvcnQubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvcnRGaWVsZCA9IG9wdGlvbnMuc29ydFswXS5maWVsZDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3J0RGlyID0gb3B0aW9ucy5zb3J0WzBdLmRpcjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW1haWw6IHVzZXJFbWFpbCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQYWdlOiBvcHRpb25zLnBhZ2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGFnZVNpemU6IG9wdGlvbnMucGFnZVNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmlsdGVyOiAkKCcjZmlsdGVyVGV4dCcsIG5hbWVzcGFjZSkudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU29ydEZpZWxkOiBzb3J0RmllbGQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU29ydERpcmVjdGlvbjogc29ydERpclxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFwiZGF0YVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbDogXCJ0b3RhbFBhZ2VzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY2NvdW50SWQ6IHsgdHlwZTogXCJndWlkXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY2NvdW50TmFtZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjb3VudE51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50QWNjb3VudDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2l0eTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGU6IHsgdHlwZTogXCJzdHJpbmdcIiB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHNlcnZlclBhZ2luZzogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBzZXJ2ZXJTb3J0aW5nOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIHNlcnZlckZpbHRlcmluZzogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBwYWdlU2l6ZTogcGFnZVNpemVzWzBdLFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHBhZ2VhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWx3YXlzVmlzaWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc29ydGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOlxyXG4gICAgICAgICAgICAgICAgICAgIFtcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyVGVtcGxhdGU6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8aW5wdXQgdHlwZT1cImNoZWNrYm94XCIgaWQ9XCJzZWxlY3RBbGxBY2NvdW50c1wiIG5hbWU9XCJzZWxlY3RBbGxBY2NvdW50c1wiIC8+IFJlbW92ZSdcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJzxpbnB1dCB0eXBlPVwiY2hlY2tib3hcIiBuYW1lPVwiYXNzaWduZWRBY2NvdW50XCIgZGF0YS1pZD1cIicgKyBlLmFjY291bnROdW1iZXIgKyAnXCIgLz4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjEwMHB4XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdhY2NvdW50TnVtYmVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnQWNjb3VudCBOdW1iZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiMTUwcHhcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ2FjY291bnROYW1lJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnQWNjb3VudCBOYW1lJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ3BhcmVudEFjY291bnQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdQYXJlbnQgQWNjb3VudCdcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdjaXR5JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnQ2l0eScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMjBweFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnc3RhdGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdTdGF0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMjBweFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlbW92ZSBidXR0b25cclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiUmVtb3ZlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMjBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChkYXRhSXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgY2xhc3M9XCJidG4gYnRuLWRhbmdlciBidG4tc20gcmVtb3ZlLWFzc2lnbmVkLUFjY291bnRcIiBkYXRhLWFjY291bnRJZD1cIicgKyBkYXRhSXRlbS5hY2NvdW50SWQgKyAnXCI+UmVtb3ZlPC9idXR0b24+JztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGF0dHJpYnV0ZXM6IHsgc3R5bGU6ICd0ZXh0LWFsaWduOiBjZW50ZXInIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgfSkuZGF0YSgna2VuZG9HcmlkJyk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gU2V0IHRoZSBwYWdlIHNpemUgZHJvcGRvd25cclxuICAgICAgICAkc2VhcmNoUmVzdWx0c0dyaWQgPSBqUXVlcnkoJyNzZWFyY2gtcmVzdWx0cy1ncmlkJywgbmFtZXNwYWNlKS5rZW5kb0dyaWQoe1xyXG4gICAgICAgICAgICBkYXRhU291cmNlOiB7XHJcbiAgICAgICAgICAgICAgICB0cmFuc3BvcnQ6IHtcclxuICAgICAgICAgICAgICAgICAgICByZWFkOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI2dldEFjY291bnRzRW5kcG9pbnQnLCBuYW1lc3BhY2UpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnUE9TVCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBcIkpTT05cIlxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyTWFwOiBmdW5jdGlvbiAob3B0aW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZU9yTnVtYmVyOiAkY3V0b21lclNlYXJjaFZhbHVlLnZhbCgpLnRyaW0oKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjY291bnRJZDogeyB0eXBlOiBcImd1aWRcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjb3VudE5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjb3VudE51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnRBY2NvdW50OiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpdHk6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGU6IHsgdHlwZTogXCJzdHJpbmdcIiB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2VydmVyRmlsdGVyaW5nOiB0cnVlLFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyVGVtcGxhdGU6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGlkPVwiY2hlY2tBbGxBY2NvdW50c1wiIG5hbWU9XCJjaGVja0FsbEFjY291bnRzXCIgLz4gQWRkJ1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGNsYXNzPVwiYWNjb3VudFRvQXNzaWduXCIgbmFtZT1cImFjY291bnRUb0Fzc2lnblwiIC8+JztcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjgwcHhcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0FjY291bnROdW1iZXInLFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnQWNjb3VudCBOdW1iZXInLFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjE1MHB4XCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdBY2NvdW50TmFtZScsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdBY2NvdW50IE5hbWUnXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnUGFyZW50QWNjb3VudCcsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdQYXJlbnQgQWNjb3VudCdcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdDaXR5JyxcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ0NpdHknLFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjEyMHB4XCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdTdGF0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdTdGF0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiMTIwcHhcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIC8vIEFkZCBidXR0b25cclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJBZGRcIixcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMDBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBmdW5jdGlvbiAoZGF0YUl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImJ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JlbW92ZUFzc2lnbm1lbnQoZSkge1xyXG4gICAgICAgIGlmIChlKSB7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIHJlbW92ZSBhc3NpZ25tZW50ICYgZ2V0IG1lc3NhZ2VcclxuICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICB2YXIgbXNnID0gJy4uLic7XHJcblxyXG4gICAgICAgIHZhciBkYXRhSXRlbSA9ICRhY2NvdW50c0dyaWQuZGF0YUl0ZW0oJCh0aGlzKS5jbG9zZXN0KCd0cicpKTtcclxuXHJcbiAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignUmVtb3ZpbmcuLi4nLCBidXR0b24pO1xyXG5cclxuICAgICAgICAvLyBNYWtlIGEgUE9TVCByZXF1ZXN0IHRvIHlvdXIgY29udHJvbGxlciBlbmRwb2ludFxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0gJC5hamF4KHtcclxuICAgICAgICAgICAgdXJsOiByZW1vdmVBc3NpZ25tZW50RW5kcG9pbnQsXHJcbiAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgRW1haWw6IHVzZXJFbWFpbCxcclxuICAgICAgICAgICAgICAgIEFjY291bnROdW1iZXI6IGRhdGFJdGVtLmFjY291bnROdW1iZXIsXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgIC8vIFJlbW92ZSB0aGUgZGF0YSBpdGVtIGZyb20gdGhlIGdyaWQncyBk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GpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChjYi5pcygnOmNoZWNrZWQnKSkge1xyXG4gICAgICAgICAgICAgICAgLy8gcG9wdWxhdGUgYWNjb3VudFxyXG4gICAgICAgICAgICAgICAgbGV0IGFjY291bnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWNjb3VudE51bWJlcjogY2IuZGF0YSgnaWQnKSxcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiB0aGUgYWNjb3VudCBpcyBpbiB0aGUgYXJyYXkgYWxyZWFkeVxyXG4gICAgICAgICAgICAgICAgdmFyIGV4aXN0cyA9IHNlbGVjdGVkQWNjb3VudE51bWJlcnMuZmluZCh4ID0+IHguYWNjb3VudE51bWJlciA9PT0gYWNjb3VudC5hY2NvdW50TnVtYmVyKTtcclxuICAgICAgICAgICAgICAgIGlmICghZXhpc3RzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRBY2NvdW50TnVtYmVycy5wdXNoKGFjY291bnQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHZhciBhY2NvdW50TnVtYmVyc0FycmF5ID0gc2VsZWN0ZWRBY2NvdW50TnVtYmVycy5tYXAob2JqID0+IG9iai5hY2NvdW50TnVtYmVyLnRvU3RyaW5nKCkpO1xyXG5cclxuICAgICAgICB2YXIgcmVxdWVzdCA9ICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogcmVtb3ZlQ2hlY2tlZEFzc2lnbm1lbnRzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgRW1haWw6IHVzZXJFbWFpbCxcclxuICAgICAgICAgICAgICAgIEFjY291bnROdW1iZXJzOiBhY2NvdW50TnVtYmVyc0FycmF5LFxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG5cclxuICAgICAgICAgICAgdmFyIGNoZWNrZWRSb3dzID0gW107XHJcbiAgICAgICAgICAgICRhY2NvdW50c0dyaWQudGJvZHkuZmluZChcImlucHV0W3R5cGU9J2NoZWNrYm94J106Y2hlY2tlZFwiKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciByb3cgPSAkKHRoaXMpLmNsb3Nlc3QoXCJ0clwiKTtcclxuICAgICAgICAgICAgICAgIHZhciBkYXRhSXRlbSA9ICRhY2NvdW50c0dyaWQuZGF0YUl0ZW0ocm93KTtcclxuICAgICAgICAgICAgICAgIGNoZWNrZWRSb3dzLnB1c2goZGF0YUl0ZW0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIC8vIFJlbW92ZSBDaGVja2VkIFJvd3NcclxuICAgICAgICAgICAgY2hlY2tlZFJvd3MuZm9yRWFjaChmdW5jdGlvbiAoZGF0YUl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICRhY2NvdW50c0dyaWQucmVtb3ZlUm93KCRhY2NvdW50c0dyaWQudGJvZHkuZmluZChcInRyW2RhdGEtdWlkPSdcIiArIGRhdGFJdGVtLnVpZCArIFwiJ11cIikpO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICRhY2NvdW50c0dyaWQucmVmcmVzaCgpOyAvLyBSZWZyZXNoIHRoZSBncmlkIHRvIHJlZmxlY3QgdGhlIGNoYW5nZXNcclxuXHJcbiAgICAgICAgICAgIGdlbmVyYWxMaWJyYXJ5LmFkZFN1Y2Nlc3NNZXNzYWdlKCcuc3VjY2Vzcy1tZXNzYWdlJywgbmFtZXNwYWNlLCBkYXRhKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uIChlcnIpIHtcclxuXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gQWRkQ2hlY2tlZEFjY291bnQoKSB7XHJcblxyXG4gICAgICAgIC8vIGdldCBjaGVja2VkIHJvdy9zIGZyb20gJHNlYXJjaFJlc3VsdHNHcmlkXHJcbiAgICAgICAgdmFyIGNoZWNrZWRSb3dzID0gW107XHJcbiAgICAgICAgJHNlYXJjaFJlc3VsdHNHcmlkLnRib2R5LmZpbmQoXCJpbnB1dFt0eXBlPSdjaGVja2JveCddOmNoZWNrZWRcIikuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciByb3cgPSAkKHRoaXMpLmNsb3Nlc3QoXCJ0clwiKTtcclxuICAgICAgICAgICAgdmFyIGRhdGFJdGVtID0gJHNlYXJjaFJlc3VsdHNHcmlkLmRhdGFJdGVtKHJvdyk7XHJcbiAgICAgICAgICAgIGNoZWNrZWRSb3dzLnB1c2goZGF0YUl0ZW0uQWNjb3VudE51bWJlcik7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogc2V0QXNzaWdubWVudHNFbmRwb2ludCxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICBFbWFpbDogdXNlckVtYWlsLFxyXG4gICAgICAgICAgICAgICAgQXNzaWduZWRBY2NvdW50czogY2hlY2tlZFJvd3MsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXNwb25zZSkge1xyXG4gICAgICAgICAgICAgICAgcG9wdWxhdGVBbmRSZWZ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ICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSwgMTIwMCk7XHJcblxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHBvcHVsYXRlQW5kUmVmcmVzaEdyaWQocmVzcG9uc2UpIHtcclxuICAgICAgICAvLyBDbGVhciB0aGUgZXhpc3RpbmcgZGF0YVxyXG4gICAgICAgICRhY2NvdW50c0dyaWQuZGF0YVNvdXJjZS5kYXRhKFtdKTtcclxuXHJcbiAgICAgICAgLy8gTWFwIHRoZSBmaWVsZHMgYW5kIGFkZCB0aGUgbmV3IGRhdGEgdG8gdGhlIERhdGFTb3VyY2VcclxuICAgICAgICB2YXIgbWFwcGVkRGF0YSA9IHJlc3BvbnNlLkFjY291bnRBc3NpZ25tZW50cy5tYXAoZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIGFjY291bnRJZDogaXRlbS5BY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICBhY2NvdW50TnVtYmVyOiBpdGVtLkFjY291bnROdW1iZXIsXHJcbiAgICAgICAgICAgICAgICBhY2NvdW50TmFtZTogaXRlbS5BY2NvdW50TmFtZSxcclxuICAgICAgICAgICAgICAgIHBhcmVudEFjY291bnQ6IGl0ZW0uUGFyZW50QWNjb3VudCxcclxuICAgICAgICAgICAgICAgIGNpdHk6IGl0ZW0uQ2l0eSxcclxuICAgICAgICAgICAgICAgIHN0YXRlOiBpdGVtLlN0YXRlXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIEFkZCBlYWNoIGl0ZW0gaW4gdGhlIG1hcHBlZERhdGEgYXJyYXkgdG8gdGhlIGRhdGFTb3VyY2VcclxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA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Zvcm0gPSB3aW5kb3cualF1ZXJ5KCcjY3JlYXRlVXNlckZvcm0nLCBuYW1lc3BhY2UpOyBcclxuXHJcbiAgICAgICAgZnVuY3Rpb24gU2VhcmNoRm9yQWNjb3VudHMoKSB7XHJcbiAgICAgICAgICAgIFJlbW92ZVNlYXJjaFJlc3VsdHMoKTtcclxuXHJcbiAgICAgICAgICAgIGlmICgkY3V0b21lclNlYXJjaFZhbHVlLnZhbCgpLnRyaW0oKS5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAkd2FpdGluZy5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICB2YXIgZ2V0QWNjb3VudHNFbmRwb2ludCA9ICQoXCIjZ2V0QWNjb3VudHNFbmRwb2ludFwiLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPVxyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogZ2V0QWNjb3VudHNFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZU9yTnVtYmVyOiAkY3V0b21lclNlYXJjaFZhbHVlLnZhbCgpLnRyaW0oKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkYWRkQXNzaWdubWVudFRhYmxlLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGFkZEFzc2lnbm1lbnRCdXR0b24uc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLm1hcChmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGN1c3RvbWVyQWNjb3VudHNGb3JBc3NpZ25tZW50LmFwcGVuZCgnXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0cj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGRhdGEtaWQ9XCInICsgaXRlbS5DdXN0b21lck51bWJlciArICdcIiBkYXRhLWN1c3RvbWVybmFtZT1cIicgKyBpdGVtLkN1c3RvbWVyTmFtZSArICdcIiBkYXRhLWNpdHk9XCInICsgaXRlbS5DaXR5ICsgJ1wiIGRhdGEtc3RhdGU9XCInICsgaXRlbS5TdGF0ZSArICdcIiBjbGFzcz1cImFjY291bnRUb0Fzc2lnblwiIC8+PC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JyArIGl0ZW0uQ3VzdG9tZXJOdW1iZXIgKyAnPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JyArIGl0ZW0uQ3VzdG9tZXJOYW1lICsgJzwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPicgKyBpdGVtLkNpdHkgKyAnPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JyArIGl0ZW0uU3RhdGUgKyAnPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgJHdhaXRpbmcuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIEFkZEFzc2lnbmVkQWNjb3VudCgpIHtcclxuICAgICAgICAgICAgJCgnLmFjY291bnRUb0Fzc2lnbjpjaGVja2VkJykuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAkYXNzaWduZWRBY2NvdW50cy52YWwoKCRhc3NpZ25lZEFjY291bnRzLnZhbCgpICsgJywnICsgJCh0aGlzKS5kYXRhKFwiaWRcIikpLnRyaW0oXCIsXCIpKTtcclxuXHJcbiAgICAgICAgICAgICAgICAkYXNzaWduZWRBY2NvdW50c0Rpc3BsYXlEYXRhLmFwcGVuZCgnXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGRhdGEtaWQ9XCInICsgJCh0aGlzKS5kYXRhKFwiaWRcIikgKyAnXCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+PGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGNsYXNzPVwiYXNzaWduZWRBY2NvdW50XCIgZGF0YS1pZD1cIicgKyAkKHRoaXMpLmRhdGEoXCJpZFwiKSArICdcIiAvPjwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JyArICQodGhpcykuZGF0YShcImlkXCIpICsgJzwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JyArICQodGhpcykuZGF0YShcImN1c3RvbWVybmFtZVwiKSArICc8L3RkPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPicgKyAkKHRoaXMpLmRhdGEoXCJjaXR5XCIpICsgJzwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+JyArICQodGhpcykuZGF0YShcInN0YXRlXCIpICsgJzwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+Jyk7XHJcblxyXG4gICAgICAgICAgICAgICAgJG5vQXNzaWdubWVudHNFcnJvci5oaWRlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgUmVtb3ZlU2VhcmNoUmVzdWx0cygpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gUmVtb3ZlQXNzaWduZWRBY2NvdW50KCkge1xyXG4gICAgICAgICAgICAkKCcuYXNzaWduZWRBY2NvdW50OmNoZWNrZWQnKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBvbGRWYWwgPSAkYXNzaWduZWRBY2NvdW50cy52YWwoKS50b1N0cmluZygpO1xyXG4gICAgICAgICAgICAgICAgdmFyIGlkID0gJCh0aGlzKS5kYXRhKFwiaWRcIikudG9TdHJpbmcoKTtcclxuICAgICAgICAgICAgICAgIHZhciBuZXdWYWwgPSBvbGRWYWwucmVwbGFjZShpZCwgXCJcIikucmVwbGFjZShcIiwsXCIsIFwiLFwiKS50cmltKFwiLFwiKTtcclxuICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgJGFzc2lnbmVkQWNjb3VudHMudmFsKG5ld1ZhbCk7XHJcbiAgICAgICAgICAgICAgICAkKHRoaXMpLmNsb3Nlc3QoJ3RyJykucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gUmVtb3ZlU2VhcmNoUmVzdWx0cygpIHtcclxuICAgICAgICAgICAgJGFkZEFzc2lnbm1lbnRUYWJs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gICAgICAvLyBjYWxsIHNob3BwaW5nIGNhcnQgYXBpXHJcbiAgICAgICAgICAgIFNob3BwaW5nQ2FydEFwaS5hZGRJdGVtVG9DYXJ0KGFjY291bnRJZCwgY29kZSwgcXR5LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgdmFyIHByaWNlID0galF1ZXJ5KHRoaXMpLmRhdGEoJ2l0ZW1QcmljZScpO1xyXG4gICAgICAgICAgICB2YXIgaXRlbU5hbWUgPSBqUXVlcnkodGhpcykuZGF0YSgnbmFtZScpO1xyXG4gICAgICAgICAgICB2YXIgbWFudWZhY3R1cmVyID0galF1ZXJ5KHRoaXMpLmRhdGEoJ21hbnVmYWN0dXJlcicpO1xyXG4gICAgICAgICAgICB2YXIgcHJpbWFyeUNhdGVnb3J5ID0galF1ZXJ5KHRoaXMpLmRhdGEoJ3ByaW1hcnlDYXRlZ29yeScpO1xyXG4gICAgICAgICAgICB2YXIgc3ViQ2F0ZWdvcnkgPSBqUXVlcnkodGhpcykuZGF0YSgnc3ViQ2F0ZWdvcnknKTtcclxuICAgICAgICAgICAgbGlicmFyeS50cmFja0FkZFRvQ2FydChjb2RlLCBxdHksIHByaWNlLCBpdGVtTmFtZSwgbWFudWZhY3R1cmVyLCBwcmltYXJ5Q2F0ZWdvcnksIHN1YkNhdGVnb3J5KTtcclxuICAgICAgICB9KTtcclxuXHJcblxyXG4gICAgICAgIC8vLS0tLS0gSW5pdCBjYXJvdXNlbHNcclxuICAgICAgICBqUXVlcnkoJy5vd2wtY2Fyb3VzZWwnLCBuYW1lc3BhY2UpLm93bENhcm91c2VsKFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBuYXY6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgbG9vcDogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBkb3RzOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgbWFyZ2luOiAxMCxcclxuICAgICAgICAgICAgICAgIHJlc3BvbnNpdmU6XHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgMDogeyBpdGVtczogMSB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDYwMDogeyBpdGVtczogMiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDkwMDogeyBpdGVtczogMyB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDEzMDA6IHsgaXRlbXM6IDQgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgalF1ZXJ5KCcudHJhY2stdmlldy1pdGVtJywgbmFtZXNwYWNlKS5vbignY2xpY2snLCBmdW5jdGlvbiAobGluaykge1xyXG4gICAgICAgICAgICB2YXIgc2t1ID0gJChsaW5rKS5kYXRhKCdpdGVtLXNrdScpO1xyXG4gICAgICAgICAgICB2YXIgcHJpY2UgPSAkKGxpbmspLmRhdGEoJ2l0ZW0tcHJpY2UnKTtcclxuICAgICAgICAgICAgdmFyIGRpc3BsYXlOYW1lID0gJChsaW5rKS5kYXRhKCdpdGVtLWRpc3BsYXktbmFtZScpO1xyXG4gICAgICAgICAgICB2YXIgbWFudWZhY3R1cmVyID0gJChsaW5rKS5kYXRhKCdtYW51ZmFjdHVyZXInKTtcclxuICAgICAgICAgICAgdmFyIHByaW1hcnlDYXRlZ29yeSA9ICQobGluaykuZGF0YSgncHJpbWF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TtcclxuXHJcbiAgICAgICAgICAgIHZhciBsaW5rID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgdmFyIGFjY291bnRJZCA9IGpRdWVyeSh0aGlzKS5kYXRhKCdhY2NvdW50LWlkJyk7XHJcbiAgICAgICAgICAgIHZhciBjb2RlID0galF1ZXJ5KHRoaXMpLmRhdGEoJ3BpZCcpO1xyXG4gICAgICAgICAgICB2YXIgcXVhbnRpdHkgPSAxO1xyXG5cclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gTGlua0FuaW1hdG9yLnN0YXJ0QW5pbWF0aW9uKCdBZGRpbmcuLi4nLCBsaW5rKTtcclxuXHJcbiAgICAgICAgICAgIC8vIGNhbGwgcXVpY2sgb3JkZXIgYXBpXHJcbiAgICAgICAgICAgIFF1aWNrT3JkZXJBcGkuYWRkVG9RdWlja09yZGVyKGFjY291bnRJZCwgY29kZSwgcXVhbnRpdHksXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIExpbmtBbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICBMaW5rQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJFcnJvciFcIik7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBtYWdpYyB6b29tIDM2MCBldmVudHNcclxuICAgICAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2xpY2snLCAnI2Rlc2t0b3AtMzYwL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yXG4gICAgICAgICAgICBzd2l0Y2hab29tMzYwTW9iaWxlKHRoaXMpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpLm9uKCd0b3VjaHN0YXJ0JywgJyNtb2JpbGUtem9vbS1saW5rJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBzd2l0Y2hab29tMzYwTW9iaWxlKHRoaXMpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2xpY2snLCAnZGl2Lm90aGVyLWxvZ29zIGltZy5pY29uSW1hZ2UnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgc3BhbklkID0gXCJzcGFuSWNvblRleHRcIjtcclxuICAgICAgICAgICAgaWYgKGUudGFyZ2V0LnRpdGxlKSB7XHJcbiAgICAgICAgICAgICAgICBzcGFuSWQgPSBcInNwYW5JY29uVGV4dFwiICsgZS50YXJnZXQudGl0bGUucmVwbGFjZSgvXFxzL2csICcnKTtcclxuICAgICAgICAgICAgfSAgICAgICAgICAgIFxyXG4gICAgICAgICAgICB2YXIgZGlzcGxheUluU2Vjb25kcyA9IDI7XHJcblxyXG4gICAgICAgICAgICBqUXVlcnkodGhpcywgbmFtZXNwYWNlKS5jc3MoXCJkaXNwbGF5XCIsIFwibm9uZVwiKTtcclxuICAgICAgICAgICAgalF1ZXJ5KHRoaXMpLmFmdGVyKFwiPHNwYW4gaWQgPSAnXCIgKyBzcGFuSWQgKyBcIicgc3R5bGU9J21hcmdpbi1sZWZ0OjFweDtjb2xvcjpibHVlOyc+XCIgKyBlLnRhcmdldC5hbHQgKyBcIjwvc3Bhbj5cIik7XHJcblxyXG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgICQoXCIjXCIgKyBzcGFuSWQpLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KHRoaXMsIG5hbWVzcGFjZSkuY3NzKFwiZGlzcGxheVwiLCBcImlubGluZVwiKTtcclxuICAgICAgICAgICAgfSwgZGlzcGxheUluU2Vjb25kcyAqIDEwMDApO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBzd2l0Y2hab29tMzYwTW9iaWxlKGUpIHtcclxuICAgICAgICAgICAgdmFyIHpvb20gPSBlLmdldEF0dHJpYnV0ZSgnZGF0YS16b29tLWlkJykgPT0gJ21vYmlsZS1tYWluLWltYWdlJztcclxuXHJcbiAgICAgICAgICAgIGlmICh6b29tKSB7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoXCIjbW9iaWxlLXpvb20tYm94XCIsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KFwiI21vYmlsZS1zcGluLWJveFwiLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeShcIiNtb2JpbGUtem9vbS1ib3hcIiwgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoXCIjbW9iaWxlLXNwaW4tYm94XCIsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBzd2l0Y2hab29tMzYwRGVza3RvcChlKSB7XHJcbiAgICAgICAgICAgIHZhciB6b29tID0gZS5nZXRBdHRyaWJ1dGUoJ2RhdGEtem9vbS1pZCcpID09ICdkZXNrdG9wLW1haW4taW1hZ2UnO1xyXG5cclxuICAgICAgICAgICAgaWYgKHpvb20pIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeShcIiNkZXNrdG9wLXpvb20tYm94XCIsIG5hbWVzcGFjZSkuc2hvdygpO1x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iAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIFxyXG4gICAgICAgIC8vLS0tLS0gSW5pdCBwYXJ0cyBjYXJvdXNlbFxyXG4gICAgICAgIGpRdWVyeSgnLnBhcnRzLWNvbnRhaW5lcicsIG5hbWVzcGFjZSkub3dsQ2Fyb3VzZWwoXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIG5hdjogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBsb29wOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGRvdHM6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBtYXJnaW46IDQwLFxyXG4gICAgICAgICAgICAgICAgcmVzcG9uc2l2ZTpcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAwOiB7IGl0ZW1zOiAyIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgMzgwOiB7IGl0ZW1zOiAyIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgNTAwOiB7IGl0ZW1zOiAzIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgOTAwOiB7IGl0ZW1zOiA0IH0sXHJcbiAgICAgICAgICAgICAgICAgICAgMTMwMDogeyBpdGVtczogNCB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgYWRkIHRvIGNhcnRcclxuICAgICAgICBqUXVlcnkoJ2Zvcm0gaW5wdXRbIG5hbWU9cGFydHMtYWRkdG9jYXJ0IF0nLCBuYW1lc3BhY2UpLmNsaWNrKGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGJ1dHRvbiA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgIHZhciBtc2cgPSBqUXVlcnkoJ2lucHV0W25hbWU9YWRkaW5nTWVzc2FnZV0nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgY29kZSA9IGpRdWVyeSh0aGlzKS5wYXJlbnQoKS5maW5kKCdpbnB1dFsgbmFtZT1wcm9kdWN0aWQgXScpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgcXVhbnRpdHkgPSBqUXVlcnkodGhpcykucGFyZW50KCkuZmluZCgnaW5wdXRbIG5hbWU9cXVhbnRpdHkgIF0nKS52YWwoKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHVzZSBidXR0b24gYW5pbWF0b3JcclxuICAgICAgICAgICAgdmFyIGFuaW1hdGlvbiA9IEJ1dHRvbkFuaW1hdG9yLnN0YXJ0QW5pbWF0aW9uKCdBZGRpbmcuLi4nLCBidXR0b24pO1xyXG5cclxuICAgICAgICAgICAgLy8gY2FsbCBzaG9wcGluZyBjYXJ0IGFwaVxyXG4gICAgICAgICAgICBTaG9wcGluZ0NhcnRBcGkuYWRkSXRlbVRvQ2FydChhY2NvdW50SWQsIGNvZGUsIHF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgdmFyIGFjY291bnRJZCA9IGpRdWVyeSh0aGlzKS5wYXJlbnQoKS5maW5kKCdpbnB1dFsgbmF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LFxyXG4gICAgICAgICAgICBHcm91cEJ5Q3VzdG9tR0xDYXRlZ29yaWVzOiBncm91cEJ5Q2F0ZWdvcnksIC8vJCgnI0dyb3VwQnlDdXN0b21HTENhdGVnb3JpZXMnKS5wcm9wKCdjaGVja2VkJyksXHJcbiAgICAgICAgICAgIFNlbGVjdGVkU2hpcFRvSWQ6IGpRdWVyeSgnI1NlbGVjdGVkU2hpcFRvSWQnKS52YWwoKSxcclxuICAgICAgICAgICAgU2hpcHBpbmdNZXRob2Q6IGpRdWVyeSgnI1NoaXBwaW5nTWV0aG9kJykudmFsKClcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBqUXVlcnkuYWpheChcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgdHlwZTogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiB7ICdjaGVja291dFBhZ2VWaWV3TW9kZWwnOiBjaGVja291dFBhZ2VWaWV3TW9kZWwgfSxcclxuICAgICAgICAgICAgICAgIHVybDogc29ydEJ5Q3VzdG9tR0xDYXRlZ29yaWVzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjY2hlY2tvdXQtY2FydC1pdGVtcycpLmh0bWwocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiB2YWxpZGF0ZUlucHV0KCkge1xyXG4gICAgICAgIC8vIHZhbGlkYXRlIHBvIG51bWJlciByZXF1aXJlZFxyXG4gICAgICAgIHZhciBwb051bSA9IGpRdWVyeSgnI1B1cmNoYXNlT3JkZXJOdW1iZXInLCBuYW1lc3BhY2UpO1xyXG5cclxuICAgICAgICBpZiAocG9OdW0uZGF0YSgncG9yZXF1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IGZhbHNlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8tLS0tIEhhbmRsZSBDb21iaW5lZCBXYXJuaW5nIE1vZGFsIC0tLS0vL1xyXG4gICAgICAgICAgICAgICAgJCgnI2NvbWJpbmVkLXdhcm5pbmctbW9kYWwnLCBuYW1lc3BhY2UpLm1vZGFsKCdzaG93Jyk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh3aW5kb3cuaXNFbXBsb3llZVxyXG4gICAgICAgICAgICAgICAgJiYgc3BlY2lhbEluc3RydWN0aW9uICE9PSB1bmRlZmluZWRcclxuICAgICAgICAgICAgICAgICYmIHNwZWNpYWxJbnN0cnVjdGlvbiAhPT0gbnVsbFxyXG4gICAgICAgICAgICAgICAgJiYgc3BlY2lhbEluc3RydWN0aW9uLnRyaW0oKSAhPT0gJydcclxuICAgICAgICAgICAgICAgICYmIHNoaXBDb21wbGV0ZSAhPT0gdHJ1ZSkge1xyXG5cclxuICAgICAgICAgICAgICAgIC8vLS0tLSBIYW5kbGUgU3BlY2lhbCBJbnN0cnVjdGlvbnMgTW9kYWwgLS0tLS8vXHJcbiAgICAgICAgICAgICAgICAkKCcjc3BlY2lhbC1pbnN0cnVjdGlvbnMtbW9kYWwnLCBuYW1lc3BhY2UpLm1vZGFsKCdzaG93Jyk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh3aW5kb3cuaXNFbXBsb3llZVxyXG4gICAgICAgICAgICAgICAgJiYgc2hpcENvbXBsZXRlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8tLS0tIEhhbmRsZSBTaGlwIENvbXBsZXRlIE1vZGFsIC0tLS0vL1xyXG4gICAgICAgICAgICAgICAgJCgnI3NoaXAtY29tcGxldGUtbW9kYWwnLCBuYW1lc3BhY2Up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QW5pbWF0aW9uKCdBcHBseWluZy4uLicsIGJ1dHRvbik7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgalF1ZXJ5KCcuY291cG9uY29kZS1lcnJvcicsIG5hbWVzcGFjZSkuaGlkZSgpO1xyXG4gICAgICAgICAgICBqUXVlcnkuYWpheChcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiBnZXRDaGVja291dFBhZ2VWaWV3TW9kZWwoKSxcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IGFkZENvdXBvbkNvZGVFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ICE9PSBmYWxzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuQ2hhZHdlbGwtUGFnZXMtQ2hlY2tvdXRQYWdlJykuaHRtbChyZXN1bHQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjYWRkLWNvdXBvbmNvZGUtYnV0dG9uJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQXBwbGllZCFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNyZW1vdmUtY291cG9uY29kZS1idXR0b24nLCBuYW1lc3BhY2UpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlSW5wdXQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLnJlbG9hZCgpOyAvL3RvIHJlLXBvcHVsYXRlIENyZWF0ZVRyYW5zYWN0aW9uTW9kYWwgZGF0YVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJFcnJvciFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNjb3Vwb25jb2RlJywgbmFtZXNwYWNlKS52YWwoXCJcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gLS0tLS0gSGFuZGxlIFJlbW92ZSBDb3Vwb24gQ29kZVxyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpLm9uKCdjbGljaycsICcjcmVtb3ZlLWNvdXBvbmNvZGUtYnV0dG9uJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ1JlbW92aW5nLi4uJywgYnV0dG9uKTtcclxuICAgICAgICAgICAgalF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogZ2V0Q2hlY2tvdXRQYWdlVmlld01vZGVsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiByZW1vdmVDb3Vwb25Db2RlRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiUmVtb3ZlZCFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLkNoYWR3ZWxsLVBhZ2VzLUNoZWNrb3V0UGFnZScpLmh0bWwocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjYWRkLWNvdXBvbmNvZGUtYnV0dG9uJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI3JlbW92ZS1jb3Vwb25jb2RlLWJ1dHRvbicsIG5hbWVzcGFjZSkuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWxpZGF0ZUlucHV0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLnJlbG9hZCgpOyAvL3RvIHJlLXBvcHVsYXRlIENyZWF0ZVRyYW5zYWN0aW9uTW9kYWwgZGF0YVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgVG9nZ2xlIHN1YnRvdGFsc1xyXG4gICAgICAgIGpRdWVyeSgnLnN1YnRvdGFsLXdyYXBwZXInLCBuYW1lc3BhY2UpLm9uKCdjbGljaycsXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLm1hcmdpbi13cmFwcGVyJywgbmFtZSkudG9nZ2xlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICA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lOb3RlcycpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgU3BlY2lhbEluc3RydWN0aW9uczogalF1ZXJ5KCcjc3BlY2lhbEluc3RydWN0aW9ucycpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgR3JvdXBCeUN1c3RvbUdMQ2F0ZWdvcmllczogZ3JvdXBCeUNhdGVnb3J5LFxyXG4gICAgICAgICAgICAgICAgU2hpcHBpbmdNZXRob2Q6ICQoJ2lucHV0LlJhZGlvQnV0dG9uOmNoZWNrZWQnKS52YWwoKSxcclxuICAgICAgICAgICAgICAgIFNlbGVjdGVkU2hpcFRvSWQ6IGpRdWVyeSgnI1NlbGVjdGVkU2hpcFRvSWQnKS52YWwoKSxcclxuICAgICAgICAgICAgICAgIEZ1dHVyZVNoaXBwaW5nRGF0ZTogalF1ZXJ5KCcjRnV0dXJlU2hpcHBpbmdEYXRlJywgbmFtZXNwYWNlKS52YWwoKSxcclxuICAgICAgICAgICAgICAgIFNoaXBDb21wbGV0ZTogJCgnI1NoaXBDb21wbGV0ZScpLmlzKFwiOmNoZWNrZWRcIiksXHJcbiAgICAgICAgICAgICAgICBFbWVyZ2VuY3lTaGlwbWVudDogJCgnI0VtZXJnZW5jeVNoaXBtZW50JykuaXMoXCI6Y2hlY2tlZFwiKVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgalF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogeyAnY2hlY2tvdXRQYWdlVmlld01vZGVsJzogY2hlY2tvdXRQYWdlVmlld01vZGVsIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZXRTaGlwVG9FbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLkNoYWR3ZWxsLVBhZ2VzLUNoZWNrb3V0UGFnZScpLmh0bWwocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdEhhbmRsZXJzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlSW5wdXQoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBPbiBDcmVhdGUgVHJhbnNhY3Rpb24gTW9kYWwgU2hvd25cclxuICAgICAgICBqUXVlcnkoJyNjcmVhdGUtdHJhbnNhY3Rpb24tbW9kYWwnLCBuYW1lc3BhY2UpXHJcbiAgICAgICAgICAgIC5vbignc2hvdy5icy5tb2RhbCcsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBnZXQgdG90YWxzXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHN1YnRvdGFsID0gd2luZG93LnRvdGFsc01vZGVsLlN1YlRvdGFsLkFtb3VudDtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZGlzY291bnQgPSB3aW5kb3cudG90YWxzTW9kZWwuRGlzY291bnRUb3RhbC5BbW91bnQ7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRheCA9IHdpbmRvdy50b3RhbHNNb2RlbC5UYXhUb3RhbC5BbW91bnQ7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIHNldCBtb2RhbCB2YWx1ZXNcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNjcmVhdGUtdHJhbnNhY3Rpb24tbW9kYWwgI3RyYW5zYWN0aW9uLXRvdGFsJykudmFsKGFtb3VudFRvQXV0aG9yaXplKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gc2V0IHBheW1lbnQgcmV2aWV3XHJcbi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GF0YSgncm93aW5kZXgnKTtcclxuICAgICAgICAgICAgICAgICRpdGVtTnVtYmVyID0galF1ZXJ5KHRoaXMpLmRhdGEoJ2l0ZW1udW1iZXInKTtcclxuICAgICAgICAgICAgICAgIGlzQ3VzdG9tQ3V0Q2hlY2sgPSAkKHRoaXMpLmlzKFwiOmNoZWNrZWRcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyICR0ZXh0Qm94ID0galF1ZXJ5KCcuY3VzdG9tQ3V0IC5jdXN0b20tY3V0LXNwZWNpZmljYXRpb25bZGF0YS1yb3dpbmRleD1cIicgKyByb3dJbmRleCArICdcIl0nLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgICAgICAgICAgJG1lc3NhZ2UgPSBqUXVlcnkoJyNzYXZpbmctbm90aWZpY2F0aW9uW2RhdGEtcm93aW5kZXg9XCInICsgcm93SW5kZXggKyAnXCJdJywgbmFtZXNwYWNlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAkdGV4dEJveC50b2dnbGUoaXNDdXN0b21DdXRDaGVjayk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCFpc0N1c3RvbUN1dENoZWNrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJG1lc3NhZ2UudG9nZ2xlKGlzQ3VzdG9tQ3V0Q2hlY2spO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGRhdGEgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgSXRlbU51bWJlcjogJGl0ZW1OdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgcm93SW5kZXg6IHJvd0luZGV4XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZGF0YTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vSGFuZGxlIEN1c3RvbUN1dCBTYXZlXHJcbiAgICAgICAgJCgnLmN1c3RvbUN1dCAuY3VzdG9tLWN1dC1zcGVjaWZpY2F0aW9uJykub24oZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIH0pLmJsdXIoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBjdXN0b21DdXRTcGVjaWZpY2F0aW9uID0gJCh0aGlzKS52YWwoKTtcclxuICAgICAgICAgICAgJG1lc3NhZ2UgPSBqUXVlcnkoJyNzYXZpbmctbm90aWZpY2F0aW9uW2RhdGEtcm93aW5kZXg9XCInICsgcm93SW5kZXggKyAnXCJdJywgbmFtZXNwYWNlKTtcclxuICAgICAgICAgICAgalF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogeyBpdGVtTnVtYmVyOiBkYXRhLkl0ZW1OdW1iZXIsIGN1c3RvbUN1dFNwZWNpZmljYXRpb246IGN1c3RvbUN1dFNwZWNpZmljYXRpb24gfSxcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVwZGF0ZUN1c3RvbUN1dFNwZWNpZmljYXRpb25FbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRtZXNzYWdlLnRvZ2dsZShyZXN1bHQpLmZhZGVPdXQoMzAwMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBTdWJtaXRDaGVja291dEZvcm0oKSB7XHJcbiAgICAgICAgbGlicmFyeS5Qcm9jZXNzaW5nQnV0dG9uKGpRdWVyeShcIiNjaGVja291dC1mb3JtLWJ1dHRvblwiLCBu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lvbjoge1xyXG4gICAgICAgICAgICAgICAgYW5pbWF0aW9uOiAnc2xpZGUtdmVydGljYWwnLCAvLyBFZmZlY3Qgb24gbmF2aWdhdGlvbiwgbm9uZS9mYWRlL3NsaWRlLWhvcml6b250YWwvc2xpZGUtdmVydGljYWwvc2xpZGUtc3dpbmdcclxuICAgICAgICAgICAgICAgIHNwZWVkOiAnNDAwJywgLy8gVHJhbnNpb24gYW5pbWF0aW9uIHNwZWVkXHJcbiAgICAgICAgICAgICAgICBlYXNpbmc6ICcnIC8vIFRyYW5zaXRpb24gYW5pbWF0aW9uIGVhc2luZy4gTm90IHN1cHBvcnRlZCB3aXRob3V0IGEgalF1ZXJ5IGVhc2luZyBwbHVnaW5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAga2V5Ym9hcmQ6IHtcclxuICAgICAgICAgICAgICAgIGtleU5hdmlnYXRpb246IGZhbHNlLFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBhbmNob3I6IHtcclxuICAgICAgICAgICAgICAgIGVuYWJsZU5hdmlnYXRpb246IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgZW5hYmxlTmF2aWdhdGlvbkFsd2F5czogZmFsc2VcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgdG9vbGJhcjoge1xyXG4gICAgICAgICAgICAgICAgc2hvd05leHRCdXR0b246IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgc2hvd1ByZXZpb3VzQnV0dG9uOiBmYWxzZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIFdpemFyZCBTdGVwc1xyXG4gICAgICAgICR3aXphcmQub24oJ3Nob3dTdGVwJywgZnVuY3Rpb24gKGUsIGFuY2hvck9iamVjdCwgc3RlcE51bWJlciwgc3RlcERpcmVjdGlvbiwgc3RlcFBvc2l0aW9uKSB7XHJcbiAgICAgICAgICAgIC8vIGdldCBzdGVwIGRldGFpbHNcclxuICA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Zm9ybSB2YWxpZGF0aW9ucyBwZXIgc3RlcFxyXG4gICAgICAgICAgICBjb25zdCBjdXJyZW50U3RlcCA9IGdldEN1cnJlbnRXaXphcmRTdGVwKCk7XHJcblxyXG4gICAgICAgICAgICBpZiAoY3VycmVudFN0ZXAgPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCQoJyNwcm9wZXJ0eS1mb3JtJywgbmFtZXNwYWNlKS52YWxpZCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUNoYW5nZXMoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50U3RlcCA9PSAxKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoJCgnI3NoaXBwaW5nLWFkZHJlc3MtZm9ybScsIG5hbWVzcGFjZSkudmFsaWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmb3JtRGF0YSA9IGdldEZvcm1EYXRhKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpcHBpbmdBZGRyZXNzID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBBZGRyZXNzX0xpbmVfMTogZm9ybURhdGEuU2hpcHBpbmdBZGRyZXNzMSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQWRkcmVzc19MaW5lXzI6IGZvcm1EYXRhLlNoaXBwaW5nQWRkcmVzczIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIENpdHk6IGZvcm1EYXRhLlNoaXBwaW5nQ2l0eSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgWmlwOiBmb3JtRGF0YS5TaGlwcGluZ1ppcENvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlZ2lvbjogZm9ybURhdGEuU2hpcHBpbmdTdGF0ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ291bnRyeTogXCJVU1wiXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlQWRkcmVzc09uU2VydmVyKHNoaXBwaW5nQWRkcmVzcywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudFN0ZXAgPT0gMikge1xyXG4gICAgICAgICAgICAgICAgaWYgKCQoJyNiaWxsaW5nLWFkZHJlc3MtZm9ybScsIG5hbWVzcGFjZSkudmFsaWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRJc0JpbGxpbmdTYW1lQXNTaGlwcGluZ0NoZWNrZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiBiaWxsaW5nIGlzIHRoZSBzYW1lIGFzIHNoaXBwaW5nLCB0aGVuIGp1c3QgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNhdmUgY2hhbmdlcyBhbmQgbW92ZSB0byB0aGUgbmV4dCBwYWdlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVDaGFuZ2VzKGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZm9ybURhdGEgPSBnZXRGb3JtRGF0YSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBiaWxsaW5nQWRkcmVzcyA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFkZHJlc3NfTGluZV8xOiBmb3JtRGF0YS5CaWxsaW5nQWRkcmVzczEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBBZGRyZXNzX0xpbmVfMjogZm9ybURhdGEuQmlsbGluZ0FkZHJlc3MyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2l0eTogZm9ybURhdGEuQmlsbGluZ0NpdHksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBaaXA6IGZvcm1EYXRhLkJpbGxpbmdaaXBDb2RlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVnaW9uOiBmb3JtRGF0YS5CaWxsaW5nU3RhdGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb3VudHJ5OiBcIlVTXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWxpZGF0ZUFkZHJlc3NPblNlcnZlcihiaWxsaW5nQWRkcmVzcywgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50U3RlcCA9PSAzKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoJCgnI2NvbnRhY3QtZm9ybScsIG5hbWVzcGFjZSkudmFsaWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlUGhvbmVOdW1iZXJPblNlcnZlcigpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gc2F2ZSBjaGFuZ2VzICYgc3VibWl0IHRvIFNhbGVzUGFkXHJcbiAgICAgICAgICAgICAgICBzYXZlQ2hhbmdlcyh0cnVlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBwcmV2aW91cyBzdGVwIGJ1dHRvblxyXG4gICAgICAgICRwcmV2aW91c1N0ZXBCdXR0b24ub24oJ2NsaWNrJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAkKCcjc21hcnR3aXphcmQnLCBuYW1lc3BhY2UpLnNtYXJ0V2l6YXJkKFwicHJldlwiKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gbGFuZGluZyBwYWdlIGJ1dHRvblxyXG4gICAgICAgICQoJy52aWV3LXN0YXR1cycsIG5hbWVzcGFjZSkub24oJ2NsaWNrJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB1cGRhdGVQYWdlU3RhdGUoc3RhdGVMYW5kaW5nUGFnZSk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIG5ldyB3aXphcmQgYnV0dG9uXHJcbiAgICAgICAgJCgnLm5ldy1mb3JtLXdpemFyZCcsIG5hbWVzcGFjZSkub24oJ2NsaWNrJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICBzdGFydE5ld0Zvcm0oKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gY29udGludWUgd2l6YXJkIGJ1dHRvblxyXG4gICAgICAgICQobmFtZXNwYWNlKS5vbignY2xpY2snLCAnLmNvbnRpbnVlLXdpemFyZC1mb3JtJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB2YXIgaWQgPSAkKHRoaXMpLmRhdGEoJ2lkJyk7XHJcbiAgICAgICAgICAgIGNvbnRpbnVlRm9ybShpZCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGNhbmNlbCB3aXphcmQgYnV0dG9uXHJcbiAgICAgICAgJChuYW1lc3BhY2UpLm9uKCdjbGljaycsICcuY2FuY2VsLWFjY291bnQnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgaWQgPSAkKCcjYWNjb3VudElkJywgbmFtZXNwYWNlKS52YWwoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChpZCA9PT0gMCB8fCBpZCA9PT0gbnVsbCB8fCBpZCA9PT0gdW5kZWZpbmVkIHx8IGlkID09PSAnJykge1xyXG4gICAgICAgICAgICAgICAgLy8gbm8gYWNjb3VudCBoYXMgYmVlbiBzYXZlZCB5ZXQsIHNvIGp1c3QgZ28gYmFjayB0byB0aGUgbGFuZGluZyBwYWdlXHJcbiAgICAgICAgICAgICAgICB1cGRhdGVQYWdlU3RhdGUoc3RhdGVMYW5kaW5nUGFnZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvLyB3ZSBuZWVkIHRvIGRlbGV0ZSB0aGUgYWNjb3VudCBpbiB0aGUgZGJcclxuICAgICAgICAgICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cudXJscy5EZWxldGVDb3VydGVzeUFjY291bnRVcmwsXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlkXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5zdWNjZXNzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciB0aGUgaW5wdXQgZmllbGRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNhY2NvdW50SWQnLCBuYW1lc3BhY2UpLnZhbCgnJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWNjb3VudCBoYXMgYmVlbiBkZWxldGVkLCBzbyBnbyBiYWNrIHRvIHRoZSBsYW5kaW5nIHBhZ2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVBhZ2VTdGF0ZShzdGF0ZUxhbmRpbmdQYWdlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVycm9yIGRlbGV0aW5nIGFjY291bnRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dFcnJvck1lc3NhZ2UoXCJFcnJvciBjYW5jZWxsaW5nIGFjY291bnRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yOiBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBlcnJvciBkZWxldGluZyBhY2NvdW50XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNob3dFcnJvck1lc3NhZ2UoXCJFcnJvciBjYW5jZWxsaW5nIGFjY291bnRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gcmUtc3VibWl0IGJ1dHRvblxyXG4gICAgICAgICQobmFtZXNwYWNlKS5vbignY2xpY2snLCAnLnJlc3VibWl0LXdpemFyZC1mb3JtJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGlkID0gJCh0aGlzKS5kYXRhKCdpZCcpO1xyXG4gICAgICAgICAgICBpZiAoIWlkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy51cmxzLlJlc3VibWl0Q291cnRlc3lBY2NvdW50VXJsLFxyXG4gICAgICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpZCxcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50TGluazogJCgnI2NvbnRlbnRMaW5rJywgbmFtZXNwYWNlKS52YWwoKVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuc3VjY2Vzcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhY2NvdW50IGhhcyBiZWVuIHJlLXN1Ym1pdHRlZCwgc28gZ28gYmFjayB0byB0aGUgbGFuZGluZyBwYWdlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVBhZ2VTdGF0ZShzdGF0ZUxhbmRpbmdQYWdlKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBlcnJvciBkZWxldGluZyBhY2NvdW50XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNob3dFcnJvck1lc3NhZ2UoXCJFcnJvciByZS1zdWJtaXR0aW5nIGFjY291bnRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGVycm9yOiBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGVycm9yIGRlbGV0aW5nIGFjY291bnRcclxuICAgICAgICAgICAgICAgICAgICBzaG93RXJyb3JNZXNzYWdlKFwiRXJyb3IgcmUtc3VibWl0dGluZyBhY2NvdW50XCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gYmlsbGluZyBzYW1lIGFzIHNoaXBwaW5nXHJcbiAgICAgICAgJCgnI2lzQmlsbGlu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GFnZVVybDtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBzZWFyY2hNYW5hZ2VtZW50Q29tcGFuaWVzKHNlYXJjaFZhbHVlKSB7XHJcbiAgICAgICAgdmFyIHJlcXVlc3REYXRhID0geyBzZWFyY2hWYWx1ZTogc2VhcmNoVmFsdWUgfVxyXG4gICAgICAgIC8vIGNhbGwgYWpheFxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICB1cmw6IHdpbmRvdy51cmxzLk1hbmFnZW1lbnRDb21wYW55VXJsLFxyXG4gICAgICAgICAgICBkYXRhOiByZXF1ZXN0RGF0YSxcclxuICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIHNlYXJjaE1hbmFnZW1lbnRDb21wYW5pZXNEYXRhU291cmNlLmRhdGEoZGF0YS5TZWFyY2hSZXN1bHRzKTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uIChlcnJvcikge1xyXG4gICAgICAgICAgICAgICAgc2hvd0Vycm9yTWVzc2FnZShcIkVycm9yIHNlYXJjaGluZyBtYW5hZ2VtZW50IGNvbXBhbmllc1wiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHNlYXJjaFNhbGVzcGVvcGxlKHNlYXJjaFZhbHVlKSB7XHJcbiAgICAgICAgdmFyIHJlcXVlc3REYXRhID0geyBzZWFyY2hWYWx1ZTogc2VhcmNoVmFsdWUgfTtcclxuICAgICAgICBqUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgIHVybDogd2luZG93LnVybHMuU2VhcmNoU2FsZXNwZW9wbGVVcmwsXHJcbiAgICAgICAgICAgIGRhdGE6IHJlcXVlc3REYXRhLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgc2VhcmNoU2FsZXNwZW9wbGVEYXRhU291cmNlLmRhdGEoZGF0YS5TZWFyY2hSZXN1bHRzKTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uIChlcnJvcikge1xyXG4gICAgICAgICAgICAgICAgc2hvd0Vycm9yTWVzc2FnZShcIkVycm9yIHNlYXJjaGluZyBzYWxlc3Blb3BsZVwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGluaXRMaXN0VmlldygpIHtcclxuXHJcbiAgICAgICAgLy8gQnVpbGQgS2VuZG8gRGF0YVNvdXJjZSBcclxuICAgICAgICBkYXRhU291cmNlID0gbmV3IGtlbmRvLmRhdGEuRGF0YVNvdXJjZSh7XHJcbiAgICAgICAgICAgIGRhdGE6IHdpbmRvdy5kYXRhLFxyXG4gICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIElkOiB7IHR5cGU6IFwibnVtYmVyXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgU2FsZXNwZXJzb25OYW1lOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQWNjb3VudE5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXM6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBDcmVhdGVkRGF0ZTogeyB0eXBlOiBcImRhdGVcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50TnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgSXNTZWxlY3RlZDogeyB0eXBlOiBcImJvb2xlYW5cIiB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIEJ1aWxkIExpc3QgVmlld1xyXG4gICAgICAgIGpRdWVyeSgnI2xpc3QtdmlldycsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLmtlbmRvTGlzdFZpZXcoe1xyXG4gICAgICAgICAgICAgICAgZGF0YVNvdXJjZTogZGF0YVNvdXJjZSxcclxuICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBrZW5kby50ZW1wbGF0ZShqUXVlcnkoXCIjbGlzdC12aWV3LXRlbXBsYXRlXCIsIG5hbWVzcGFjZSkuaHRtbCgpKVxyXG4gICAgICAgICAgICB9KS5kYXRhKCdrZW5kb0xpc3RWaWV3Jyk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gaW5pdEF1dG9Db21wbGV0ZXMoKSB7XHJcblxyXG4gICAgICAgIC8vIGluaXQgbWFuYWdlbWVudCBjb21wYW55IGRhdGEgc291cmNlXHJcbiAgICAgICAgc2VhcmNoTWFuYWdlbWVudENvbXBhbmllc0RhdGFTb3VyY2UgPSBuZXcga2VuZG8uZGF0YS5EYXRhU291cmNlKHtcclxuICAgICAgICAgICAgZGF0YTogW10sXHJcbiAgICAgICAgICAgIHNlcnZlckZpbHRlcmluZzogdHJ1ZSxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDdXN0b21lcl9OYW1lOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3VzdG9tZXJfTnVtOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ3JlZGl0U3BlY2lhbGlzdDogeyB0eXBlOiBcInN0cmluZ1wiIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGluaXQgbWFuYWdlbWVudCBjb21wYW55IHNlYXJjaFxyXG4gICAgICAgICQoJyNtYW5hZ2VtZW50Q29tcGFueU5hbWUnLCBuYW1lc3BhY2UpLmtlbmRvQXV0b0NvbXBsZXRlKHtcclxuICAgICAgICAgICAgZGF0YVNvdXJjZTogc2VhcmNoTWFuYWdlbWVudENvbXBhbmllc0RhdGFTb3VyY2UsXHJcbiAgICAgICAgICAgIGRhdGFUZXh0RmllbGQ6IFwiQ3VzdG9tZXJfTmFtZVwiLFxyXG4gICAgICAgICAgICBmaWx0ZXI6IFwiY29udGFpbnNcIixcclxuICAgICAgICAgICAgZmlsdGVyaW5nOiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gY2xlYXIgbWFuYWdlbWVudCBjb21wYW55IG51bWJlclxyXG4gICAgICAgICAgICAgICAgJCgnI21hbmFnZW1lbnROdW0nLCBuYW1lc3BhY2UpLmh0bWwoJycpO1xyXG4gICAgICAgICAgICAgICAgJCgnI2NyZWRpdFNwZWNpYWxpc3QnLCBuYW1lc3BhY2UpLnZhbCgnJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gZ2V0IGZpbHRlciB2YWx1ZSBmcm9tIGlucHV0XHJcbiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZSA9IGUuZmlsdGVyLnZhbHVlO1xyXG4gICAgIC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ICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgU2FsZXNJZDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBFbWFpbDogeyB0eXBlOiBcInN0cmluZ1wiIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gaW5pdCBzYWxlc3BlcnNvbiBzZWFyY2hcclxuICAgICAgICAkKCcjc2FsZXNwZXJzb25OYW1lJywgbmFtZXNwYWNlKS5rZW5kb0F1dG9Db21wbGV0ZSh7XHJcbiAgICAgICAgICAgIGRhdGFTb3VyY2U6IHNlYXJjaFNhbGVzcGVvcGxlRGF0YVNvdXJjZSxcclxuICAgICAgICAgICAgZGF0YVRleHRGaWVsZDogXCJOYW1lXCIsXHJcbiAgICAgICAgICAgIGZpbHRlcjogXCJjb250YWluc1wiLFxyXG4gICAgICAgICAgICBmaWx0ZXJpbmc6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBjbGVhciBzYWxlcyBpZCAmIGVtYWlsXHJcbiAgICAgICAgICAgICAgICAkKCcjc2FsZXNJZCcsIG5hbWVzcGFjZSkuaHRtbCgnJyk7XHJcbiAgICAgICAgICAgICAgICAkKCcjc2FsZXNwZXJzb25FbWFpbCcsIG5hbWVzcGFjZSkudmFsKCcnKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBnZXQgZmlsdGVyIHZhbHVlIGZyb20gaW5wdXRcclxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gZS5maWx0ZXIudmFsdWU7XHJcbiAgICAgICAgICAgICAgICBzZWFyY2hTYWxlc3Blb3BsZSh2YWx1ZSk7XHJcbiAgIC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lcXVpcmVWYWxpZENvbXBhbnlOdW1iZXJcIiwgZnVuY3Rpb24gKHZhbHVlLCBlbGVtZW50KSB7XHJcbiAgICAgICAgICAgIC8vIGlmIHJ1bGUgaXMgdHVybmVkIG9mZiB0aGVuIGV4aXRcclxuICAgICAgICAgICAgaWYgKCF2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHZhciAkcGFyZW50ID0gJChlbGVtZW50KS5wYXJlbnQoKS5wYXJlbnQoKTtcclxuICAgICAgICAgICAgdmFyIGNvbXBhbnlOYW1lID0gJChlbGVtZW50KS52YWwoKTtcclxuICAgICAgICAgICAgdmFyIGNvbXBhbnlOdW1iZXIgPSAkcGFyZW50LmZpbmQoJyNtYW5hZ2VtZW50TnVtJykudGV4dCgpO1xyXG5cclxuICAgICAgICAgICAgLy8gY29tcGFueSBudW1iZXIgaXMgb25seSByZXF1aXJlZCBpZiBhIG5hbWUgaXMgZW50ZXJlZFxyXG4gICAgICAgICAgICBpZiAoIWNvbXBhbnlOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIGNvbXBhbnlOdW1iZXIgIT09IG51bGxcclxuICAgICAgICAgICAgICAgICYmIGNvbXBhbnlOdW1iZXIgIT09IHVuZGVmaW5lZFxyXG4gICAgICAgICAgICAgICAgJiYgY29tcGFueU51bWJlciAhPT0gJyc7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGNyZWF0ZSB2YWxpZCBTYWxlc3BlcnNvbiBydWxlXHJcbiAgICAgICAgJC52YWxpZGF0b3IuYWRkTWV0aG9kKFwicmVxdWlyZVZhbGlkU2FsZXNwZXJzb25JZFwiLCBmdW5jdGlvbiAodmFsdWUsIGVsZW1lbnQpIHtcclxuICAgICAgICAgICAgLy8gaWYgcnVsZSBpcyB0dXJuZWQgb2ZmIHRoZW4gZXhpdFxyXG4gICAgICAgICAgICBpZiAoIXZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdmFyICRwYXJlbnQgPSAkKGVsZW1lbnQpLnBhcmVudCgpLnBhcmVudCgpO1xyXG4gICAgICAgICAgICB2YXIgc2FsZXNwZXJzb25JZCA9ICRwYXJlbnQuZmluZCgnI3NhbGVzSWQnKS50ZXh0KCk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gc2FsZXNwZXJzb25JZCAhPT0gbnVsbFxyXG4gICAgICAgICAgICAgICAgJiYgc2FsZXNwZXJzb25JZCAhPT0gdW5kZWZpbmVkXHJcbiAgICAgICAgICAgICAgICAmJiBzYWxlc3BlcnNvbklkICE9PSAnJztcclxuICAgICAgICB9KTtcclxuXHJcblxyXG4gICAgICAgIC8vIHByb3BlcnR5IGZvcm0gdmFsaWRhdGlvblxyXG4gICAgICAgICQoJyNwcm9wZXJ0eS1mb3JtJywgbmFtZXNwYWNlKS52YWxpZGF0ZSh7XHJcbiAgICAgICAgICAgIHJ1bGVzOiB7XHJcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eU5hbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBtaW5sZW5ndGg6IDMsXHJcbiAgICAgICAgICAgICAgICAgICAgbWF4bGVuZ3RoOiA2NVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIG51bWJlck9mVW5pdHM6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNhbGVzcGVyc29uTmFtZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVWYWxpZFNhbGVzcGVyc29uSWQ6IHRydWVcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBpc011bHRpRmFtaWx5SG91c2luZzoge1xyXG4gICAgICAgICAgICAgICAgICAgIG11c3RCZVRydWU6IHRydWVcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBwYXltZW50VGVybXM6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHdhcmVob3VzZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbWFuYWdlbWVudENvbXBhbnlOYW1lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZVZhbGlkQ29tcGFueU51bWJlcjogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBtZXNzYWdlczoge1xyXG4gICAgICAgICAgICAgICAgcHJvcGVydHlOYW1lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2UgZW50ZXIgYSBwcm9wZXJ0eSBuYW1lLicsXHJcbiAgICAgICAgICAgICAgICAgICAgbWlubGVuZ3RoOiAnUHJvcGVydHkgbmFtZSBtdXN0IGJlIGF0IGxlYXN0IDMgY2hhcmFjdGVycy4nLFxyXG4gICAgICAgICAgICAgICAgICAgIG1heGxlbmd0aDogJ1Byb3BlcnR5IG5hbWUgbXVzdCBiZSBhdCBtb3N0IDY1IGNoYXJhY3RlcnMuJ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIG51bWJlck9mVW5pdHM6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogJ1BsZWFzZSBlbnRlciBhIG51bWJlciBvZiB1bml0cy4nXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2FsZXNwZXJzb25OYW1lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2UgZW50ZXIgYSBzYWxlc3BlcnNvbiBuYW1lLicsXHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZVZhbGlkU2FsZXNwZXJzb25JZDogJ1BsZWFzZSBlbnRlciBhIHZhbGlkIHNhbGVzcGVyc29uLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBpc011bHRpRmFtaWx5SG91c2luZzoge1xyXG4gICAgICAgICAgICAgICAgICAgIG11c3RCZVRydWU6ICdNdXN0IGJlIE11bHRpLUZhbWlseSBob3VzaW5nJ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHBheW1lbnRUZXJtczoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIHNlbGVjdCBhIHBheW1lbnQgdGVybS4nXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgd2FyZWhvdXNlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2Ugc2VsZWN0IGEgV2FyZWhvdXNlLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBtYW5hZ2VtZW50Q29tcGFueU5hbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlVmFsaWRDb21wYW55TnVtYmVyOiAnUGxlYXNlIGVudGVyIGEgdmFsaWQgbWFuYWdlbWVudCBjb21wYW55J1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBlcnJvclBsYWNlbWVudDogZnVuY3Rpb24gKGVycm9yLCBlbGVtZW50KSB7XHJcblxyXG4gICAgICAgICAgICAgICAgJCgnLnRhYi1jb250ZW50JywgbmFtZXNwYWNlKS5jc3MoJ2hlaWdodCcsICdhdXRvJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGVsZW1lbnQuYXR0cihcIm5hbWVcIikgPT0gXCJpc011bHRpRmFtaWx5SG91c2luZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgfHwgZWxlbWVudC5hdHRyKCduYW1lJykgPT0gXCJtYW5hZ2VtZW50Q29tcGFueU5hbWVcIlxyXG4gICAgICAgICAgICAgICAgICAgIHx8IGVsZW1lbnQuYXR0cignbmFtZScpID09IFwic2FsZXNwZXJzb25OYW1lXCIpIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJvci5pbnNlcnRBZnRlcihlbGVtZW50LnBhcmVudCgpLnBhcmVudCgpKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IuaW5zZXJ0QWZ0ZXIoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gc2hpcHBpbmcgYWRkcmVzcyBmb3JtIHZhbGlkYXRpb25cclxuICAgICAgICAkKCcjc2hpcHBpbmctYWRkcmVzcy1mb3JtJywgbmFtZXNwYWNlKS52YWxpZGF0ZSh7XHJcbiAgICAgICAgICAgIHJ1bGVzOiB7XHJcbiAgICAgICAgICAgICAgICBzaGlwcGluZ0FkZHJlc3M6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNoaXBwaW5nQ2l0eToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2hpcHBpbmdTdGF0ZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2hpcHBpbmdaaXBDb2RlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6IHRydWVcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgbWVzc2FnZXM6IHtcclxuICAgICAgICAgICAgICAgIHNoaXBwaW5nQWRkcmVzczoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGFuIGFkZHJlc3MuJ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNoaXBwaW5nQ2l0eToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGEgY2l0eS4nXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2hpcHBpbmdTdGF0ZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGEgc3RhdGUuJ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNoaXBwaW5nWmlwQ29kZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGEgemlwIGNvZGUuJ1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBlcnJvclBsYWNlbWVudDogZnVuY3Rpb24gKGVycm9yLCBlbGVtZW50KSB7XHJcbiAgICAgICAgICAgICAgICAvLyByZXNpemUgY29udGVudFxyXG4gICAgICAgICAgICAgICAgJCgnLnRhYi1jb250ZW50JywgbmFtZXNwYWNlKS5jc3MoJ2hlaWdodCcsICdhdXRvJyk7XHJcbiAgICAgICAgICAgICAgICBlcnJvci5pbnNlcnRBZnRlcihlbGVtZW50KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBiaWxsaW5nIGFkZHJlc3MgZm9ybSB2YWxpZGF0aW9uXHJcbiAgICAgICAgJCgnI2JpbGxpbmctYWRkcmVzcy1mb3JtJywgbmFtZXNwYWNlKS52YWxpZGF0ZSh7XHJcbiAgICAgICAgICAgIHJ1bGVzOiB7XHJcbiAgICAgICAgICAgICAgICBiaWxsaW5nQWRkcmVzczoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYmlsbGluZ0NpdHk6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGJpbGxpbmdTdGF0ZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYmlsbGluZ1ppcENvZGU6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBtZXNzYWdlczoge1xyXG4gICAgICAgICAgICAgICAgYmlsbGluZ0FkZHJlc3M6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogJ1BsZWFzZSBlbnRlciBhbiBhZGRyZXNzLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBiaWxsaW5nQ2l0eToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGEgY2l0eS4nXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYmlsbGluZ1N0YXRlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2UgZW50ZXIgYSBzdGF0ZS4nXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYmlsbGluZ1ppcENvZGU6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogJ1BsZWFzZSBlbnRlciBhIHppcCBjb2RlLidcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3JQbGFjZW1lbnQ6IGZ1bmN0aW9uIChlcnJvciwgZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgLy8gcmVzaXplIGNvbnRlbnRcclxuICAgICAgICAgICAgICAgICQoJy50YWItY29udGVudCcsIG5hbWVzcGFjZSkuY3NzKCdoZWlnaHQnLCAnYXV0bycpO1xyXG4gICAgICAgICAgICAgICAgZXJyb3IuaW5zZXJ0QWZ0ZXIoZWxlbWVudCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gY29udGFjdCBmb3JtIHZhbGlkYXRpb25cclxuICAgICAgICAkKCcjY29udGFjdC1mb3JtJywgbmFtZXNwYWNlKS52YWxpZGF0ZSh7XHJcbiAgICAgICAgICAgIHJ1bGVzOiB7XHJcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eVBob25lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgbWlubGVuZ3RoOiAxMCxcclxuICAgICAgICAgICAgICAgICAgICBtYXhsZW5ndGg6IDEwXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbWFuYWdlck5hbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBtaW5sZW5ndGg6IDMsXHJcbiAgICAgICAgICAgICAgICAgICAgbWF4bGVuZ3RoOiA1MFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIG1hbmFnZXJFbWFpbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIGVtYWlsOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG1lc3NhZ2VzOiB7XHJcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eVBob25lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2UgZW50ZXIgYSBwaG9uZSBudW1iZXIuJyxcclxuICAgICAgICAgICAgICAgICAgICBtaW5sZW5ndGg6ICdQaG9uZSBudW1iZXIgbXVzdCBiZSBhdCBsZWFzdCAxMCBjaGFyYWN0ZXJzLicsXHJcbiAgICAgICAgICAgICAgICAgICAgbWF4bGVuZ3RoOiAnUGhvbmUgbnVtYmVyIG11c3QgYmUgYXQgbW9zdCAxMCBjaGFyYWN0ZXJzLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBtYW5hZ2VyTmFtZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGEgbWFuYWdlciBuYW1lLicsXHJcbiAgICAgICAgICAgICAgICAgICAgbWlubGVuZ3RoOiAnTWFuYWdlciBuYW1lIG11c3QgYmUgYXQgbGVhc3QgMyBjaGFyYWN0ZXJzLicsXHJcbiAgICAgICAgICAgICAgICAgICAgbWF4bGVuZ3RoOiAnTWFuYWdlciBuYW1lIG11c3QgYmUgYXQgbW9zdCA1MCBjaGFyYWN0ZXJzLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBtYW5hZ2VyRW1haWw6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogJ1BsZWFzZSBlbnRlciBhbiBlbWFpbCBhZGRyZXNzLicsXHJcbiAgICAgICAgICAgICAgICAgICAgZW1haWw6ICdQbGVhc2UgZW50ZXIgYSB2YWxpZCBlbWFpbCBhZGRyZXNzLidcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3JQbGFjZW1lbnQ6IGZ1bmN0aW9uIChlcnJvciwgZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgLy8gcmVzaXplIGNvbnRlbnRcclxuICAgICAgICAgICAgICAgICQoJy50YWItY29udGVudCcsIG5hbWVzcGFjZSkuY3NzKCdoZWlnaHQnLCAnYXV0bycpO1xyXG5cclxuICAgICAgICAgICAgICAgIGVycm9yLmluc2VydEFmdGVyKGVsZW1lbnQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gaW5pdERyb3BEb3ducygpIHtcclxuXHJcbiAgICAgICAgLy8gc2hpcHBpbmcgc3RhdGUgZHJvcGRvd25cclxuICAgICAgICAkc2hpcHBpbmdTdGF0ZURyb3BEb3duTGlzdCA9ICQoJyNzaGlwcGluZ1N0YXRlJywgbmFtZXNwYWNlKS5rZW5kb0Ryb3BEb3duTGlzdCh7XHJcbiAgICAgICAgICAgIGRhdGFTb3VyY2U6IHtcclxuICAgICAgICAgICAgICAgIGRhdGE6IHdpbmRvdy5zdGF0ZXNcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pLmRhdGEoXCJrZW5kb0Ryb3BEb3duTGlzdFwiKTtcclxuXHJcbiAgICAgICAgLy8gYmlsbGluZyBzdGF0ZSBkcm9wZG93blxyXG4gICAgICAgICRiaWxsaW5nU3RhdGVEcm9wRG93bkxpc3QgPSAkKCcjYmlsbGluZ1N0YXRlJywgbmFtZXNwYWNlKS5rZW5kb0Ryb3BEb3duTGlzdCh7XHJcbiAgICAgICAgICAgIG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jdGluZ1xyXG4gICAgICAgICAgICAgICAgJCgnI3NlbGVjdG9yLWlzLXNoaXBwaW5nJywgbmFtZXNwYWNlKS5wcm9wKCdjaGVja2VkJywgaXNTaGlwcGluZyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gZ2l2ZSBlYWNoIGFkZHJlc3MgYSB1bmlxdWUgaWRcclxuICAgICAgICAgICAgICAgIGRhdGEuQWRkcmVzc2VzLmZvckVhY2goZnVuY3Rpb24gKGYsIGluZGV4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZi5JZCA9IGluZGV4O1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gaW5pdCBuZXcga2VuZG8gZGF0YSBzb3VyY2VcclxuICAgICAgICAgICAgICAgIHZhciBhZGRyZXNzRGF0YVNvdXJjZSA9IG5ldyBrZW5kby5kYXRhLkRhdGFTb3VyY2Uoe1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEuQWRkcmVzc2VzLFxyXG4gICAgICAgICAgICAgICAgICAgIHNjaGVtYToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IFwiSWRcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElkOiB7IHR5cGU6IFwibnVtYmVyXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBZGRyZXNzX0xpbmVfMTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWRkcmVzc19MaW5lXzI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENpdHk6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFppcDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVnaW9uOiB7IHR5cGU6IFwic3RyaW5nXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gaW5pdCBrZW5kbyBncmlkIGZvciBkYXRhU291cmNlIFxyXG4gICAgICAgICAgICAgICAgJGFkZHJlc3NPcHRpb25zR3JpZCA9IGpRdWVyeSgnI2FkZHJlc3Mtb3B0aW9ucy1ncmlkJywgbmFtZXNwYWNlKS5rZW5kb0dyaWQoe1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IGFkZHJlc3NEYXRhU291cmNlLFxyXG4gICAgICAgICAgICAgICAgICAgIGVkaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwiQWRkcmVzc19MaW5lXzFcIiwgdGl0bGU6IFwiTGluZSAxXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeyBmaWVsZDogXCJBZGRyZXNzX0xpbmVfMlwiLCB0aXRsZTogXCJMaW5lIDJcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGZpZWxkOiBcIkNpdHlcIiwgdGl0bGU6IFwiQ2l0eVwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwiUmVnaW9uXCIsIHRpdGxlOiBcIlN0YXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeyBmaWVsZDogXCJaaXBcIiwgdGl0bGU6IFwiWmlwXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChkYXRhSXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGlucHV0IHR5cGU9XCJidXR0b25cIiB2YWx1ZT1cIlNlbGVjdFwiIGNsYXNzPVwic2VsZWN0LWFkZHJlc3MtYnV0dG9uIGJ0biBidG4tcHJpbWFyeSBidG4tc21cIiBkYXRhLWRpc21pc3M9XCJtb2RhbFwiIGRhdGEtaWQ9XCInICsgZGF0YUl0ZW0uSWQgKyAnXCIgLz4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIH0pLmRhdGEoJ2tlbmRvR3JpZCcpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHNob3cgYWRkcmVzcyBtb2RhbFxyXG4gICAgICAgICAgICAgICAgJCgnI2FkZHJlc3NNb2RhbCcsIG5hbWVzcGFjZSkubW9kYWwoJ3Nob3cnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBoYW5kbGUgZXJyb3JcclxuICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKGVycm9yKSB7XHJcblxyXG4gICAgICAgICAgICAvLyBoaWRlIGxvYWRpbmdcclxuICAgICAgICAgICAgdG9nZ2xlTG9hZGluZyhmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoJy5lcnJvci1tZXNzYWdlcycsIG5hbWVzcGFjZSwgZXJyb3IpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHZhbGlkYXRlUGhvbmVOdW1iZXJPblNlcnZlcigpIHtcclxuICAgICAgICAvLyBzaG93IGxvYWRpbmdcclxuICAgICAgICB0b2dnbGVMb2FkaW5nKHRydWUpO1xyXG5cclxuICAgICAgICAvLyBwcmVwYXJlIHNlcnZlciBwaG9uZSBudW1iZXIgdmFsaWRhdGlvbiByZXF1ZXN0XHJcbiAgICAgICAgdmFyIHJlcXVlc3QgPSBqUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgIHVybDogd2luZG93LnVybHMuQWRkcmVzc1ZhbGlkYXRvclVybCxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgQ2hlY2tJZkFkZHJlc3NFeGlzdHM6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgQ2hlY2tJZkFkZHJlc3NJc1VzZWRCeUV4aXN0aW5nQ3VzdG9tZXI6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgQ2hlY2tJZlBob25lTnVtYmVySXNVc2VkQnlFeGlzdGluZ0N1c3RvbWVyOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgQWRkcmVzczoge30sXHJcbiAgICAgICAgICAgICAgICBQaG9uZU51bWJlcjogJCgnI3Byb3BlcnR5UGhvbmUnLCBuYW1lc3BhY2UpLnZhbCgpXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gaGFuZGxlIHN1Y2Nlc3NcclxuICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgdG9nZ2xlTG9hZGluZyhmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAvLyBzaG93IGVycm9yIG1lc3NhZ2VzXHJcbiAgICAgICAgICAgIGlmICghZGF0YS5TdWNjZXNzKSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhLk1lc3NhZ2VzLmZvckVhY2goZnVuY3Rpb24gKGYpIHtcclxuICAgICAgICAg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cbiAgICAgICAgICAgICAgICBzdWJtaXRGb3JDb21wbGV0aW9uOiBpc1N1Ym1pdHRpbmcsXHJcbiAgICAgICAgICAgICAgICBjb250ZW50TGluazogJCgnI2NvbnRlbnRMaW5rJywgbmFtZXNwYWNlKS52YWwoKSxcclxuICAgICAgICAgICAgICAgIGNvdXJ0ZXN5QWNjb3VudDogZGF0YVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGhhbmRsZSBzdWNjZXNzXHJcbiAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgIC8vIHRvZ2dsZSBsb2FkaW5nXHJcbiAgICAgICAgICAgIHRvZ2dsZUxvYWRpbmcoZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGRhdGEuSWQgPT09IDApIHtcclxuICAgICAgICAgICAgICAgIC8vIHNob3cgZXJyb3IgbWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgc2hvd0Vycm9yTWVzc2FnZSgnQW4gdW5leHBlY3RlZCBlcnJvciBvY2N1cnJlZCBhbmQgdGhlIHJlcXVlc3QgY291bGQgbm90IGJlIHByb2Nlc3NlZCcpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBzZXQgdGhlIGFjY291bnQgaWRcclxuICAgICAgICAgICAgJCgnI2FjY291bnRJZCcsIG5hbWVzcGFjZSkudmFsKGRhdGEuSWQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGlzU3VibWl0dGluZykge1xyXG4gICAgICAgICAgICAgICAgdXBkYXRlQ29tcGxldGVWaWV3KHRydWUpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gbm90IHN1Ym1pdHRpbmcgc28gZ28gdG8gdGhlIG5leHQgd2l6YXJkIHN0ZXBcclxuICAgICAgICAg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dGVMYW5kaW5nUGFnZSkge1xyXG4gICAgICAgICAgICBpZiAoIXNraXBSZWxvYWQpIHtcclxuICAgICAgICAgICAgICAgIC8vIHJlZnJlc2ggYWNjb3VudHNcclxuICAgICAgICAgICAgICAgIHJlZnJlc2hBY2NvdW50cygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIGNoYW5nZSB1cmwgc3RhdGVcclxuICAgICAgICAgICAgd2luZG93Lmhpc3RvcnkucHVzaFN0YXRlKHt9LCBkb2N1bWVudC50aXRsZSwgd2luZG93LnVybHMuQ291cnRlc3lQYWdlVXJsKTtcclxuICAgICAgICAgICAgJGxhbmRpbmdTZWN0aW9uLmZhZGVJbigpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdGUgPT09IHN0YXRlV2l6YXJkKSB7XHJcbiAgICAgICAgICAgICQoJyNzbWFydHdpemFyZCcpLnNtYXJ0V2l6YXJkKFwicmVzZXRcIik7XHJcbiAgICAgICAgICAgIHJlc2V0Q29tcGxldGVWaWV3KCk7XHJcbiAgICAgICAgICAgICR3aXphcmRTZWN0aW9uLmZhZGVJbigpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiByZWZyZXNoQWNjb3VudHMoKSB7XHJcblxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0gJC5hamF4KHtcclxuICAgICAgICAgICAgdXJsOiB3aW5kb3cudXJscy5HZXRDb3VydGVzeUFjY291bnRzVXJsLFxyXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcclxuICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBoYW5kbGUgc3VjY2Vzc1xyXG4gICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4g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uZGxlIEJ1aWxkIEluZm9cclxuICAgICAgICAkKFwiaW5wdXRbbmFtZT1idWlsZEluZm9dXCIpLmNsaWNrKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgJChcIjpzdWJtaXRcIikuYXR0cihcImRpc2FibGVkXCIsIGZhbHNlKTtcclxuICAgICAgICAgICAgYnVpbGRJbmZvTmFtZSA9ICQodGhpcykudmFsKCk7XHJcbiAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpID09IFwiSGlzdG9yeVwiKSB7XHJcbiAgICAgICAgICAgICAgICAkKFwiI3RpbWVsaW5lXCIpLnNob3coKTtcclxuICAgICAgICAgICAgICAgIC8vaW4gY2FzZSBvZiBwcmV2b3VzIGZhaWxlZCByZXF1ZXN0XHJcbiAgICAgICAgICAgICAgICAkKFwiLmVycm9yLW1lc3NhZ2VcIikucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICAkKFwiI3F1b3RlXCIpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICQoXCIjZmlsZVVwbG9hZFJvd1wiKS5oaWRlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZiAoJCh0aGlzKS52YWwoKSA9PSBcIlF1b3RlXCIpIHtcclxuICAgICAgICAgICAgICAgICQoXCIjcXVvdGVcIikuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgJChcIi5lcnJvci1tZXNzYWdlXCIpLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgJChcIiN0aW1lbGluZVwiKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAkKFwiI2ZpbGVVcGxvYWRSb3dcIikuaGlkZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2UgaWYgKCQodGhpcykudmFsKCkgPT0gXCJDcm9zcyBSZWZlcmVuY2VcIikge1xyXG4gICAgICAgICAgICAgICAgJChcIiNmaWxlVXBsb2FkUm93XCIpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICQoXCIuZXJyb3ItbWVzc2FnZVwiKS5yZW1vdmUoKTtcclxuICAgICAgICAgICAgICAgICQoXCIjdGltZWxpbmVcIikuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgJChcIiNxdW90ZVwiKS5oaWRlKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkKFwiI3RpbWVsaW5lXCIpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICQoXCIjcXVvdGVcIikuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgJChcIiNmaWxlVXBsb2FkUm93XCIpLmhpZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAkKFwiaW5wdXRbbmFtZT1vcmRlcnR5cGVdXCIpLmNsaWNrKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgb3JkZXJUeXBlTmFtZSA9ICQodGhpcykudmFsKCk7XHJcbiAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpID09IFwiQklOTEFCRUxTXCIpIHtcclxuICAgICAgICAgICAgICAgICQoXCIjcmVxdWVzdFBERkNhdGFsb2dcIikuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgJChcIiNyZXF1ZXN0UERGQ2F0YWxvZ0xhYmVsXCIpLmhpZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIGlmICgkKHRoaXMpLnZhbCgpID09IFwiQ0FUQUxPR1wiKSB7XHJcbiAgICAgICAgICAgICAgICAkKFwiI3JlcXVlc3RQREZDYXRhbG9nXCIpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICQoXCIjcmVxdWVzdFBERkNhdGFsb2dMYWJlbFwiKS5zaG93KCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSBpZiAoJCh0aGlzKS52YWwoKSA9PSBcIkJPVEhcIikge1xyXG4gICAgICA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9yZGVyID0gJChcImlucHV0W25hbWU9J29yZGVydHlwZSddOmNoZWNrZWRcIikudmFsKCk7XHJcbiAgICAgICAgZm9ybURhdGEuYXBwZW5kKFwiT3JkZXJcIiwgT3JkZXIpO1xyXG5cclxuICAgICAgICBpZiAoYnVpbGRJbmZvTmFtZSA9PSBcIkhpc3RvcnlcIikge1xyXG4gICAgICAgICAgICB2YXIgdGltZWxpbmVWYWx1ZSA9ICQoXCJpbnB1dFtuYW1lPSd0aW1lbGluZSddOmNoZWNrZWRcIikudmFsKCk7XHJcbiAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZChcIkl0ZW1EZXNjcmlwdGlvblwiLCB0aW1lbGluZVZhbHVlKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSBpZiAoYnVpbGRJbmZvTmFtZSA9PSBcIlF1b3RlXCIpIHtcclxuICAgICAgICAgICAgdmFyIHF1b3RlTnVtYmVyID0gJChcImlucHV0W25hbWU9J3F1b3RlTnVtYmVyJ11cIiwgbmFtZXNwYWNlKS52YWwoKTtcclxuICAgICAgICAgICAgaWYgKHF1b3RlTnVtYmVyICE9IFwiXCIpIHtcclxuICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZChcIkl0ZW1EZXNjcmlwdGlvblwiLCAnUXVvdGUgLScgKyBxdW90ZU51bWJlcik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkKFwiI3F1b3RlTnVtYmVyXCIpLmFmdGVyKFwiPGRpdiBjbGFzcz0ndmFsaWRhdGlvbicgc3R5bGU9J2NvbG9yOnJlZDttYXJnaW4tYm90dG9tOiAyMHB4Oyc+UGxlYXNlIGVudGVyIFF1b3RlIE51bWJlcjwvZGl2PlwiKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIGlmIChidWlsZEluZm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G4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZmlsZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFnZW5lcmFsTGlicmFyeS52YWxpZEZpbGVUeXBlKGZpbGVzW2ldLm5hbWUsIHZhbGlkRmlsZVR5cGUpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKFwiI0Nyb3NzUmVmZXJlbmNlRXJyb3JNc2dcIikuYWZ0ZXIoXCI8ZGl2IGNsYXNzPSd2YWxpZGF0aW9uJyBzdHlsZT0nY29sb3I6cmVkO21hcmdpbi1ib3R0b206IDIwcHg7Jz5cIiArIGZpbGVzW2ldLm5hbWUgKyBcIiBpcyBub3QgYSBzdXBwb3J0ZWQgZmlsZTwvZGl2PlwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ0ZpbGV1cGxvYWQnLCBmaWxlc1tpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgnSXRlbURlc2NyaXB0aW9uJywgJycpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vdGVDaGVja2VkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgnSXRlbURlc2NyaXB0aW9uJywgJ3RydWUnKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgnSXRlbURlc2NyaXB0aW9uJywgJ2Zh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AgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQ29kZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZXNjcmlwdGlvbjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBHbFZhbHVlOiB7IHR5cGU6IFwic3RyaW5nXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiUmVtb3ZlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChkYXRhSXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0UmVtb3ZlQ2VsbFRlbXBsYXRlKGRhdGFJdGVtKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlclRlbXBsYXRlOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRSZW1vdmVDZWxsSGVhZGVyVGVtcGxhdGUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiAnNzVweCcsXHJcbiAgICAgICAgICAgICAgICAgICAgc29ydGFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkNvZGVcIixcclx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ICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIHZhciBleHAgPSBqUXVlcnkoJ2lucHV0WyBuYW1lPVByb2R1Y3RTS1VSZWdleCBdJywgbmFtZXNwYWNlKS52YWwoKTtcclxuICAgICAgICAgICAgdmFyIHJlZyA9IG5ldyBSZWdFeHAoZXhwLCAnaScpO1xyXG4gICAgICAgICAgICB2YXIgcnRuID0gcmVnLnRlc3QodmFsdWUpO1xyXG5cclxuICAgICAgICAgICAgcmV0dXJuIHJ0bjtcclxuXHJcbiAgICAgICAgfSwgXCJJbnZhbGlkIFNLVSBGb3JtYXQuXCIpO1xyXG5cclxuXHJcbiAgICAgICAgalF1ZXJ5KCcuYWRkLWNhdGVnb3J5LWZvcm0nLCBuYW1lc3BhY2UpLnZhbGlkYXRlKFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBzdWJtaXRIYW5kbGVyOiBmdW5jdGlvbiAoZm9ybSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB1c2VySWQgPSBqUXVlcnkoJ2lucHV0W25hbWU9dWlkXScsIG5hbWVzcGFjZSkudmFsKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNhdFRleHQgPSBqUXVlcnkoJyNDYXRlZ29yeVRleHQnLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBza3VUZXh0ID0galF1ZXJ5KCcjU0tVVGV4dCcsIG5hbWVzcGFjZSkudmFsKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHZhciByZXF1ZXN0ID0gJC5hamF4KFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBhZGRDdXN0b21HTEl0ZW1FbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHsgY29kZTogc2t1VGV4dCwgZ2xWYWx1ZTogY2F0VGV4dCB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7IHdpdGhDcmVkZW50aWFsczogdHJ1ZSB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3RQYWdlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5lcnJvci1hZGRpbmctY2F0ZWdvcnknLCBuYW1lc3BhY2UpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gaW5pdEhhbmRsZXJzKCkge1xyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIHBhZ2UgdGFiIHJlZGlyZWN0c1xyXG4gICAgICAgIGpRdWVyeSgnLnBhZ2UtdGFicyAucGFnZS10YWInLCBuYW1lc3BhY2UpLmNsaWNrKGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGYgPSBqUXVlcnkodGhpcykuZGF0YSgnZmllbGQnKTtcclxuICAgICAgICAgICAgdmFyIHYgPSBqUXVlcnkodGhpcykuZGF0YSgndmFsdWUnKTtcclxuXHJcbiAgICAgICAgICAgIHN0b3JlVmFsdWUoZiwgdik7XHJcblxyXG4gICA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tZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHJlbW92ZUN1c3RvbUdMSXRlbXNFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogeyBpdGVtczogc2t1TGlzdCB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHsgd2l0aENyZWRlbnRpYWxzOiB0cnVlIH1cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICByZWRpcmVjdFBhZ2UoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmVycm9yLXJlbW92aW5nLWNhdGVnb3JpZXMnLCBuYW1lc3BhY2UpLnNob3coKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBzYXZlIGNhdGVnb3JpZXMgYnV0dG9uIGNsaWNrXHJcbiAgICAgICAgalF1ZXJ5KCcuYnRuLXNhdmUtY2F0ZWdvcmllcycsIG5hbWVzcGFjZSkuY2xpY2soZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgdXNlcklkID0galF1ZXJ5KCdpbnB1dFsgbmFtZT11aWQgXScsIG5hbWVzcGFjZSkudmFsKCk7XHJcbiAgICAgICAgICAgIHZhciBtYXBwaW5nID0gZ2V0Q2F0ZWdvcnlNYXBwaW5nKCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgcmVxdWVzdCA9ICQuYWpheChcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHVybDogdXBkYXRlQ3VzdG9tR0xDYXRlZ29yaWVzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogeyBtYXBwZWRDYXRlZ29yaWVzOiBtYXBwaW5nIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7IHdpdGhDcmVkZW50aWFsczogdHJ1ZSB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgcmVkaXJlY3RQYWdlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoJy5lcnJvci1zYXZpbmctY2F0ZWdvcmllcycsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmIChqUXVlcnkobmFtZXNwYWNlKS5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGluaXRLZW5kb0dyaWRzKCk7XHJcbiAgICAgICAgaW5pdEZvcm1zKCk7XHJcbiAgICAgICAgaW5pdEhhbmRsZXJzKCk7XHJcbiAgICB9O1xyXG59XHJcblxyXG5cclxuLy8tLS0tLSBXaGVuIHBhZ2UgbG9hZHNcclxualF1ZXJ5KGRvY3VtZW50KS5yZWFkeShmdW5jdGlvbiAoKSB7XHJcbiAgICBuZXcgQ29tcG9uZW50KCkuaW5pdCgpO1xyXG59KTtcclxuIiwiZn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ZW5kbyBkYXRhc291cmNlc1xyXG4gICAgdmFyIHVzZXJEYXRhU291cmNlID0ge307XHJcbiAgICB2YXIgYWNjb3VudHNEYXRhU291cmNlID0ge307XHJcbiAgICB2YXIgcm9sZXNEYXRhU291cmNlID0ge307XHJcblxyXG4gICAgZnVuY3Rpb24gaW5pdERhdGFTb3VyY2VzKCkge1xyXG5cclxuICAgICAgICAvLyB1c2VyIGRhdGEgc291cmNlXHJcbiAgICAgICAgdXNlckRhdGFTb3VyY2UgPSBuZXcga2VuZG8uZGF0YS5EYXRhU291cmNlKHtcclxuICAgICAgICAgICAgdHJhbnNwb3J0OiB7XHJcbiAgICAgICAgICAgICAgICByZWFkOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB1c2Vyc0VuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IFwiR0VUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6IFwianNvblwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgb3JnYW5pemF0aW9uTnVtYmVyOiAkb3JnYW5pemF0aW9uRHJvcGRvd24udmFsKCkgfTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNjaGVtYToge1xyXG4gICAgICAgICAgICAgICAgbW9kZWw6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZDogXCJFbWFpbFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDb250YWN0SWQ6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBFbWFpbDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEZpcnN0TmFtZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExhc3ROYW1lOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUGhvbmU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBTdGF0dXNMYWJlbDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1c0FjdGlvbjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJvbGVOYW1lczogeyB0eXBlOiBcIm9iamVjdFwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnROdW1iZXJzOiB7IHR5cGU6IFwib2JqZWN0XCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQXZhaWxhYmxlQWN0aW9uczogeyB0eXBlOiBcIm9iamVjdFwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBhY2NvdW50cyBkYXRhIHNvdXJjZVxyXG4gICAgICAgIGFjY291bnRzRGF0YVNvdXJjZSA9IG5ldyBrZW5kby5kYXRhLkRhdGFTb3VyY2Uoe1xyXG4gICAgICAgICAgICB0cmFuc3BvcnQ6IHtcclxuICAgICAgICAgICAgICAgIHJlYWQ6IHtcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IGFjY291bnRzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJHRVRcIixcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogXCJqc29uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBvcmdhbml6YXRpb25OdW1iZXI6ICRvcmdhbml6YXRpb25Ecm9wZG93bi52YWwoKSB9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcIkFjY291bnROdW1iZXJcIixcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQWNjb3VudE51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnROYW1lOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUGFyZW50QWNjb3VudE51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjdGl2ZTogeyB0eXBlOiBcImJvb2xlYW5cIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBJc0Fzc2lnbmVkOiB7IHR5cGU6IFwiYm9vbGVhblwiIH0gLy8gbm90ZTogdGhpcyBjb2x1bW4gaXMgbm90IGluIHRoZSBkYXRhLCBidXQgd2UnbGwgcG9wdWxhdGUgaXQgYmFzZWQgb24gdGhlIHJvd1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyByb2xlcyBkYXRhIHNvdXJjZVxyXG4gICAgICAgIHJvbGVzRGF0YVNvdXJjZSA9IG5ldyBrZW5kby5kYXRhLkRhdGFTb3VyY2Uoe1xyXG4gICAgICAgICAgICB0cmFuc3BvcnQ6IHtcclxuICAgICAgICAgICAgICAgIHJlYWQ6IHtcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHJvbGVzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJHRVRcIixcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogXCJqc29uXCJcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcIklkXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIElkOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUm9sZU5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBSb2xlRGlzcGxheU5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBSb2xlRGVzY3JpcHRpb246IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBEaXNhYmxlRWRpdGluZzogeyB0eXBlOiBcImJvb2xlYW5cIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBJc0Fzc2lnbmVkOiB7IHR5cGU6IFwiYm9vbGVhblwiIH0gLy8gbm90ZTogdGhpcyBjb2x1bW4gaXMgbm90IGluIHRoZSBkYXRhLCBidXQgd2UnbGwgcG9wdWxhdGUgaXQgYmFzZWQgb24gdGhlIHJvd1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHJlbG9hZERhdGEoKSB7XHJcbiAgICAg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dGlvbikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmb3JtID0gZGV0YWlsUm93LmZpbmQoXCJmb3JtLnJvdy10ZW1wbGF0ZS1mb3JtXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcm0uYWRkQ2xhc3MoJ2Zvcm0tYW5pbWF0aW9uJyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNlbGVjdGFibGU6IFwicm93XCIsXHJcbiAgICAgICAgICAgIGRldGFpbFRlbXBsYXRlOiBrZW5kby50ZW1wbGF0ZSgkKFwiI3RlbXBsYXRlXCIpLmh0bWwoKSksXHJcbiAgICAgICAgICAgIHNvcnQ6IHsgZmllbGQ6IFwiRW1haWxcIiwgZGlyOiBcImFzY1wiIH0sXHJcbiAgICAgICAgICAgIGNvbHVtbnM6IFtcclxuICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwiRW1haWxcIiwgdGl0bGU6IFwiRW1haWxcIiwgd2lkdGg6IFwiMTgwcHhcIiB9LFxyXG4gICAgICAgICAgICAgICAgeyBmaWVsZDogXCJGaXJzdE5hbWVcIiwgdGl0bGU6IFwiRmlyc3QgTmFtZVwiLCB3aWR0aDogXCIxMjBweFwiIH0sXHJcbiAgICAgICAgICAgICAgICB7IGZpZWxkOiBcIkxhc3ROYW1lXCIsIHRpdGxlOiBcIkxhc3QgTmFtZVwiLCB3aWR0aDogXCIxMjBweFwiIH0sXHJcbiAgICAgICAgICAgICAgICB7IGZpZWxkOiBcIlBob25lXCIsIHRpdGxlOiBcIlBob25lXCIsIHdpZHRoOiBcIjEyMHB4XCIgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJTdGF0dXNcIixcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJTdGF0dXNcIixcclxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGRhdGFJdGVtKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdGF0dXNDbGFzcyA9ICcnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGRhdGFJdGVtLlN0YXR1c0xhYmVsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdQZW5kaW5nIGFwcHJvdmFsJzogc3RhdHVzQ2xhc3MgPSAnc3RhdHVzLXBlbmRpbmcnOyBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0FjdGl2ZSc6IHN0YXR1c0NsYXNzID0gJ3N0YXR1cy1hY3RpdmUnOyBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0luYWN0aXZlJzogc3RhdHVzQ2xhc3MgPSAnc3RhdHVzLWluYWN0aXZlJzsgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGA8c3BhbiBjbGFzcz1cInN0YXR1cy1sYWJlbCAke3N0YXR1c0NsYXNzfVwiPiR7ZGF0YUl0ZW0uU3RhdHVzTGFiZWx9PC9zcGFuPmA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJBY3Rpb25zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChkYXRhSXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWN0aW9uT3B0aW9ucyA9IGdldEFjdGlvbk9wdGlvbnMoZGF0YUl0ZW0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZHJvcGRvd25IdG1sID0gJzxkaXYgY2xhc3M9XCJkcm9wZG93bi1jb250YWluZXJcIj4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkcm9wZG93bkh0bWwgKz0gJzxzZWxlY3QgY2xhc3M9XCJhY3Rpb24tZHJvcGRvd24gbWVudSBtZW51LWFjdGlvbnNcIiBkYXRhLWVtYWlsPVwiJyArIGRhdGFJdGVtLkVtYWlsICsgJ1wiPic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRyb3Bkb3duSHRtbCArPSBhY3Rpb25PcHRpb25zO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkcm9wZG93bkh0bWwgKz0gJzwvc2VsZWN0PjwvZGl2Pic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkcm9wZG93bkh0bWw7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgXVxyXG4gICAgICAgIH0pLmRhdGEoJ2tlbmRvR3JpZCcpO1xyXG5cclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRBY3Rpb25PcHRpb25zKGRhdGFJdGVtKSB7XHJcbiAgICAgICAgdmFyIG9wdGlvbnMgPSAnPG9wdGlvbiB2YWx1ZT1cIlwiIGRpc2FibGVkIHNlbGVjdGVkPkFjdGlvbnM8L29wdGlvbj4nOyAvLyBQbGFjZWhvbGRlciwgbm9uLXNlbGVjdGFibGVcclxuICAgICAgICBkYXRhSXRlbS5BdmFpbGFibGVBY3Rpb25zLmZvckVhY2goZnVuY3Rpb24gKGFjdGlvbikge1xyXG4gICAgICAgICAgICBvcHRpb25zICs9IGA8b3B0aW9uIHZhbHVlPVwiJHthY3Rpb259XCI+JHthY3Rpb259PC9vcHRpb24+YDtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gb3B0aW9ucztcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0SGFuZGxlcnMoKSB7XHJcblxyXG4gICAgICAgIC8vIGhhbmRsZSBvcmdhbml6YXRpb24gZHJvcGRvd24gY2hhb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gICAgICAgICAgIGdyaWQuZXhwYW5kUm93KHJvdyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gR2V0IGFsbCByb3dzXHJcbiAgICAgICAgICAgICAgICB2YXIgYWxsUm93cyA9IGdyaWQudGJvZHkuZmluZChcIj50clwiKTtcclxuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYWxsUm93cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50Um93ID0gJChhbGxSb3dzW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBTa2lwIHRoZSBzZWxlY3RlZCByb3dcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudFJvdy5pcyhyb3cpKSBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBDb2xsYXBzZSBhbGwgb3RoZXIgcm93c1xyXG4gICAgICAgICAgICAgICAgICAgIGdyaWQuY29sbGFwc2VSb3coY3VycmVudFJvdyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGZyZWV6ZVJvd0RldGFpbCA9IGZhbHNlO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBQcmV2ZW50IGNsaWNrIGV2ZW50cyBpbnNpZGUgdGhlIGRldGFpbCByb3cgZnJvbSBidWJibGluZyB1cCB0byB0aGUgcGFyZW50IHJvd1xyXG4gICAgICAgICRrZW5kb0dyaWQudGJvZHkub24oXCJjbGlja1wiLCBcIi5rLWRldGFpbC1yb3csIC5rLWRldGFpbC1yb3cgKlwiLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGhhbmRsZSBhY3RpdmUgc3RhdHVzIHRvZ2dsZVxyXG4gICAgICAgICRrZW5kb0dyaWQudGJvZHkub24oXCJjbGlja1wiLCBcIi5hY3RpdmUtc3RhdHVzXCIsIGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICB2YXIgY2hlY2tib3ggPSB0aGlzO1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICAgICAgdXBkYXRlVXNlclN0YXR1cyhjaGVja2JveCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIEhhbmRsZSBzYXZlIHVzZXIgaW5mb1xyXG4gICAgICAgICRrZW5kb0dyaWQudGJvZHkub24oXCJjbGlja1wiLCBcIi5zYXZlLXVzZXItaW5mb1wiLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xyXG4gICAgICAgICAgICB2YXIgZW1haWwgPSAkKHRoaXMpLmRhdGEoJ2VtYWlsJyk7XHJcbiAgICAgICAgICAgIHZhciBpZCA9ICQodGhpcykuZGF0YSgnaWQnKTtcclxuICAgICAgICAgICAgdXBkYXRlVXNlckluZm8oaWQsIGVtYWlsKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gSGFuZGxlIGNhbmNlbCB1c2VyIGluZm9cclxuICAgICAgICAka2VuZG9HcmlkLnRib2R5Lm9uKFwiY2xpY2tcIiwgXCIuY2FuY2VsLXVzZXItaW5mb1wiLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xyXG4gICAgICAgICAgICB2YXIgZW1haWwgPSAkKHRoaXMpLmRhdGEoJ2VtYWlsJyk7XHJcblxyXG4gICAgICAgICAgICAvLyBnZXQgYnV0dG9uIGFuZCBzaG93IGFuaW1hdGlvblxyXG4gICAgICAgICAgICB2YXIgY2FuY2VsQnV0dG9uID0gJCh0aGlzKTtcclxuICAg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Ch0aGlzKTtcclxuICAgICAgICAgICAgdmFyIGFuaW1hdGlvbiA9IEJ1dHRvbkFuaW1hdG9yLnN0YXJ0QW5pbWF0aW9uKFwiU2F2aW5nLi4uXCIsIGJ1dHRvbik7XHJcblxyXG4gICAgICAgICAgICAvLyBzZW5kIHJlcXVlc3QgdG8gc2VydmVyXHJcbiAgICAgICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgICAgICB1cmw6IHNldFVzZXJQYXNzd29yZEVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi9qc29uJyxcclxuICAgICAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHtcclxuICAgICAgICAgICAgICAgICAgICBFbWFpbDogJCgnI3Jlc2V0LXBhc3N3b3JkLWVtYWlsJywgbmFtZXNwYWNlKS52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICBQYXNzd29yZDogbmV3UGFzc3dvcmQsXHJcbiAgICAgICAgICAgICAgICAgICAgQ29uZmlybVBhc3N3b3JkOiBjb25maXJtUGFzc3dvcmRcclxuICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3BvbnNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZW5kIGFuaW1hdGlvblxyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgJ1NhdmVkIScpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBjbG9zZSB0aGUgbW9kYWwgXHJcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRyZXNldFBhc3N3b3JkTW9kYWwubW9kYWwoJ2hpZGUnKTtcclxuICAgICAgICAgICAgICAgICAgICB9LCAxMDAwKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBlcnJvcjogZnVuY3Rpb24gKGVycm9yKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGVuZCBhbmltYXRpb25cclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCAnRXJyb3IhJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZSBlcnJvclxyXG4gICAgICAgICAgICAgICAgICAgIGxpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKCcucmVzZXQtcGFzc3dvcmQtbWVzc2FnZScsIG5hbWVzcGFjZSwgZXJyb3IucmVzcG9uc2VUZXh0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gc2V0dXBVc2VyRmlsdGVyKCkge1xyXG4gICAgICAgIHZhciAkc3RhdHVzRmlsdGVyID0gJCgnI3N0YXR1c0ZpbHRlcicsIG5hbWVzcGFjZSk7XHJcbiAgICAgICAgdmFyICRlbWFpbEZpbHRlciA9ICQoJyNlbWFpbEZpbHRlcicsIG5hbWVzcGFjZSk7XHJcbiAgICAgICAgdmFyICRjbGVhckZpbHRlciA9ICQoJyNjbGVhckZpbHRlcicsIG5hbWVzcGFjZSk7XHJcblxyXG4gICAgICAgICRzdGF0dXNGaWx0ZXIuYWRkKCRlbWFpbEZpbHRlcikub24oJ2NoYW5nZSBpbnB1dCcsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgYXBwbHlVc2VyRmlsdGVycygpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAkY2xlYXJGaWx0ZXIub24oJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAg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Wluc1wiLCB2YWx1ZTogZmlsdGVyVmFsdWUgfSxcclxuICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwiRW1haWxcIiwgb3BlcmF0b3I6IFwiY29udGFpbnNcIiwgdmFsdWU6IGZpbHRlclZhbHVlIH1cclxuICAgICAgICAgICAgXTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIElmIHRoZXJlIGFyZSB0ZXh0IGZpbHRlcnMsIHVzZSBPUiBsb2dpYyBiZXR3ZWVuIHRoZW1cclxuICAgICAgICBpZiAodGV4dEZpbHRlcnMubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgIGZpbHRlcnMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBsb2dpYzogXCJvclwiLFxyXG4gICAgICAgICAgICAgICAgZmlsdGVyczogdGV4dEZpbHRlcnNcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBJZiBzdGF0dXMgZmlsdGVyIGlzIG5vdCAnYWxsJywgYXBwbHkgaXQgd2l0aCBBTkQgbG9naWNcclxuICAgICAgICBpZiAoc3RhdHVzVmFsdWUgIT09ICdhbGwnKSB7XHJcbiAgICAgICAgICAgIGZpbHRlcnMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBmaWVsZDogXCJTdGF0dXNMYWJlbFwiLFxyXG4gICAgICAgICAgICAgICAgb3BlcmF0b3I6IFwiZXFcIixcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBzdGF0dXNWYWx1ZVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIEFwcGx5IGNvbWJpbmVkIGZpbHRlcnMgdG8gdGhlIGdyaWRcclxuICAgICAgICAka2VuZG9HcmlkLmRhdGFTb3VyY2UuZmlsdGVyKHtcclxuICAgICAgICAgICAgbG9naWM6IFwiYW5kXCIsXHJcbiAgICAgICAgICAgIGZpbHRlcnM6IGZpbHRlcnNcclxuICAgICAgICB9KT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gICAgICAgICAgICAgICAgbG9naWM6IFwib3JcIixcclxuICAgICAgICAgICAgICAgIGZpbHRlcnM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkFjY291bnROYW1lXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBzZWFyY2hWYWx1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJBY2NvdW50TnVtYmVyXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yOiBcImNvbnRhaW5zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBzZWFyY2hWYWx1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBBcHBseSBmaWx0ZXJzIHRvIHRoZSBMaXN0VmlldyBpbiB0aGUgc3BlY2lmaWMgZGV0YWlsIHJvd1xyXG4gICAgICAgIGFjY291bnRzRGF0YVNvdXJjZS5maWx0ZXIoe1xyXG4gICAgICAgICAgICBsb2dpYzogXCJhbmRcIixcclxuICAgICAgICAgICAgZmlsdGVyczogZmlsdGVyc1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHNldHVwT3JnYW5pemF0aW9uTG9va3VwKCkge1xyXG4gICAgICAgICRvcmdhbml6YXRpb25Mb29rdXAua2VuZG9BdXRvQ29tcGxldGUoe1xyXG4gICAgICAgICAgICBtaW5MZW5ndGg6IDMsXHJcbiAgICAgICAgICAgIGF1dG9XaWR0aDogdHJ1ZSxcclxuICAgICAgICAgICAgZGF0YVRleHRGaWVsZDogXCJPcmdhbml6YXRpb25OYW1lXCIsXHJcbiAgICAgICAgICAgIGZvb3RlclRlbXBsYXRlOiAnVG90YWwgIzogaW5zdGFuY2UuZGF0YVNvdXJjZS50b3RhbCgpICMgaXRlbXMgZm91bmQnLFxyXG4gICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGRhdGFJdGVtKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZm9ybWF0T3JnYW5pemF0aW9uVGVtcGxhdGUoZGF0YUl0ZW0pO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZWxlY3Q6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZS5kYXRhSXRlbSA9PSBudWxsIHx8IGUuZGF0YUl0ZW0gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJEYXRhKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgZHJvcGRvd24gdmFsdWUgYW5kIHJlbG9hZCBkYXRhXHJcbiAgICAgICAgICAgICAgICBjb25zdCBvcmdhbml6YXRpb25OdW1iZXIgPSBlLmRhdGFJdGVtLk9yZ2FuaXphdGlvbk51bWJlcjtcclxuICAgICAgICAgICAgICAgICRvcmdhbml6YXRpb25Ecm9wZG93bi52YWwob3JnYW5pemF0aW9uTnVtYmVyKTtcclxuICAgICAgICAgICAgICAgIHJlbG9hZERhdGEoKTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZGF0YVNvdXJjZToge1xyXG4gICAgICAgICAgICAgICAgc2VydmVyRmlsdGVyaW5nOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgdHJhbnNwb3J0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogXCJqc29uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogc2VhcmNoT3JnYW5pemF0aW9uRW5kcG9pbnRcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlck1hcDogZnVuY3Rpb24gKGRhdGEsIHR5cGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIHJlcXVlc3QgaXMgZm9yIHJlYWQgb3BlcmF0aW9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSBcInJlYWRcIikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgbm8gc2VhcmNoIHRlcm0gaXMgc3BlY2lmaWVkLCByZXR1cm4gZW1wdHkgb2JqZWN0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5maWx0ZXIgPT0gbnVsbFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGRhdGEuZmlsdGVyLmZpbHRlcnMgPT0gbnVsbFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGRhdGEuZmlsdGVyLmZpbHRlcnMubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge307XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2VuZCBhIHNpbXBsZSBwYXJhbWV0ZXIgd2l0aCB0aGUgc2VhcmNoIHRlcm1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHNlYXJjaFRlcm06IGRhdGEuZmlsdGVyLmZpbHRlcnNbMF0udmFsdWUgfTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICA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W0uQ29udGFjdElkfVwiIG5hbWU9XCJQaG9uZU51bWJlclwiIHZhbHVlPVwiJHtkYXRhSXRlbS5QaG9uZSB8fCAnJ31cIiBjbGFzcz1cImZvcm0tY29udHJvbFwiIC8+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgIDwvZGl2PmA7XHJcblxyXG4gICAgICAgIC8vIGFkZCBmb3JtIFxyXG4gICAgICAgIGRldGFpbFJvdy5maW5kKFwiLnVzZXItaW5mby1zZWN0aW9uXCIpLmh0bWwodXNlckluZm9IdG1sKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0QWNjb3VudERldGFpbFNlY3Rpb24oZGF0YUl0ZW0sIGRldGFpbFJvdykge1xyXG4gICAgICAgIC8vIGdldCB0aGUgY3VycmVudCBhY2NvdW50cyBhc3NpZ25lZCB0byB0aGUgdXNlclxyXG4gICAgICAgIGN1cnJlbnRVc2VyQXNzaWduZWRBY2NvdW50cyA9IGNvbnZlcnRUb0FycmF5KGRhdGFJdGVtLkFjY291bnROdW1iZXJzKTtcclxuXHJcbiAgICAgICAgLy8gZGVzdHJveSBhbnkgZXhpc3RpbmcgbGlzdCB2aWV3XHJcbiAgICAgICAgaWYgKCRjdXJyZW50QWNjb3VudHNMaXN0Vmlldykge1xyXG4gICAgICAgICAgICAkY3VycmVudEFjY291bnRzTGlzdFZpZXcuZGVzdHJveSgpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaW5pdGlhbGl6ZSB0aGUgbGlzdCBib3ggdXNpbmcgdGhlIGFjY291bnRzIGRhdGEgc291cmNlICYgdGVtcGxhdGVcclxuICAgICAgICAkY3VycmVudEFjY291bnRzTGlzdFZpZXcgPSBkZXRhaWxSb3cuZmluZChcIiNhY2NvdW50c0xpc3RCb3hcIiwgbmFtZXNwYWNlKS5rZW5kb0xpc3RWaWV3KHtcclxuICAgICA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KFwiI2FjY291bnRzTGlzdEJveFwiKS5vbihcImNoYW5nZVwiLCBcIi5hY2NvdW50LWNoZWNrYm94XCIsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XHJcbiAgICAgICAgICAgIHZhciAkY2hlY2tib3ggPSAkKHRoaXMpO1xyXG4gICAgICAgICAgICB2YXIgaXNDaGVja2VkID0gJGNoZWNrYm94LmlzKCc6Y2hlY2tlZCcpO1xyXG4gICAgICAgICAgICB2YXIgYWNjb3VudE51bWJlciA9ICRjaGVja2JveC52YWwoKTtcclxuXHJcbiAgICAgICAgICAgIC8vIEZpbmQgdGhlIGNvcnJlc3BvbmRpbmcgYWNjb3VudCBpbiB0aGUgZGF0YSBzb3VyY2VcclxuICAgICAgICAgICAgdmFyIGRhdGFJdGVtID0gYWNjb3VudHNEYXRhU291cmNlLmdldChhY2NvdW50TnVtYmVyKTtcclxuICAgICAgICAgICAgaWYgKGRhdGFJdGVtKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBVcGRhdGUgdGhlIElzQXNzaWduZWQgcHJvcGVydHlcclxuICAgICAgICAgICAgICAgIGRhdGFJdGVtLnNldChcIklzQXNzaWduZWRcIiwgaXNDaGVja2VkKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gYWRkIG9yIHJlbW92ZSBmcm9tIGFycmF5XHJcbiAgICAgICAgICAgIGlmIChpc0NoZWNrZWQpIHtcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRVc2VyQXNzaWduZWRBY2NvdW50cy5wdXNoKGFjY291bnROdW1iZXIpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgY3VycmVudFVzZXJBc3NpZ25lZEFjY291bnRzLnNwbGljZShjdXJyZW50VXNlckFzc2lnbmVkQWNjb3VudHMuaW5kZXhPZihhY2NvdW50TnVtYmVyKSwgMSk7XHJcbiAgICAgICAgICAgI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dG8gdGhlIHNhdmUgYnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNhdmVCdXR0b24gPSAkKCcuc2F2ZS11c2VyLWluZm9bZGF0YS1pZD1cIicgKyBpZCArICdcIl0nLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbihcIlNhdmluZy4uLlwiLCBzYXZlQnV0dG9uKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gc2hvdyBzdWNjZXNzIGFuaW1hdGlvblxyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJTYXZlZCFcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGVycm9yOiBmdW5jdGlvbiAoanFYSFIsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBIYW5kbGUgYW55IGVycm9ycyBoZXJlXHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCdFcnJvciB1cGRhdGluZyB1c2VyIGluZm86ICcsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzaG93IGVycm9yIGFuaW1hdGlvblxyXG4gICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJFcnJvciFcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBwZXJmb3JtVXNlckFjdGlvbihlbWFpbCwgYWN0aW9uKSB7XHJcblxyXG4gICAgICAgIC8vIGNoZWNrIGlmIHdlIG5lZWQgdG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vLyBIYW5kbGUgZXJyb3JcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ0Vycm9yIHBlcmZvcm1pbmcgYWN0aW9uOicsIGVycm9yKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGNvbnZlcnRUb0FycmF5KGRhdGFPYmopIHtcclxuICAgICAgICAvLyBJZiBpdCdzIGFscmVhZHkgYW4gYXJyYXksIGp1c3QgcmV0dXJuIGl0XHJcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGF0YU9iaikpIHtcclxuICAgICAgICAgICAgcmV0dXJuIGRhdGFPYmo7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBJZiBpdCdzIGFuIG9iamVjdCwgdHJhbnNmb3JtIGl0IGludG8gYW4gYXJyYXlcclxuICAgICAgICBpZiAodHlwZW9mIGRhdGFPYmogPT09ICdvYmplY3QnICYmIGRhdGFPYmogIT09IG51bGwpIHtcclxuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKGRhdGFPYmopLm1hcChmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAvLyBDb252ZXJ0IGtleXMgdGhhdCBhcmUgbnVtZXJpYyBpbmRpY2VzIHRvIHZhbHVlc1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuICFpc05hTihrZXkpID8gZGF0YU9ialtrZXldIDogbnVsbDtcclxuICAgICAgICAgICAgfSkuZmlsdGVyKGZ1bmN0aW9uICh2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gRmlsdGVyIG91dCBhbnkgbm9uLXZhbHVlIGVudHJpZXNcclxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZSAhPT0gbnVsbDtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBJZiBpdCdzIG5laXRoZXIgYW4gYXJyYXkgbm9yIGFuIG9iamVjdCwgcmV0dXJuIGFuIGVtcHR5IGFycmF5XHJcbiAgICAgICAgcmV0dXJuIFtdO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHJlbG9hZFVzZXIoZW1haWwsIHN1Y2Nlc3NDYWxsYmFjaywgZXJyb3JDYWxsYmFjaykge1xyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogdXNlckJ5RW1haWxFbmRwb2ludCArICc/ZW1haWw9JyArIGVuY29kZVVSSUNvbXBvbmVudChlbWFpbCksXHJcbiAgICAgICAgICAgIHR5cGU6ICdHRVQnLFxyXG4gICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgcmVmcmVzaERhdGFJdGVtKGRhdGEsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc3VjY2Vzc0NhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NDYWxsYmFjaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBlcnJvcjogZnVuY3Rpb24gKGpxWEhSLCB0ZXh0U3RhdHVzLCBlcnJvclRocm93bikge1xyXG4gICAgICAgICAgICAgICAgLy8gdG9kbzogc2hvdyBlcnJvcj9cclxuICAgICAgICAgICAgICAgIGlmIChlcnJvckNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JDYWxsYmFjaygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcmVmcmVzaERhdGFJdGVtKHVwZGF0ZWREYXRhLCBjYWxsYmFjaykge1xyXG4gICAgICAgIC8vIEZpbmQgdGhlIGRhdGEgaXRlbSBpbiB0aGUgZGF0YVNvdXJjZSBieSBpdHMgSURcclxuICAgICAgICB2YXIgZGF0YUl0ZW0gPSB1c2VyRGF0YVNvdXJjZS5nZXQodXBkYXRlZERhdGEuRW1haWwpO1xyXG4gICAgICAgIGlmIChkYXRhSXRlbSkge1xyXG4gICAgICAgICAgICAvLyBVcGRhdGUgdGhlIGRhdGEgaXRlbSB3aXRoIHRoZSBuZXcgZGF0YVxyXG4gICAgICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiB1cGRhdGVkRGF0YSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZWREYXRhLmhhc093blByb3BlcnR5KHByb3BlcnR5KSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFJdGVtLnNldChwcm9wZXJ0eSwgdXBkYXRlZERhdGFbcHJvcGVydHldKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gZ2V0IHRoZSByb3cgXHJcbiAgICAgICAgICAgIHZhciByb3cgPSAka2VuZG9HcmlkLnRib2R5LmZpbmQoXCJ0cltkYXRhLXVpZD0nXCIgKyBkYXRhSXRlbS51aWQgKyBcIiddXCIpO1xyXG4gICAgICAgICAgICBpZiAocm93Lmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgLy8gZnJlZXplIHRoZSByb3cgY29sbGFwc2UgbG9naWMgYW5kIGFuaW1hdGlvbnNcclxuICAgICAgICAgICAgICAgIGZyZWV6ZVJvd0RldGFpbCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICBmcmVlemVSb3dEZXRhaWxBbmltYXRpb24gPSB0cnVlO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHJlZnJlc2ggdGhlIHJvd1xyXG4gICAgICAgICAgICAgICAgJGtlbmRvR3JpZC5zZWxlY3Qocm93KTtcclxuICAgICAgICAgICAgICAgICRrZW5kb0dyaWQuZXhwYW5kUm93KHJvdyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdW5mcmVlemUgdGhlIHJvdyBjb2xsYXBzZSBsb2dpYyBhbmQgYW5pbWF0aW9uc1xyXG4gICAgICAgICAgICAgICAgZnJlZXplUm93RGV0YWlsID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBmcmVlemVSb3dEZXRhaWxBbmltYXRpb24gPSBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICBjYWxsYmFjaygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGNsZWFyRGF0YSgpIHtcclxuICAgICAgICB1c2VyRGF0YVNvdXJjZS5kYXRhKFtdKTtcclxuICAgICAgICBhY2NvdW50c0RhdGFTb3VyY2UuZGF0YShbXSk7XHJcbiAgICAgICAgcm9sZXNEYXRhU291cmNlLmRhdGEoW10pO1xyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpbml0RGF0YVNvdXJjZXMoKTtcclxuICAgICAgICBpbml0R3JpZHNBbmRMaXN0Vmlld3MoKTtcclxuICAgICAgICBpbml0SGFuZGxlcnMoKTtcclxuICAgICAgICBzZXR1cFVzZXJGaWx0ZXIoKTtcclxuICAgICAgICBzZXR1cE9yZ2FuaXphdGlvbkxvb2t1cCgpO1xyXG4gICAgfTtcclxufVxyXG5cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVu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bXNnID0gXCJcIjtcclxuICAgICAgICAgICAgZm9yICggdmFyIHggPSAwOyB4IDwgZmlsZXMubGVuZ3RoOyB4KysgKVxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICB2YXIgZk9iaiA9IGZpbGVzW3hdO1xyXG4gICAgICAgICAgICAgICAgaWYgKCAhZS5jdXJyZW50VGFyZ2V0LmFjY2VwdC5pbmNsdWRlcyggZk9iai50eXBlICkgfHwgZk9iai5zaXplID49IDE5MDAwIClcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBtc2cgKz0gXCI8cD5UaGUgc2VsZWN0ZWQgZmlsZSBpcyBlaXRoZXIgdG8gbGFyZ2Ugb3IgaXMgb2YgdGhlIHdyb25nIGZpbGUgdHlwZS48L3A+XCJcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlc1RvU2VuZC5hcHBlbmQoIFwiZmlsZVwiICsgeCArIGZpbGVzVG9TZW5kLmxlbmd0aCwgZk9iaiApO1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSggJy5zdWJtaXQnLCBuYW1lc3BhY2UgKS5yZW1vdmVBdHRyKCAnZGlzYWJsZWQnICk7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCAnI2dlbmVyYWxlcnJvcnMnLCBuYW1lc3BhY2UgKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICggbXNnLmxlbmd0aCA+IDAgKVxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoICcjZ2VuZXJhbGVycm9ycycsIG5hbWVzcGFjZSApXHJcbiAgICAgICAgICAgICAgICAgICAgLmFwcGVuZCggbXNnIClcclxuICAgICAgICAgICAgICAgICAgICAuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCAnLnN1Ym1pdCcsIG5hbWVzcGFjZSApLmF0dHIoICdkaXNhYmxlZCcgKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gKTtcclxuXHJcbiAgICAgICAgalF1ZXJ5KCAnLnN1Ym1pdCcsIG5hbWVzcGFjZSApLmNsaWNrKCBmdW5jdGlvbiggZSApXHJcbiAgICAgICAge1xyXG5cclxuICAgICAgICAgICAgdmFyIHJlcXVlc3QgPSBqUXVlcnkuYWpheCgge1xyXG4gICAgICAgICAgICAgICAgdXJsOiB1cGxvYWRBdmF0YXJFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgICAgIGRhdGE6IGZpbGVzVG9TZW5kLC8vIG5ldyBGb3JtRGF0YSh0aGlzKSxcclxuICAgICAgICAgICAgICAgIHByb2Nlc3NEYXRhOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9ICk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoIGZ1bmN0aW9uKCByIClcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgaWYgKCByLnJlc3VsdCApXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB1cGxvYWRFcnJvck1lc3NhZ2UgPSAkKCcjdXBsb2FkLWVycm9yL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zcGFuPjwvYnV0dG9uPjwvZGl2PicpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKCF3aW5kb3cuZmF2b3JpdGVzRGV0YWlscykge1xyXG4gICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoXCJFcnJvciBsb2FkaW5nIGZhdm9yaXRlcy4gUGxlYXNlIHRyeSBhZ2Fpbi5cIik7XHJcbiAgICAgICAgICAgICRwcm9kdWN0TGlzdENvbnRhaW5lci5oaWRlKCk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGlzU2VsZWN0ZWQoaWQpIHtcclxuICAgICAgICAgICAgcmV0dXJuIChzZWxlY3RlZC5pbmRleE9mKGlkKSA+IC0xKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlbW92ZUZyb21TZWxlY3RlZChpZCkge1xyXG4gICAgICAgICAgICB2YXIgaW5kZXggPSBzZWxlY3RlZC5pbmRleE9mKGlkKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKVxyXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWQuc3BsaWNlKGluZGV4LCAxKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHVwZGF0ZVRvdGFsc0FuZEJ1dHRvbnMoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxlY3RlZFN1YlRvdGFsID0gMDtcclxuICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcclxuXHJcbiAgICAgICAgICAgIGl0ZW1zLm1hcChmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGlzU2VsZWN0ZWQoaXRlbS5JZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudCsrO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkU3ViVG90YWwgKz0gaXRlbS5MaW5lVG90YWw7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkoXCIjc2VsZWN0ZWRcIiwgbmFtZXNwYWNlKS5odG1sKGNvdW50KTtcclxuICAgICAgICAgICAgd2luZG93LmpRdWVyeShcIiNzdW1tYXJ5LXN1YnRvdGFsXCIsIG5hbWVzcGFjZSkuaHRtbChsaWJyYXJ5LmZvcm1hdFVTRChzZWxlY3RlZFN1YlRvdGFsKSk7XHJcblxyXG4gICAgICAgICAgICAkcmVtb3ZlQnV0dG9ucy5wcm9wKCdkaXNhYmxlZCcsIGNvdW50ID09PSAwKTtcclxuICAgICAgICAgICAgJGFkZFRvQ2FydEJ1dHRvbnMucHJvcCgnZGlzYWJsZWQnLCBjb3VudCA9PT0gMCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVDaGVja0JveENoYW5nZSgpIHtcclxuICAgICAgICAgICAgdmFyICR0ciA9IHdpbmRvdy5qUXVlcnkodGhpcykuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICB2YXIgY2hlY2tlZCA9IGlzU2VsZWN0ZWQoaWQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGNoZWNrZWQpIHtcclxuICAgICAgICAgICAgICAgIHJlbW92ZUZyb21TZWxlY3RlZChpZCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZWxlY3RlZC5wdXNoKGlkKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdXBkYXRlVG90YWxzQW5kQnV0dG9ucygpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlQ2hlY2tBbGxDaGFuZ2UoKSB7XHJcbiAgICAgICAgICAgIHZhciBjaGVja2VkID0gd2luZG93LmpRdWVyeSh0aGlzKS5wcm9wKCdjaGVja2VkJyk7XHJcbiAgICAgICAgICAgIHZhciAkY2hlY2tCb3hlcyA9IHdpbmRvdy5qUXVlcnkoXCIjc2hvcHBpbmctbGlzdC1wcm9kdWN0cyBpbnB1dFt0eXBlPWNoZWNrYm94XVwiLCBuYW1lc3BhY2UpO1xyXG5cclxuICAgICAgICAgICAgc2VsZWN0ZWQgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIGlmIChjaGVja2VkKSB7XHJcbiAgICAgICAgICAgICAgICBpdGVtcy5tYXAoZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZC5wdXNoKGl0ZW0uSWQpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICRjaGVja0JveGVzLnByb3AoJ2NoZWNrZWQnLCBjaGVja2VkKTtcclxuICAgICAgICAgICAgdXBkYXRlVG90YWxzQW5kQnV0dG9ucygpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlVXBkYXRlTGluZUl0ZW1RdWFudGl0eUNoYW5nZSgpIHtcclxuICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgIHZhciAkdHIgPSAkdGhpcy5jbG9zZXN0KFwidHJcIik7XHJcbiAgICAgICAgICAgIHZhciBpZCA9ICR0ci5kYXRhKFwiaWRcIik7XHJcbiAgICAgICAgICAgIHZhciBxdWFudGl0eSA9ICR0aGlzLnZhbCgpO1xyXG5cclxuICAgICAgICAgICAgRmF2b3JpdGVzQXBpLnVwZGF0ZUxpbmVJdGVtUXVhbnRpdHkoaWQsIHF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKHJlcykge1xyXG4gICAgICA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waW5nLWxpc3QtcHJvZHVjdHNcIiwgbmFtZXNwYWNlKTtcclxuICAgICAgICAgICAgJHNob3BwaW5nTGlzdFByb2R1Y3RzLmh0bWwoXCJcIik7XHJcbiAgICAgICAgICAgIGl0ZW1zLm1hcChmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgJHNob3BwaW5nTGlzdFByb2R1Y3RzLmFwcGVuZCgnIFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDx0ciBkYXRhLWlkPVwiJyArIGl0ZW0uSWQgKyAnXCIgZGF0YS1jb2RlPVwiJyArIGl0ZW0uU0tVICsgJ1wiPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtdGl0bGU9XCJTZWxlY3Q6XCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9XCJjaGVja2JveFwiJyArIChpc1NlbGVjdGVkKGl0ZW0uSWQpID8gJ2NoZWNrZWQ9XCJjaGVja2VkXCInIDogXCJcIikgKyAnXCIgLz4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIkl0ZW06XCI+JyArIGl0ZW0uU0tVICsgJzwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIkltYWdlOlwiPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbWcgc3JjPVwiJysgaXRlbS5JbWFnZVVybCArICdcIiBhbHQ9XCInICsgaXRlbS5EaXNwbGF5TmFtZSArICdcIiAvPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBkYXRhLXRpdGxlPVwiRGVzY3JpcHRpb246XCI+PGEgaHJlZj1cIicgKyBpdGVtLlVybCArICdcIiBhbHQ9XCInICsgaXRlbS5EaXNwbGF5TmFtZSArICdcIj4nICsgaXRlbS5EaXNwbGF5TmFtZSArICc8L3RkPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtdGl0bGU9XCJQcmljZTpcIiBjbGFzcz1cInRleHQtcmlnaHRcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3Bhbj4nICsgbGlicmFyeS5mb3JtYXRVU0QoaXRlbS5BY3R1YWxQcmljZSkgKyAnPC9zcGFuPlxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPlxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIlF1YW50aXR5OlwiPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPVwibnVtYmVyXCIgcmVxdWlyZWQ9XCJyZXF1aXJlZFwiIG1pbj1cIjFcIiBtYXg9XCIxMDAwXCIgdmFsdWU9XCInICsgaXRlbS5RdWFudGl0eSArICdcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIlRvdGFsOlwiIGNsYXNzPVwidGV4dC1yaWdodFwiPlxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHN0cm9uZz4nICsgbGlicmFyeS5mb3JtYXRVU0QoaXRlbS5MaW5lVG90YWwpICsgJzwvc3Ryb25nPiAgXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+Jyk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBiaW5kUHJvZHVjdHMoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZVJlbW92ZVByb2R1Y3RzRnJvbUxpc3QoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIHZhciBtZXNzYWdlID0galF1ZXJ5KCdpbnB1dFtuYW1lPXJlbW92ZUNvbmZpcm1hdGlvbk1lc3NhZ2VdJywgbmFtZXNwYWNlKS52YWwoKTtcclxuICAgICAgICAgICAgaWYgKHdpbmRvdy5jb25maXJtKG1lc3NhZ2UpKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gYnV0dG9uIGFuaW1hdGlvblxyXG4gICAgICAgICAgICAgICAgdmFyIGFuaW1hdGlvbiA9IEJ1dHRvbkFuaW1hdG9yLnN0YXJ0QW5pbWF0aW9uKCdSZW1vdmluZy4uLicsICQodGhpcykpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGNhbGwgZmF2b3JpdGVzIGFwaVxyXG4gICAgICAgICAgICAgICAgRmF2b3JpdGVzQXBpLnJlbW92ZVByb2R1Y3RMaXN0KHNlbGVjdGVkLFxyXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChyZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSByZXM7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNob3cgc3VjY2VzcyBhbmltYXRpb25cclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd1N1Y2Nlc3NBbmltYXRpb24oYW5pbWF0aW9uLCBcIlJlbW92ZWQhXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGdhSXRlbXMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvdGFsID0gMDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQubWFwKGZ1bmN0aW9uIChsaW5lSXRlbUlkLCBpbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW0gPSBpdGVtV2l0aExpbmVJdGVtSWQobGluZUl0ZW1JZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbSAhPT0gdW5kZWZpbmVkICYmIGl0ZW0gIT09IG51bGwpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG90YWwgKz0gaXRlbS5BY3R1YWxQcmljZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZ2FJdGVtID0gbGlicmFyeS5jcmVhdGVHQUl0ZW0oaXRlbS5TS1UsIGl0ZW0uUXVhbnRpdHksIGl0ZW0uQWN0dWFsUHJpY2UsIGl0ZW0uRGlzcGxheU5hbWUsIGl0ZW0uTWFudWZhY3R1cmVyLCBpdGVtLlByaW1hcnlDYXRlZ29yeSwgaXRlbS5TdWJDYXRlZ29yeSwgaW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdhSXRlbXMucHVzaChnYUl0ZW0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdhSXRlbXMgJiYgZ2FJdGVtcy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LnRyYWNrR2FFdmVudFRvRGF0YUxheWVyKFwicmVtb3ZlX2Zyb21fZmF2b3JpdGVzXCIsIGdhSXRlbXMsIHRvdGFsLCBcIml0ZW1zX3JlbW92ZV9mYXZvcml0ZXNcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGNoZWNrQWxsSW5wdXRzLnByb3AoJ2NoZWNrZWQnLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb2R1Y3RzKGRhdGEuSXRlbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVUb3RhbHNBbmRCdXR0b25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNob3cgZXJyb3IgYW5pbWF0aW9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRmFpbGVkIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKFwiRXJyb3IgcmVtb3ZpbmcgcHJvZHVjdCBmcm9tIGZhdm9yaXRlc1wiKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaXRlbVdpdGhMaW5lSXRlbUlkKGlkKSB7XHJcbiAgICAgICAgICAgIHZhciBmb3VuZCA9IG51bGw7XHJcblxyXG4gICAgICAgICAgICBpdGVtcy5tYXAoZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChpdGVtLklkID09PSBpZCkgZm91bmQgPSBpdGVtO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJldHVybiBmb3VuZDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZUFkZFRvQ2FydEZyb21MaXN0KGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgLy8gZ2V0IHZhcmlhYmxlc1xyXG4gICAgICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgdmFyIGdhSXRlbXMgPSBbXTtcclxuICAgICAgICAgICAgdmFyIGl0ZW1QcmljZSA9IDAuMDtcclxuICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcclxuICAgICAgICAgICAgdmFyIG1zZyA9ICcuLi4nO1xyXG4gICAgICAgICAgICB2YXIgYWNjb3VudElkID0gd2luZG93LmZhdm9yaXRlc0RldGFpbHMuQWNjb3VudElkXHJcblxyXG4gICAgICAgICAgICAvLyBtYXAgaXRlbXMgdG8gYXJyYXlcclxuICAgICAgICAgICAgdmFyIGl0ZW1zVG9DYXJ0ID0gc2VsZWN0ZWQubWFwKGZ1bmN0aW9uIChsaW5lSXRlbUlkKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaXRlbSA9IGl0ZW1XaXRoTGluZUl0ZW1JZChsaW5lSXRlbUlkKTtcclxuICAgICAgICAgICAgICAgIGlmIChpdGVtICE9PSB1bmRlZmluZWQgJiYgaXRlbSAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBjb2RlID0gaXRlbS5TS1U7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHF1YW50aXR5ID0gaXRlbS5RdWFudGl0eTtcclxuICAgICAgICAgICAgICAgICAgICBpdGVtUHJpY2UgPSBpdGVtLkFjdHVhbFByaWNlO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBnYUl0ZW0gPSBsaWJyYXJ5LmNyZWF0ZUdBSXRlbShjb2RlLCBxdWFudGl0eSwgaXRlbVByaWNlLCBpdGVtLkRpc3BsYXlOYW1lLCBpdGVtLk1hbnVmYWN0dXJlciwgaXRlbS5QcmltYXJ5Q2F0ZWdvcnksIGl0ZW0uU3ViQ2F0ZWdvcnksIGNvdW50KTtcclxuICAgICAgICAgICAgICAgICAgICBnYUl0ZW1zLnB1c2goZ2FJdGVtKTtcclxuICAgICAgICAgICAgICAgICAgICBjb3VudCsrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKFwiRXJyb3IgYWRkaW5nIGl0ZW0gdG8gY2FydC5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvZGU6IGl0ZW0uU0tVLFxyXG4gICAgICAgICAgICAgICAgICAgIHF1YW50aXR5OiBpdGVtLlF1YW50aXR5XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgLy8gZGV0ZXJtaW5lIGFkZGVkIGNvdW50XHJcbiAgICAgICAgICAgIHZhciBtc2cgPSAnJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7ICsnICsgY291bnQgKyAnICZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyc7XHJcblxyXG4gICAgICAgICAgICAvLyB1c2UgYnV0dG9uIGFuaW1hdG9yXHJcbiAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignQWRkaW5nLi4uJywgYnV0dG9uKTtcclxuXHJcbiAgICAgICAgICAgIC8vIGNhbGwgc2hvcHBpbmcgY2FydCBhcGlcclxuICAgICAgICAgICAgU2hvcHBpbmdDYXJ0QXBpLmFkZEl0ZW1MaXN0VG9DYXJ0KGFjY291bnRJZCwgaXRlbXNUb0NhcnQsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgbXNnKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyK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gICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy5mYXZvcml0ZXNEZXRhaWxzLkFkZFByb2R1Y3RFbmRQb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIENvZGU6IGNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFF1YW50aXR5OiBxdWFudGl0eVxyXG4gICAgICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuSXRlbXMpIHtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVQcm9kdWN0cyhkYXRhLkl0ZW1zKTtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVUb3RhbHNBbmRCdXR0b25zKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIlVuYWJsZSB0byBhZGQgcHJvZHVjdCBcIiArIGNvZGUgKyBcIiB0byBmYXZvcml0ZXNcIik7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlU2hvcHBpbmdMaXN0VGFibGUoKSB7XHJcbiAgICAgICAgICAgICRtYWluV2FpdGluZy5zaG93KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgcmVxdWVzdCA9XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cualF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cuZmF2b3JpdGVzRGV0YWlscy5GYXZvcml0ZXNFbmRQb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnRJZDogd2luZG93LmZhdm9yaXRlc0RldGFpbHMuQWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBOYW1lOiB3aW5kb3cuZmF2b3JpdGVzRGV0YWlscy5OYW1lXHJcbiAgICAgICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi9qc29uJyxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YS5JdGVtcykge1xyXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb2R1Y3RzKGRhdGEuSXRlbXMpO1xyXG4gICAg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vdGFsOiBjYi5kYXRhKCd0b3RhbCcpLFxyXG4gICAgICAgICAgICAgICAgICAgIGFjY291bnROdW1iZXI6IGNiLmRhdGEoJ2FjY291bnQnKSxcclxuICAgICAgICAgICAgICAgICAgICBkYXRlOiBjYi5kYXRhKCdkYXRlJylcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiB0aGUgaW52b2ljZSBpcyBpbiB0aGUgbGlzdCBhbHJlYWR5XHJcbiAgICAgICAgICAgICAgICB2YXIgZXhpc3RzID0gaW52b2ljZXMuZmluZCh4ID0+IHguaW52b2ljZU51bWJlciA9PT0gaW52b2ljZS5pbnZvaWNlTnVtYmVyKTtcclxuICAgICAgICAgICAgICAgIGlmICghZXhpc3RzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW52b2ljZXMucHVzaChpbnZvaWNlKTtcclxuICAgICAgICAgICAgICAgICAgICBpbnZvaWNldG90YWwgKz0gcGFyc2VGbG9hdChjYi5kYXRhKCd0b3RhbCcpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBqUXVlcnkoJ2lucHV0W25hbWU9cGF5bWVudG90YWxdJywgbmFtZXNwYWNlKS52YWwoaW52b2ljZXRvdGFsKTtcclxuICAgICAgICByZXR1cm4gaW52b2ljZXM7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcmVzZXRTZWxlY3Rpb25BbmRCdXR0b25zKCkge1xyXG4gICAgICAgIC8qIHN0YXJ0IHJlbW92ZWQgcGVyIGRldm9wcyAxMzAzXHJcbiAgICAgICAgalF1ZXJ5KCAnaW5wdXRbIG5hbWU9c2VsZWN0SW52b2ljZSBdJywgbmFtZXNwYWNlICkuZWFjaCggZnVuY3Rpb24oKVxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgdmFyIGNiID0galF1ZXJ5KCB0aGlzICk7XHJcblxy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blxyXG4gICAgICAgIHZhciBjaGVja2JveCA9IGUuaXNSZXR1cm5cclxuICAgICAgICAgICAgPyAnJ1xyXG4gICAgICAgICAgICA6ICc8cD48c3Ryb25nPlNlbGVjdDwvc3Ryb25nPjxici8+PGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGRhdGEtaWQ9XCInXHJcbiAgICAgICAgICAgICsgZS5pbnZvaWNlTnVtYmVyXHJcbiAgICAgICAgICAgICsgJ1wiIGRhdGEtdG90YWw9XCInXHJcbiAgICAgICAgICAgICsgZS50b3RhbFxyXG4gICAgICAgICAgICArICdcIiBkYXRhLWFjY291bnQ9XCInXHJcbiAgICAgICAgICAgICsgZS5hY2NvdW50TnVtYmVyXHJcbiAgICAgICAgICAgICsgJ1wiIGRhdGEtZGF0ZT1cIidcclxuICAgICAgICAgICAgKyBlLmludm9pY2VEYXRlXHJcbiAgICAgICAgICAgICsgJ1wiIG5hbWU9XCJzZWxlY3RJbnZvaWNlXCIgLz5TZWxlY3QgVGhpcyBJbnZvaWNlPC9wPic7XHJcblxyXG4gICAgICAgIHZhciBhcHBseUNyZWRpdHNIdG1sID0gZS5pc1JldHVybiAmJiB3aW5kb3cuc2V0dGluZ3MuRW5hYmxlQXBwbHlDcmVkaXRzXHJcbiAgICAgICAgICAgID8gJzxwPjxpbnB1dCB0eXBlPVwiYnV0dG9uXCIgbmFtZT1cImFwcGx5LWNyZWRpdHNcIiBjbGFzcz1cImJ0biBidG4tcHJpbWFyeSBidG4tc20gYXBwbHktY3JlZGl0c1wiIHZhbHVlPVwiQXBwbHlcIiBkYXRhLWlkPVwiJ1xyXG4gICAgICAgICAgICArIGUuaW52b2ljZU51bWJlclxyXG4gICAgICAgICAgICArICdcIiBkYXRhLXRvdGFsPVwiJ1xyXG4gICAgICAgICAgICArIGUudG90YWxcclxuICAgICAgICAgICAgKyAnXCIgZGF0YS1hY2NvdW50PVwiJ1xyXG4gICAgICAgICAgICArIGUuYWNjb3VudE51bWJlclxyXG4gICAgICAgIC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V0VW5wYWlkSW52b2ljZXNVcmwsXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6IFwianNvblwiXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgcGFyYW1ldGVyTWFwOiBmdW5jdGlvbiAob3B0aW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnROdW1iZXI6IGdldFNlbGVjdGVkQWNjb3VudE51bWJlcigpXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBkYXRhOiBmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICBsb2FkUGF5bWVudFNjaGVkdWxlKHJlc3BvbnNlLlBheW1lbnRTY2hlZHVsZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlSW52b2ljZXNMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuVW5wYWlkSW52b2ljZXM7IC8vIHRoaXMgaWRlbnRpZmllcyB3aGF0IHBhcnQgb2YgdGhlIHJlc3BvbnNlIHRoZSBpbnZvaWNlcyBhcnJheSBpcyBsb2NhdGVkXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbW9kZWw6IHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2ljZU51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludm9pY2VEYXRlOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2ljZURhdGVGb3JtYXR0ZWQ6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwb051bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvdGFsOiB7IHR5cGU6IFwiaW50ZWdlclwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpZWRDcmVkaXRzOiB7IHR5cGU6IFwib2JqZWN0XCIgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY2hhbmdlOiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gYWRkIHRoZSBkYXRhc291cmNlIHRvIHRoZSB3aW5kb3cgc28gdGhhdCBhcHBsaWVkIGNyZWRpdHMgSlMgY2FuIGFjY2VzcyBpdFxyXG4gICAgICAgICAgICAgICAgd2luZG93LnVucGFpZEludm9pY2VzRGF0YVNvdXJjZSA9IHVucGFpZEludm9pY2VzRGF0YVNvdXJjZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0tIEludm9pY2UgSGlzdG9yeSBEYXRhIFNvdXJjZVxyXG4gICAgICAgIGludm9pY2VIaXN0b3J5RGF0YVNvdXJjZSA9IG5ldyBrZW5kby5kYXRhLkRhdGFTb3VyY2Uoe1xyXG4gICAgICAgICAgICB0cmFuc3BvcnQ6IHtcclxuICAgICAgICAgICAgICAgIHJlYWQ6IHtcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy5zZXR0aW5ncy5HZXRQYWlkSW52b2ljZXNVcmwsXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBcImpzb25cIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHBhcmFtZXRlck1hcDogZnVuY3Rpb24gKG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgc29ydEZpZWxkID0gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNvcnREaXIgPSAnJztcclxuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucz8uc29ydCAmJiBvcHRpb25zLnNvcnQubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzb3J0RmllbGQgPSBvcHRpb25zLnNvcnRbMF0uZmllbGQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvcnREaXIgPSBvcHRpb25zLnNvcnRbMF0uZGlyO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50TnVtYmVyOiBnZXRTZWxlY3RlZEFjY291bnROdW1iZXIoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUGFnZU51bWJlcjogb3B0aW9ucy5wYWdlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBQYWdlU2l6ZTogb3B0aW9ucy5wYWdlU2l6ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgRmlsdGVyVGV4dDogJCgnI2ZpbHRlclRleHQnLCBuYW1lc3BhY2UpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJEYXRlOiAkKCcjZmlsdGVyRGF0ZScsIG5hbWVzcGFjZSkudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFNvcnRGaWVsZDogc29ydEZpZWxkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBTb3J0RGlyZWN0aW9uOiBzb3J0RGlyXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBkYXRhOiBcIkRhdGFcIixcclxuICAgICAgICAgICAgICAgIHRvdGFsOiBcIlRvdGFsXCIsXHJcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnZvaWNlTnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2ljZURhdGU6IHsgdHlwZTogXCJkYXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcG9OdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBJbnZvaWNlRGF0ZUZvcm1hdHRlZDogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpZWRDcmVkaXRzOiB7IHR5cGU6IFwib2JqZWN0XCIgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgc2VydmVyUGFnaW5nOiB0cnVlLFxyXG4gICAgICAgICAgICBzZXJ2ZXJGaWx0ZXJpbmc6IHRydWUsXHJcbiAgICAgICAgICAgIHNlcnZlclNvcnRpbmc6IHRydWUsXHJcbiAgICAgICAgICAgIHBhZ2VTaXplOiBwYWdlU2l6ZXNbMl0sXHJcbiAgICAgICAgICAgIHBhZ2U6IDFcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0R3JpZHNBbmRMaXN0Vmlld3MoKSB7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gVW5wYWlkIEludm9pY2VzIEdyaWQgKERlc2t0b3ApXHJcbiAgICAgICAgalF1ZXJ5KCcua2VuZG8tdW5wYWlkLWludm9pY2VzJywgbmFtZXNwYWNlKS5rZW5kb0dyaWQoXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IHVucGFpZEludm9pY2VzRGF0YVNvdXJjZSxcclxuICAgICAgICAgICAgICAgIGNvbHVtbnM6IFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIlNlbGVjdFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCI2NXB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBmdW5jdGlvbiAoZGF0YUl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhSXRlbS5pc1JldHVybikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuc2V0dGluZ3MuRW5hYmxlQXBwbHlDcmVkaXRzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGlucHV0IHR5cGU9XCJidXR0b25cIiBuYW1lPVwiYXBwbHktY3JlZGl0c1wiIGNsYXNzPVwiYnRuIGJ0bi1wcmltYXJ5IGJ0bi1zbSBhcHBseS1jcmVkaXRzXCIgdmFsdWU9XCJBcHBseVwiIGRhdGEtaWQ9XCInXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIGRhdGFJdGVtLmludm9pY2VOdW1iZXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJ1wiIGRhdGEtdG90YWw9XCInXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIGRhdGFJdGVtLnRvdGFsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICdcIiBkYXRhLWFjY291bnQ9XCInXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIGRhdGFJdGVtLmFjY291bnROdW1iZXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJ1wiIC8+JztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8aW5wdXQgdHlwZT1cImNoZWNrYm94XCIgbmFtZT1cInNlbGVjdEludm9pY2VcIiBkYXRhLWlkPVwiJyArIGRhdGFJdGVtLmludm9pY2VOdW1iZXIgKyAnXCIgZGF0YS10b3RhbD1cIicgKyBkYXRhSXRlbS50b3RhbCArICdcIiBkYXRhLWFjY291bnQ9XCInICsgZGF0YUl0ZW0uYWNjb3VudE51bWJlciArICdcIiBkYXRhLWRhdGU9XCInICsgZGF0YUl0ZW0uaW52b2ljZURhdGUgKyAnXCIgLz4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB7IGZpZWxkOiBcImludm9pY2VOdW1iZXJcIiwgdGl0bGU6IFwiSW52b2ljZSNcIiwgd2lkdGg6IFwiMTAwXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcImludm9pY2VEYXRlXCIsIHRpdGxlOiBcIkRhdGVcIiwgd2lkdGg6IFwiMTAwcHhcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6ICcjPSBrZW5kby50b1N0cmluZyhrZW5kby5wYXJzZURhdGUoaW52b2ljZURhdGUsIFwieXl5eS1NTS1kZFwiKSwgXCJNTS9kZC95eXl5XCIpIydcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwicG9OdW1iZXJcIiwgdGl0bGU6IFwiUE9cIiwgd2lkdGg6IFwiMjEwcHhcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHsgZmllbGQ6IFwidG90YWxcIiwgdGl0bGU6IFwiVG90YWxcIiwgZm9ybWF0OiBcInswOmN9XCIsIHdpZHRoOiBcIjEwMHB4XCIgfSxcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkFjdGlvblwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxNzVweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGRhdGFJdGVtKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdXJsID0gd2luZG93LnNldHRpbmdzLkdldFBkZlVybFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJz9hY2NvdW50TnVtYmVyPScgKyBnZXRTZWxlY3RlZEFjY291bnROdW1iZXIoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJyZpbnZvaWNlPScgKyBkYXRhSXRlbS5pbnZvaWNlTnVtYmVyO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGdldCBvbmx5IFBERiBsaW5rXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9ICc8YSBocmVmPVwiJyArIHVybCArICdcIiB0YXJnZXQ9XCJfYmxhbmtcIj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnVmlldyBQREYnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPC9hPidcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm4gaHRtbFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGh0bWw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgIH0pLmRhdGEoJ2tlbmRvR3JpZCcpO1xyXG5cclxuICAgICAgICAvLy0tLS0tIFVucGFpZCBJbnZvaWNlcyBMaXN0VmlldyAoTW9iaWxlKVxyXG4gICAgICAgIGpRdWVyeSgnI3VucGFpZC1pbnZvaWNlcy1jYXJkcy1jb250YWluZXIgLm1vYmlsZS1pdGVtcycsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLmtlbmRvTGlzdFZpZXcoe1xyXG4gICAgICAgICAgICAgICAgZGF0YVNvdXJjZTogdW5wYWlkSW52b2ljZXNEYXRhU291cmNlLFxyXG4gICAgICAgICAgICAgICAgc2Nyb2xsYWJsZTogJ2VuZGxlc3MnLFxyXG4gICAgICAgICAgICAgICAgaGVpZ2h0OiA0MDAsXHJcbiAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZ2V0VW5wYWlkSW52b2ljZXNDYXJkVGVtcGxhdGVcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSW52b2ljZSBoaXN0b3J5IEdyaWQgKERlc2t0b3ApXHJcbiAgICAgICAgalF1ZXJ5KCcua2VuZG8taW52b2ljZS1oaXN0b3J5JywgbmFtZXNwYWNlKS5rZW5kb0dyaWQoXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IGludm9pY2VIaXN0b3J5RGF0YVNvdXJjZSxcclxuICAgICAgICAgICAgICAgIHNvcnRhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgcGFnZWFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICBhbHdheXNWaXNpYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgICBwYWdlU2l6ZXM6IHBhZ2VTaXplc1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNvbHVtbnM6XHJcbiAgICAgICAgICAgICAgICAgICAgW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ2ludm9pY2VOdW1iZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdJbnZvaWNlIycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2ZpbHRlcmFibGU6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdEYXRlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnaW52b2ljZURhdGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9maWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6ICcjPSBrZW5kby50b1N0cmluZyhrZW5kby5wYXJzZURhdGUoaW52b2ljZURhdGUsIFwieXl5eS1NTS1kZFwiKSwgXCJNTS9kZC95eXl5XCIpIydcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ3BvTnVtYmVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnUE8nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9maWx0ZXJhYmxlOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnQWN0aW9uJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZmlsdGVyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxNzVweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChkYXRhSXRlbSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1cmwgPSB3aW5kb3cuc2V0dGluZ3MuR2V0UGRmVXJsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJz9hY2NvdW50TnVtYmVyPScgKyBnZXRTZWxlY3RlZEFjY291bnROdW1iZXIoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICcmaW52b2ljZT0nICsgZGF0YUl0ZW0uaW52b2ljZU51bWJlcjtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWRkIFBERiBsaW5rXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSAnPGEgaHJlZj1cIicgKyB1cmwgKyAnXCIgdGFyZ2V0PVwiX2JsYW5rXCI+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICdWaWV3IFBERidcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPC9hPic7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJldHVybiBodG1sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGh0bWw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICA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aHRtbChnZW5lcmFsTGlicmFyeS5mb3JtYXRVU0QodG90YWwpKTtcclxuXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgT24gVHJhbnNhY3Rpb24gQXBwcm92ZWQgXHJcbiAgICAgICAgalF1ZXJ5KHdpbmRvdylcclxuICAgICAgICAgICAgLm9uKCdtb2RhbC5PblRyYW5zYWN0aW9uQXBwcm92ZWQnLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUsIGRhdGEpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gaGlkZSB0aGUgdHJhbnNhY3Rpb24gbW9kYWxcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNjcmVhdGUtdHJhbnNhY3Rpb24tbW9kYWwnLCBuYW1lc3BhY2UpLm1vZGFsKCdoaWRlJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzZXRTZWxlY3Rpb25BbmRCdXR0b25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcGF5bWVudFN1Y2Nlc3Muc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBPbiBDcmVkaXRzIEFwcGxpZWRcclxuICAgICAgICBqUXVlcnkod2luZG93KVxyXG4gICAgICAgICAgICAub24oJ21vZGFsLk9uQ3JlZGl0c0FwcGxpZWQnLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUsIGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBsb2FkRGF0YUZvckFjY291bnQoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIFJlZ2lzdGVyIGNoZWNrYm94IGNoYW5nZVxyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpXHJcbiAgICAgICAgICAgIC5vbignY2hhbmdlJywgJ2lucHV0WyBuYW1lPXNlbGVjdEludm9pY2UgXScsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRTZWxlY3RlZEludm9pY2VzKCkubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5idG4tcGF5JywgbmFtZXNwYWNlKS5wcm9wKCdkaXNhYmxlZCcsICcnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuYnRuLWVtYWlsJywgbmFtZXNwYWNlKS5wcm9wKCdkaXNhYmxlZCcsICcnKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmJ0bi1wYXknLCBuYW1lc3BhY2UpLnByb3AoJ2Rpc2FibGVkJywgJ2Rpc2FibGVkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmJ0bi1lbWFpbCcsIG5hbWVzcGFjZSkucHJvcCgnZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgZmlsdGVyIGZvcm0gc3VibWl0XHJcbiAgICAgICAgalF1ZXJ5KCcjZmlsdGVyLWZvcm0nLCBuYW1lc3BhY2UpXHJcbiAgICAgICAgICAgIC5zdWJtaXQoZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgIGludm9pY2VIaXN0b3J5RGF0YVNvdXJjZS5yZWFkKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIENsZWFyIGJ1dHRvblxyXG4gICAgICAgIGpRdWVyeSgnI2NsZWFyRm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cclxuICAgICAgICBjbGVhck1lc3NhZ2VzKCk7XHJcblxyXG4gICAgICAgIHZhciBlbWFpbCA9IGVtYWlsU2VsZWN0aW9uLnZhbCgpO1xyXG5cclxuICAgICAgICBpZiAoZW1haWwgPT0gJ090aGVyJykge1xyXG4gICAgICAgICAgICBpZiAoZW1haWxPdGhlci52YWwoKSA9PSBcIlwiKSB7XHJcbiAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXCJFbnRlciBvdGhlciBlbWFpbCBhZGRyZXNzXCIpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVtYWlsID0gZW1haWxPdGhlci52YWwoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChlbWFpbCA9PSAnJykge1xyXG4gICAgICAgICAgICBpZiAoZW1haWxTZWxlY3Rpb24udmFsKCkgPT0gJ090aGVyJykge1xyXG4gICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKCdQbGVhc2UgZW50ZXIgYW4gZW1haWwgYWRkcmVzcy4nKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZSgnUGxlYXNlIHNlbGVjdCBhbiBlbWFpbCBhZGRyZXNzLicpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBqUXVlcnkoJyNzZW5kLWVtYWlsJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHZhciBhY2NvdW50TnVtYmVyID0gd2luZG93Lmludm9pY2VEZXRhaWxzLkFjY291bnROdW1iZXI7XHJcblxyXG4gICAgICAgIHZhciBtYXhGaWxlTGltaXQgPSB3aW5kb3cuaW52b2ljZURldGFpbHMuTWF4RmlsZUxpbWl0O1xyXG5cclxuICAgICAgICBqUXVlcnkoJyNzZW5kLWVtYWlsJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbiAgICAgICAgalF1ZXJ5KCcuZW1haWwtd2FpdGluZycsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgIHZhciBzZWxlY3RlZE9wdGlvbiA9IGdldFNlbGVjdGVkQWNjb3VudE51bWJlcigpO1xyXG4gICAgICAgIHZhciBtb2RlbEFjY291bnROdW1iZXIgPSBcIlwiO1xyXG5cclxuICAgICAgICBpZiAoc2VsZWN0ZWRPcHRpb24gPT09IFwidW5kZWZpbmVkXCIpIHtcclxuICAgICAgICAgICAgbW9kZWxBY2NvdW50TnVtYmVyID0gYWNjb3VudE51bWJlcjtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIG1vZGVsQWNjb3VudE51bWJlciA9IHNlbGVjdGVkT3B0aW9uO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gc2VuZCBlbWFpbFxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0gd2luZG93LmpRdWVyeS5hamF4KFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cuc2V0dGluZ3MuRW1haWxVcmwsXHJcbiAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHsgd2l0aENyZWRlbnRpYWxzOiB0cnVlIH0sXHJcbiAgICAgICAgICAgICAgICBkYXRhOlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIEVtYWlsOiBlbWFpbCxcclxuICAgICAgICAgICAgICAgICAgICBBY2NvdW50TnVtYmVyOiBtb2RlbEFjY291bnROdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgSW52b2ljZU51bWJlcjogaW52b2ljZU51bWJlckxpc3RTZWxlY3Rpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgTWVzc2FnZTogcGVyc29uYWxNZXNzYWdlU2VsZWN0aW9uLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgIE1heEZpbGVMaW1pdDogbWF4RmlsZUxpbWl0XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgaWYgKGRhdGEpIHtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5FbWFpbFNlbnRNZXNzYWdlICE9ICcnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkU3VjY2Vzc01lc3NhZ2UoJy5zdWNjZXNzLW1lc3NhZ2UnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuRW1haWxTZW50TWVzc2FnZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICQoJyNzZW5kLWVtYWlsLW1vZGFsJywgbmFtZXNwYWNlKS5tb2RhbCgnaGlkZScpO1xyXG5cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkU3VjY2Vzc01lc3NhZ2UoJy5lcnJvci1tZXNzYWdlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBcIkVycm9yIHNlbmRpbmcgZW1haWwuIFBsZWFzZSB0cnkgYWdhaW4hXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5zY3JvbGxUbygwLCAwKTtcclxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgIC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IGFjQ29uZmlybUludm9pY2VEYXRhU291cmNlLmRhdGEoKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRJbnZvaWNlRnJvbVNlbGVjdERhdGFTb3VyY2UoaW52b2ljZU51bWJlcikge1xyXG4gICAgICAgIHJldHVybiBhY1NlbGVjdEludm9pY2VEYXRhU291cmNlLmRhdGEoKVxyXG4gICAgICAgICAgICAuZmluZChmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGkuaW52b2ljZU51bWJlciA9PT0gaW52b2ljZU51bWJlcjtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gZ2V0SW52b2ljZUZyb21Db25maXJtRGF0YVNvdXJjZShpbnZvaWNlTnVtYmVyKSB7XHJcbiAgICAgICAgcmV0dXJuIGFjQ29uZmlybUludm9pY2VEYXRhU291cmNlLmRhdGEoKVxyXG4gICAgICAgICAgICAuZmluZChmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGkuaW52b2ljZU51bWJlciA9PT0gaW52b2ljZU51bWJlcjtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gZ2V0U2VsZWN0ZWRJbnZvaWNlVG90YWwoKSB7XHJcbiAgICAgICAgdmFyIGludm9pY2VUb3RhbHMgPSAwO1xyXG4gICAgICAgIGdldFNlbGVjdGVkSW52b2ljZXNUb0FwcGx5KCkuZm9yRWFjaChmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICBpbnZvaWNlVG90YWxzICs9IE51bWJlcihpLnRvdGFsKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gaW52b2ljZVRvdGFscztcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRSZW1haW5pbmdDcmVkaXQoKSB7XHJcbiAgICAgICAgdmFyIGNyZWRpdHNSZW1haW5p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mVkaXRzUmVtYWluaW5nID0gZ2V0UmVtYWluaW5nQ3JlZGl0KCk7XHJcbiAgICAgICAgICAgIHZhciBjcmVkaXRzVG9BcHBseSA9IE1hdGgubWluKGNyZWRpdHNSZW1haW5pbmcsIGludm9pY2UudG90YWwpO1xyXG5cclxuICAgICAgICAgICAgLy8gYWRkIHRvIGNvbmZpcm0gZGF0YSBzb3VyY2VcclxuICAgICAgICAgICAgYWNDb25maXJtSW52b2ljZURhdGFTb3VyY2UuYWRkKHtcclxuICAgICAgICAgICAgICAgIGludm9pY2VOdW1iZXI6IGludm9pY2UuaW52b2ljZU51bWJlcixcclxuICAgICAgICAgICAgICAgIHRvdGFsOiBpbnZvaWNlLnRvdGFsLFxyXG4gICAgICAgICAgICAgICAgY3JlZGl0c1RvQXBwbHk6IGNyZWRpdHNUb0FwcGx5LFxyXG4gICAgICAgICAgICAgICAgYmFsYW5jZTogKGludm9pY2UudG90YWwgLSBjcmVkaXRzVG9BcHBseSkudG9GaXhlZCgyKVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIC8vIGdvIHRvIG5leHQgc3RlcCBpZiB0aGUgdXNlciBoYXMgc2VsZWN0ZWQgYWxsIGNyZWRpdHMgYXZhaWxhYmxlXHJcbiAgICAgICAgICAgIGlmIChnZXRSZW1haW5pbmdDcmVkaXQoKSA8PSAwKSB7XHJcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG93QXBwbHlDcmVkaXRzTW9kYWxTdGVwKDIpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICA1MDApO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgIH0gZWxzZSB7XHJcblxyXG4gICAgICAgICAgICAvLyBnZXQgdGhlIGludm9pY2VcclxuICAgICAgICAgICAgdmFyIGludm9pY2UgPSBnZXRJbnZvaWNlRnJvbUNvbmZ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XQgY3JlZGl0cyBmcm9tIHVucGFpZCBpbnZvaWNlcyB0byBzaG93IGluIHRoZSBhcHBseSBjcmVkaXRzIG1vZGFsXHJcbiAgICAgICAgaWYgKHVucGFpZEludm9pY2VzICYmIHVucGFpZEludm9pY2VzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICBcclxuICAgICAgICAgICAgYWNTZWxlY3RJbnZvaWNlRGF0YVNvdXJjZS5kYXRhKHVucGFpZEludm9pY2VzLmZpbHRlcihmdW5jdGlvbiAoZikge1xyXG4gICAgICAgICAgICAgICAgaWYgKGYuaXNSZXR1cm4pIHsgcmV0dXJuIGZhbHNlOyB9Ly9yZW1vdmUgcmV0dXJuc1xyXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkUmV0dXJuICYmIHNlbGVjdGVkUmV0dXJuLmFwcGxpZWRDcmVkaXRzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBzZWxlY3RlZFJldHVybi5hcHBsaWVkQ3JlZGl0cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWRSZXR1cm4uYXBwbGllZENyZWRpdHNbaV0uYXBwbGllZFRvRG9jdW1lbnROdW1iZXIgPT0gZi5pbnZvaWNlTnVtYmVyKSB7Ly9XZSd2ZSBhbHJlYWR5IHVzZWQgcGFydCBvZiB0aGlzIGNyZWRpdCBvbiB0aGlzIGludm9pY2UuIFdlIGNhbid0IGRvIGl0IHR3aWNlLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIH0pKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAg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mFjLWNvbnRlbnQtc3RlcHBlcicsIG5hbWVzcGFjZSkuZmFkZUluKCk7XHJcblxyXG4gICAgICAgIC8vIGhhbmRsZSBidXR0b25zXHJcbiAgICAgICAgJG1vZGFsTmV4dEJ1dHRvbi5wcm9wKCdkaXNhYmxlZCcsIGZhbHNlKTtcclxuICAgICAgICAkbW9kYWxQcmV2aW91c0J1dHRvbi5wcm9wKCdkaXNhYmxlZCcsIGZhbHNlKTtcclxuICAgICAgICAkbW9kYWxDYW5jZWxCdXR0b24ucHJvcCgnZGlzYWJsZWQnLCBmYWxzZSk7XHJcbiAgICAgICAgJG1vZGFsQ29uZmlybUJ1dHRvbi5wcm9wKCdkaXNhYmxlZCcsIGZhbHNlKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0RGF0YVNvdXJjZXMoKSB7XHJcblxyXG4gICAgICAgIC8vLS0tLS0tIEFwcGx5IENyZWRpdHMgLSBTZWxlY3QgSW52b2ljZSBEYXRhIFNvdXJjZVxyXG4gICAgICAgIGFjU2VsZWN0SW52b2ljZURhdGFTb3VyY2UgPSBuZXcga2VuZG8uZGF0YS5EYXRhU291cmNlKHtcclxuICAgICAgICAgICAgZGF0YTogW10sXHJcbiAgICAgICAgICAgIHNjaGVtYToge1xyXG4gICAgICAgICAgICAgICAgbW9kZWw6IHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2ljZU51bWJlcjogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludm9pY2VEYXRlOiB7IHR5cGU6IFwiZGF0ZVwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludm9pY2VEYXRlRm9ybWF0dGVkOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcG9OdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbDogeyB0eXBlOiBcImludGVnZXJcIiB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gQXBwbHkgQ3JlZGl0cyAtIENvbmZpcm0gRGlzdHJpYnV0aW9ucyBEYXRhIFNvdXJjZVxyXG4gICAgICAgIGFjQ29uZmlybUludm9pY2VEYXRhU291cmNlID0gbmV3IGtlbmRvLmRhdGEuRGF0YVNvdXJjZSh7XHJcbiAgICAgICAgICAgIGRhdGE6IFtdLFxyXG4gICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludm9pY2VOdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvdGFsOiB7IHR5cGU6IFwiaW50ZWdlclwiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmFsYW5jZTogeyB0eXBlOiBcImludGVnZXJcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNyZWRpdHNUb0FwcGx5OiB7IHR5cGU6IFwiaW50ZWdlclwiLCBlZGl0YWJsZTogdHJ1ZSB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gaW5pdEdyaWRzQW5kTGlzdFZpZXdzKCkge1xyXG5cclxuICAgICAgICAvLy0tLS0tIFNlbGVjdCBJbnZvaWNlcyAoRGVza3RvcCAmIE1vYmlsZSlcclxuICAgICAgICBqUXVlcnkoJyNhYy1rZW5kby1ncmlkJywgbmFtZXNwYWNlKS5rZW5kb0dyaWQoXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IGFjU2VsZWN0SW52b2ljZURhdGFTb3VyY2UsXHJcbiAgICAgICAgICAgICAgICBzY3JvbGxhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgc29ydGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJcIiwgd2lkdGg6IFwiMzBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGNsYXNzPVwic2VsZWN0LWludm9pY2UtdG8tYXBwbHktY3JlZGl0XCIgZGF0YS1pZD1cIicgKyBlLmludm9pY2VOdW1iZXIgKyAnXCIgZGF0YS10b3RhbD1cIicgKyBlLnRvdGFsICsgJ1wiIGRhdGEtYWNjb3VudD1cIicgKyBlLmFjY291bnROdW1iZXIgKyAnXCIgZGF0YS1kYXRlPVwiJyArIGUuaW52b2ljZURhdGUgKyAnXCIgLz4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB7IGZpZWxkOiBcImludm9pY2VOdW1iZXJcIiwgdGl0bGU6IFwiSW52b2ljZSNcIiwgd2lkdGg6IFwiMTAwXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICB7IGZpZWxkOiBcInRvdGFsXCIsIHRpdGxlOiBcIlRvdGFsXCIsIGZvcm1hdDogXC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0bGU6IFwiQmFsYW5jZVwiLCBmb3JtYXQ6IFwiezA6Y31cIiwgd2lkdGg6IFwiMTAwcHhcIixcclxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFkZGl0aW9uYWxIdG1sID0gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoZS5iYWxhbmNlKSA8IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZGl0aW9uYWxIdG1sID0gJzxzcGFuIGNsYXNzPVwiYmFkZ2UgYmFkZ2UtZGFuZ2VyXCI+SW52YWxpZCBiYWxhbmNlPC9zcGFuPic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoTnVtYmVyKGUuYmFsYW5jZSkgPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZGl0aW9uYWxIdG1sID0gJzxzcGFuIGNsYXNzPVwiYmFkZ2UgYmFkZ2Utc3VjY2Vzc1wiPlBhaWQgaW4gZnVsbDwvc3Bhbj4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnJDxzcGFuPicgKyBlLmJhbGFuY2UgKyAnPC9zcGFuPicgKyBhZGRpdGlvbmFsSHRtbDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIGVkaXQ6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBnZXQgaW5wdXQgdmFsdWUgXHJcbiAgICAgICAgICAgICAgICB2YXIgaW5wdXQgPSBlLmNvbnRhaW5lci5maW5kKFwiLmstaW5wdXRcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gd2F0Y2ggZm9yIGlucHV0IGJsdXIgc28gd2UgY2FuIHVwZGF0ZSB0aGUgdG90YWxzXHJcbiAgICAgICAgICAgICAgICBpbnB1dC5ibHVyKGZ1bmN0aW9uICgpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZ2V0IHRoZSBkYXRhIGl0ZW0gZnJvbSB0aGUgZ3JpZFxyXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhSXRlbSA9ICRjb25maXJtR3JpZC5kYXRhSXRlbShpbnB1dC5jbG9zZXN0KCd0cicpKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZXZhbHVhdGUgdGhlIGlucHV0IGluIGNhc2UgdGhlIHVzZXIgYWRkZWQgbWF0aGVtYXRpY2FsIGV4cHJlc3Npb25zXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZhbCA9IGlucHV0LnZhbCgpLnJlcGxhY2UoJyQnLCAnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cFJlcyA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwUmVzID0gZ2VuZXJhbExpYnJhcnkuZXZhbHVhdGVFeHByZXNzaW9uKHZhbCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBleHBSZXMgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXhwUmVzID09PSBudWxsIHx8IGV4cFJlcyA9PT0gdW5kZWZpbmVkIHx8IGV4cFJlcyA8IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwUmVzID0gMDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgZGF0YSBpdGVtJ3MgdmFsdWUgdG8gdGhlIGV2YWx1YXRlZCBleHByZXNzaW9uXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YUl0ZW0uc2V0KCdjcmVkaXRzVG9BcHBseScsIE51bWJlcihleHBSZXMpLnRvRml4ZWQoMikpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGUgdWlcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVBcHBsaWVkVG90YWxzSGVhZGVyQW5kR3JpZCgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KS5kYXRhKCdrZW5kb0dyaWQnKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0SGFuZGxlcnMoKSB7XHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgQXBwbHkgQ3JlZGl0IENsaWNrZWRcclxuICAgICAgICBqUXVlcnkoZG9jdW1lbnQpXHJcbiAgICAgICAgICAgIC5vbignY2xpY2snLFxyXG4gICAgICAgICAgICAgICAgJy5hcHBseS1jcmVkaXRzJyxcclxuICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBnZXQgdW5wYWlkIGludm9pY2VzIGZyb20gd2luZG93XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVucGFpZEludm9pY2VzID0gd2luZG93LnVucGFpZEludm9pY2VzRGF0YVNvdXJjZS5kYXRhKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGdldCBpbnZvaWNlIG51bWJlciAmIHNldCB0aGUgc2VsZWN0ZWQgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGludm9pY2VOdW1iZXIgPSBqUXVlcnkodGhpcykuZGF0YSgnaWQnKTtcclxuICAgICAgICAgICAgICAgICAgICBsb2FkU2VsZWN0ZWRSZXR1cm4odW5wYWlkSW52b2ljZXMsIGludm9pY2VOdW1iZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGxvYWQgdW5wYWlkIGludm9pY2VzIHRvIG1vZGFsIGdyaWRcclxuICAgICAgICAgICAgICAgICAgICBsb2FkVW5wYWlkSW52b2ljZXNUb1NlbGVjdCh1bnBhaWRJbnZvaWNlcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gdXBkYXRlIHVpXHJcbiAgICAgICAgICAgICAgICAgICAgc2hvd0JvZHlDb250ZW50KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlQXBwbGllZFRvdGFsc0hlYWRlckFuZEdyaWQoKTtcclxuICAgICAgICAgICAgICAgICAgICBzaG93QXBwbHlDcmVkaXRzTW9kYWxTdGVwKDEpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBzaG93IGFwcGx5IGNyZWRpdHMgbW9kYWxcclxuICAgICAgICAgICAgICAgICAgICAkYXBwbHlDcmVkaXRzTW9kYWwubW9kYWwoJ3Nob3cnLCB7IGtleWJvYXJkOiBmYWxzZSB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLS0gSGFuZGxlIE1vZGFsIE5leHRcclxuICAgICAgICAkbW9kYWxOZXh0QnV0dG9uXHJcbiAgICAgICAgICAgIC5vbignY2xpY2snLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvd0FwcGx5Q3JlZGl0c01vZGFsU3RlcChjdXJyZW50U3RlcCArIDEpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0tIEhhbmRsZSBNb2RhbCBQcmV2aW91c1xyXG4gICAgICAgICRtb2RhbFByZXZpb3VzQnV0dG9uXHJcbiAgICAgICAgICAgIC5vbignY2xpY2snLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvd0FwcGx5Q3JlZGl0c01vZGFsU3RlcChjdXJyZW50U3RlcCAtIDEpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIFNlbGVjdCBJbnZvaWNlIHRvIEFwcGx5IENyZWRpdHNcclxuICAgICAgICBqUXVlcnkoZG9jdW1lbnQpXHJcbiAgICAgICAgICAgIC5vbignY2xpY2snLFxyXG4gICAgICAgICAgICAgICAgJy5zZWxlY3QtaW52b2ljZS10by1hcHBseS1jcmVkaXQnLFxyXG4gICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICB0b2dnbGVTZWxlY3RJbnZvaWNlc0ZvckFwcGx5aW5nQ3JlZGl0c0NoZWNrYm94ZXMoZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBnZXQgc2VsZWN0ZWQgaW52b2ljZSBpZFxyXG4gICAgICAgICAgICAgICAgICAgIHZhciBpZCA9ICQodGhpcykuZGF0YSgnaWQnKTtcclxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVTZWxlY3RlZEludm9pY2VUb0FwcGx5Q3JlZGl0cyhpZCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHRvZ2dsZVNlbGVjdEludm9pY2VzRm9yQXBwbHlpbmdDcmVkaXRzQ2hlY2tib3hlcyh0cnVlKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBPbiBNb2RhbCBDbG9zZVxyXG4gICAgICAgICRhcHBseUNyZWRpdHNNb2RhbC5vbignaGlkZGVuLmJzLm1vZGFsJyxcclxuICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgY2xlYXJNb2RhbERhdGEoKTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIENvbmZpcm1cclxuICAgICAgICAkbW9kYWxDb25maXJtQnV0dG9uLm9uKCdjbGljaycsXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgd2UgYXJlIGFscmVhZHkgc2VuZGluZyB0aGUgcmVxdWVzdFxyXG4gICAgICAgICAgICAgICAgaWYgKGlzU2VuZGluZ1JlcXVlc3QpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpc1NlbmRpbmdSZXF1ZXN0ID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzaG93IHNwaW5uZXJcclxuICAgICAgICAgICAgICAgIHNob3dCb2R5TG9hZGluZyh0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBnZXQgaW52b2ljZXMgXHJcbiAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdEJvZHkgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuTnVtYmVyOiBzZWxlY3RlZFJldHVybi5pbnZvaWNlTnVtYmVyLFxyXG4gICAgICAgICAgICAgICAgICAgIGludm9pY2VzOiBnZXRTZWxlY3RlZEludm9pY2VzVG9BcHBseSgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW52b2ljZU51bWJlcjogaS5pbnZvaWNlTnVtYmVyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGx5QW1vdW50OiBpLmNyZWRpdHNUb0FwcGx5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHByZXBhcmUgcmVxdWVzdFxyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPSAkLmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgICAgIHVybDogd2luZG93LnNldHRpbmdzLkFwcGx5Q3JlZGl0c1VybCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiByZXF1ZXN0Qm9keSxcclxuICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChyZXN1bHRzKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHRzLlN1Y2Nlc3MgPT09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXBkYXRlIGJvZHlcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0JvZHlMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0JvZHlTdWNjZXNzKHdpbmRvdy5zZXR0aW5ncy5DcmVkaXRzQXBwbGllZFN1Y2Nlc3NNZXNzYWdlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsb3NlIHRoZSBtb2RhbCBpbiB4IHNlY29uZHNcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFwcGx5Q3JlZGl0c01vZGFsLm1vZGFsKCdoaWRlJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc1NlbmRpbmdSZXF1ZXN0ID0gZmFsc2U7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2FsbCBhcHBsaWVkIGNyZWRpdHMgc3VjY2VzcyBldmVudCBzbyB0aGF0IHdlIGNhbiByZWZyZXNoIHVucGFpZCBpbnZvaWNlc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KHdpbmRvdykudHJpZ2dlcihvbkNyZWRpdHNBcHBsaWVkRXZlbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMzAwMCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzdWx0cy5QYXJ0aWFsU3VjY2VzcyA9PT0gdHJ1ZSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZ2V0IHRoZSBmYWlsZWQgaW52b2ljZXNcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZhaWxlZEh0bWwgPSAnPHVsIGNsYXNzPVwidGV4dC1kYW5nZXJcIj4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRzLkludm9pY2VSZXN1bHRzLmZvckVhY2goZnVuY3Rpb24gKGYpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmLlN1Y2Nlc3MgIT09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYWlsZWRIdG1sICs9ICc8bGk+JyArIGYuSW52b2ljZU51bWJlciArICc8L2xpPic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWlsZWRIdG1sICs9ICc8L3VsPic7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGUgYm9keVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG93Qm9keUxvYWRpbmcoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG93Qm9keVN1Y2Nlc3Mod2luZG93LnNldHRpbmdzLkNyZWRpdHNBcHBsaWVkUGFydGlhbFN1Y2Nlc3NNZXNzYWdlICsgJzxici8+JyArIGZhaWxlZEh0bWwpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2xvc2UgdGhlIG1vZGFsIGluIHggc2Vjb25kc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYXBwbHlDcmVkaXRzTW9kYWwubW9kYWwoJ2hpZGUnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzU2VuZGluZ1JlcXVlc3QgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjYWxsIGFwcGxpZWQgY3JlZGl0cyBzdWNjZXNzIGV2ZW50IHNvIHRoYXQgd2UgY2FuIHJlZnJlc2ggdW5wYWlkIGludm9pY2VzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkod2luZG93KS50cmlnZ2VyKG9uQ3JlZGl0c0FwcGxpZWRFdmVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA5MDAwKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXBkYXRlIGJvZHlcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0JvZHlMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0JvZHlDb250ZW50KCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAkbW9kYWxFcnJvck1lc3NhZ2VzLmh0bWwod2luZG93LnNldHRpbmdzLkdlbmVyaWNFcnJvck1lc3NhZ2UpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXNTZW5kaW5nUmVxdWVzdCA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoZXJyb3IpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gdXBkYXRlIGJvZHlcclxuICAgICAgICAgICAgICAgICAgICBzaG93Qm9keUxvYWRpbmcoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNob3dCb2R5Q29udGVudCgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAkbW9kYWxFcnJvck1lc3NhZ2VzLmh0bWwod2luZG93LnNldHRpbmdzLkdlbmVyaWNFcnJvck1lc3NhZ2UpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICBpc1NlbmRpbmdSZXF1ZXN0ID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIFByZXZlbnQgZW50ZXIga2V5IGZyb20gY2xvc2luZyB0aGUgZm9ybVxyXG4gICAgICAgICRhcHBseUNyZWRpdHNNb2RhbC5vbigna2V5dXAga2V5cHJlc3MnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICB2YXIga2V5Q29kZSA9IGUua2V5Q29kZSB8fCBlLndoaWNoO1xyXG4gICAgICAgICAgICBpZiAoa2V5Q29kZSA9PT0gMTMpIHtcclxuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpbml0RGF0YVNvdXJjZXMoKTtcclxuICAgICAgICBpbml0R3JpZHNBbmRMaXN0Vmlld3MoKTtcclxuICAgICAgICBpbml0SGFuZGxlcnMoKTtcclxuICAgIH07XHJcblxyXG59XHJcblxyXG4vLy0tLS0tIFdoZW4gcGFnZSBsb2Fkc1xyXG5qUXVlcnkoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uICgpIHtcclxuICAgIG5ldyBDb21wb25lbnQoKS5pbml0KCk7XHJcbn0pO1xyXG4iLCJcclxuZnVuY3Rpb24gQ29tcG9uZW50KCkge1xyXG4gICAgdmFyIG5hbWVzcGFjZSA9ICcuQ2hhZHdlbGwtUGFnZXMtTG9naW5QYWdlJztcclxuXHJcbiAgICB0aGlzLmluaXQgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgaWYgKGpRdWVyeShuYW1lc3BhY2UpLmxlbmd0aCA8IDEpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICAkKCcuc2lnbi1pbi1idXR0b24nKS5jbGljayhmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIGRhdGFMYXllci5wdXNoKHsgJ2V2ZW50JzogJ2xvZ2luJyB9KTtcclxuICAgICAgICB9KTtcclxuICAgICAgICAvLy0tLS0tIEZv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AgICAgICsgd2luZG93Lm1vZGVsLldoZXJlc015T3JkZXJMaW5rVGV4dCArICc8L2E+JztcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGRldGFpbHM7XHJcbiAgICB9XHJcblxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmIChqUXVlcnkobmFtZXNwYWNlKS5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSW5pdCBrZW5kbyBncmlkXHJcbiAgICAgICAgalF1ZXJ5KCd0YWJsZScsIG5hbWVzcGFjZSkua2VuZG9HcmlkKFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBkYXRhU291cmNlOlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHdpbmRvdy5tb2RlbC5PcmRlckhpc3RvcnlWaWV3TW9kZWxzLFxyXG4gICAgICAgICAgICAgICAgICAgIHNjaGVtYTpcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZHM6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3JkZXJOdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBvTnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVbml0TnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPcmRlclN0YXR1czogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3JkZXJEYXRlOiB7IHR5cGU6IFwiZGF0ZVwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVG90YWw6IHsgdHlwZTogXCJudW1iZXJcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERlbGl2ZXJ5UGRmRXhpc3RzOiB7IHR5cGU6IFwiYm9vbGVhblwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVHJhY2tpbmdOdW1iZXJzOiB7IHR5cGU6IFwib2JqZWN0XCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOlxyXG4gICAgICAgICAgICAgICAgICAgIFtcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdPcmRlck51bWJlcicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdpbmRvdy5tb2RlbC5PcmRlck51bWJlckhlYWRlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAnMTQ1cHgnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnUG9OdW1iZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdpbmRvdy5tb2RlbC5QT051bWJlckhlYWRlclxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1VuaXROdW1iZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdpbmRvdy5tb2RlbC5Vbml0TnVtYmVySGVhZGVyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnT3JkZXJTdGF0dXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB3aW5kb3cubW9kZWwuU3RhdHVzSGVhZGVyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnT3JkZXJEYXRlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdkYXRlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0OiAnezA6TU0vZGQveXl5eX0nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdpbmRvdy5tb2RlbC5EYXRlSGVhZGVyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnVG90YWwnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQ6ICd7MDpjfScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd2luZG93Lm1vZGVsLlRvdGFsSGVhZGVyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnRGVsaXZlcnlQZGZFeGlzdHMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd2luZG93Lm1vZGVsLlZpZXdIZWFkZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJzc1cHgnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChkYXRhSXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRWaWV3VGVtcGxhdGUoZGF0YUl0ZW0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd2luZG93Lm1vZGVsLlRyYWNraW5nTnVtYmVySGVhZGVyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZS5UcmFja2luZ051bWJlcnMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5UcmFja2luZ051bWJlcnMuZm9yRWFjaChmdW5jdGlvbiAoZikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGYuVHJhY2tpbmdOdW1iZXIgIT09IG51bGwgJiYgZi5UcmFja2luZ051bWJlclVybCAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gJzxhIGhyZWY9XCInXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgZi5UcmFja2luZ051bWJlclVybFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICdcIiB0YXJnZXQ9XCJfYmxhbmtcIj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgZi5UcmFja2luZ051bWJlclxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8L2E+PGJyLz4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmLlRyYWNraW5nTnVtYmVyICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCArPSBmLlRyYWNraW5nTnVtYmVyICsgJzxici8+JztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBodG1sO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIHBhZ2VhYmxlOlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VTaXplczogd2luZG93Lm1vZGVsLkdyaWRTZXR0aW5ncy5QYWdlU2l6ZXMsXHJcbiAgICAgICAgICAgICAgICAgICAgcGFnZVNpemU6IHdpbmRvdy5tb2RlbC5HcmlkU2V0dGluZ3MuRGVmYXVsdFBhZ2VTaXplLFxyXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbkNvdW50OiB3aW5kb3cubW9kZWwuR3JpZFNldHRpbmdzLkJ1dHRvbnNUb1Nob3csXHJcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZXM6XHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpdGVtc1BlclBhZ2U6IHdpbmRvdy5tb2RlbC5HcmlkU2V0dGluZ3MuSXRlbXNQZXJQYWdlTWVzc2FnZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogd2luZG93Lm1vZGVsLkdyaWRTZXR0aW5ncy5JbmZvRGlzcGxheVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQ6IHRydWVcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIHNvcnRhYmxlOiB0cnVlXHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuXHJcbiAgICAgICAgLy8tLS0tLSBEaXNwbGF5IGhpc3RvcnkgY29udGVudFxyXG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5oaXN0b3J5LXdhaXRpbmcnLCBuYW1lc3BhY2UpLmZhZGVPdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcuaGlzdG9yeS1jb250ZW50JywgbmFtZXNwYWNlKS5mYWRlSW4oKTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIH0sIDIwMDApO1xyXG5cclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgcHJvb2Ygb2YgZGVsaXZlcnlcclxuICAgICAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2xpY2snLCAnLnByb29mLW9mLWRlbGl2ZXJ5JywgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgb3JkZXIgPSBqUXVlcnkodGhpcykuZGF0YSgnb3JkZXItbnVtYmVyJyk7XHJcblxyXG4gICAgICAgICAgICAvLyBwcm9vZiBvZiBkZWxpdmVyeSBhdmFpbGFibGU/XHJcbiAgICAgICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IGlzUHJvb2ZPZkRlbGl2ZXJ5UGRmQXZhaWxhYmxlRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogeyBvcmRlck51bWJlcjogb3JkZXIgfSxcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogXCJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQ7IGNoYXJzZXQ9VVRGLThcIixcclxuICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHsgd2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gICAgICAgICAgICAgICAoYlNldCA/IGIuaW5kZXhPZihidikgPj0gMCA6IHRydWUpICYmXHJcbiAgICAgICAgICAgICAgICAgICAgKGNTZXQgPyBjLmluZGV4T2YoY3YpID49IDAgOiB0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoZm91bmQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0b3RhbCsrO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkodGhpcykuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KHRoaXMpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBqUXVlcnkoJy5vcmRlci1jb3VudCcsIG5hbWVzcGFjZSkudGV4dCh0b3RhbCA+IDAgPyB0b3RhbCA6ICdObycpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBtb2JpbGVDYXJkLmluaXQobmFtZXNwYWNlKTtcclxuICAgIH07XHJcbn1cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24gKCkge1xyXG4gICAgbmV3IENvbXBvbmVudCgpLmluaXQoKTtcclxufSk7XHJcbiIsInZhciBQYXltZW50TGlicmFyeSA9IHJlcXVpcmUoJy4uLy4uLy4uL3d3d3Jvb3QvZ2xvYmFsL1BheW1lbnRMaWJyYXJ5LmpzJyk7XHJcbnZhciBMb2dMaWJyYXJ5ID0gcmVxdWlyZSgnLi4vLi4vLi4vd3d3cm9vdC9nbG9iYWwvTG9nTWVzc2FnZXNMaWJyYXJ5LmpzJyk7XHJcbnZhciBHZW5lcmFsTGlicmFyeSA9IHJlcXVpcmUoJy4uLy4uLy4uL3d3d3Jvb3QvZ2xvYmFsL0dlbmVyY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IGN0ID0galF1ZXJ5KCdpbnB1dFsgbmFtZT10YWIgXScsIG5hbWVzcGFjZSkuYXR0cigndmFsdWUnKTtcclxuICAgICAgICB2YXIgdXJsID0gJz90YWI9JyArIGN0O1xyXG5cclxuICAgICAgICAvLyBjb25zb2xlLmxvZyggdXJsICk7XHJcbiAgICAgICAgLy8gd2luZG93LmxvY2F0aW9uID0gdXJsO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldFdhbGxldHMoc3VjY2Vzc0NhbGxCYWNrKSB7XHJcbiAgICAgICAgLy8gZ2V0IHdhbGxldHNcclxuICAgICAgICBQYXltZW50QXBpLmdldEN1c3RvbWVyV2FsbGV0cyhcclxuICAgICAgICAgICAgZnVuY3Rpb24gKHJlc3BvbnNlKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UuU3VjY2VzcyA9PT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHByZXBhcmUgaHRtbCBzdHJpbmdzXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNyZWRpdENhcmRUYWJsZUh0bWwgPSAnJztcclxuICAgICAgICAgICAgICAgICAgICB2YXIgY3JlZGl0Q2FyZE1vYmlsZUh0bWwgPSAnJztcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZUNoZWNrVGFibGVIdG1sID0gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGVDaGVja01vYmlsZUh0bWwgPSAnJztcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9vcCB0aHJvdWdoIHJlc3VsdHMgYW5kIGJ1aWxkIGh0bWwgcm93c1xyXG4gICAgICAgICAgICAgICAgICAgIHdhbGxldHMgPSByZXNwb25zZS5EYXRhO1xyXG4gICAgICAgICAgICAgICAgICAgIHdhbGxldHMuZm9yRWFjaChmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaS5Jc0NyZWRpdENhcmQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyZWRpdENhcmRUYWJsZUh0bWwgKz0gYnVpbGRDcmVkaXRDYXJkVGFibGVSb3coaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmVkaXRDYXJkTW9iaWxlSHRtbCArPSBidWlsZENyZWRpdENhcmRDYXJkUm93KGkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZUNoZWNrVGFibGVIdG1sICs9IGJ1aWxkRUNoZWNrVGFibGVSb3coaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlQ2hlY2tNb2JpbGVIdG1sICs9IGJ1aWxkRUNoZWNrQ2FyZFJvdyhpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyB1cGRhdGUgdGhlIGRvY3VtZW50IHdpdGggdGhlIGh0bWwgc3RyaW5nc1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI2NvbnRlbnQxIHRhYmxlIHRib2R5JywgbmFtZXNwYWNlKS5odG1sKGNyZWRpdENhcmRUYWJsZUh0bWwpO1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI2NvbnRlbnQxIC5tb2JpbGUtaXRlbXMnLCBuYW1lc3BhY2UpLmh0bWwoY3JlZGl0Q2FyZE1vYmlsZUh0bWwpO1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI2NvbnRlbnQyIHRhYmxlIHRib2R5JywgbmFtZXNwYWNlKS5odG1sKGVDaGVja1RhYmxlSHRtbCk7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjY29udGVudDIgLm1vYmlsZS1pdGVtcycsIG5hbWVzcGFjZSkuaHRtbChlQ2hlY2tNb2JpbGVIdG1sKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN1Y2Nlc3NDYWxsQmFjaylcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc0NhbGxCYWNrKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcjZ2VuZXJhbGVycm9ycycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UuTWVzc2FnZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgIC8vIHNob3cgZXJyb3IgbWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKFxyXG4gICAgICAgICAgICAgICAgICAgICcjZ2VuZXJhbGVycm9ycycsXHJcbiAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBidWlsZENyZWRpdENhcmRUYWJsZVJvdyhjYykge1xyXG4gICAgICAgIHZhciBkZWZhdWx0SHRtbCA9IGJ1aWxkSXNEZWZhdWx0KGNjKTtcclxuICAgICAgICByZXR1cm4gXCI8dHI+XCJcclxuICAgICAgICAgICAgKyBcIjx0ZD5cIiArIGNjLklkZW50aWZpZXIgKyBkZWZhdWx0SHRtbCArIFwiPC90ZD5cIlxyXG4gICAgICAgICAgICArIFwiPHRkPlwiICsgY2MuQWNjb3VudCArIFwiPC90ZD5cIlxyXG4gICAgICA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iIGNsYXNzPSdkZWxldGUtY2FyZCBidG4gYnRuLXNtIGJ0bi1kYW5nZXIgYnRuLWJsb2NrJz5cIiArIGRlbGV0ZUxhYmVsICsgXCI8L2J1dHRvbj5cIlxyXG4gICAgICAgICAgICArIFwiPC9kaXY+PC90ZD48L3RyPlwiO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGJ1aWxkQ3JlZGl0Q2FyZENhcmRSb3coY2MpIHtcclxuICAgICAgICB2YXIgZGVmYXVsdEh0bWwgPSBidWlsZElzRGVmYXVsdChjYyk7XHJcbiAgICAgICAgcmV0dXJuICc8ZGl2IGNsYXNzPVwiaXRlbVwiPidcclxuICAgICAgICAgICAgKyAnPHA+PHN0cm9uZz4nICsgY3JlZGl0Q2FyZElkZW50aWZpZXJMYWJlbCArICc8L3N0cm9uZz48YnIvPidcclxuICAgICAgICAgICAgKyBjYy5JZGVudGlmaWVyICsgZGVmYXVsdEh0bWxcclxuICAgICAgICAgICAgKyAnPC9wPjxwPjxzdHJvbmc+JyArIGNhcmROdW1iZXJMYWJlbCArICc8L3N0cm9uZz48YnIvPidcclxuICAgICAgICAgICAgKyBjYy5BY2NvdW50XHJcbiAgICAgICAgICAgICsgJzwvcD48cD4nXHJcbiAgICAgICAgICAgICsgJzxzdHJvbmc+JyArIGNhcmRIb2xkZXJMYWJlbCArICc8L3N0cm9uZz48YnIvPidcclxuICAgICAgICAgICAgKyBjYy5GaXJzdE5hbWUgKyAnICcgKyBjYy5MYXN0TmFtZVxyXG4gICAgICAgICAgICArICc8L3A+PHA+J1xyXG4gICAgICAgICAgICArICc8c3Ryb25nPicgKyBleHBpcmF0aW9uTGFiZWwgKyAnPC9zdHJvbmc+PGJyLz4nXHJcbiAgICAgICAgICAgICsgY2MuRXhwaXJhdGlvblxyXG4gICAgICAgICAgICArICc8L3A+PHA+J1xyXG4gICAgICAgICAgICArICc8YnV0dG9uIGRhdGEtdG9nZ2xlPVwibW9kYWxcIiBkYXRhLXRhcmdld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WNjb3VudFR5cGUnLCB2YWx1ZTogZWMuQWNjb3VudFR5cGUgfSxcclxuICAgICAgICAgICAgeyBrZXk6ICdpZCcsIHZhbHVlOiBlYy5JRCB9XHJcbiAgICAgICAgICAgIF0pXHJcbiAgICAgICAgICAgICsgJ2NsYXNzPVwiYnRuIGJ0bi1zbSBidG4tcHJpbWFyeSBidG4tYmxvY2tcIiA+ICcgKyB1cGRhdGVMYWJlbCArICc8L2J1dHRvbiA+J1xyXG4gICAgICAgICAgICArICc8YnV0dG9uIGRhdGEtaWQ9XCInICsgZWMuSUQgKyAnXCIgY2xhc3M9XCJkZWxldGUtZWNoZWNrIGJ0biBidG4tc20gYnRuLWRhbmdlciBidG4tYmxvY2tcIj4nICsgZGVsZXRlTGFiZWwgKyAnIDwvYnV0dG9uPidcclxuICAgICAgICAgICAgKyAnPC9kaXY+PC90ZD48L3RyID4gJztcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBidWlsZEVDaGVja0NhcmRSb3coZWMpIHtcclxuICAgICAgICB2YXIgZGVmYXVsdEh0bWwgPSBidWlsZElzRGVmYXVsdChlYyk7XHJcbiAgICAgICAgcmV0dXJuICc8ZGl2IGNsYXNzPVwiaXRlbVwiPidcclxuICAgICAgICAgICAgKyAnPHA+PHN0cm9uZz4nICsgZWNoZWNrSWRlbnRpZmllckxhYmVsICsgJzwvc3Ryb25nPjxici8+J1xyXG4gICAgICAgICAgICArIGVjLklkZW50aWZpZXIgKyBkZWZhdWx0SHRtbFxyXG4gICAgICAgICAgICArICc8L3A+PHA+PHN0cm9uZz4nICsgYWNjb3VudE51bWJlckxhYmVsICsgJzwvc3Ryb25nPjxici8+J1xyXG4gICAgICAgICAgICArIGVjLkFjY291bnRcclxuICAgICAgICAgICAgKyAnPC9wPjxwPidcclxuICAgICAgICAgICAgKyAnPHN0cm9uZz4nICsgcm91dGluZ0xhYmVsICsgJzwvc3Ryb25nPjxici8+J1xyXG4gICAgICAgICAgICArIGVjLlJvdXRpbmdOdW1iZXJcclxuICAgICAgICAgICAgKyAnPC9wPjxwPidcclxuICAgICAgICAgICAgKyAnPHN0cm9uZz4nICsgbmFtZU9uQWNjb3VudExhYmVsICsgJzwvc3Ryb25nPjxici8+J1xyXG4gICAgICAgICAgICArIGVjLkZpcnN0TmFtZSArICcgJyArIGVjLkxhc3ROYW1lXHJcbiAgICAgICAgICAgICsgJzwvcD48cD4nXHJcbiAgICAgICAgICAgICsgJzxzdHJvbmc+JyArIGFjY291bnRUeXBlTGFiZWwgKyAnPC9zdHJvbmc+PGJyLz4nXHJcbiAgICAgICAgICAgICsgZWMuQWNjb3VudFR5cGVcclxuICAgICAgICAgICAgKyAnPC9wPjxwPidcclxuICAgICAgICAgICAgKyAnPGJ1dHRvbiBkYXRhLXRvZ2dsZT1cIm1vZGFsXCIgZGF0YS10YXJnZXQ9XCIjY3JlYXRlLWVjaGVjay1tb2RhbFwiJ1xyXG4gICAgICAgICAgICArIGJ1aWxkRGF0YUF0dHJpYnV0ZXMoW3sga2V5OiAnYWNjb3VudCcsIHZhbHVlOiBlYy5BY2NvdW50IH0sXHJcbiAgICAgICAgICAgIHsga2V5OiAncm91dGluZ051bWJlcicsIHZhbHVlOiBlYy5Sb3V0aW5nTnVtYmVyIH0sXHJcbiAgICAgICAgICAgIHsga2V5OiAnaWRlbnRpZmllcicsIHZhbHVlOiBlYy5JZGVudGlmaWVyIH0sXHJcbiAgICAgICAgICAgIHsga2V5OiAnZmlyc3ROYW1lJywgdmFsdWU6IGVjLkZpcnN0TmFtZSB9LFxyXG4gICAgICAgICAgICB7IGtleTogJ2xhc3ROYW1lJywgdmFsdWU6IGVjLkxhc3ROYW1lIH0sXHJcbiAgICAgICAgICAgIHsga2V5OiAnaXNEZWZhdWx0JywgdmFsdWU6IGVjLklzRGVmYXVsdCB9LFxyXG4gICAgICAgICAgICB7IGtleTogJ2FjY291bnRUeXBlJywgdmFsdWU6IGVjLkFjY291bnRUeXBlIH0sXHJcbiAgICAgICAgICAgIHsga2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O1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHNob3cgZXJyb3IgbWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYWxMaWJyYXJ5LmFkZEVycm9yTWVzc2FnZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgJyNnZW5lcmFsZXJyb3JzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZS5NZXNzYWdlKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgJ0Vycm9yIScpO1xyXG4gICAgICAgICAgICAgICAgLy8gc2hvdyBlcnJvciBtZXNzYWdlXHJcbiAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgJyNnZW5lcmFsZXJyb3JzJyxcclxuICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgZXJyLk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0SGFuZGxlcnMoKSB7XHJcbiAgICAgICAgLy8tLS0tLSBJbml0IGtlbmRvIGdyaWRzXHJcbiAgICAgICAgalF1ZXJ5KCd0YWJsZScsIG5hbWVzcGFjZSkua2VuZG9HcmlkKHsgc29ydGFibGU6IHRydWUgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIHBhZ2UgdGFiIHJlZGlyZWN0c1xyXG4gICAgICAgIGpRdWVyeSgnLnBhZ2UtdGFicyAucGFnZS10YWInLCBuYW1lc3BhY2UpLmNsaWNrKGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGYgPSBqUXVlcnkodGhpcykuZGF0YSgnZmllbGQnKTtcclxuICAgICAgICAgICAgdmFyIHYgPSBqUXVlcnkodGhpcykuZGF0YSgndmFsdWUnKTtcclxuXHJcbiAgICAgICAgICAgIHN0b3JlVmFsdWUoZiwgdik7XHJcbiAgICAgICAgICAgIHJlZGlyZWN0UGFnZSgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBjcmVkaXQgY2FyZCAvIGVjaGVjayBkZWxldGUgYnV0dG9uIGNsaWNrc1xyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpXHJcbiAgICAgICAgICAgIC5vbignY2xpY2snLFxyXG4gICAgICAgICAgICAgICAgJy5kZWxldGUtY2FyZCwgLmRlbGV0ZS1lY2hlY2snLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaWQgPSBqUXVlcnkodGhpcykuZGF0YSgnaWQnKTtcclxuICAgICAgICAgICAgICAgICAgICBkZWxldGVXYWxsZXQoYnV0dG9uLCBpZCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICB0aGlzLmluaXQgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgaWYgKGpRdWVyeShuYW1lc3BhY2UpLmxlbmd0aCA8IDEpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZ2V0V2FsbGV0cygpO1xyXG4gICAgICAgIGluaXRIYW5kbGVycygpO1xyXG5cclxuICAgICAgICAvLy0tLS0tIERpc3BsYXkgdGFiIGNvbnR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kb3cuY29uZmlybShtZXNzYWdlKSkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGJ1dHRvbiA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgICAgICB2YXIgcGlkID0galF1ZXJ5KHRoaXMpLmRhdGEoJ2lkJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gc2hvdyBidXR0b24gYW5pbWF0aW9uXHJcbiAgICAgICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oXCJSZW1vdmluZy4uLlwiLCBidXR0b24pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGNhbGwgcHJvZHVjdCBjb21wYXJlIGFwaVxyXG4gICAgICAgICAgICAgICAgUHJvZHVjdENvbXBhcmVBcGkuY2xlYXJJdGVtKHBpZCxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5hbGVydC1yZW1vdmluZy1wcm9kdWN0JywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRmFpbGVkIHRvIHJlbW92ZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBhZGQgcHJvZHVjdCB0byBjYXJ0IGJ1dHRvbiBjbGlja1xyXG4gICAgICAgIGpRdWVyeSgnLmJ0bi1jYXJ0JywgbmFtZXNwYWNlKS5jbGljayhmdW5jdGlvbiAoKSB7XHJcblxyXG4gICAgICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgdmFyIHBpZCA9IGpRdWVyeSh0aGlzKS5kYXRhKCdpZCcpO1xyXG4gICAgICAgICAgICB2YXIgYWNjb3VudCA9IGpRdWVyeSh0aGlzKS5kYXRhKCdhY2NvdW50Jyk7XHJcbiAgICAgICAgICAgIHZhciBpdGVtTmFtZSA9IGpRdWVyeSh0aGlzKS5kYXRhKCdpdGVtTmFtZScpO1xyXG4gICAgICAgICAgICB2YXIgcHJpY2UgPSBqUXVlcnkodGhpcykuZGF0YSgncHJpY2UnKTtcclxuICAgICAgICAgICAgdmFyIEFkZFRvQWNjb3VudENhcnRSZXF1ZXN0ID1cclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgQWNjb3VudElkOiBhY2NvdW50LFxyXG4gICAgICAgICAgICAgICAgQ29kZTogcGlkLFxyXG4gICAgICAgICAgICAgICAgUXVhbnRpdHk6IDFcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ0FkZGluZy4uLicsIGJ1dHRvbik7XHJcblxyXG4gICAgICAgICAgICAvLyBjYWxsIHNob3BwaW5nIGNhcnQgYXBpXHJcbiAgICAgICAgICAgIFNob3BwaW5nQ2FydEFwaS5hZGRJdGVtVG9DYXJ0KGFjY291bnQsIHBpZCwgMSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd1N1Y2Nlc3NBbmltYXRpb24oYW5pbWF0aW9uLCBcIkFkZGVkIVwiKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5j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iPGlucHV0PlwiKTtcclxuICAgICAgICAgICAgalF1ZXJ5KFwiYm9keVwiKS5hcHBlbmQoJHRlbXApO1xyXG4gICAgICAgICAgICAkdGVtcC52YWwodmFsdWUpLnNlbGVjdCgpO1xyXG4gICAgICAgICAgICBkb2N1bWVudC5leGVjQ29tbWFuZChcImNvcHlcIik7XHJcbiAgICAgICAgICAgICR0ZW1wLnJlbW92ZSgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGNvcGllZFRleHQgPSBqUXVlcnkodGhpcykuc2libGluZ3MoXCIuY29waWVkLWFsZXJ0XCIpO1xyXG4gICAgICAgICAgICBjb3BpZWRUZXh0LnNob3coKTtcclxuICAgICAgICAgICAgY29waWVkVGV4dC5mYWRlT3V0KDI1MDApO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfTtcclxufVxyXG5cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24gKCkge1xyXG4gICAgbmV3IENvbXBvbmVudCgpLmluaXQoKTtcclxufSk7XHJcbiIsImZ1bmN0aW9uIENvbXBvbmVudCgpIHtcclxuICAgIHZhciBuYW1lc3BhY2UgPSAnLkNoYWR3ZWxsLVBhZ2VzLVB1bmNob3V0U2V0dXBSZXN1bHRzUGFnZSc7XHJcbiAgICBcclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2hhbmdlJywgJyNPcmdhbml6YXRpb25zJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBqUXVlcnkoJyNpbnZhbGlkLWZvcm0nLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuXHJcbiAgICAgICAg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XBlZCA9ICFpc0dyb3VwZWQ7XHJcbiAgICAgICAgaWYgKCFpc0dyb3VwZWQpIHtcclxuICAgICAgICAgICAgJGtlbmRvR3JpZC5kYXRhU291cmNlLmdyb3VwKFtdKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAka2VuZG9HcmlkLmRhdGFTb3VyY2UuZ3JvdXAoW1xyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkNhdGVnb3J5XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZGlyOiBcImFzY1wiXHJcbiAgICAgICAgICAgICAgICB9XSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldEl0ZW1zRnJvbVF1aWNrT3JkZXJUYWJsZSgpIHtcclxuICAgICAgICB2YXIgaXRlbXMgPSBbXTtcclxuICAgICAgICAkKCcjcHJvZHVjdHMgdHJbZGF0YS1jb2RlXScsIG5hbWVzcGFjZSkuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBjb2RlID0gJCh0aGlzKS5kYXRhKCdjb2RlJyk7XHJcbiAgICAgICAgICAgIHZhciBxdWFudGl0eSA9ICQodGhpcykuZmluZCgnaW5wdXQucXVhbnRpdHknKS52YWwoKTtcclxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICBjb2RlOiBjb2RlLFxyXG4gICAgICAgICAgICAgICAgcXVhbnRpdHk6IHBhcnNlSW50KHF1YW50aXR5LCAxMClcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIGl0ZW1zO1xyXG4gICAgfVxyXG5cclxuICAgIC8vdG9nZ2xlIHRoZSB2aWV3IGljb25zXHJcbiAgICBqUXVlcnkoJy5hY3RpdmUtdG9nZ2xlJywgbmFtZXNwYWNlKS5vbignY2xpY2snLCBmdW5jdG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R1Y3QtcHJldmlldy1tb2RhbCAuc3Bpbm5lcicsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5xdWljay1vcmRlci1wcm9kdWN0LXByZXZpZXcgI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuYWpheC1jb250ZW50JywgbmFtZXNwYWNlKS5lbXB0eSgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBtb2RhbCBwcm9kdWN0IHByZXZpZXcgY29udGVudFxyXG4gICAgICAgIGpRdWVyeSgnLnF1aWNrLW9yZGVyLXByb2R1Y3QtcHJldmlldyAjcHJvZHVjdC1wcmV2aWV3LW1vZGFsJywgbmFtZXNwYWNlKS5vbignc2hvd24uYnMubW9kYWwnLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIHBpZCA9IGpRdWVyeSgnaW5wdXRbIG5hbWU9bW9kYWxwcm9kdWN0aWQgICBdJywgbmFtZXNwYWNlKS5hdHRyKCd2YWx1ZScpO1xyXG4gICAgICAgICAgICAgICAgdmFyIGRhdGEgPSB7IGNvZGU6IHBpZCB9O1xyXG5cclxuICAgICAgICAgICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBwcm9kdWN0RGV0YWlsc0VuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcucXVpY2stb3JkZXItcHJvZHVjdC1wcmV2aWV3ICNwcm9kdWN0LXByZXZpZXctbW9kYWwgLnNwaW5uZXInLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5xdWljay1vcmRlci1wcm9kdWN0LXByZXZpZXcgI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuYWpheC1jb250ZW50JywgbmFtZXNwYWNlKS5odG1sKGRhdGEuaHRtbCkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgIHByb2R1Y3RMaW5rc0xpYnJhcnkuaW5pdExpbmtzKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIHByb2R1Y3RMaW5rc0xpYnJhcnkubG9hZFNob3BwaW5nTGlzdHMoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLnF1aWNrLW9yZGVyLXByb2R1Y3QtcHJldmlldyAjcHJvZHVjdC1wcmV2aWV3LW1vZGFsIC5zcGlubmVyJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSwgMTIwMCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGxpc3QgZm9yIHF1aWNrIG9yZGVyIGdsb2JhbCBldmVudCBmcm9tIHJlY2VudCBwdXJjaGFzZXMgYmxvY2tcclxuICAgICAgICBqUXVlcnkoZG9jdW1lbnQpLm9uKCdyZWNlbnRwdXJjaGFzZXNibG9j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BkYXRlTGluZUl0ZW1RdWFudGl0eUNoYW5nZSgpIHtcclxuICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgIHZhciAkdHIgPSAkdGhpcy5jbG9zZXN0KFwidHJcIik7XHJcbiAgICAgICAgICAgIHZhciBzYXZpbmdOb3RpZmljYXRpb24gPSAkdHIuZmluZChcIi5zYXZpbmctbm90aWZpY2F0aW9uXCIpO1xyXG4gICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICB2YXIgcXVhbnRpdHkgPSAkdGhpcy52YWwoKTtcclxuICAgICAgICAgICAgdmFyIGFjY291bnRJZCA9IHdpbmRvdy5xdWlja09yZGVyRGV0YWlscy5BY2NvdW50SWQ7XHJcblxyXG4gICAgICAgICAgICBzYXZpbmdOb3RpZmljYXRpb24uc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgLy8gY2FsbCBxdWljayBvcmRlciBhcGlcclxuICAgICAgICAgICAgUXVpY2tPcmRlckFwaS51cGRhdGVRdWlja09yZGVySXRlbVF1YW50aXR5KGFjY291bnRJZCwgaWQsIHF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBoYW5kbGVEYXRhUmVzcG9uc2UoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiRXJyb3IgdXBkYXRpbmcgcHJvZHVjdCBxdWFudGl0eSBmb3IgcXVpY2sgb3JkZXJcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0sIHRydWUpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlVXBkYXRlTGluZUl0ZW1QcmljZUNoYW5nZSgpIHtcclxuICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgIHZhciBidXR0b24gPSAkKHRoaXMpO1xyXG4gICAgICAgICAgICB2YXIgJHRyID0gJHRoaXMuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICB2YXIgcHJpY2UgPSAkdGhpcy52YWwoKTtcclxuICAgICAgICAgICAgdmFyIGFjY291bnRJZCA9IHdpbmRvdy5xdWlja09yZGVyRGV0YWlscy5BY2NvdW50SWQ7XHJcblxyXG4gICAgICAgICAgICAvLyBjYWxsIHF1aWNrIG9yZGVyIGFwaVxyXG4gICAgICAgICAgICBRdWlja09yZGVyQXBpLnVwZGF0ZVF1aWNrT3JkZXJJdGVtUHJpY2UoYWNjb3VudElkLCBpZCwgcHJpY2UsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZURhdGFSZXNwb25zZShkYXRhKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2Fn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B7XHJcbiAgICAgICAgICAgIC8vIGNsZWFyIHRoZSBlcnJvciBtZXNzYWdlcyB0aGF0IHdlIGFyZSB0cmFja2luZyAmIHJlc2V0IGFycmF5LiBcclxuICAgICAgICAgICAgLy8gKFdlIGRvbid0IHdhbnQgdG8gY2xlYXIgYWxsIGVycm9ycywganVzdCBvbmVzIHRoYXQgdGhlIHVzZXIgaGFzIHBvdGVudGlhbGx5IGZpeGVkIGFscmVhZHkpXHJcbiAgICAgICAgICAgIHRyYWNrRXJyb3JzLmZvckVhY2goZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCdkaXZbZGF0YS1tc2c9XCInICsgZXJyICsgJ1wiXScsIG5hbWVzcGFjZSkucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB0cmFja0Vycm9ycyA9IFtdO1xyXG5cclxuICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YS5FcnJvck1lc3NhZ2VzICYmIGRhdGEuRXJyb3JNZXNzYWdlcy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhLkVycm9yTWVzc2FnZXMuZm9yRWFjaChmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHJhY2tFcnJvcnMucHVzaChlcnIucmVwbGFjZSgnXCInLCAnJiMzNDsnKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVyci5yZXBsYWNlKCdcIicsICcmIzM0OycpXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAoZGF0YSAmJiBkYXRhLkl0ZW1zKSB7XHJcbiAgICAgICAgICAgICAgICB1cGRhdGVQcm9kdWN0cyhkYXRhLkl0ZW1zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlUHJvZHVjdHModXBkYXRlZEl0ZW1zKSB7XHJcbiAgICAgICAgICAgIGl0ZW1zID0gdXBkYXRlZEl0ZW1zO1xyXG5cclxuICAgICAgICAgICAgdmFyICRwcm9kdWN0cyA9IHdpbmRvdy5qUXVlcnkoXCIjcHJvZHVjdHNcIiwgbmFtZXNwYWNlKTtcclxuXHJcbiAgICAgICAgICAgICRwcm9kdWN0cy5odG1sKFwiXCIpO1xyXG5cclxuICAgICAgICAgICAgdmFyIHN1YlRvdGFsID0gMDtcclxuXHJcbiAgICAgICAgICAgIGl0ZW1zLm1hcChmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGlzc3Vlc0h0bWwgPSBnZXRQcm9kdWN0SXNzdWVzSHRtbChpdGVtKTtcclxuICAgICAgICAgICAgICAgIHZhciBjdXN0b21JY29uSHRtbCA9IGdldEN1c3RvbUljb25IdG1sKGl0ZW0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHZhciBmaXJzdENvbHVtbiA9IFwiY29sLWF1dG9cIjtcclxuICAgICAgICAgICAgICAgIGlmIChjdXN0b21JY29uSHRtbCAmJiBjdXN0b21JY29uSHRtbC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RDb2x1bW4gPSBcImNvbC1zbS05XCI7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIG1hcmt1cCA9ICcgXFxcclxuICAgICAgICAgICAgICAgICAgICA8dHIgY2xhc3M9XCJtb2JpbGUtY2FyZC1pdGVtXCIgZGF0YS1pZD1cIicgKyBpdGVtLklkICsgJ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WNlKSkgKyAnPC9zcGFuPlxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGNsYXNzPVwibW9iaWxlLW9ubHktaGlkZVwiIGRhdGEtdGl0bGU9XCJRdWFudGl0eTpcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBjbGFzcz1cInF1YW50aXR5XCIgdHlwZT1cIm51bWJlclwiIHJlcXVpcmVkPVwicmVxdWlyZWRcIiBtaW49XCIxXCIgbWF4PVwiMTAwMFwiIHZhbHVlPVwiJyArIGl0ZW0uUXVhbnRpdHkgKyAnXCIgYXV0b2NvbXBsZXRlPVwib2ZmXCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInNhdmluZy1ub3RpZmljYXRpb25cIj5TYXZpbmcuLi48L3NwYW4+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBjbGFzcz1cInRleHQtcmlnaHRcIiBkYXRhLXRpdGxlPVwiRXh0ZW5kZWQgUHJpY2U6XCI+XFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdHJvbmc+JyArIGxpYnJhcnkuZm9ybWF0VVNEKGl0ZW0uTGluZVRvdGFsKSArICc8L3N0cm9uZz4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGNsYXNzPVwibW9iaWxlLW9ubHktaGlkZVwiIGRhdGEtdGl0bGU9XCJBY3Rpb25zOlwiPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9XCJyZW1vdmVcIiBocmVmPVwiamF2YXNjcmlwdDpcIj5SZW1vdmU8L2E+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgPC90cj4nO1xyXG5cclxuICAgICAgICAgICAgICAgICRwcm9kdWN0cy5wcmVwZW5kKG1hcmt1cCk7XHJcblxyXG4gICAgICAgICAgICAgICAgc3ViVG90YWwgKz0gaXRlbS5MaW5lVG90YWw7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgdmFyIGZvcm1hdHRlZFN1YnRvdGFsID0gKHN1YlRvdGFsKS50b0xvY2FsZVN0cmluZygnZW4tVVMnLFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHN0eWxlOiAnY3VycmVuY3knLFxyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbmN5OiAnVVNEJ1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICB3aW5kb3cualF1ZXJ5KCcjc3VidG90YWwtc2VsZWN0ZWQnKS5odG1sKGZvcm1hdHRlZFN1YnRvdGFsKTtcclxuICAgICAgICAgICAgYmluZFByb2R1Y3RzKCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBnZXRQcm9kdWN0SXNzdWVzSHRtbChpdGVtKSB7XHJcbiAgICAgICAgICAgIHZhciBodG1sID0gJyc7XHJcbiAgICAgICAgICAgIHZhciBpc3N1ZXMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIC8vIGFkZCB2YWxpZGF0aW9uIGlzc3Vlc1xyXG4gICAgICAgICAgICBpZiAoaXRlbSAmJiBpdGVtLlZhbGlkYXRpb25Jc3N1ZXMpIHtcclxuICAgICAgICAgICAgICAgIGlzc3VlcyA9IGlzc3Vlcy5jb25jYXQoaXRlbS5WYWxpZGF0aW9uSXNzdWVzKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gYWRkIHdhcm5pbmcgaXNzdWVzXHJcbiAgICAgICAgICAgIGlmIChpdGVtICYmIGl0ZW0uV2FybmluZ0lzc3Vlcykge1xyXG4gICAgICAgICAgICAgICAgaXNzdWVzID0gaXNzdWVzLmNvbmNhdChpdGVtLldhcm5pbmdJc3N1ZXMpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBpZiBpc3N1ZXMgZXhpc3QsIHRoZW4gbG9vcCB0aHJvdWdoIGFuZCBjcmVhdGUgSFRNTCBlbGVtZW50cyBmb3IgZWFjaCBpc3N1ZVxyXG4gICAgICAgICAgICBpZiAoaXNzdWVzICYmIGlzc3Vlcy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBpc3N1ZXMuZm9yRWFjaChmdW5jdGlvbiAoaXNzdWUpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNzdWUgJiYgaXNzdWUubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sICs9ICcgPGRpdiBjbGFzcz1cImFsZXJ0IGFsZXJ0LXdhcm5pbmcgYWxlcnQtZGlzbWlzc2libGUgZmFkZSBzaG93XCI+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBpc3N1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgY2xhc3M9XCJjbG9zZVwiIGRhdGEtZGlzbWlzcz1cImFsZXJ0XCIgYXJpYS1sYWJlbD1cIkNsb3NlXCI+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHNwYW4gYXJpYS1oaWRkZW49XCJ0cnVlXCI+JnRpbWVzOzwvc3Bhbj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8L2J1dHRvbj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8L2Rpdj4nO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gaHRtbDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGdldEN1c3RvbUljb25IdG1sKGl0ZW0pIHtcclxuICAgICAgICAgICAgdmFyIGh0bWwgPSAnJztcclxuXHJcbiAgICAgICAgICAgIHZhciBpY29uID0gaXRlbS5DdXN0b21JY29uLkN1c3RvbUljb25Vcmw7XHJcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IGl0ZW0uQ3VzdG9tSWNvbi5DdXN0b21JY29uVG9vbHRpcDtcclxuXHJcbiAgICAgICAgICAgIGlmIChpY29uICYmIGljb24ubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgaHRtbCA9ICc8ZGl2IGNsYXNzPVwiY3VzdG9tLWljb25cIj48aW1nIHNyYz1cIicgKyBpY29uICsgJ1wiIGFsdD1cIicgKyB0aXRsZSArICdcIiB0aXRsZT1cIicgKyB0aXRsZSArICdcIi8+PC9kaXY+JztcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmV0dXJuIGh0bWw7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVSZW1vdmVBbGxQcm9kdWN0c0Zyb21MaXN0KGUpIHtcclxuICAgICAgICAgICAgaWYgKGUpIHtcclxuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdmFyIG1lc3NhZ2UgPSBqUXVlcnkoJ2lucHV0W25hbWU9cmVtb3ZlQ29uZmlybWF0aW9uTWVzc2FnZV0nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHdpbmRvdy5jb25maXJtKG1lc3NhZ2UpKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIGJ1dHRvbiA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgICAgICB2YXIgYWNjb3VudElkID0gd2luZG93LnF1aWNrT3JkZXJEZXRhaWxzLkFjY291bnRJZDtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyB1c2UgYnV0dG9uIGFuaW1hdG9yXHJcbiAgICAgICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ1JlbW92aW5nLi4uJywgYnV0dG9uKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBjYWxsIHF1aWNrIG9yZGVyIGFwaVxyXG4gICAgICAgICAgICAgICAgUXVpY2tPcmRlckFwaS5yZW1vdmVBbGxGcm9tUXVpY2tPcmRlcihhY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd1N1Y2Nlc3NBbmltYXRpb24oYW5pbWF0aW9uLCBcIlJlbW92ZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVEYXRhUmVzcG9uc2UoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRXJyb3IhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LmFkZEVycm9yTWVzc2FnZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJFcnJvciByZW1vdmluZyBwcm9kdWN0IGZyb20gc2hvcHBpbmcgbGlzdFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSwgdHJ1ZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZVJlbW92ZVByb2R1Y3RzRnJvbUxpc3QoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgbGluayA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgIHZhciAkdHIgPSBqUXVlcnkodGhpcykuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICB2YXIgYWNjb3VudElkID0gd2luZG93LnF1aWNrT3JkZXJEZXRhaWxzLkFjY291bnRJZDtcclxuXHJcbiAgICAgICAgICAgIC8vIHVzZSBidXR0b24gYW5pbWF0b3JcclxuICAgICAgICAgICAgdmFyIGFuaW1hdGlvbiA9IExpbmtBbmltYXRvci5zdGFydEFuaW1hdGlvbignUmVtb3ZpbmcuLi4nLCBsaW5rKTtcclxuXHJcbiAgICAgICAgICAgIC8vIGNhbGwgcXVpY2sgb3JkZXIgYXBpXHJcbiAgICAgICAgICAgIFF1aWNrT3JkZXJBcGkucmVtb3ZlRnJvbVF1aWNrT3JkZXIoYWNjb3VudElkLCBpZCxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgTGlua0FuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJSZW1vdmVkIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICBoYW5kbGVEYXRhUmVzcG9uc2UoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIExpbmtBbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiRXJyb3IgcmVtb3ZpbmcgcHJvZHVjdCBmcm9tIHNob3BwaW5nIGxpc3RcIlxyXG4gICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICB9LCB0cnVlKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZUFkZFRvQ2FydEZyb21MaXN0KGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB2YXIgdHJhY2tlZEl0ZW1zID0gW107XHJcbiAgICAgICAgICAgIHZhciBjb3VudCA9IDA7XHJcblxyXG4gICAgICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgdmFyIG1zZyA9ICcuLi4nO1xyXG4gICAgICAgICAgICB2YXIgc3VjY2VzcyA9IGZhbHNlO1xyXG5cclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ0FkZGluZy4uLicsIGJ1dHRvbik7XHJcblxyXG4gICAgICAgICAgICB2YXIgcmVxdWVzdCA9IHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgdXJsOiBtb3ZlVG9TaG9wcGluZ0NhcnRFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgICAgICBBY2NvdW50SWQ6IHdpbmRvdy5xdWlja09yZGVyRGV0YWlscy5BY2NvdW50SWRcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgY29udGVudFR5cGU6IFwiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkOyBjaGFyc2V0PVVURi04XCIsXHJcbiAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIHJlcGxhY2VtZW50L3N1YnN0aXR1dGlvbiBtZXNzYWdlXHJcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEhcmVzdWx0LlN1Y2Nlc3NmdWwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5Nb2RpZmljYXRpb25zKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQuTW9kaWZpY2F0aW9ucy5tYXAoZnVuY3Rpb24gKG1vZGlmaWNhdGlvbikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFN1Y2Nlc3NNZXNzYWdlKG1vZGlmaWNhdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudCA9IGl0ZW1zLmxlbmd0aDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0ZW1zICYmIGNvdW50ID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMuZm9yRWFjaChmdW5jdGlvbiAoaXRlbSwgaSkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZ2FJdGVtID0gbGlicmFyeS5jcmVhdGVHQUl0ZW0oaXRlbS5TS1UsIGl0ZW0uUXVhbnRpdHksIGl0ZW0uQWN0dWFsUHJpY2UsIGl0ZW0uRGlzcGxheU5hbWUsIGl0ZW0uTWFudWZhY3R1cmVyLCBpdGVtLlByaW1hcnlDYXRlZ29yeSwgaXRlbS5TdWJDYXRlZ29yeSwgaSwgJ2xpc3RfUXVpY2tPcmRlcicsICdRdWljayBPcmRlcicpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNrZWRJdGVtcy5wdXNoKGdhSXRlbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpYnJhcnkudHJhY2tHYUV2ZW50VG9EYXRhTGF5ZXIoXCJhZGRfdG9fY2FydFwiLCB0cmFja2VkSXRlbXMsIHdpbmRvdy5qUXVlcnkoJyNzdWJ0b3RhbC1zZWxlY3RlZCcpLmh0bWwoKSwgXCJpdGVtc19hZGRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUHJvZHVjdHMoW10pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdWNjZXNzID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LkVycm9ycykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LkVycm9ycy5tYXAoZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJyNlcnJvci1tZXNzYWdlcycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiRXJyb3IgYWRkaW5nIGl0ZW1zIHRvIGNhcnRcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAnI2Vycm9yLW1lc3NhZ2VzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBcIkVycm9yIGFkZGluZyBpdGVtcyB0byBjYXJ0XCJcclxuICAgICAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlcXVlc3QuYWx3YXlzKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBtc2cgPSAnJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7ICsnICsgY291bnQgKyAnICZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyc7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gZmluaXNoIHRoZSBidXR0b24gYW5pbWF0aW9uXHJcbiAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIG1zZyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gcmVmcmVzaCB0aGUgbWluaSBjYXJ0XHJcbiAgICAgICAgICAgICAgICBTaG9wcGluZ0NhcnRBcGkucmVmcmVzaENhcnQoKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVBZGRUb0xpc3QoZSkge1xyXG4gICAgICAgICAgICBpZiAoZSkge1xyXG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB2YXIgYnV0dG9uID0gJCgnI2FkZC1wcm9kdWN0LXRvLWxpc3QtYnV0dG9uJywgbmFtZXNwYWNlKTtcclxuICAgICAgICAgICAgdmFyIGNvZGUgPSAkYWRkUHJvZHVjdENvZGUudmFsKCk7XHJcbiAgICAgICAgICAgIHZhciBxdWFudGl0eSA9ICRhZGRQcm9kdWN0UXVhbnRpdHkudmFsKCk7XHJcbiAgICAgICAgICAgIHZhciBhY2NvdW50SWQgPSB3aW5kb3cucXVpY2tPcmRlckRldGFpbHMuQWNjb3VudElkO1xyXG5cclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ0FkZGluZy4uLicsIGJ1dHRvbik7XHJcblxyXG4gICAgICAgICAgICAvLyBjYWxsIHF1aWNrIG9yZGVyIGFwaVxyXG4gICAgICAgICAgICBRdWlja09yZGVyQXBpLmFkZFRvUXVpY2tPcmRlcihhY2NvdW50SWQsIGNvZGUsIHF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZURhdGFSZXNwb25zZShkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciB0aGUgdGV4dCBib3ggYW5kIHJlc2V0IHRoZSBxdHlcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy52YWxpZGF0ZUNoYWR3ZWxsU0tVJywgbmFtZXNwYWNlKS52YWwoJycpLmZvY3VzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFkZFByb2R1Y3RRdWFudGl0eS52YWwoJycpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZXJyb3JNZXNzYWdlID0gXCJVbmFibGUgdG8gYWRkIHByb2R1Y3QgXCIgKyBjb2RlICsgXCIgdG8gc2hvcHBpbmcgbGlzdC5cIjtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyLnJlc3BvbnNlVGV4dCAhPSBudWxsICYmIGVyci5yZXNwb25zZVRleHQgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9IGVyci5yZXNwb25zZVRleHQ7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LmFkZEVycm9yTWVzc2FnZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgJyNlcnJvci1tZXNzYWdlcycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH0sIHRydWUpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgalF1ZXJ5LndhaXQgPSBmdW5jdGlvbiAoY2FsbGJhY2ssIHNlY29uZHMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5zZXRUaW1lb3V0KGNhbGxiYWNrLCBzZWNvbmRzICogMTAwMCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVBZGRUb1F1aWNrT3JkZXJGcm9tU2hvcHBpbmdMaXN0KGUpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIGxpbmsgPSAkKHRoaXMpO1xyXG4gICAgICAgICAgICB2YXIgY29kZSA9IGpRdWVyeSh0aGlzKS5kYXRhKCdjb2RlJyk7XHJcbiAgICAgICAgICAgIHZhciBhY2NvdW50SWQgPSB3aW5kb3cucXVpY2tPcmRlckRldGFpbHMuQWNjb3VudElkO1xyXG4gICAgICAgICAgICB2YXIgcXVhbnRpdHkgPSAxO1xyXG5cclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gTGlua0FuaW1hdG9yLnN0YXJ0QW5pbWF0aW9uKCdBZGRpbmcuLi4nLCBsaW5rKTtcclxuXHJcbiAgICAgICAgICAgIC8vIGNhbGwgcXVpY2sgb3JkZXIgYXBpXHJcbiAgICAgICAgICAgIFF1aWNrT3JkZXJBcGkuYWRkVG9RdWlja09yZGVyKGFjY291bnRJZCwgY29kZSwgcXVhbnRpdHksXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIExpbmtBbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuSXRlbXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlRGF0YVJlc3BvbnNlKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgTGlua0FuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRXJyb3IhXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LmFkZEVycm9yTWVzc2FnZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgJyNlcnJvci1tZXNzYWdlcycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgXCJVbmFibGUgdG8gYWRkIHByb2R1Y3QgXCIgKyBjb2RlICsgXCIgdG8gc2hvcHBpbmcgbGlzdFwiXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH0sIHRydWUpO1xyXG5cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gZmV0Y2hRdWlja09yZGVyVGFibGUoKSB7XHJcbiAgICAgICAgICAgICRtYWluV2FpdGluZy5zaG93KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgYWNjb3VudElkID0gd2luZG93LnF1aWNrT3JkZXJEZXRhaWxzLkFjY291bnRJZDtcclxuXHJcbiAgICAgICAgICAgIC8vIGNhbGwgcXVpY2sgb3JkZXIgYXBpXHJcbiAgICAgICAgICAgIFF1aWNrT3JkZXJBcGkuZ2V0UXVpY2tPcmRlckNhcnQoYWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBoYW5kbGVEYXRhUmVzcG9uc2UoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgJG1haW5XYWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiRXJyb3IgcmV0cmlldmluZyBxdWljayBvcmRlclwiXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgICAgICAkcHJvZHVjdExpc3RDb250YWluZXIuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICRtYWluV2FpdGluZy5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICB9LCB0cnVlKTtcclxuICAgICAgICB9XHJcblxyX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Kz0gaXRlbS5BY3R1YWxQcmljZTtcclxuICAgICAgICAgICAgICAgIHRyYWNrZWRJdGVtcy5wdXNoKHRyYWNrZWRJdGVtKTtcclxuICAgICAgICAgICAgICAgIGpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVybCxcclxuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEgKyBcIiZDb2RlPVwiICsgZW5jb2RlVVJJQ29tcG9uZW50KGl0ZW0uU0tVKSArIFwiJlF1YW50aXR5PVwiICsgZW5jb2RlVVJJQ29tcG9uZW50KGl0ZW0uUXVhbnRpdHkpLFxyXG4gICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgKytzdWNjZXNzO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgKytlcnJvcjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KS5hbHdheXMoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICsraTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaSA9PT0gaXRlbXMubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcnJvciA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcjZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIkVycm9yIGFkZGluZyBpdGVtcyB0byBzaG9wcGluZyBsaXN0XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LnRyYWNrR2FFdmVudFRvRGF0YUxheWVyKFwiYWRkX3RvX3Nob3BwaW5nX2xpc3RcIiwgdHJhY2tlZEl0ZW1zLCB0b3RhbCwgXCJpdGVtc19hZGRfc2hvcHBpbmdfbGlzdFwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFN1Y2Nlc3NNZXNzYWdlKFwiU3VjY2Vzc2Z1bGx5IGFkZGVkIGl0ZW1zIHRvIHNob3BwaW5nIGxpc3RcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVXBkYXRlIHNob3BwaW5nIGxpc3RcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0galF1ZXJ5KFwic2VsZWN0W25hbWU9J05hbWUnXVwiLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgJGRpdiA9IGpRdWVyeShcImRpdltkYXRhLXNob3BwaW5nLWxpc3QtbmFtZT0nXCIgKyBuYW1lICsgXCInXVwiLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgb3BlbmVkID0gJGRpdi5jaGlsZHJlbihcIi5zaG93XCIpLmxlbmd0aCA+IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXF1ZXN0ID0gd2luZG93LmpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGdldFNob3BwaW5nTGlzdEFjY29yZGlvbkVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnRJZDogd2luZG93LnF1aWNrT3JkZXJEZXRhaWxzLkFjY291bnRJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTaG9wcGluZ0xpc3ROYW1lOiBuYW1lXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6IFwiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkOyBjaGFyc2V0PVVURi04XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZGl2LnJlcGxhY2VXaXRoKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcGVuZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KFwiZGl2W2RhdGEtc2hvcHBpbmctbGlzdC1uYW1lPSdcIiArIG5hbWUgKyBcIiddXCIsIG5hbWVzcGFjZSkuY2hpbGRyZW4oJy5jb2xsYXBzZScpLmFkZENsYXNzKCdzaG93Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIG1hcEl0ZW1zVG9DYXJ0SXRlbXMoKSB7XHJcbiAgICAgICAgICAgIGxldCBjYXJ0SXRlbXMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIGlmIChpdGVtcyAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaSA9IDA7XHJcblxyXG4gICAgICAgICAgICAgICAgaXRlbXMuZm9yRWFjaChmdW5jdGlvbiAoaXRlbSwgaW5kZXgpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYXJ0SXRlbSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbV9pZDogaXRlbS5TS1U/LnRyaW0oKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbV9uYW1lOiBpdGVtLkRpc3BsYXlOYW1lPy50cmltKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbmN5OiAnVVNEJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaWNlOiBwYXJzZUZsb2F0KGl0ZW0uQWN0dWFsUHJpY2UpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBxdWFudGl0eTogcGFyc2VJbnQoaXRlbS5RdWFudGl0eSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1fYnJhbmQ6IGl0ZW0uTWFudWZhY3R1cmVyLCBcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbV9jYXRlZ29yeTogaXRlbS5QcmltYXJ5Q2F0ZWdvcnksXHJcbiAgICAgICAgICAgICAgICAg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kge1xyXG4gICAgICAgICAgICAgICAgJHJlamVjdEJ1dHRvbi5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAkcmVqZWN0T3B0aW9ucy5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAkcmVqZWN0TWVzc2FnZU5vUmVhc29uLnNob3coKTtcclxuICAgICAgICAgICAgICAgICRhcHByb3ZlQnV0dG9uLnNob3coKTtcclxuICAgICAgICAgICAgICAgICR3YWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHZhciByZXF1ZXN0ID1cclxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cualF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy5SZWplY3RRdW90ZUVuZFBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY2NvdW50SWQ6IHdpbmRvdy5BY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdW90ZU51bWJlcjogd2luZG93LlF1b3RlTnVtYmVyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0aW9uUmVhc29uOiAkcmVqZWN0T3B0aW9ucy52YWwoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHJlamVjdEJ1dHRvbi5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRyZWplY3RPcHRpb25zLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHJlamVjdE1lc3NhZ2VTdWNlc3Muc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJHJlamVjdE1lc3NhZ2VFcnJvci5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFwcHJvdmVCdXR0b24uc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICRyZWplY3RCdXR0b24uc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICRyZWplY3RPcHRpb25zLnNob3coKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICR3YWl0aW5nLmhpZGUoKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgICRyZWplY3RCdXR0b24ub24oJ2NsaWNrJywgcmVqZWN0KTtcclxuICAgIH07XHJcblxyXG4gICAgLy8tLS0tLSBTdWJtaXQgYnV0dG9uIGZlZWRiYWNrXHJcbiAgICBqUXVlcnkoICcuYnRuLXBheScgLCBuYW1lc3BhY2UgKS5jbGljayggZnVuY3Rpb24oIGV2ZW50IClcclxuICAgIHtcclxuICAgICAgICAvLyBldmVudC5wcmV2ZW50RGVmYXVsdCgpOyAvLyBwcmV2ZW50cyBzdWJtaXQgZm9yIHRlc3RpbmdcclxuICAgICAgICBqUXVlcnkoIHRoaXMgKS5oaWRlKCk7XHJcbiAgIC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XggXScsIG5hbWVzcGFjZSkudmFsKCk7XHJcbiAgICAgICAgICAgIHZhciByZWcgPSBuZXcgUmVnRXhwKGV4cCwgJ2knKTtcclxuICAgICAgICAgICAgdmFyIHJ0biA9IHJlZy50ZXN0KHZhbHVlKTtcclxuXHJcbiAgICAgICAgICAgIHJldHVybiBydG47XHJcblxyXG4gICAgICAgIH0sICdJbnZhbGlkIFNLVSBGb3JtYXQuJyk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gVmFsaWRhdGUgYWRkIHByb2R1Y3QgdG8gbGlzdCBmb3JtXHJcbiAgICAgICAgalF1ZXJ5KCcjYWRkLXByb2R1Y3QnLCBuYW1lc3BhY2UpLnZhbGlkYXRlKFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBzdWJtaXRIYW5kbGVyOiBmdW5jdGlvbiAoZm9ybSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZXIoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmICh3aW5kb3cualF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB2YXIgZXJyb3JJZCA9IDA7XHJcbiAgICAgICAgdmFyIHNlbGVjdGVkID0gW107XHJcbiAgICAgICAgdmFyIGl0ZW1zID0gW107XHJcbiAgICAgICAgdmFyIGNhcnRMZXZlbEVycm9ycyA9IFtdO1xyXG4gICAgICAgIHZhciBlZGl0ZWREZXRhaWxzID0gZmFsc2U7XHJcbiAgICAgICAgdmFyIG5pY2tuYW1lID0gXCJcIjtcclxuICAgICAgICB2YXIgd2lsbENhbGwgPSBcIlwiO1xyXG4gICAgICAgIHZhciBzYW1lRGF5U2hpcHBpbmcgPSBcIlwiO1xyX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clxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaXNTZWxlY3RlZChpZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gc2VsZWN0ZWQuaW5kZXhPZihpZCkgPiAtMTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZnVuY3Rpb24gaXRlbVdpdGhMaW5lSXRlbUlkKGlkKSB7XHJcbiAgICAgICAgICAgIHZhciBmb3VuZCA9IG51bGw7XHJcblxyXG4gICAgICAgICAgICBpdGVtcy5tYXAoZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChpdGVtLklkID09PSBpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kID0gaXRlbTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gZm91bmQ7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGZ1bmN0aW9uIHJlbW92ZUZyb21TZWxlY3RlZChpZCkge1xyXG4gICAgICAgICAgICB2YXIgaW5kZXggPSBzZWxlY3RlZC5pbmRleE9mKGlkKTtcclxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpXHJcbiAgICAgICAgICAgICAgICBzZWxlY3RlZC5zcGxpY2UoaW5kZXgsIDEpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlU2VsZWN0aW9uVG90YWxzQW5kQnV0dG9ucygpIHtcclxuICAgICAgICAgICAgdmFyIHN1YlRvdGFsID0gMDtcclxuICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcclxuICAgICAgICAgICAgaXRlbXMubWFwKGZ1bmN0aW9uIChpdGVtKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaXNTZWxlY3RlZChpdGVtLklkKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICsrY291bnQ7XHJcbiAgICAgICAgIC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5qUXVlcnkoXCIjc2hvcHBpbmctbGlzdC1wcm9kdWN0cyBpbnB1dFt0eXBlPWNoZWNrYm94XVwiLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgICAgICBzZWxlY3RlZCA9IFtdO1xyXG4gICAgICAgICAgICBpZiAoY2hlY2tlZCkge1xyXG4gICAgICAgICAgICAgICAgaXRlbXMubWFwKGZ1bmN0aW9uIChpdGVtKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQucHVzaChpdGVtLklkKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICRjaGVja0JveGVzLnByb3AoJ2NoZWNrZWQnLCBjaGVja2VkKTtcclxuICAgICAgICAgICAgdXBkYXRlU2VsZWN0aW9uVG90YWxzQW5kQnV0dG9ucygpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlVXBkYXRlTGluZUl0ZW1RdWFudGl0eUNoYW5nZSgpIHtcclxuICAgICAgICAgICAgaWYgKGNhbkVkaXRQcm9kdWN0cykge1xyXG4gICAgICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgJHRyID0gJHRoaXMuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICAgICAgdmFyIHNhdmluZ05vdGlmaWNhdGlvbiA9ICR0ci5maW5kKFwiLnNhdmluZy1ub3RpZmljYXRpb25cIik7XHJcbiAgICAgICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICAgICAgdmFyIHF1YW50aXR5ID0gJHRoaXMudmFsKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLnNob3coKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9IHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVwZGF0ZUxpbmVJdGVtUXVhbnRpdHlFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnRJZDogYWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdW90ZU51bWJlcjogcXVvdGVOdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExpbmVJdGVtSWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdWFudGl0eTogcXVhbnRpdHlcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSAmJiBkYXRhLkl0ZW1zKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb2R1Y3RzKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVTZWxlY3Rpb25Ub3RhbHNBbmRCdXR0b25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRvdGFscyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUXVvdGVEZXRhaWxzQW5kQnV0dG9ucyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlRXJyb3JzKGRhdGEpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIkVycm9yIHVwZGF0aW5nIHByb2R1Y3QgcXVhbnRpdHkgZm9yIHF1b3RlXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICRhcHByb3ZlQnV0dG9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICAkc2VuZEFwcHJvdmFsQnV0dG9uLmhpZGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVVcGRhdGVMaW5lSXRlbVByaWNlQ2hhbmdlKCkge1xyXG4gICAgICAgICAgICBpZiAoY2FuRWRpdFByaWNlcykge1xyXG4gICAgICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgJHRyID0gJHRoaXMuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICAgICAgdmFyIHNhdmluZ05vdGlmaWNhdGlvbiA9ICR0ci5maW5kKFwiLnNhdmluZy1wcmljZS1ub3RpZmljYXRpb25cIik7XHJcbiAgICAgICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICAgICAgdmFyIHByaWNlID0gJHRoaXMudmFsKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLnNob3coKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9IHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHVwZGF0ZUxpbmVJdGVtUHJpY2VFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnRJZDogYWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdW90ZU51bWJlcjogcXVvdGVOdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExpbmVJdGVtSWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBQcmljZTogcHJpY2VcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSAmJiBkYXRhLkl0ZW1zKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb2R1Y3RzKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVTZWxlY3Rpb25Ub3RhbHNBbmRCdXR0b25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRvdGFscyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUXVvdGVEZXRhaWxzQW5kQnV0dG9ucyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlRXJyb3JzKGRhdGEpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F2aW5nTm90aWZpY2F0aW9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIkVycm9yIHVwZGF0aW5nIHByb2R1Y3QgcHJpY2UgZm9yIHF1b3RlXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNhdmluZ05vdGlmaWNhdGlvbi5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gYmluZFByb2R1Y3RzKCkge1xyXG4gICAgICAgICAgICB3aW5kb3cualF1ZXJ5KFwiI3Nob3BwaW5nLWxpc3QtcHJvZHVjdHMgaW5wdXRbdHlwZT1jaGVja2JveF1cIiwgbmFtZXNwYWNlKS5iaW5kKCdjaGFuZ2UnLCBoYW5kbGVDaGVja0JveENoYW5nZSk7XHJcbiAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkoXCIjc2hvcHBpbmctbGlzdC1wcm9kdWN0cyBpbnB1dFt0eXBlPW51bWJlcl0ucXVhbnRpdHlcIiwgbmFtZXNwYWNlKS5iaW5kKCdjaGFuZ2UgYmx1cicsIG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cnkpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2F0ZWdvcnkgPT09IGl0ZW0uQ2F0ZWdvcnkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3ViVG90YWwgKz0gaXRlbS5MaW5lVG90YWw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRheFRvdGFsICs9IGl0ZW0uU2FsZXNUYXg7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNhdGVnb3J5ICE9PSBcIlwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc2hvcHBpbmdMaXN0UHJvZHVjdHMuYXBwZW5kKGdldENhdGVnb3J5VG90YWxIdG1sKHN1YlRvdGFsLCB0YXhUb3RhbCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlc2V0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVnb3J5ID0gaXRlbS5DYXRlZ29yeTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3ViVG90YWwgPSBpdGVtLkxpbmVUb3RhbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGF4VG90YWwgPSBpdGVtLlNhbGVzVGF4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkc2hvcHBpbmdMaXN0UHJvZHVjdHMuYXBwZW5kKGdldENhdGVnb3J5SGVhZGVySHRtbChjYXRlZ29yeSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgY3VzdG9tSWNvbkh0bWwgPSBnZXRDdXN0b21JY29uSHRtbChpdGVtKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgZmlyc3RDb2x1bW4gPSBcImNvbC1hdXRvXCI7XHJcbiAgICAgICAgICAgICAgICBpZiAoY3VzdG9tSWNvbkh0bWwgJiYgY3VzdG9tSWNvbkh0bWwubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpcnN0Q29sdW1uID0gXCJjb2wtc20tOVwiO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vYWRkIG5ldyBpdGVtIHRvIHRoZSBmcm9udCBvZiB0aGUgbGlzdFxyXG4gICAgICAgICAgICAgICAgdmFyIG1hcmt1cCA9ICcgXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGRhdGEtaWQ9XCInICsgaXRlbS5JZCArICdcIiBkYXRhLWNvZGU9XCInICsgaXRlbS5TS1UgKyAnXCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIlNlbGVjdDpcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT1cImNoZWNrYm94XCInICsgKGlzU2VsZWN0ZWQoaXRlbS5JZCkgPyAnY2hlY2tlZD1cImNoZWNrZWRcIicgOiBcIlwiKSArICdcIiAnICsgKCFjYW5FZGl0UHJvZHVjdHMgPyAnZGlzYWJsZWQnIDogJycpICsgJyAvPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBkYXRhLXRpdGxlPVwiSXRlbTpcIj4nICsgaXRlbS5TS1UgKyAnPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBkYXRhLXRpdGxlPVwiSW1hZ2U6XCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGltZyBzcmM9XCInKyBpdGVtLkltYWdlVXJsICsgJ1wiIGFsdD1cIicgKyBpdGVtLkRpc3BsYXlOYW1lICsgJ1wiIC8+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtdGl0bGU9XCJEZXNjcmlwdGlvbjpcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicm93XCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCInICsgZmlyc3RDb2x1bW4gKyAnXCI+PGEgaHJlZj1cIicgKyBpdGVtLlVybCArICdcIiBhbHQ9XCInICsgaXRlbS5EaXNwbGF5TmFtZSArICdcIj4nICsgaXRlbS5EaXNwbGF5TmFtZSArICc8L2E+JyArIGdldExpbmVJdGVtVmFsaWRhdGlvbkh0bWwoaXRlbSkgKyAnPC9kaXY+JztcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoY3VzdG9tSWNvbkh0bWwgJiYgY3VzdG9tSWNvbkh0bWwubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG1hcmt1cCArPSAnPGRpdiBjbGFzcz1cImNvbC1zbS0zXCI+JyArIGN1c3RvbUljb25IdG1sICsgJzwvZGl2Pic7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgbWFya3VwICs9ICcgXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIlByaWNlOlwiPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcgKyAoY2FuRWRpdFByaWNlc1xyXG4gICAgICAgICAgICAgICAgICAgID8gJzxpbnB1dCB0eXBlPVwibnVtYmVyXCIgc3RlcD1cIjAuMDFcIiB2YWx1ZT1cIicgKyBpdGVtLkFjdHVhbFByaWNlLnRvRml4ZWQoMikgKyAnXCIgY2xhc3M9XCJwcmljZVwiIGF1dG9jb21wbGV0ZT1cIm9mZlwiIC8+IDxzcGFuIGNsYXNzPVwic2F2aW5nLXByaWNlLW5vdGlmaWNhdGlvblwiPlNhdmluZy4uLjwvc3Bhbj4gJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICA6ICgnPHNwYW4+JyArIGxpYnJhcnkuZm9ybWF0VVNEKGl0ZW0uQWN0dWFsUHJpY2UudG9GaXhlZCgyKSkgKyAnPC9zcGFuPicpKSArXHJcbiAgICAgICAgICAgICAgICAgICAgJzwvdGQ+XFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBkYXRhLXRpdGxlPVwiUXVhbnRpdHk6XCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9XCJudW1iZXJcIiBjbGFzcz1cInF1YW50aXR5XCIgcmVxdWlyZWQ9XCJyZXF1aXJlZFwiIG1pbj1cIjFcIiBtYXg9XCIxMDAwXCIgdmFsdWU9XCInICsgaXRlbS5RdWFudGl0eSArICdcIiAnICsgKCFjYW5FZGl0UHJvZHVjdHMgPyAnZGlzYWJsZWQnIDogJycpICsgJyBhdXRvY29tcGxldGU9XCJvZmZcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInNhdmluZy1ub3RpZmljYXRpb25cIj5TYXZpbmcuLi48L3NwYW4+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtdGl0bGU9XCJUb3RhbDpcIiBjbGFzcz1cInRleHQtcmlnaHRcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3Ryb25nPicgKyBsaWJyYXJ5LmZvcm1hdFVTRChpdGVtLkxpbmVUb3RhbCkgKyAnPC9zdHJvbmc+ICB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ICAgICAgICAgICAgIGpRdWVyeSgnI3RvdGFscy1kaXNjb3VudCcsIG5hbWVzcGFjZSkuaHRtbChsaWJyYXJ5LmZvcm1hdFVTRChkYXRhLkRpc2NvdW50KSk7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoJy5kaXNjb3VudC13cmFwcGVyJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoJy5kaXNjb3VudC13cmFwcGVyJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHVwZGF0ZVF1b3RlRGV0YWlsc0FuZEJ1dHRvbnMoZGF0YSkge1xyXG4gICAgICAgICAgICBpZiAoIWVkaXRlZERldGFpbHMgJiYgZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFlZGl0ZWREZXRhaWxzKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIHNldCB2YWx1ZXNcclxuICAgICAgICAgICAgICAgICAgICBuaWNrbmFtZSA9IGRhdGEuUXVvdGVOaWNrbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICB3aWxsQ2FsbCA9IGRhdGEuV2lsbENhbGxTZWxlY3RlZDtcclxuICAgICAgICAgICAgICAgICAgICBkZWxpdmVyeU5vdGVzID0gZGF0YS5EZWxpdmVyeU5vdGVzO1xyXG4gICAgICAgICAgICAgICAgICAgIG5vdGVzID0gZGF0YS5Ob3RlcztcclxuICAgICAgICAgICAgICAgICAgICBwb051bWJlciA9IGRhdGEuUG9OdW1iZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgdW5pdE51bWJlciA9IGRhdGEuVW5pdE51bWJlcjtcclxuICAgICAgICAgICAgICAgICAgICBzYW1lRGF5U2hpcHBpbmcgPSBkYXRhLlNhbWVEYXlTaGlwcGluZztcclxuICAgICAgICAgICAgICA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ChkYXRhLkZ1dHVyZVNoaXBwaW5nRGF0ZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghZGF0YS5DYW5FZGl0RGV0YWlscykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkZGVsaXZlcnlOb3Rlcy5wcm9wKCdkaXNhYmxlZCcsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkbm90ZXMucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJG5pY2tuYW1lLnByb3AoJ2Rpc2FibGVkJywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICR3aWxsQ2FsbC5wcm9wKCdkaXNhYmxlZCcsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkcG9OdW1iZXIucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHVuaXROdW1iZXIucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHNhbWVEYXlTaGlwcGluZy5wcm9wKCdkaXNhYmxlZCcsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkc2VsZWN0ZWRTaGlwVG9JZC5wcm9wKCdkaXNhYmxlZCcsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkZnV0dXJlU2hpcHBpbmdEYXRlLnByb3AoJ2Rpc2FibGVkJywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRzaGlwQ29tcGxldGUucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHNhdmVCdXR0b24uaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5DYW5CZUFwcHJvdmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFwcHJvdmVCdXR0b24uc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFwcHJvdmVCdXR0b24uaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChkYXRhLkNhbkJlU2VudEZvckFwcHJvdmFsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJHNlbmRBcHByb3ZhbEJ1dHRvbi5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAkc2VuZEFwcHJvdmFsQnV0dG9uLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5DYW5CZVJlamVjdGVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJHJlamVjdEJ1dHRvbi5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgJHJlamVjdE9wdGlvbnMuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJHJlamVjdEJ1dHRvbi5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgJHJlamVjdE9wdGlvbnMuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vaGFuZGxlIHBvIHJlcXVpcmVkXHJcbiAgICAgICAgICAgICAgICBjYW5BcHByb3ZlT3JkZXIgPSBkYXRhLkNhbkJlQXBwcm92ZWQ7XHJcbiAgICAgICAgICAgICAgICBoYW5kbGVQT1JlcXVpcmVkKCk7XHJcbiAgICAgICAgICAgICAgICB2YWxpZGF0ZVNoaXBUb0FkZHJlc3MoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlRXJyb3JzKGRhdGEpIHtcclxuICAgICAgICAgICAgLy9hbHdheXMgaGlkZSB0aGUgcmVqZWN0aW9uIG1lc3NhZ2VzIGFib3ZlIHRoZSBidXR0b25zIGlmIHN0aWxsIHZpc2libGVcclxuICAgICAgICAgICAgJHJlamVjdE1lc3NhZ2VTdWNlc3MuaGlkZSgpO1xyXG4gICAgICAgICAgICAkcmVqZWN0TWVzc2FnZUVycm9yLmhpZGUoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuRXJyb3JNZXNzYWdlcykge1xyXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBkYXRhLkVycm9yTWVzc2FnZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayBpbiBlcnJvciBhcnJheSAtIGlmIGl0IGRvZXNuJ3QgZXhpc3QgYWRkIGl0XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYXJ0TGV2ZWxFcnJvcnMuaW5jbHVkZXMoZGF0YS5FcnJvck1lc3NhZ2VzW2ldKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmV3SW5kZXggPSBlcnJvcklkO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXJ0TGV2ZWxFcnJvcnNbbmV3SW5kZXhdID0gZGF0YS5FcnJvck1lc3NhZ2VzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoZGF0YS5FcnJvck1lc3NhZ2VzW2ldLCBuZXdJbmRleCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICsrZXJyb3JJZDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUmVtb3ZlIGZyb20gYXJyYXkgaWYgaXQgaXNuJ3QgaW4gZGF0YS5FcnJvck1lc3NhZ2VzXHJcbiAgICAgICAgICAgICAgICB2YXIga2V5cyA9IE9iamVjdC5rZXlzKGNhcnRMZXZlbEVycm9ycyk7XHJcbiAgICAgICAgICAgICAgICBrZXlzLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghZGF0YS5FcnJvck1lc3NhZ2VzLmluY2x1ZGVzKGNhcnRMZXZlbEVycm9yc1trZXldKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgY2FydExldmVsRXJyb3JzW2tleV07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUVycm9yTWVzc2FnZShrZXkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBoYW5kbGVQT1JlcXVpcmVkRXJyb3IoZGF0YS5QT051bWJlclJlcXVpcmVkKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZVBPUmVxdWlyZWRFcnJvcihwb1JlcXVpcmVkKSB7XHJcbiAgICAgICAgICAgIHBvTnVtYmVyUmVxdWlyZWQgPSBwb1JlcXVpcmVkO1xyXG4gICAgICAgICAgICBoYW5kbGVQT1JlcXVpcmVkKCk7XHJcblxyXG4gICAgICAgICAgICAvL3NwZWNpYWwgcG8gbnVtYmVyIHJlcXVpcmVkIG1lc3NhZ2VcclxuICAgICAgICAgICAgaWYgKHBvTnVtYmVyUmVxdWlyZWQpIHtcclxuICAgICAgICAgICAgICAgICRwb0Vycm9yTWVzc2FnZS5zaG93KCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkcG9FcnJvck1lc3NhZ2UuaGlkZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVQT1JlcXVpcmVkKCkge1xyXG5cclxuICAgICAgICAgICAgaWYgKHBvTnVtYmVyUmVxdWlyZWQpIHtcclxuICAgICAgICAgICAgICAgIGlmICgkcG9OdW1iZXIudmFsKCkudHJpbSgpID09ICcnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFwcHJvdmVCdXR0b24ucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbkFwcHJvdmVPcmRlcikgeyAvL2Rvbid0IGVuYWJsZSBpZiBpdCBjYW4ndCBiZSBhcHByb3ZlZCBmb3Igb3RoZXIgdmFsaWRhdGlvbiBlcnJvcnNcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGFwcHJvdmVCdXR0b24ucHJvcCgnZGlzYWJsZWQnLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGZ1bmN0aW9uIHZhbGlkYXRlU2hpcFRvQWRkcmVzcygpIHtcclxuICAgICAgICAgICAgdmFyIHZhbGlkID0gZmFsc2U7XHJcbiAgICAgICAgICAgIGlmICgkc2VsZWN0ZWRTaGlwVG9JZC52YWwoKSkge1xyXG4gICAgICAgICAgICAgICAgdmFsaWQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgdG9nZ2xlU2hpcFRvQWRkcmVzc0Vycm9yKGZhbHNlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHsgdG9nZ2xlU2hpcFRvQWRkcmVzc0Vycm9yKHRydWUpOyB9XHJcbiAgICAgICAgICAgIHJldHVybiB2YWxpZDtcclxuICAgICAgICB9XHJcbiAgICAgICAgZnVuY3Rpb24gdG9nZ2xlU2hpc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dXJsOiByZW1vdmVQcm9kdWN0RW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50SWQ6IGFjY291bnRJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUXVvdGVOdW1iZXI6IHF1b3RlTnVtYmVyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBMaW5lSXRlbUlkczogc2VsZWN0ZWRcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuSXRlbXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd1N1Y2Nlc3NBbmltYXRpb24oYW5pbWF0aW9uLCAnUmVtb3ZlZCEnKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0cmFja2VkSXRlbXMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvdGFsUHJpY2UgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZC5tYXAoZnVuY3Rpb24gKGxpbmVJdGVtSWQsIGNvdW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbSA9IGl0ZW1XaXRoTGluZUl0ZW1JZChsaW5lSXRlbUlkKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbSAhPT0gdW5kZWZpbmVkICYmIGl0ZW0gIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IGl0ZW0uU0tVO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcmljZSA9IGxpYnJhcnkucGFyc2VTdHJpbmdUb051bWJlcihpdGVtLkFjdHVhbFByaWNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFja2VkSXRlbXMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1faWQ6IGNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1fbmFtZTogaXRlbS5EaXNwbGF5TmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVuY3k6IFwiVVNEXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBjb3VudCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpY2U6IGl0ZW0uQWN0dWFsUHJpY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aXR5OiBpdGVtLlF1YW50aXR5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG90YWxQcmljZSArPSBwcmljZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpYnJhcnkudHJhY2tHYUV2ZW50VG9EYXRhTGF5ZXIoXCJyZW1vdmVfZnJvbV9xdW90ZVwiLCB0cmFja2VkSXRlbXMsIHRvdGFsUHJpY2UsIFwiaXRlbXNfcXVvdGVfcmVtb3ZlXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkY2hlY2tBbGxJbnB1dHMucHJvcCgnY2hlY2tlZCcsIGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUHJvZHVjdHMoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRvdGFscyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlU2VsZWN0aW9uVG90YWxzQW5kQnV0dG9ucygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVRdW90ZURldGFpbHNBbmRCdXR0b25zKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVFcnJvcnMoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgJ0Vycm9yIScpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoXCJFcnJvciByZW1vdmluZyBwcm9kdWN0IGZyb20gcXVvdGVcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgJ0Vycm9yIScpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIGhhbmRsZUFkZFRvTGlzdChlKSB7XHJcbiAgICAgICAgICAgIGlmIChlKSB7XHJcbiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChjYW5FZGl0UHJvZHVjdHMpIHtcclxuICAgICAgICAgICAgICAgIHZhciBidXR0b24gPSAkKCcjYWRkLXByb2R1Y3QtdG8tbGlzdC1idXR0b24nLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgICAgICAgICAgdmFyIGNvZGUgPSAkYWRkUHJvZHVjdENvZGUudmFsKCk7XHJcbiAgICAgICAgICAgICAgICB2YXIgcXVhbnRpdHkgPSAkYWRkUHJvZHVjdFF1YW50aXR5LnZhbCgpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGFuaW1hdG9yXHJcbiAgICAgICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ0FkZGluZy4uLicsIGJ1dHRvbik7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPVxyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogYWRkUHJvZHVjdEFqYXhFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQWNjb3VudElkOiBhY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBRdW90ZU51bWJlcjogcXVvdGVOdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb2RlOiBjb2RlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgUXVhbnRpdHk6IHF1YW50aXR5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuSXRlbXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd1N1Y2Nlc3NBbmltYXRpb24oYW5pbWF0aW9uLCBcIkFkZGVkIVwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0cmFja2VkSXRlbXMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2tlZEl0ZW1zLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbV9pZDogY29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiAwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpdHk6IHF1YW50aXR5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LnRyYWNrR2FFdmVudFRvRGF0YUxheWVyKFwiYWRkX3RvX3F1b3RlXCIsIHRyYWNrZWRJdGVtcywgbnVsbCwgXCJpdGVtc19hZGRfcXVvdGVcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb2R1Y3RzKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVTZWxlY3Rpb25Ub3RhbHNBbmRCdXR0b25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRvdGFscyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUXVvdGVEZXRhaWxzQW5kQnV0dG9ucyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlRXJyb3JzKGRhdGEpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgJGFkZFByb2R1Y3RDb2RlLnZhbCgnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRhZGRQcm9kdWN0UXVhbnRpdHkudmFsKCcnKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIlVuYWJsZSB0byBhZGQgcHJvZHVjdCBcIiArIGNvZGUgKyBcIiB0byBxdW90ZS4gXCIgKyBkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIlVuYWJsZSB0byBhZGQgcHJvZHVjdCBcIiArIGNvZGUgKyBcIiB0byBxdW90ZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gbG9hZFF1b3RlKCkge1xyXG4gICAgICAgICAgICAkbWFpbldhaXRpbmcuc2hvdygpO1xyXG4gICAgICAgICAgICB2YXIgcmVxdWVzdCA9XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cualF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZXRRdW90ZUVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQWNjb3VudElkOiBhY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFF1b3RlTnVtYmVyOiBxdW90ZU51bWJlclxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcsXHJcbiAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uIChkYXRhKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YS5JdGVtcykge1xyXG4gICAgICAgICAgICAgICAgICAgICRtYWluV2FpdGluZy5oaWRl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cGxldGUtbW9kYWwgc3VibWl0IChDb25maXJtIGJ1dHRvbiBjbGlja2VkKVxyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpLm9uKCdjbGljaycsICcjY29uZmlybS1tb2RhbCcsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICQoJyNzaGlwLWNvbXBsZXRlLW1vZGFsJywgbmFtZXNwYWNlKS5tb2RhbCgnaGlkZScpO1xyXG4gICAgICAgICAgICBpZiAoZS50YXJnZXQudmFsdWUgPT09ICdTYXZlJykge1xyXG4gICAgICAgICAgICAgICAgc2F2ZURldGFpbHMoKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChlLnRhcmdldC52YWx1ZSA9PT0gJ0FwcHJvdmUnKSB7XHJcbiAgICAgICAgICAgICAgICBhcHByb3ZlUXVvdGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBzYXZlRGV0YWlscygpIHtcclxuICAgICAgICAgICAgJHdhaXRpbmcuc2hvdygpO1xyXG4gICAgICAgICAgICAkYXBwcm92YWxCdXR0b25zLmhpZGUoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChlZGl0ZWREZXRhaWxzKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPVxyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogc2F2ZVF1b3RlRGV0YWlsc0VuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50SWQ6IGFjY291bnRJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFF1b3RlTnVtYmVyOiBxdW90ZU51bWJlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIERlbGl2ZXJ5Tm90ZXM6ICRkZWxpdmVyeU5vdGVzLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTm90ZXM6ICRub3Rlcy52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBvTnVtYmVyOiAkcG9OdW1iZXIudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBVbml0OiAkdW5pdE51bWJlci52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFF1b3RlTmlja25hbWU6ICRuaWNrbmFtZS52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdpbGxDYWxsU2VsZWN0ZWQ6ICR3aWxsQ2FsbC5wcm9wKFwiY2hlY2tlZFwiKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNhbWVEYXlTaGlwcGluZzogJHNhbWVEYXlTaGlwcGluZy5wcm9wKFwiY2hlY2tlZFwiKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNlbGVjdGVkU2hpcFRvSWQ6ICRzZWxlY3RlZFNoaXBUb0lkLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgRnV0dXJlU2hpcHBpbmdEYXRlOiAkZnV0dXJlU2hpcHBpbmdEYXRlLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU2hpcENvbXBsZXRlOiAkc2hpcENvbXBsZXRlLnByb3AoXCJjaGVja2VkXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuSXRlbXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdGVkRGV0YWlscyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxpdmVyeU5vdGVzID0gJGRlbGl2ZXJ5Tm90ZXMudmFsKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vdGVzID0gJG5vdGVzLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwb051bWJlciA9ICRwb051bWJlci52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdW5pdE51bWJlciA9ICR1bml0TnVtYmVyLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuaWNrbmFtZSA9ICRuaWNrbmFtZS52YWwoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHNhdmVCdXR0b24ucHJvcCgnZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUHJvZHVjdHMoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVRvdGFscyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICR3YWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICAkYXBwcm92YWxCdXR0b25zLnNob3coKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbi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AgICAgJGFwcHJvdmFsQnV0dG9ucy5oaWRlKCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgcmVxdWVzdCA9XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cualF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBhcHByb3ZlUXVvdGVFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnRJZDogYWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdW90ZU51bWJlcjogcXVvdGVOdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIERlbGl2ZXJ5Tm90ZXM6ICRkZWxpdmVyeU5vdGVzLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBOb3RlczogJG5vdGVzLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdW90ZU5pY2tuYW1lOiAkbmlja25hbWUudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFBvTnVtYmVyOiAkcG9OdW1iZXIudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFVuaXQ6ICR1bml0TnVtYmVyLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBXaWxsQ2FsbFNlbGVjdGVkOiAkd2lsbENhbGwucHJvcChcImNoZWNrZWRcIiksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFNhbWVEYXlTaGlwcGluZzogJHNhbWVEYXlTaGlwcGluZy5wcm9wKFwiY2hlY2tlZFwiKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgU2VsZWN0ZWRTaGlwVG9JZDogJHNlbGVjdGVkU2hpcFRvSWQudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEZ1dHVyZVNoaXBwaW5nRGF0ZTogJGZ1dHVyZVNoaXBwaW5nRGF0ZS52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgU2hpcENvbXBsZXRlOiAkc2hpcENvbXBsZXRlLnByb3AoXCJjaGVja2VkXCIpXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyxcclxuICAgICAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIGlmIChkYXRhICYmIGRhdGEuT3JkZXJOdW1iZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IGFwcHJvdmVkRW5kcG9pbnQgKyBcIj9vcmRlck51bWJlcj1cIiArIGRhdGEuT3JkZXJOdW1iZXI7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChkYXRhICYmIGRhdGEuRXJyb3JNZXNzYWdlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKGRhdGEuRXJyb3JNZXNzYWdlKTtcclxuICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LnNjcm9sbFRvcCA9IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5zY3JvbGxUb3AgPSAwO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKFwiWW91ciBvcmRlciBmYWlsZWQsIHBsZWFzZSBjb250YWN0IGN1c3RvbWVyIHNlcnZpY2UuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuc2Nyb2xsVG9wID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFwcHJvdmFsQnV0dG9ucy5zaG93KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAkd2FpdGluZy5oaWRlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIllvdXIgb3JkZXIgZmFpbGVkLCBwbGVhc2UgY29udGFjdCBjdXN0b21lciBzZXJ2aWNlLlwiKTtcclxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuc2Nyb2xsVG9wID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcCA9IDA7XHJcbiAgICAgICAgICAgICAgICAkd2FpdGluZy5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAkYXBwcm92YWxCdXR0b25zLnNob3coKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBzZW5kRm9yQXBwcm92YWwoKSB7XHJcblxyXG4gICAgICAgICAgICAkd2FpdGluZy5zaG93KCk7XHJcbiAgICAgICAgICAgICRhcHByb3ZhbEJ1dHRvbnMuaGlkZSgpO1xyXG5cclxuICAgICAgICAgICAgdmFyIHJlcXVlc3QgPVxyXG4gICAgICAgICAgICAgICAgd2luZG93LmpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiR0VUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBzZW5kUXVvdGVGb3JBcHByb3ZhbEVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQWNjb3VudElkOiBhY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFF1b3RlTnVtYmVyOiBxdW90ZU51bWJlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgRGVsaXZlcnlOb3RlczogJGRlbGl2ZXJ5Tm90ZXMudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE5vdGVzOiAkbm90ZXMudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFF1b3RlTmlja25hbWU6ICRuaWNrbmFtZS52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUG9OdW1iZXI6ICRwb051bWJlci52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgVW5pdDogJHVuaXROdW1iZXIudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFdpbGxDYWxsU2VsZWN0ZWQ6ICR3aWxsQ2FsbC5wcm9wKFwiY2hlY2tlZFwiKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgU2FtZURheVNoaXBwaW5nOiAkc2FtZURheVNoaXBwaW5nLnByb3AoXCJjaGVja2VkXCIpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBTZWxlY3RlZFNoaXBUb0lkOiAkc2VsZWN0ZWRTaGlwVG9JZC52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgRnV0dXJlU2hpcHBpbmdEYXRlOiAkZnV0dXJlU2hpcHBpbmdEYXRlLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBTaGlwQ29tcGxldGU6ICRzaGlwQ29tcGxldGUucHJvcChcImNoZWNrZWRcIilcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IFwiL2N1c3RvbWVyL29yZGVyc3F1b3Rlcy9xdW90ZXMvcXVvdGUtY29uZmlybWF0aW9uP3F1b3RlTnVtYmVyPVwiICsgZGF0YS5RdW90ZU51bWJlcjtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAkd2FpdGluZy5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAkYXBwcm92YWxCdXR0b25zLnNob3coKTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKFwiRXJyb3Igc2VuZGluZyBxdW90ZSBmb3IgYXBwcm92YWwuXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICR3YWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICRhcHByb3ZhbEJ1dHRvbnMuc2hvdygpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlamVjdCgpIHtcclxuICAgICAgICAgICAgJHdhaXRpbmcuc2hvdygpO1xyXG4gICAgICAgICAgICAkYXBwcm92YWxCdXR0b25zLmhpZGUoKTtcclxuICAgICAgICAgICAgJHJlamVjdE1lc3NhZ2VOb1JlYXNvbi5oaWRlKCk7XHJcblxyXG4gICAgICAgICAgICBpZiAoJHJlamVjdE9wdGlvbnNbMF0uc2VsZWN0ZWRJbmRleCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAkd2FpdGluZy5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAkYXBwcm92YWxCdXR0b25zLnNob3coKTtcclxuICAgICAgICAgICAgICAgICRyZWplY3RNZXNzYWdlTm9SZWFzb24uc2hvdygpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPVxyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogcmVqZWN0UXVvdGVFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNjb3VudElkOiBhY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdW90ZU51bWJlcjogcXVvdGVOdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3Rpb25SZWFzb246ICRyZWplY3RPcHRpb25zLnZhbCgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRyZWplY3RCdXR0b24uaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkcmVqZWN0T3B0aW9ucy5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRhcHByb3ZhbEJ1dHRvbnMuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVFcnJvcnMoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRyZWplY3RNZXNzYWdlU3VjZXNzLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICR3YWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJHdhaXRpbmcuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICRhcHByb3ZhbEJ1dHRvbnMuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgICRyZWplY3RNZXNzYWdlRXJyb3Iuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgICRjaGVja0FsbElucHV0cy5iaW5kKCdjaGFuZ2UnLCBoYW5kbGVDaGVja0FsbENoYW5nZSk7XHJcbiAgICAgICAgJHJlbW92ZUJ1dHRvbnMub24oJ2NsaWNrJ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AgICAgICAgICAgICAgICBlbWFpbC5zcGxpY2UoaW5kZXhPdGhlciwgMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy9jcmVhdGUgYSBzdHJpbmcgb2YgZW1haWxzIHNlcGFyYXRlZCBieSA7IGZyb20gYW4gYXJyYXlcclxuICAgICAgICAgICAgZW1haWwgPSBlbWFpbC5qb2luKFwiO1wiKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIHNlbmQgZW1haWxcclxuICAgICAgICB2YXIgcmVxdWVzdCA9IHdpbmRvdy5qUXVlcnkuYWpheChcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgIHVybDogZW1haWxRdW90ZUVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7IHdpdGhDcmVkZW50aWFsczogdHJ1ZSB9LFxyXG4gICAgICAgICAgICAgICAgZGF0YTpcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBFbWFpbDogZW1haWwsXHJcbiAgICAgICAgICAgICAgICAgICAgQWNjb3VudElkOiBhY2NvdW50SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgUXVvdGVOdW1iZXI6IHF1b3RlTnVtYmVyU2VsZWN0aW9uLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgIE1lc3NhZ2U6IHBlcnNvbmFsTWVzc2FnZVNlbGVjdGlvbi52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICBJbmNsdWRlSW1hZ2VzOiBpbmNsdWRlSW1hZ2VzU2VsZWN0aW9uLnByb3AoXCJjaGVja2VkXCIpXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgY29udGVudFR5cGU6IFwiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkOyBjaGFyc2V0PVVURi04XCJcclxuICAgICAgICAgICAg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5KCcjcGRmLW9wdGlvbnMtbW9kYWwnLCBuYW1lc3BhY2UpLm1vZGFsKCdoaWRlJyk7IC8vIGNsb3NlIHRoZSBtb2RhbFxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSByZXF1b3RlIHN1Ym1pdHNcclxuICAgICAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2xpY2snLCAnLnJlcXVvdGVMaW5rJywgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICBqUXVlcnkodGhpcykuY2xvc2VzdCgnZm9ybScpLnN1Ym1pdCgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBkZWxldGUgUXVvdGVcclxuICAgICAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2xpY2snLCAnI2RlbGV0ZS1xdW90ZScsIGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICBkZWxldGVRdW90ZSgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBkZWxldGVRdW90ZSgpIHtcclxuXHJcbiAgICAgICAgICAgIGpRdWVyeSgnI2RlbGV0ZS1xdW90ZScsIG5hbWVzcGFjZSkuaGlkZSgpO1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5kZWxldGUtd2FpdGluZycsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgLy8gZGVsZXRlIFF1b3RlXHJcbiAgICAgICAgICAgIHZhciByZXF1ZXN0ID0gd2luZG93LmpRdWVyeS5hamF4KFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBkZWxldGVRdW90ZUVuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6XHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50SWQ6IGFjY291bnRJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgUXVvdGVOdW1iZXI6IHF1b3RlTnVtYmVyU2VsZWN0aW9uLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFR5cGU6IFwiYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkOyBjaGFyc2V0PVVURi04XCJcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIGlmIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLmhyZWYgPSAgXCIvY3VzdG9tZXIvb3JkZXJzcXVvdGVzL3F1b3Rlcz9kZWxldGVNZXNzYWdlPVwiICsgZGF0YS5NZXNzYWdlRGVsZXRlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcuZGVsZXRlLXdhaXRpbmcnLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8tLS0tLSBJbml0IGtlbmRvIGdyaWRcclxuICAgICAgICBqUXVlcnkoJ3RhYmxlJywgbmFtZXNwYWNlKS5rZW5kb0dyaWQoXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBzb3J0YWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGNvbHVtbnM6XHJcbiAgICAgICAgICAgICAgICAgICAgW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1F1b3RlJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdDcmVhdG9yJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdQTycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnVW5pdCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiByZXBsYWNlZCBwZXIgYnVnIDE5NThcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdkYXRlJyAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0RhdGUnICxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlICxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdDogJ3swOk1NL2RkL3l5eXl9J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnRGF0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1N0YXR1cycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0FwcHJvdmFsJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnVG90YWwnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdBY3Rpb25zJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIERpc3BsYXkgcXVvdGUgY29udGVudFxyXG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBqUXVl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bmd0aCA+IDA7XHJcblxyXG4gICAgICAgICAgICB2YXIgdG90YWwgPSAwO1xyXG5cclxuICAgICAgICAgICAgalF1ZXJ5KCcubW9iaWxlLWl0ZW1zIC5pdGVtJywgbmFtZXNwYWNlKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBhID0galF1ZXJ5KHRoaXMpLmZpbmQoJy5xbicpLnRleHQoKS50cmltKCkudG9Mb3dlckNhc2UoKTtcclxuICAgICAgICAgICAgICAgIHZhciBiID0galF1ZXJ5KHRoaXMpLmZpbmQoJy5jYicpLnRleHQoKS50cmltKCkudG9Mb3dlckNhc2UoKTtcclxuICAgICAgICAgICAgICAgIHZhciBjID0galF1ZXJ5KHRoaXMpLmZpbmQoJy5wbycpLnRleHQoKS50cmltKCkudG9Mb3dlckNhc2UoKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgZm91bmQgPVxyXG4gICAgICAgICAgICAgICAgICAgIChhU2V0ID8gYS5pbmRleE9mKGF2KSA+PSAwIDogdHJ1ZSkgJiZcclxuICAgICAgICAgICAgICAgICAgICAoYlNldCA/IGIuaW5kZXhPZihidikgPj0gMCA6IHRydWUpICYmXHJcbiAgICAgICAgICAgICAgICAgICAgKGNTZXQgPyBjLmluZGV4T2YoY3YpID49IDAgOiB0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoZm91bmQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0b3RhbCsrO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkodGhpcykuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KHRoaXMpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBqUXVlcnkoJy5tb2JpbGUtaXRlbXMgLm9yZGVyLWNvdW50JywgbmFtZXNwYWNlKS50ZXh0KHRvdGFsID4gMCA/IHRvdGFsIDogJ05vJyk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIG1vYmlsZUNhcmQuaW5pdChuYW1lc3BhY2UpO1xyXG5cclxuICAgICAgICBqUXVlcnkoJyNxdW90ZS1maWx0ZXItZm9ybScsIG5hbWVzcGFjZSkuc3VibWl0KGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGpRdWVyeSgnI3F1b3RlLWZpbHRlci1mb3JtJywgbmFtZXNwYWNlKS52YWxpZCgpKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaGlkZUV4cGlyZWRDaGVja2VkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIHZhciBoaWRlQ29tcGxldGVkQ2hlY2tlZCA9IHRydWU7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCQoJyNoaWRlRXhwaXJlZCcpLnByb3AoXCJjaGVja2VkXCIpICE9IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICAgICBoaWRlRXhwaXJlZENoZWNrZWQgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoJCgnI2hpZGVDb21wbGV0ZWQnKS5wcm9wKFwiY2hlY2tlZFwiKSAhPSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaGlkZUNvbXBsZXRlZENoZWNrZWQgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbiA9IHdpbmRvdy5sb2NhdGlvbi5wYXRobmFtZSArXHJcbiAgICAgICAgICAgICAgICAgICAgJz9oaWRlRXhwaXJlZD0nICtcclxuICAgICAgICAgICAgICAgICAgICBoaWRlRXhwaXJlZENoZWNrZWQgK1xyXG4gICAgICAgICAgICAgICAgICAgICcmaGlkZUNvbXBsZXRlZD0nICtcclxuICAgICAgICAgICAgICAgICAgICBoaWRlQ29tcGxldGVkQ2hlY2tlZCArXHJcbiAgICAgICAgICAgICAgICAgICAgJyZzdGFydERhdGU9JyArXHJcbiAgICAgICAgICAgICAgICAgICAgJCgnI3N0YXJ0RGF0ZScpLnZhbCgpICtcclxuICAgICAgICAgICAgICAgICAgICAnJmVuZERhdGU9JyArXHJcbiAgICAgICAgICAgICAgICAgICAgJCgnI2VuZERhdGUnKS52YWwoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBqUXVlcnkoJyNxdW90ZS1maWx0ZXItZm9ybScsIG5hbWVzcGFjZSkudmFsaWRhdGUoKTtcclxuICAgICAgICBqUXVlcnkudmFsaWRhdG9yLmFkZE1ldGhvZChcImRhdGVDb21wYXJlXCIsXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uICh2YWx1ZSwgZWxlbWVudCwgcGFyYW1zKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCEvSW52YWxpZHxOYU4vLnRlc3QobmV3IERhdGUodmFsdWUpKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRGF0ZSh2YWx1ZSkgPj0gbmV3IERhdGUoalF1ZXJ5KHBhcmFtcykudmFsKCkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBpc05hTih2YWx1ZSkgJiYgaXNOYU4oalF1ZXJ5KHBhcmFtcykudmFsKCkpXHJcbiAgICAgICAgICAgICAgICAgICAgfHwgKE51bWJlcih2YWx1ZSkgPj0gTnVtYmVyKGpRdWVyeShwYXJhbXMpLnZhbCgpKSk7XHJcbiAgICAgICAgICAgIH0sICdFbmQgRGF0ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiBTdGFydCBEYXRlLicpO1xyXG5cclxuICAgICAgICBqUXVlcnko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ICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IHtcclxuICAgICAgICAgICAgICAgICAgICB0cmFuc3BvcnQ6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhZDoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBnZXRBY2NvdW50c0VuZHBvaW50LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ0dFVCdcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyTWFwOiBmdW5jdGlvbiAob3B0aW9ucykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvcnRGaWVsZCA9ICcnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvcnREaXIgPSAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zPy5zb3J0ICYmIG9wdGlvbnMuc29ydC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc29ydEZpZWxkID0gb3B0aW9ucy5zb3J0WzBdLmZpZWxkO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvcnREaXIgPSBvcHRpb25zLnNvcnRbMF0uZGlyO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQYWdlTnVtYmVyOiBvcHRpb25zLnBhZ2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGFnZVNpemU6IG9wdGlvbnMucGFnZVNpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmlsdGVyVGV4dDogJCgnI2ZpbHRlclRleHQnLCBuYW1lc3BhY2UpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvcnRGaWVsZDogc29ydEZpZWxkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvcnREaXJlY3Rpb246IHNvcnREaXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFwiRGF0YVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbDogXCJUb3RhbFBhZ2VzXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTYWxlc0lkOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTYWxlc1BlcnNvbk5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFjY291bnROYW1lOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50TnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQYXJlbnRBY2NvdW50OiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50Q29udGFjdElkOiB7IHR5cGU6IFwic3RyaW5nXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBzZXJ2ZXJQYWdpbmc6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgc2VydmVyU29ydGluZzogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBzZXJ2ZXJGaWx0ZXJpbmc6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgcGFnZTogMSxcclxuICAgICAgICAgICAgICAgICAgICBwYWdlU2l6ZTogcGFnZVNpemVzWzBdLFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHBhZ2VhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWx3YXlzVmlzaWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc29ydGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOlxyXG4gICAgICAgICAgICAgICAgICAgIFtcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdTYWxlc0lkJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB3aW5kb3cubW9kZWwuU2FsZXNJZEhlYWRlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvcnRhYmxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1NhbGVzUGVyc29uTmFtZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd2luZG93Lm1vZGVsLlNhbGVzUGVyc29uTmFtZUhlYWRlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvcnRhYmxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0FjY291bnROYW1lJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB3aW5kb3cubW9kZWwuQWNjb3VudE5hbWVIZWFkZXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdBY2NvdW50TnVtYmVyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB3aW5kb3cubW9kZWwuQWNjb3VudE51bWJlckhlYWRlclxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ1BhcmVudEFjY291bnQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdpbmRvdy5tb2RlbC5Pcmdhbml6YXRpb25OYW1lSGVhZGVyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB3aW5kb3cubW9kZWwuQWN0aW9uc0hlYWRlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvcnRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gJyc7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgKz0gJzxmb3JtIGFjdGlvbj1cIicgKyBjaGFuZ2VBY2NvdW50RW5kcG9pbnQgKyAnXCIgbWV0aG9kPVwicG9zdFwiPicgK1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPGlucHV0IHR5cGU9XCJoaWRkZW5cIiBuYW1lPVwiY29udGFjdElkXCIgdmFsdWU9XCInICsgZS5BY2NvdW50Q29udGFjdElkICsgJ1wiPicgK1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPGJ1dHRvbiB0eXBlPVwic3VibWl0XCIgY2xhc3M9XCJidG4gYnRuLXNtIGJ0bi1saW5rXCI+JyArIHdpbmRvdy5tb2RlbC5TZWxlY3RBY2NvdW50VGV4dCArICc8L2J1dHRvbj4nICtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJzwvZm9ybT4nO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgeyB0aXRsZTogXCJcIiwgbmFtZTogXCJNb2JpbGUtVGVtcGxhdGVcIiwgdGVtcGxhdGU6IGdldE1vYmlsZVRlbXBsYXRlIH1cclxuICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgIH0pLmRhdGEoJ2tlbmRvR3JpZCcpO1xyXG5cclxuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgalF1ZXJ5KCcucnNtLXdhaXRpbmcnLCBuYW1lc3BhY2UpLmZhZGVPdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcucnNtLWNvbnRlbnQnLCBuYW1lc3BhY2UpLmZhZGVJbigpO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgfSwgNTAwKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0SGFuZGxlcnMoKSB7XHJcblxyXG4gICAgICAgIC8vIC0tLS0tIEhhbmRsZSBmaWx0ZXIgdGV4dFxyXG4gICAgICAgICRmaWx0ZXJUZXh0Lm9uKCdpbnB1dCcsIGdlbmVyYWxMaWJyYXJ5LmRlYm91bmNlKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgJGFjY291bnRzR3JpZC5kYXRhU291cmNlLnJlYWQoKTtcclxuICAgICAgICB9LCAyNTApKTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBDbGVhciBidXR0b25cclxuICAgICAgICBqUXVlcnkoJyNjbGVhckZpbHRlcicsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLm9uKCdjbGljaycsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAkKCcjZmlsdGVyVGV4dCcsIG5hbWVzcGFjZSkudmFsKCcnKTtcclxuICAgICAgICAgICAgICAgICAgICAkYWNjb3VudHNHcmlkLmRhdGFTb3VyY2UucmVhZCgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIGxpc3RlbiBmb3IgZGlzcGxheSBzaXplIGNoYW5nZVxyXG4gICAgICAgICQod2luZG93KS5vbigncmVzaXplIG9yaWVudGF0aW9uY2hhbmdlJywgZ2VuZXJhbExpYnJhcnkuZGVib3VuY2UoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB0b2dnbGVWaXNpYmxlQ29sdW1ucygpO1xyXG4gICAgICAgIH0sIDEwMCkpO1xyXG5cclxuICAgICAgICAvLyBoYW5kbGUgZm9ybSBzdWJtaXRcclxuICAgICAgICBqUXVlcnkoJy5yc20tYWNjb3VudC1mb3JtJywgbmFtZXNwYWNlKS5zdWJtaXQoZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICRhY2N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IHNhbGVzSWRWYWx1ZS5pbmRleE9mKHNhbGVzSWRTZWFyY2gpID49IDAgOiB0cnVlKSAmJlxyXG4gICAgICAgICAgICAgICAgICAgIChzYWxlc05hbWVTZXQgPyBzYWxlc05hbWVWYWx1ZS5pbmRleE9mKHNhbGVzTmFtZVNlYXJjaCkgPj0gMCA6IHRydWUpICYmXHJcbiAgICAgICAgICAgICAgICAgICAgKGFjY291bnROdW1iZXJTZXQgPyBhY2NvdW50TnVtYmVyVmFsdWUuaW5kZXhPZihhY2NvdW50TnVtYmVyU2VhcmNoKSA+PSAwIDogdHJ1ZSkgJiZcclxuICAgICAgICAgICAgICAgICAgICAob3JnYW5pemF0aW9uU2V0ID8gb3JnYW5pemF0aW9uVmFsdWUuaW5kZXhPZihvcmdhbml6YXRpb25TZWFyY2gpID49IDAgOiB0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoZm91bmQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0b3RhbCsrO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkodGhpcykuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KHRoaXMpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBqUXVlcnkoJy5hY2NvdW50LWNvdW50JywgbmFtZXNwYWNlKS50ZXh0KHRvdGFsKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIGZ1bmN0aW9uIHRvZ2dsZVZpc2libGVDb2x1bW5zKCkge1xyXG5cclxuICAgICAgICAvLyBnZXQgcGFyZW50IGNvbnRhaW5lciBzaXplXHJcbiAgICAgICAgdmFyIGN1cnJlbnRXaWR0aCA9ICQobmFtZXNwYWNlKS53aWR0aCgpO1xyXG5cclxuICAgICAgICAvLyBjaGVjayBpZiBtb2JpbGUgZGlzcGxheVxyXG4gICAgICAgIHZhciBpc01vYmlsZSA9IGN1cnJlbnRXaWR0aCA8PSB3aW5kb3cubW9kZWwuTW9iaWxlV2lkdGhCcmVha3BvaW50O1xyXG5cclxuICAgICAgICAkYWNjb3VudHNHcmlkLmNvbHVtbnMuZm9yRWFjaChmdW5jdGlvbiAoZiwgaW5kZXgpIHtcclxuICAgICAgICAgICAgaWYgKGlzTW9iaWxlKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZi5uYW1lID09PSAnTW9iaWxlLVRlbXBsYXRlJykge1xyXG4gICAgICAgICAgICAgICAgICAgICRhY2NvdW50c0dyaWQuc2hvd0NvbHVtbihpbmRleCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICRhY2NvdW50c0dyaWQuaGlkZUNvbHVtbihpbmRleCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZi5uYW1lID09PSAnTW9iaWxlLVRlbXBsYXRlJykge1xyXG4gICAgICAgICAgICAgICAgICAgICRhY2NvdW50c0dyaWQuaGlkZUNvbHVtbihpbmRleCk7XHJcbiAgICAgICAgICAgICAgICB9IFxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGFjY291bnRzR3JpZC5zaG93Q29sdW1uKGluZGV4KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldE1vYmlsZVRlbXBsYXRlKGl0ZW0pIHtcclxuICAgICAgICBsZXQgaHRtbCA9ICc8ZGl2IGNsYXNzPVwibW9iaWxlLWdyaWRcIj4nO1xyXG5cclxuICAgICAgICBcclxuICAgICAgICBodG1sICs9ICc8ZGl2IGNsYXNzPVwiZ3JpZC1jZW50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bWUoXCJhY2NvcmRpb25cIik7XHJcbiAgICAgICAgdmFyIGk7XHJcblxyXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBhY2MubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgYWNjW2ldLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAvKiBUb2dnbGUgYmV0d2VlbiBhZGRpbmcgYW5kIHJlbW92aW5nIHRoZSBcImFjdGl2ZVwiIGNsYXNzLFxyXG4gICAgICAgICAgICAgICAgdG8gaGlnaGxpZ2h0IHRoZSBidXR0b24gdGhhdCBjb250cm9scyB0aGUgcGFuZWwgKi9cclxuICAgICAgICAgICAgICAgIHRoaXMuY2xhc3NMaXN0LnRvZ2dsZShcImFjdGl2ZVwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvKiBUb2dnbGUgYmV0d2VlbiBoaWRpbmcgYW5kIHNob3dpbmcgdGhlIGFjdGl2ZSBwYW5lbCAqL1xyXG4gICAgICAgICAgICAgICAgdmFyIHBhbmVsID0gdGhpcy5uZXh0RWxlbWVudFNpYmxpbmc7XHJcbiAgICAgICAgICAgICAgICBpZiAocGFuZWwuc3R5bGUuZGlzcGxheSA9PT0gXCJibG9ja1wiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGFuZWwuc3R5bGUuZGlzcGxheSA9IFwibm9uZVwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwYW5lbC5zdHlsZS5kaXNwbGF5ID0gXCJibG9ja1wiO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9KVxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmIChqUXVlcnkobmFtZXNwYWNlKS5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGRhdGFTb3VyY2UgPSBuZXcga2VuZG8uZGF0YS5EYXRhU291cmNlKHtcclxuICAgICAgICAgICAgZGF0YTogd2luZG93Lm1vZGVsV2l0aENhdGVnb3J5LFxyXG4gICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFNLVTogeyB0eXBlOiBcInN0cmluZ1wiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgRGlzcGxheU5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIElzRmF2b3JpdGU6IHsgdHlwZTogXCJib29sXCIsIGVkaXRhYmxlOiBmYWxzZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdWFudGl0eVB1cmNoYXNlZDogeyB0eXBlOiBcImludGVnZXJcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExhc3RPcmRlcjogeyB0eXBlOiBcImRhdGVcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFVybDogeyB0eXBlOiBcInN0cmluZ1wiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgTGFzdFByaWNlOiB7IHR5cGU6IFwiZGVjaW1hbFwiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2F0ZWdvcnk6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEFkZFJlbW92ZUZhdm9yaXRlc1ZpZXdNb2RlbDogeyB0eXBlOiBcIm9iamVjdFwiLCBlZGl0YWJsZTogZmFsc2UgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZ3JvdXA6IHtcclxuICAgICAgICAgICAgICAgIGZpZWxkOiBcIkNhdGVnb3J5XCIsXHJcbiAgICAgICAgICAgICAgICBkaXI6IFwiYXNjXCJcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyBJbml0IEtlbmRvIEdyaWQgKERlc2t0b3ApXHJcbiAgICAgICAgJGtlbmRvR3JpZCA9ICQoXCIjZ3JpZFwiLCBuYW1lc3BhY2UpLmtlbmRvR3JpZCh7XHJcbiAgICAgICAgICAgIGRhdGFTb3VyY2U6IGRhdGFTb3VyY2UsXHJcbiAgICAgICAgICAgIGVkaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgc2Nyb2xsYWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgbmF2aWdhdGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIGVkaXRhYmxlOiBcImluY2VsbFwiLFxyXG4gICAgICAgICAgICBjb2x1bW5NZW51OiB7XHJcbiAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiBmYWxzZVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiUHJldmlld1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IGl0ZW0uU0tVO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcG5hbWUgPSBpdGVtLkRpc3BsYXlOYW1lO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJzxzcGFuIGNsYXNzPVwiZmEgZmEtc2VhcmNoIHF1aWNrLXZpZXctaWNvblwiIGRhdGEtY29kZT1cIicgKyBjb2RlICsgJ1wiIGRhdGEtcG5hbWU9XCInICsgcG5hbWUgKyAnXCIgZGF0YS10b2dnbGU9XCJtb2RhbFwiIGRhdGEtdGFyZ2V0PVwiI3Byb2R1Y3QtcHJldmlldy1tb2RhbFwiIHN0eWxlPVwiY29sb3I6IzAwNzdjOFwiID48L3NwYW4gPidcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjgwcHhcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJJc0Zhdm9yaXRlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiSXMgRmF2b3JpdGVcIixcclxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogdXBkYXRlSXNGYXZvcml0ZSxcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMDBcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJTS1VcIixcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJJdGVtXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiMTAwXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiRGlzcGxheU5hbWVcIixcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJEZXNjcmlwdGlvblwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJzxhIGhyZWY9XCInICsgaXRlbS5VcmwgKyAnXCIgYWx0PVwiJyArIGl0ZW0uRGlzcGxheU5hbWUgKyAnXCI+JyArIGl0ZW0uRGlzcGxheU5hbWUgKyAnPC9hPidcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkxhc3RQcmljZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkxhc3QgUHJpY2VcIixcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMDBcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJRdWFudGl0eVB1cmNoYXNlZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIlB1cmNoYXNlZCBRdWFudGl0eVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjgwXCJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiTGFzdE9yZGVyXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiTGFzdCBPcmRlclwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdDogJ3swOk1NL2RkL3l5eXl9JyxcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMDBcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJDYXRlZ29yeVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkNhdGVnb3J5XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZWRpdG9yOiBjbGllbnRDYXRlZ29yeUVkaXRvcixcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMDBcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJBY3Rpb25zXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiMTIwcHhcIixcclxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICc8YSBjbGFzcz1cImFkZC10by1jYXJ0IGJ0biBidG4tc21cIiBzdHlsZT1cImNvbG9yOndoaXRlXCIgdGl0bGU9XCInXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArIGl0ZW0uRGlzcGxheU5hbWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJ1wiIGRhdGEtY29kZT1cIidcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgaXRlbS5TS1UgKyAnXCI+JyArIFwiQWRkIHRvIENhcnRcIiArICc8L2E+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHNwYW4gY2xhc3M9XCJzdWNjZXNzLW1lc3NhZ2VcIj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8c3BhbiBjbGFzcz1cImZhIGZhLWNoZWNrXCI+PC9zcGFuPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJ0FkZGVkIHRvIENhcnQnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8L3NwYW4+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHNwYW4gY2xhc3M9XCJmYWlsdXJlLW1lc3NhZ2VcIj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8c3BhbiBjbGFzcz1cImZhIGZhLXdpbmRvdy1jbG9zZVwiPjwvc3Bhbj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICdGYWlsdXJlIGFkZGluZyB0byBjYXJ0J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPC9zcGFuPic7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgcGFnZWFibGU6IHtcclxuICAgICAgICAgICAgICAgIHBhZ2VzaXplczogMTAsXHJcbiAgICAgICAgICAgICAgICBwYWdlU2l6ZTogMTBcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICB9KS5kYXRhKFwia2VuZG9HcmlkXCIpO1xyXG5cclxuICAgICAgICBmdW5jdGlvbiBjbGllbnRDYXRlZ29yeUVkaXRvcihjb250YWluZXIsIG9wdGlvbnMpIHtcclxuXHJcbiAgICAgICAgICAgICQoJzxpbnB1dCByZXF1aXJlZCBuYW1lPVwiQ2F0ZWdvcnlcIj4nKVxyXG4gICAgICAgICAgICAgICAgLmFwcGVuZFRvKGNvbnRhaW5lcilcclxuICAgICAgICAgICAgICAgIC5rZW5kb0Ryb3BEb3duTGlzdCh7XHJcbiAgICAgICAgICAgICAgICAgICAgYXV0b0JpbmQ6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUZXh0RmllbGQ6IFwiQ2F0ZWdvcnlcIixcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVmFsdWVGaWVsZDogXCJDYXRlZ29yeVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFTb3VyY2U6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogQ2F0ZWdvcnlcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSW5pdCBLZW5kbyBMaXN0IFZpZXcgKEZvciBDYXJkcylcclxuICAgICAgICAka2VuZG9MaXN0ID0galF1ZX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H07XHJcblxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICB1cmw6IGVuZFBvaW50LFxyXG4gICAgICAgICAgICBkYXRhOiBkYXRhLFxyXG4gICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgLy8gdXBkYXRlIGl0ZW0gaW4gZGF0YSBzb3VyY2VcclxuICAgICAgICAgICAgY29uc3QgaXRlbSA9IGRhdGFTb3VyY2UuZ2V0KGNvZGUpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgIC8vIGZsaXAgSXNGYXZvcml0ZVxyXG4gICAgICAgICAgICAgICAgaXRlbS5Jc0Zhdm9yaXRlID0gIWlzRmF2b3JpdGU7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gcmVmcmVzaCBncmlkIGFuZCBsaXN0XHJcbiAgICAgICAgICAgICAgICAka2VuZG9MaXN0LnJlZnJlc2goKTtcclxuICAgICAgICAgICAgICAgICRrZW5kb0dyaWQucmVmcmVzaCgpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB2YXIgJHN1Y2Nlc3NNZXNzYWdlID0gaXNGYXZvcml0ZVxyXG4gICAgICAgICAgICAgICAgPyAkdGhpcy5zaWJsaW5ncyhcIi5zdWNjZXNzLXJlbW92ZS1tZXNzYWdlXCIpXHJcbiAgICAgICAgICAgICAgICA6ICR0aGlzLnNpYmxpbmdzKFwiLnN1Y2Nlc3MtYWRkLW1lc3NhZ2Vc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2lucHV0W25hbWU9QWNjb3VudElkXScsIG5hbWVzcGFjZSkudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgQ29kZTogY29kZSxcclxuICAgICAgICAgICAgICAgICAgICBRdWFudGl0eTogMVxyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICB4aHJGaWVsZHM6XHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKCkge1xyXG5cclxuICAgICAgICAgICAgLy8gcmVmcmVzaCBtaW5pIGNhcnRcclxuICAgICAgICAgICAgalF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBqUXVlcnkoJ2lucHV0W25hbWU9R2V0TWluaUNhcnRFbmRwb2ludF0nLCBuYW1lc3BhY2UpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICdHRVQnLFxyXG4gICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuQ2hhZHdlbGwtU2hhcmVkLU1pbmlTaG9wcGluZ0NhcnRXcmFwcGVyJykuaHRtbChyZXN1bHQpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8tLS0tLSBTaG93IHN1Y2Nlc3MgbWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXJ0LmJ1dHRvbi5mYWRlT3V0KDkwMCwgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5yZXNldEFkZFRvQ2FydEJ1dHRvbkNvbnRlbnQoY2FydCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LnNob3dBZGRUb0NhcnRTdWNjZXNzKGNhcnQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgbGlicmFyeS50cmFja0FkZFRvQ2FydChjb2RlLCAxLCBpdGVtUHJpY2UsIGl0ZW1OYW1lKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgLy8gYWRkRXJyb3JNZXNzYWdlKCBcIkVycm9yIGFkZGluZyBcIiArIGNvZGUgKyBcIiB0byBjYXJ0XCIgKTtcclxuXHJcbiAgICAgICAgICAgIC8vLS0tLS0gU2hvdyBmYWlsdXJlIG1lc3NhZ2VcclxuICAgICAgICAgICAgY2FydC5idXR0b24uZmFkZU91dCg5MDAsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGxpYnJhcnkucmVzZXRBZGRUb0NhcnRCdXR0b25Db250ZW50KGNhcnQpO1xyXG4gICAgICAgICAgICAgICAgbGlicmFyeS5zaG93QWRkVG9DYXJ0RmFpbHVyZShjYXJ0KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8vLS0tLS0gSGFuZGxlIEFkZCBUbyBDYXJ0XHJcbiAgICBqUXVlcnkobmFtZXNwYWNlKS5vbignY2xpY2snLCAnLmFkZC10by1jYXJ0JywgaGFuZGxlQWRkVG9DYXJ0KTtcclxuXHJcblxyXG4gICAgLy8tLS0tLSBIYW5kbGUgT3BlbiBNb2RlbFxyXG4gICAgalF1ZXJ5KG5hbWVzcGFjZSkub24oJ2NsaWNrJywgJy5mYS1zZWFyY2gnLCBmdW5jdGlvbiAoZSkge1xyXG4gIC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IEhhbmRsZSBtb2RhbCBwcm9kdWN0IHByZXZpZXcgY29udGVudFxyXG4gICAgalF1ZXJ5KCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsJywgbmFtZXNwYWNlKS5vbignc2hvd24uYnMubW9kYWwnLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBwaWQgPSBqUXVlcnkoJ2lucHV0WyBuYW1lPW1vZGFscHJvZHVjdGlkICAgXScsIG5hbWVzcGFjZSkuYXR0cigndmFsdWUnKTtcclxuXHJcbiAgICAgICAgICAgIHZhciBkYXRhID0geyBjb2RlOiBwaWQgfTtcclxuXHJcbiAgICAgICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHByb2R1Y3REZXRhaWxzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogZGF0YSxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczogeyB3aXRoQ3JlZGVudGlhbHM6IHRydWUgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuc3Bpbm5lcicsIG5hbWVzcGFjZSkuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsIC5hamF4LWNvbnRlbnQnLCBuYW1lc3BhY2UpLmh0bWwoZGF0YS5odG1sKS5zaG93KCk7XHJ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IC8vIFJlZGlyZWN0IHRvIEZvcm1cclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgdmFyIG5ld1VzZXJVcmwgPSAkKCcjaGROZXdVc2VyUmVnaXN0cmF0aW9uRm9ybVVybCcpLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcuY2FyZC1vbmUnLCBuYW1lc3BhY2UpLnNsaWRlVXAoKTtcclxuICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbiA9IG5ld1VzZXJVcmw7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgZnVuY3Rpb24gc2V0dXBGb3JtVmFsaWRhdGlvbigpIC8vIHBlciAvd3d3cm9vdC9qUXVlcnlWYWxpZGF0aW9uLyouanNcclxuICAgIHtcclxuICAgICAgICBqUXVlcnkoICcjUGhvbmUnICAgICkubWFzayggJyg5OTkpIDk5OS05OTk5JyApO1xyXG4gICAgICAgIGpRdWVyeSggJyNQaG9uZU5ldycgKS5tYXNrKCAnKDk5OSkgOTk5LTk5OTknICk7XHJcblxyXG4gICAgICAgIGpRdWVyeSggJyNleGlzdGluZ0N1c3RvbWVyRm9ybScgLCBuYW1lc3BhY2UgKS52YWxpZGF0ZShcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIHN1Ym1pdEhhbmRsZXI6IGZ1bmN0aW9uKCBmb3JtIClcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgLy9FbnN1cmUgZW1haWwgYWRkcmVzcyBpcyB2YWxpZFxyXG4gICAgICAgICAgICAgICAgdmFyIGVtYWlsQWRkcmVzcyA9IHZhbGlkYXRlRW1haWwoalF1ZXJ5KFwiLnZhbGlkYXRlRW1haWxcIiwgbmFtZXNwYWNlKS52YWwoKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCFlbWFpbEFkZHJlc3MpXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KFwiI2VtYWlsQWRkcmVzc0Vycm9yTWVzc2FnZVwiLCBuYW1lc3BhY2UpLnNob3coKS5kZWxheSgyMDAwKS5mYWRlT3V0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vRW5zdXJlIHBhc3N3b3JkIGlzIHZhbGlkXHJcbiAgICAgICAgICAgICAgICB2YXIgcGFzc3dvcmQgPSB2YWxpZGF0ZVBhc3N3b3JkKGpRdWVyeShcIi5wYXNzd29yZEZpZWxkXCIsIG5hbWVzcGFjZSkudmFsKCkpO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICghcGFzc3dvcmQpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoXCIjcGFzc3dvcmRFcnJvck1lc3NhZ2VcIiwgbmFtZXNwYWNlKS5zaG93KCkuZGVsYXkoMjAwMCkuZmFkZU91dCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAkKCcjcGFzc3dvcmRFcnJvck1lc3NhZ2UnLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLy0tLS0tIEVuc3VyZSBjYXB0Y2hhIGNoZWNrYm94IGlzIHNlbGVjdGVkXHJcbiAgICAgICAgICAgICAgICBpZiAoIGdyZWNhcHRjaGEuZ2V0UmVzcG9uc2UoKS5sZW5ndGggPiAwKVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcm0uc3VibWl0KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCAnLmNhcHRjaGEtY29udGFpbmVyIC5lcnJvci1tZXNzYWdlJyAsIG5hbWVzcGFjZSApLnNob3coKS5kZWxheSggMjAwMCApLmZhZGVPdXQoKTtcclxuICAgICAgICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgIH0gLFxyXG5cclxuICAgICAgICAgICAgcnVsZXM6XHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIENvbmZpcm1QYXNzd29yZDpcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBlcXVhbFRvOiAnLnBhc3N3b3JkRmllbGQnXHJcbiAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgIH0gLFxyXG5cclxuICAgICAgICAgICAgbWVzc2FnZXM6XHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIENvbmZpcm1QYXNzd29yZDogalF1ZXJ5KCAnaW5wdXRbbmFtZT1QYXNzd29yZE1lc3NhZ2VdJyAsIG5hbWVzcGFjZSApLnZhbCgpXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgZnVuY3Rpb24gc2V0SW5pdGlhbEZvcm0oKVxyXG4gICAge1xyXG4gICAgICAgIHZhciB0YXJnZXRBbnN3ZXIgPSAnJztcclxuICAgICAgICB2YXIgaW5pdGlhbEZvcm1BID0galF1ZXJ5KCAnaW5wdXRbbmFtZT1TZXRJbml0aWFsRm9ybVZpZXddJyAsIG5hbWVzcGFjZSApLnZhbCgpO1xyXG4gICAgICAgIHZhciBpbml0aWFsRm9ybUIgPSB3aW5kb3cubG9jYXRpb24uaHJlZi5pbmRleE9mKCAnP2Zvcm09bmV3LWN1c3RvbWVyJyAgICAgICkgPiAwO1xyXG4gICAgICAgIHZhciBpbml0aWFsRm9ybUMgPSB3aW5kb3cubG9jYXRpb24uaHJlZi5pbmRleE9mKCAnP2Zvcm09ZXhpc3RpbmctY3VzdG9tZXInICkgPiAwO1xyXG5cclxuXHJcbiAgICAgICAgaWYgKCBpbml0aWFsRm9ybUEgPT0gJ25ldy1jdXN0b21lcicgKVxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgdGFyZ2V0QW5zd2VyID0gJyNhbnN3ZXIyJztcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSBpZiAoIGluaXRpYWxGb3JtQSA9PSAnZXhpc3RpbmctY3VzdG9tZXInIClcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIHRhcmdldEFuc3dlciA9ICcjYW5zd2VyMSc7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKCBpbml0aWFsRm9ybUIgKVxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgdGFyZ2V0QW5zd2VyID0gJyNhbnN3ZXIyJztcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSBpZiAoIGluaXRpYWxGb3JtQyApXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICB0YXJnZXRBbnN3ZXIgPSAnI2Fuc3dlcjEnO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKCB0YXJnZXRBbnN3ZXIubGVuZ3RoID4gMCApXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBqUXVlcnkoIHRhcmdldEFuc3dlciAsIG5hbWVzcGFjZSApLnRyaWdnZXIoICdjbGljaycgKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gdmFsaWRhdGVFbWFpbCgkZW1haWwpIHtcclxuICAgICAgICB2YXIgZW1haWxSZWcgPSAvXihbXFx3LVxcLl0rQChbXFx3LV0rXFwuKStbXFx3LV17Miw0fSk/JC87XHJcbiAgICAgICAgcmV0dXJuIGVtYWlsUmVnLnRlc3QoJGVtYWlsK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G4gICAgdmFyIG5hbWVzcGFjZSA9ICcuQ2hhZHdlbGwtUGFnZXMtUmVzb3VyY2VDb250ZW50TGlua3NBZG1pblBhZ2VFZGl0JztcclxuICAgIFxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmIChqUXVlcnkobmFtZXNwYWNlKS5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSW5pdCBrZW5kbyBncmlkXHJcbiAgICAgICAgalF1ZXJ5KCd0YWJsZScsIG5hbWVzcGFjZSkua2VuZG9HcmlkKFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBkYXRhU291cmNlOlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHdpbmRvdy5JdGVtcyxcclxuICAgICAgICAgICAgICAgICAgICBzY2hlbWE6XHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDpcclxuICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRzOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvZGU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvZGU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENhdGVnb3J5OiB7IHR5cGU6IFwic3RyaW5nXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOlxyXG4gICAgICAgICAgICAgICAgW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyVGVtcGxhdGU6ICc8aW5wdXQgdHlwZT1cImNoZWNrYm94XCIgY2xhc3M9XCJzZWxlY3QtYWxsXCI+IFNlbGVjdCBBbGwnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZTogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnPGlucHV0IHR5cGU9XCJjaGVja2JveFwiIGNsYXNzPVwicmVtb3ZlLWl0ZW1cIiBkYXRhLWl0ZW0tY29kZT1cIicgKyBlLkNvZGUgKyAnXCI+JztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICcxMDBweCdcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiAnTmFtZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIk5hbWVcIlxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0NvZGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJTS1VcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICcxNzVweCdcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdDYXRlZ29yeScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJDYXRlZ29yeVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJzMwMHB4J1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF0sXHJcblxyXG4gICAgICAgICAgICAgICAgcGFnZWFibGU6XHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGFnZVNpemVzOiB3aW5kb3cuU2V0dGluZ3MuUGFnZVNpemVzLFxyXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VTaXplOiB3aW5kb3cuU2V0dGluZ3MuRGVmYXVsdFBhZ2VTaXplLFxyXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbkNvdW50OiB3aW5kb3cuU2V0dGluZ3MuQnV0dG9uc1RvU2hvdyxcclxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlczpcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zUGVyUGFnZTogd2luZG93LlNldHRpbmdzLkl0ZW1zUGVyUGFnZU1lc3NhZ2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IHdpbmRvdy5TZXR0aW5ncy5JbmZvRGlzcGxheVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQ6IHRydWVcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIHNvcnRhYmxlOiB0cnVlXHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIERpc3BsYXkgY29udGVudFxyXG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5pdGVtcy13YWl0aW5nJywgbmFtZXNwYWNlKS5mYWRlT3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLml0ZW1zLWNvbnRlbnQnLCBuYW1lc3BhY2UpLmZhZGVJbigpO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgfSwgMTAwMCk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gc2VsZWN0IGFsbFxyXG4gICAgICAgIGpRdWVyeSgnLnNlbGVjdC1hbGwnLCBuYW1lc3BhY2UpLmNsaWNrKGZ1bmN0aW9uIChldmVudCkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5jaGVja2VkID09IHRydWUpIHtcclxuICAgICAgICAgICAgICAgICQoJy5yZW1vdmUtaXRlbScpLnByb3AoJ2NoZWNrZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICQoJy5yZW1vdmUtaXRlbScpLnByb3AoJ2NoZWNrZWQnLCBmYWxzZSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICQoJy5yZW1vdmUtaXRlbScpLnRyaWdnZXIoJ2NoYW5nZScpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBqUXVlcnkoJy5yZW1vdmUtc2t1cy1idG4nLCBuYW1lc3BhY2UpLmNsaWNrKGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIHZhciBza3VzID0galF1ZXJ5KCcjc2t1cycsIG5hbWVzcGFjZSk7XHJcbiAgICAgICAgICAgIHNrdXMud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rcycsIG5hbWVzcGFjZSkua2VuZG9HcmlkKFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBkYXRhU291cmNlOlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHdpbmRvdy5CbG9ja3MsXHJcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hOlxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkczpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMaW5rVGl0bGU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExpbmtVcmw6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEl0ZW1zOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCbG9ja0lkOiB7IHR5cGU6IFwic3RyaW5nXCIgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOlxyXG4gICAgICAgICAgICAgICAgW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdMaW5rVGl0bGUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJMaW5rIFRpdGxlXCJcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdMaW5rVXJsJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkxpbmsgVVJMXCJcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6ICdJdGVtcycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIlNLVXNcIlxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogJ0Jsb2NrSWQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdFZGl0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJzxhIGhyZWY9XCJFZGl0P0Jsb2NrSWQ9JyArIGUuQmxvY2tJZCArICdcIiBjbGFzcz1cImJ0biBidG4tcHJpbWFyeVwiPkVkaXQ8L2E+IDxhIGhyZWY9XCJSZW1vdmVCbG9jaz9CbG9ja0lkPScgKyBlLkJsb2NrSWQgKyAnXCIgY2xhc3M9XCJidG4gYnRuLXByaW1hcnkgZGVsZXRlLWJ1dHRvblwiPkRlbGV0ZTwvYT4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogJzE3MHB4J1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF0sXHJcblxyXG4gICAgICAgICAgICAgICAgcGFnZWFibGU6XHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGFnZVNpemVzOiB3aW5kb3cuU2V0dGluZ3MuUGFnZVNpemVzLFxyXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VTaXplOiB3aW5kb3cuU2V0dGluZ3MuRGVmYXVsdFBhZ2VTaXplLFxyXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbkNvdW50OiB3aW5kb3cuU2V0dGluZ3MuQnV0dG9uc1RvU2hvdyxcclxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlczpcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zUGVyUGFnZTogd2luZG93LlNldHRpbmdzLkl0ZW1zUGVyUGFnZU1lc3NhZ2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IHdpbmRvdy5TZXR0aW5ncy5JbmZvRGlzcGxheVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQ6IHRydWVcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIHNvcnRhYmxlOiB0cnVlXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIFxyXG4gICAgICAgIC8vLS0tLS0gRGlzcGxheSBoaXN0b3J5IGNvbnRlbnRcclxuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgalF1ZXJ5KCcuYmxvY2tzLXdhaXRpbmc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VmFsdWUoa2V5KSB7XHJcbiAgICAgICAgdmFyIHZhbHVlID0gQ29va2llcy5nZXQoa2V5KTsgLy8gcGVyIC93d3dyb290L2pzLWNvb2tpZS9qcy1jb29raWUuanNcclxuXHJcbiAgICAgICAgaWYgKHZhbHVlID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gdmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gYWRkVG9Db29raWVWYWx1ZShza3UpIHtcclxuICAgICAgICB2YXIgY29va2llID0gZ2V0Q29va2llVmFsdWUoY29va2llTmFtZSk7XHJcblxyXG4gICAgICAgIGlmIChjb29raWUgPT09IHVuZGVmaW5lZCB8fCBjb29raWUgPT09ICcnKSB7XHJcbiAgICAgICAgICAgIENvb2tpZXMuc2V0KGNvb2tpZU5hbWUsIHNrdSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2UgaWYgKCFjb29raWUuaW5jbHVkZXMoc2t1KSkge1xyXG4gICAgICAgICAgICBDb29raWVzLnNldChjb29raWVOYW1lLCBza3UgKyAnfCcgKyBjb29raWUpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcG9wdWxhdGVQcmV2aW91c1NrdURyb3BEb3duTGlzdCgpO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGNyZWF0ZURvd25sb2FkTGlzdEJ1dHRvbigpIHtcclxuICAgICAgICB2YXIgY29udGFpbmVyID0galF1ZXJ5KCcuZG93bmxvYWQtc2RzLWxpc3QtY29udGFpbmVyJywgbmFtZXNwYWNlKTtcclxuXHJcbiAgICAgICAgY29udGFpbmVyLmVtcHR5KCk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gQ2hlY2sgcmVjZW50IHB1cmNoYXNlcyBmb3IgYXQgbGVhc3Qgb25lIGF2YWlsYWJsZSBzZHNcclxuICAgICAgICBqUXVlcnkuYWpheChcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnR0VUJyxcclxuICAgICAgICAgICAgICAgIHhockZpZWxkczogeyB3aXRoQ3JlZGVudGlhbHM6IHRydWUgfSxcclxuICAgICAgICAgICAgICAgIHVybDogcGRmRXhpc3RzSW5SZWNlbnRQdXJjaGFzZXNFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGdldFBkZkxpc3RFbmRwb2ludDtcclxuICAgICAgICAgICAgICAgICAgICAvLy0tLS0tIEFkZCBkb3dubG9hZCBidXR0b24gdG8gcGFnZVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lci5odG1sKCc8YSBocmVmPVwiJyArIHVybCArICdcIiB0YXJnZXQ9XCJfYmxhbmtcIiBjbGFzcz1cImJ0biBidG4tc20gYnRuLXByaW1hcnlcIj5Eb3dubG9hZCBNeSBTRFMgTGlzdDwvYT4nKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBlcnJvcjogZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLnNkcy1saXN0LXVuYXZhaWxhYmxlJywgbmFtZXNwYWNlKS5yZW1vdmVDbGFzcygnZC1ub25lJyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGhhbmRsZURvd25sb2FkU0RTQ2xpY2tlZChlKSB7XHJcbiAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAvLyBnZXQgdGhlIGVudGVyZWQgc2t1IGZyb20gdGhlIHVzZXJcclxuICAgICAgICB2YXI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gdmFsdWVcclxuICAgICAgICBjb25zdCBjdXN0b21TZWFyY2hDbGllbnQgPSB7XHJcbiAgICAgICAgICAgIHNlYXJjaChyZXF1ZXN0cykge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgdHJhbnNmb3JtZWRSZXF1ZXN0cyA9IHJlcXVlc3RzLm1hcChyZXF1ZXN0ID0+ICh7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gTW92ZSBgaW5kZXhOYW1lYCBpbnNpZGUgYHBhcmFtc2BcclxuICAgICAgICAgICAgICAgICAgICAuLi5yZXF1ZXN0LnBhcmFtcyxcclxuICAgICAgICAgICAgICAgICAgICBpbmRleE5hbWU6IHJlcXVlc3QuaW5kZXhOYW1lLFxyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBFbnN1cmUgYGZhY2V0c2AgaXMgYWx3YXlzIGFuIGFycmF5XHJcbiAgICAgICAgICAgICAgICAgICAgZmFjZXRzOiBBcnJheS5pc0FycmF5KHJlcXVlc3QucGFyYW1zLmZhY2V0cylcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyByZXF1ZXN0LnBhcmFtcy5mYWNldHNcclxuICAgICAgICAgICAgICAgICAgICAgICAgOiBbcmVxdWVzdC5wYXJhbXMuZmFjZXRzXSxcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIGNhdGVnb3J5RmlsdGVyXHJcbiAgICAgICAgICAgICAgICAgICAgZmlsdGVyczogY2F0ZWdvcnlGaWx0ZXJcclxuICAgICAgICAgICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmV0Y2goJHNlYXJjaEVuZHBvaW50SW5wdXQudmFsKCksIHtcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdwb3N0JyxcclxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7IHJlcXVlc3RzOiB0cmFuc2Zvcm1lZFJlcXVlc3RzIH0pLFxyXG4gICAgICAgICAgICAgICAgfSkudGhlbihyZXMgPT4gcmVzLmpzb24oKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICByZXR1cm4gaW5zdGFudHNlYXJjaCh7XHJcbiAgICAgICAgICAgIGluZGV4TmFtZTogcHJvZHVjdHNJbmRleCxcclxuICAgICAgICAgICAgc2VhcmNoQ2xpZW50OiBjdXN0b21TZWFyY2hDbGllbnQsXHJcbiAgICAgICAgICAgIGluc2lnaHRzOiBmYWxzZSxcclxuICAgICAgICAgICAgcm91dGluZzogaW5zdGFudFNlYXJjaFJvdXRlclxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldFJlZmluZW1lbnRXaWRnZXQoY29udGFpbmVyLCBhdHRyaWJ1dGUsIGN1c3RvbVNvcnRGdW5jKSB7XHJcbiAgICAgICAgcmV0dXJuIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5wYW5lbCh7XHJcbiAgICAgICAgICAgIHRlbXBsYXRlczoge1xyXG4gICAgICAgICAgICAgICAgLy8gcmVtb3ZlIHVuZGVyc2NvcmVzIGZyb20gYXR0cmlidXRlIG5hbWVcclxuICAgICAgICAgICAgICAgIGhlYWRlcjogYXR0cmlidXRlLnJlcGxhY2UoL18vZywgJyAnKSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaGlkZGVuKG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgICAgIC8vIGhpZGUgdGhlIHBhbmVsICYgd2lkZ2V0IGlmIHRoZXJlIGFyZSBubyByZXN1bHRzXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9ucy5pdGVtcy5sZW5ndGggPT09IDA7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNvbGxhcHNlZDogZmFsc2UsXHJcbiAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgIHJvb3Q6ICdmYWNldC1wYW5lbCcsXHJcbiAgICAgICAgICAgICAgICBoZWFkZXI6ICd3aWRnZXQtZmlsdGVyLW1lbnUnLFxyXG4gICAgICAgICAgICAgICAgY29sbGFwc2VCdXR0b246ICdmYWNldC1jb2xsYXBzZS1idG4nLFxyXG4gICAgICAgICAgICAgICAgY29sbGFwc2VkUm9vdDogJ2ZhY2V0LWNvbGxhcHNlZCcsXHJcbiAgICAgICAgICAgICAgICBib2R5OiAnZmFjZXQtYm9keScsXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KShpbnN0YW50c2VhcmNoLndpZGdldHMucmVmaW5lbWVudExpc3QpKHtcclxuICAgICAgICAgICAgY29udGFpbmVyLFxyXG4gICAgICAgICAgICBhdHRyaWJ1dGUsXHJcbiAgICAgICAgICAgIG9wZXJhdG9yOiAnb3InLFxyXG4gICAgICAgICAgICBsaW1pdDogMTAsXHJcbiAgICAgICAgICAgIHNob3dNb3JlOiB0cnVlLFxyXG4gICAgICAgICAgICBzb3J0Qnk6IGN1c3RvbVNvcnRGdW5jID8gY3VzdG9tU29ydEZ1bmMgOiBbJ25hbWU6YXNjJ10sXHJcbiAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgIHNob3dNb3JlOiAnd2lkZ2V0LWZpbHRlci1zaG93LW1vcmUnLFxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIGZ1bmN0aW9uIHNvcnRQcmljZVJhbmdlcyhhLCBiKSB7XHJcbiAgICAgICAgLy8gZm9ybWF0IGlzIFwiJDAtJDI1XCIsIFwiJDI1LSQ1MFwiLCBldGMuXHJcbiAgICAgICAgLy8gY29ud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gICAgICAvLy0tLS0tIEhhbmRsZSBtb2RhbCBwcm9kdWN0IHByZXZpZXcgY29udGVudFxyXG4gICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCcsIG5hbWVzcGFjZSkub24oJ3Nob3duLmJzLm1vZGFsJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBwaWQgPSBqUXVlcnkoJ2lucHV0WyBuYW1lPW1vZGFscHJvZHVjdGlkICAgXScsIG5hbWVzcGFjZSkuYXR0cigndmFsdWUnKTtcclxuICAgICAgICAgICAgICAgIHZhciBwbmFtZSA9IGpRdWVyeSgnaW5wdXRbIG5hbWU9bW9kYWxwcm9kdWN0bmFtZSBdJywgbmFtZXNwYWNlKS5hdHRyKCd2YWx1ZScpO1xyXG5cclxuICAgICAgICAgICAgICAgIHZhciBkYXRhID1cclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBjb2RlOiBwaWRcclxuICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QgPSBqUXVlcnkuYWpheChcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJHByb2R1Y3REZXRhaWxzSW5wdXQudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHhockZpZWxkczogeyB3aXRoQ3JlZGVudGlhbHM6IHRydWUgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuc3Bpbm5lcicsIG5hbWVzcGFjZSkuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI3Byb2R1Y3QtcHJldmlldy1tb2RhbCAuYWpheC1jb250ZW50JywgbmFtZXNwYWNlKS5odG1sKGRhdGEuaHRtbCkuc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBwcm9kdWN0TGlua3NMaWJyYXJ5LmluaXRMaW5rcyh0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICBwcm9kdWN0TGlua3NMaWJyYXJ5LmxvYWRTaG9wcGluZ0xpc3RzKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNwcm9kdWN0LXByZXZpZXctbW9kYWwgLnNwaW5uZXInLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyggXCJFcnJvciBsb2FkaW5nIHByb2R1Y3QgcHJldmlld1wiLCBkYXRhICk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIH0sIDEyMDApO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGJpbmRSZWRpcmVjdFRvTG9naW5CdXR0b24oKSB7XHJcbiAgICAgICAgalF1ZXJ5KCcucmVkaXJlY3QtdG8tbG9naW4nLCBuYW1lc3BhY2UpLm9uKCdjbGljaycsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgLy8gUmVkaXJlY3QgdG8gbG9naW4gcGFnZVxyXG4gICAgICAgICAgICB2YXIgcmV0dXJuUGF0aCA9I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ZXRzLmluZGV4KHtcclxuICAgICAgICAgICAgICAgIGluZGV4TmFtZTogcHJvZHVjdHNJbmRleFxyXG4gICAgICAgICAgICB9KS5hZGRXaWRnZXRzKFtcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5jdXJyZW50UmVmaW5lbWVudHMoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lcjogJyNjdXJyZW50LXJlZmluZW1lbnRzJyxcclxuICAgICAgICAgICAgICAgICAgICBjc3NDbGFzc2VzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3Q6ICd3aWRnZXQtc2VsZWN0ZWQtZmlsdGVycy1saXN0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbTogJ3dpZGdldHMtc2VsZWN0ZWQtZmlsdGVycy1pdGVtJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZWdvcnk6ICd3aWRnZXRzLXNlbGVjdGVkLWZpbHRlcnMtY2F0ZWdvcnknLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGU6ICd3aWRnZXRzLXNlbGVjdGVkLWZpbHRlcnMtZGVsZXRlJyxcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5jbGVhclJlZmluZW1lbnRzKHtcclxuICAgICAgICAgICAgICAgICAgICBjb250YWluZXI6ICcjY2xlYXItcmVmaW5lbWVudHMnLFxyXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNldExhYmVsKHsgaGFzUmVmaW5lbWVudHMgfSwgeyBodG1sIH0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBoYXNSZWZpbmVtZW50cyA/IGh0bWxgPHNwYW4+IENsZWFyIGZpbHRlcnM8L3NwYW4+IGAgOiAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vdDogJ3dpZGdldC1zZWxlY3RlZC1maWx0ZXJzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnV0dG9uOiAnd2lkZ2V0LWNsZWFyLWFsbC1maWx0ZXJzJyxcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5keW5hbWljV2lkZ2V0cyh7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI2R5bmFtaWMtd2lkZ2V0cycsXHJcbiAgICAgICAgICAgICAgICAgICAgd2lkZ2V0czogW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXIgPT4gaW5zdGFudHNlYXJjaC53aWRnZXRzLnBhbmVsKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcjogJ0NhdGVnb3JpZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxhcHNlZDogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjc3NDbGFzc2VzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm9vdDogJ2ZhY2V0LXBhbmVsJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXI6ICd3aWRnZXQtZmlsdGVyLW1lbnUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxhcHNlQnV0dG9uOiAnZmFjZXQtY29sbGFwc2UtYnRuJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xsYXBzZWRSb290OiAnZmFjZXQtY29sbGFwc2VkJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5OiAnZmFjZXQtYm9keScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKGluc3RhbnRzZWFyY2gud2lkZ2V0cy5oaWVyYXJjaGljYWxNZW51KSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0NhdGVnb3JpZXMubHZsMCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0NhdGVnb3JpZXMubHZsMScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXIgPT4gZ2V0UmVmaW5lbWVudFdpZGdldChjb250YWluZXIsICdMaXN0X1ByaWNlX1JhbmdlJywgc29ydFByaWNlUmFuZ2VzKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyID0+IGdldFJlZmluZW1lbnRXaWRnZXQoY29udGFpbmVyLCAnU2hhZnQnLCBzaXplU29ydGVyLnNvcnRBcnJheSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA9PiBnZXRSZWZpbmVtZW50V2lkZ2V0KGNvbnRhaW5lciwgJ1NpemUnLCBzaXplU29ydGVyLnNvcnRBcnJheSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA9PiBnZXRSZWZpbmVtZW50V2lkZ2V0KGNvbnRhaW5lciwgJ0hQJywgc2l6ZVNvcnRlci5zb3J0QXJyYXkpLFxyXG4gICAgICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgICAgICAgICAgZmFsbGJhY2tXaWRnZXQ6ICh7IGNvbnRhaW5lciwgYXR0cmlidXRlIH0pID0+IGdldFJlZmluZW1lbnRXaWRnZXQoY29udGFpbmVyLCBhdHRyaWJ1dGUpXHJcbiAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5oaXRzUGVyUGFnZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI2hpdHMtcGVyLXBhZ2UnLFxyXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zOiB3aW5kb3cucHJvZHVjdFBhZ2luZ09wdGlvbnMubWFwKG9wdGlvbiA9PiAoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogYCR7b3B0aW9uLlZhbHVlfSAke29wdGlvbi5MYWJlbH1gLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogTnVtYmVyKG9wdGlvbi5WYWx1ZSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IG9wdGlvbi5EZWZhdWx0XHJcbiAgICAgICAgICAgICAgICAgICAgfSkpXHJcbiAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5zdGF0cyh7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI3Byb2R1Y3Qtc2VhcmNoLXN0YXRzJyxcclxuICAgICAgICAgICAgICAgICAgICBjc3NDbGFzc2VzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICd3aWRnZXQtc2VhcmNoLXN0YXRzJyxcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICAgICBpbnN0YW50c2VhcmNoLndpZGdldHMuc29ydEJ5KHtcclxuICAgICAgICAgICAgICAgICAgICBjb250YWluZXI6ICcjc29ydC1ieS1jb250YWluZXInLCAvLyBVcGRhdGVkIHRvIG1hdGNoIHRvb2xiYXIgcGxhY2VtZW50XHJcbiAgICAgICAgICAgICAgICAgICAgaXRlbXM6IHdpbmRvdy5wcm9kdWN0U29ydE9wdGlvbnMgPyB3aW5kb3cucHJvZHVjdFNvcnRPcHRpb25zLm1hcChvcHRpb24gPT4gKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IG9wdGlvbi5MYWJlbCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IG9wdGlvbi5BbGlhc1xyXG4gICAgICAgICAgICAgICAgICAgIH0pKSA6IFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIGNzc0NsYXNzZXM6IHsgc2VsZWN0OiAnc29ydC1ieS1kcm9wZG93bicgfSxcclxuICAgICAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICAgICAgaW5zdGFudHNlYXJjaC53aWRnZXRzLmhpdHMoe1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lcjogJyNoaXRzJyxcclxuICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbShoaXQsIHsgaHRtbCB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNBdXRoZW50aWNhdGVkID09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGh0bWxgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInByb2R1Y3QtY2FyZFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1oZWFkZXItYWN0aW9ucy1ncmlkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7Z2V0UHJvZHVjdFByZXZpZXdDb21wb25lbnQoaGl0LCBodG1sKX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtnZXRGYXZvcml0ZUNvbXBvbmVudChoaXQsIGh0bWwpfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIiNcIiBjbGFzcz1cImNvbXBhcmUtbGlua1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwiZmFzIGZhLWV4Y2hhbmdlLWFsdFwiPjwvaT4gQ29tcGFyZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInByb2R1Y3QtaW1hZ2VcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbWcgc3JjPVwiJHtoaXQuaW1hZ2VzIHx8ICdodHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vMjAwJ31cIiBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0PVwiJHtoaXQuVGl0bGV9XCIgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uZXJyb3I9XCJ0aGlzLnNyYz0naHR0cHM6Ly92aWEucGxhY2Vob2xkZXIuY29tLzIwMCc7XCIgLz5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwcm9kdWN0LWluZm9cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBQcm9kdWN0IFRpdGxlIGFzIGEgTGluayAtLT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIiR7aGl0LlJlbGF0aXZlUGF0aH1cIiBjbGFzcz1cInByb2R1Y3QtdGl0bGVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7aGl0LlRpdGxlIHx8IFwiVW5rbm93biBQcm9kdWN0XCJ9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1tZXRhXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XCJwcm9kdWN0LWlkXCI+PHN0cm9uZz5JdGVtOjwvc3Ryb25nPiAke2hpdC5JdGVtX051bWJlcn08L3A+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XCJwcm9kdWN0LXVvbVwiPjxzdHJvbmc+VU9NOjwvc3Ryb25nPiAke2hpdC5TZWxsaW5nX1VPTSB8fCBcIk4vQVwifTwvcD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7aGl0LkFsdGVybmF0aXZlX0NvbG9ycyA9PT0gXCJUcnVlXCIgPyBodG1sYFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XCJhbHRlcm5hdGl2ZS1jb2xvcnNcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cImZhcyBmYS1leGNsYW1hdGlvbi1jaXJjbGVcIj48L2k+IFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9XCIjXCI+TW9yZSBjb2xvcnMgYXZhaWxhYmxlPC9hPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9wPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAgOiAnJ31cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInByb2R1Y3QtaGVhZGVyLWFjdGlvbnMtbGlzdFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7Z2V0UHJvZHVjdFByZXZpZXdDb21wb25lbnQoaGl0LCBodG1sKX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAke2dldEZhdm9yaXRlQ29tcG9uZW50KGhpdCwgaHRtbCl9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9XCIjXCIgY2xhc3M9XCJjb21wYXJlLWxpbmtcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwiZmFzIGZhLWV4Y2hhbmdlLWFsdFwiPjwvaT4gQ29tcGFyZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1hY3Rpb25zXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XCJwcm9kdWN0LWNhdGFsb2ctcGFnZVwiPkNhdGFsb2cgUGFnZTogJHtoaXQuQ2F0YWxvZ19QYWdlX051bWJlciB8fCBcIk4vQVwifTwvcD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVwiYnRuIGJ0bi1zbSBwcmljZS1idG4gcmVkaXJlY3QtdG8tbG9naW5cIj5Mb2dpbiBmb3IgUHJpY2U8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbGBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1jYXJkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwcm9kdWN0LWhlYWRlci1hY3Rpb25zLWdyaWRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtnZXRQcm9kdWN0UHJldmlld0NvbXBvbmVudChoaXQsIGh0bWwpfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAke2dldEZhdm9yaXRlQ29tcG9uZW50KGhpdCwgaHRtbCl9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiI1wiIGNsYXNzPVwiY29tcGFyZS1saW5rXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9XCJmYXMgZmEtZXhjaGFuZ2UtYWx0XCI+PC9pPiBDb21wYXJlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1pbWFnZVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGltZyBzcmM9XCIke2hpdC5pbWFnZXMgfHwgJ2h0dHBzOi8vdmlhLnBsYWNlaG9sZGVyLmNvbS8yMDAnfVwiIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQ9XCIke2hpdC5UaXRsZX1cIiBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25lcnJvcj1cInRoaXMuc3JjPSdodHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vMjAwJztcIiAvPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJwcm9kdWN0LWluZm9cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gUHJvZHVjdCBUaXRsZSBhcyBhIExpbmsgLS0+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiL3Byb2R1Y3QvJHtoaXQuSXRlbV9OdW1iZXJ9XCIgY2xhc3M9XCJwcm9kdWN0LXRpdGxlXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtoaXQuVGl0bGUgfHwgXCJVbmtub3duIFByb2R1Y3RcIn1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1tZXRhXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XCJwcm9kdWN0LWlkXCI+PHN0cm9uZz5JdGVtOjwvc3Ryb25nPiAke2hpdC5JdGVtX051bWJlcn08L3A+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtoaXQuQWx0ZXJuYXRpdmVfQ29sb3JzID09PSBcIlRydWVcIiA/IGh0bWxgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwIGNsYXNzPVwicHJvZHVjdC1pbi1zdG9ja1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHN0cm9uZz5JbiBTdG9jazwvc3Ryb25nPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3A+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgIDogJydcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cCBjbGFzcz1cInByb2R1Y3QtdW9tXCI+PHN0cm9uZz5VT006PC9zdHJvbmc+ICR7aGl0LlNlbGxpbmdfVU9NIHx8IFwiTi9BXCJ9PC9wPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtoaXQuQWx0ZXJuYXRpdmVfQ29sb3JzID09PSBcIlRydWVcIiA/IGh0bWxgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cCBjbGFzcz1cImFsdGVybmF0aXZlLWNvbG9yc1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwiZmFzIGZhLWV4Y2xhbWF0aW9uLWNpcmNsZVwiPjwvaT4gXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIiNcIj5Nb3JlIGNvbG9ycyBhdmFpbGFibGU8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3A+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYCA6ICcnfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1oZWFkZXItYWN0aW9ucy1saXN0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtnZXRQcm9kdWN0UHJldmlld0NvbXBvbmVudChoaXQsIGh0bWwpfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7Z2V0RmF2b3JpdGVDb21wb25lbnQoaGl0LCBodG1sKX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIiNcIiBjbGFzcz1cImNvbXBhcmUtbGlua1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9XCJmYXMgZmEtZXhjaGFuZ2UtYWx0XCI+PC9pPiBDb21wYXJlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicHJvZHVjdC1hY3Rpb25zXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XCJwcm9kdWN0LWNhdGFsb2ctcGFnZVwiPkNhdGFsb2cgUGFnZTogJHtoaXQuQ2F0YWxvZ19QYWdlX051bWJlciB8fCBcIk4vQVwifTwvcD5cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNhcnQtc2VjdGlvblwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY2FydC1jb250cm9sc1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9XCJudW1iZXJcIiB2YWx1ZT1cIjFcIiBjbGFzcz1cInF0eS1pbnB1dFwiIG1pbj1cIjFcIiAvPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cImJ0biBidG4tc20gcHJpY2UtYnRuXCI+PGkgY2xhc3M9XCJmYXMgZmEtcGx1c1wiIHN0eWxlPVwiZm9udC1zaXplOiA5cHQ7XCI+PC9pPiBDYXJ0PC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cCBjbGFzcz1cInByb2R1Y3QtcHJpY2VcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdHJvbmc+UHJpY2U6ICQke051bWJlcihoaXQuTGlzdF9QcmljZSB8fCAwKS50b0ZpeGVkKDIpfTwvc3Ryb25nPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3A+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5wYWdpbmF0aW9uKHtcclxuICAgICAgICAgICAgICAgICAgICBjb250YWluZXI6ICcjcGFnaW5hdGlvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgY3NzQ2xhc3Nlczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb290OiAnYWlzLXBhZ2VyJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdDogJ2Fpcy1wYWdlci1saXN0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGluazogJ2Fpcy1wYWdlci1saXN0LWxpbmsnLFxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgIF0pXHJcbiAgICAgICAgXTtcclxuXHJcbiAgICAgICAgLy8gc2V0dXAgU2l0ZSBDb250ZW50IEluZGV4IFdpZGdldHMgaWYgd2UgYXJlIG5vdCBvbiB0aGUgZmlsdGVyIGJ5IGNhdGVnb3J5IHBhZ2VcclxuICAgICAgICBpZiAoIWNhdGVnb3J5RmlsdGVyKSB7XHJcbiAgICAgICAgICAgIHdpZGdldHMucHVzaChcclxuICAgICAgICAgICAgICAgIGluc3RhbnRzZWFyY2gud2lkZ2V0cy5pbmRleCh7XHJcbiAgICAgICAgICAgICAgICAgICAgaW5kZXhOYW1lOiBzaXRlQ29udGVudEluZGV4XHJcbiAgICAgICAgICAgICAgICB9KS5hZGRXaWRnZXRzKFtcclxuICAgICAgICAgICAgICAgICAgICBpbnN0YW50c2VhcmNoLndpZGdldHMuY3VycmVudFJlZmluZW1lbnRzKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI3NjLWN1cnJlbnQtcmVmaW5lbWVudHMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjc3NDbGFzc2VzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0OiAnd2lkZ2V0LXNlbGVjdGVkLWZpbHRlcnMtbGlzdCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtOiAnd2lkZ2V0cy1zZWxlY3RlZC1maWx0ZXJzLWl0ZW0nLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZWdvcnk6ICd3aWRnZXRzLXNlbGVjdGVkLWZpbHRlcnMtY2F0ZWdvcnknLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlOiAnd2lkZ2V0cy1zZWxlY3RlZC1maWx0ZXJzLWRlbGV0ZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgICAgICBpbnN0YW50c2VhcmNoLndpZGdldHMuY2xlYXJSZWZpbmVtZW50cyh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lcjogJyNzYy1jbGVhci1yZWZpbmVtZW50cycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXRMYWJlbCh7IGhhc1JlZmluZW1lbnRzIH0sIHsgaHRtbCB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhc1JlZmluZW1lbnRzID8gaHRtbGA8c3Bhbj5DbGVhciBmaWx0ZXJzPC9zcGFuPmAgOiAnJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvb3Q6ICd3aWRnZXQtc2VsZWN0ZWQtZmlsdGVycycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b246ICd3aWRnZXQtY2xlYXItYWxsLWZpbHRlcnMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFudHNlYXJjaC53aWRnZXRzLmR5bmFtaWNXaWRnZXRzKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI3NjLWR5bmFtaWMtd2lkZ2V0cycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZGdldHM6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA9PiBpbnN0YW50c2VhcmNoLndpZGdldHMucGFuZWwoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXI6ICdDYXRlZ29yaWVzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm9vdDogJ3dpZGdldC1maWx0ZXJzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnd2lkZ2V0LWZpbHRlci1tZW51J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkoaW5zdGFudHNlYXJjaC53aWRnZXRzLmhpZXJhcmNoaWNhbE1lbnUpKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlczogW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUGFnZUNhdGVnb3J5Lmx2bDAnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUGFnZUNhdGVnb3J5Lmx2bDEnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUGFnZUNhdGVnb3J5Lmx2bDInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUGFnZUNhdGVnb3J5Lmx2bDMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUGFnZUNhdGVnb3J5Lmx2bDQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUGFnZUNhdGVnb3J5Lmx2bDUnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhbGxiYWNrV2lkZ2V0OiAoeyBjb250YWluZXIsIGF0dHJpYnV0ZSB9KSA9PiBnZXRSZWZpbmVtZW50V2lkZ2V0KGNvbnRhaW5lciwgYXR0cmlidXRlKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtSXRlbXMoaXRlbXMsIHsgcmVzdWx0cyB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXM7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFudHNlYXJjaC53aWRnZXRzLmhpdHNQZXJQYWdlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI3NjLWhpdHMtcGVyLXBhZ2UnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpdGVtczogd2luZG93LnNpdGVDb250ZW50UGFnaW5nT3B0aW9ucy5tYXAob3B0aW9uID0+ICh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogYCR7b3B0aW9uLlZhbHVlfSAke29wdGlvbi5MYWJlbH1gLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IE51bWJlcihvcHRpb24uVmFsdWUpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDogb3B0aW9uLkRlZmF1bHRcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpXHJcbiAgICAgICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFudHNlYXJjaC53aWRnZXRzLnN0YXRzKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyOiAnI3NjLXNlYXJjaC1zdGF0cycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICd3aWRnZXQtc2VhcmNoLXN0YXRzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB9KSxcclxuICAgICAgICAgICAgICAgICAgICBpbnN0YW50c2VhcmNoLndpZGdldHMuaGl0cyh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lcjogJyNzYy1oaXRzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtKGhpdCwgeyBodG1sLCBjb21wb25lbnRzIH0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbGBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInNpdGUtY29udGVudC1jYXJkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2l0ZS1jb250ZW50LWJvZHlcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIiR7aGl0LlJlbGF0aXZlUGF0aH1cIiBjbGFzcz1cInNpdGUtY29udGVudC10aXRsZVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7aGl0Lk5hbWV9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInNpdGUtY29udGVudC1zbmlwcGV0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtjb21wb25lbnRzLlNuaXBwZXQoeyBhdHRyaWJ1dGU6ICdNYWluQ29udGVudEFyZWEnLCBoaXQgfSl9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtjb21wb25lbnRzLlNuaXBwZXQoeyBhdHRyaWJ1dGU6ICdCbG9ja3MnLCBoaXQgfSl9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic2l0ZS1jb250ZW50LWFjdGlvbnNcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgaHJlZj1cIiR7aGl0LlJlbGF0aXZlUGF0aH1cIiBjbGFzcz1cInNpdGUtY29udGVudC1yZWFkbW9yZVwiPlJlYWQgbW9yZSDihpI8L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PmA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFudHNlYXJjaC53aWRnZXRzLnBhZ2luYXRpb24oe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXI6ICcjc2MtcGFnaW5hdGlvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNzc0NsYXNzZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvb3Q6ICdhaXMtcGFnZXInLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdDogJ2Fpcy1wYWdlci1saXN0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbms6ICdhaXMtcGFnZXItbGlzdC1saW5rJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICBdKSxcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIEFkZCB0byBzZWFyY2ggaW5zdGFuY2VcclxuICAgICAgICBzZWFyY2guYWRkV2lkZ2V0cyh3aWRnZXRzKTtcclxuICAgICAgICBzZWFyY2guc3RhcnQoKTtcclxuXHJcbiAgICAgICAgU2VhcmNoTGlicmFyeS5iaW5kSW5zdGFudFNlYXJjaChzZWFyY2gsIHByb2R1Y3RzSW5kZXgpO1xyXG5cclxuICAgICAgICAvLyBTZXR1cCBldmVudHMgZm9yIGFmdGVyIHNlYXJjaCByZXN1bHRzIGFyZSByZW5kZXJlZFxyXG4gICAgICAgIHNlYXJjaC5vbigncmVuZGVyJywgKCkgPT4ge1xyXG4gICAgICAgICAgICAvLyBFbnN1cmUgdGhlIERPTSBpcyByZWFkeVxyXG4gICAgICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgQXBwbHlTZWxlY3RlZFZpZXdNb2RlKFwiZ3JpZFwiKTtcclxuICAgICAgICAgICAgICAgIGJpbmRGYXZvcml0ZXNDb250cm9scygpO1xyXG4gICAgICAgICAgICAgICAgYmluZFByb2R1Y3RQcmV2aWV3Q29udHJvbHMoKTtcclxuICAgICAgICAgICAgICAgIGJpbmRSZWRpcmVjdFRvTG9naW5CdXR0b24oKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGxldCBzZWxlY3RlZENvbXBhcmlzb25zID0g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YXRpb24oKTtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IHBhcnNlSW50KHRoaXMuZGF0YXNldC5pbmRleCwgMTApO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlbW92ZWRJdGVtID0gc2VsZWN0ZWRDb21wYXJpc29uc1tpbmRleF07XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRDb21wYXJpc29ucy5zcGxpY2UoaW5kZXgsIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUNvbXBhcmVEcm9wZG93bigpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFwiLmNvbXBhcmUtbGlua1wiKS5mb3JFYWNoKGxpbmsgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjYXJkID0gbGluay5jbG9zZXN0KFwiLnByb2R1Y3QtY2FyZFwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdGl0bGUgPSBjYXJkLnF1ZXJ5U2VsZWN0b3IoXCIucHJvZHVjdC10aXRsZVwiKT8uaW5uZXJUZXh0LnRyaW0oKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRpdGxlID09PSByZW1vdmVkSXRlbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluay5xdWVyeVNlbGVjdG9yKFwiaVwiKS5jbGFzc0xpc3QucmVwbGFjZShcImZhLWNoZWNrXCIsIFwiZmEtZXhjaGFuZ2UtYWx0XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAvLyBDbGVhciBsaXN0IGhhbmRsZXJcclxuICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcIi5jbGVhci1saXN0XCIpPy5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgKGUpID0+IHtcclxuICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7IC8vIFByZXZlbnQgY2xvc2luZyB0aGUgZHJvcGRvd25cclxuICAgICAgICAgICAgICAgIHNlbGVjdGVkQ29tcGFyaXNvbnMgPSBbXTtcclxuICAgICAgICAgICAgICAgIHVwZGF0ZUNvbXBhcmVEcm9wZG93bigpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIEtlZXAgdGhlIGRyb3Bkb3duIHZpc2libGUgYWZ0ZXIgY2xlYXJpbmdcclxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiY29tcGFyZS1kcm9wZG93blwiKS5jbGFzc0xpc3QuYWRkKFwidmlzaWJsZVwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBSZXNldCBpY29uc1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcIi5jb21wYXJlLWxpbmsgaVwiKS5mb3JFYWNoKGljb24gPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGljb24uY2xhc3NMaXN0LnJlcGxhY2UoXCJmYS1jaGVja1wiLCBcImZhLWV4Y2hhbmdlLWFsdFwiKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIC8vIEdvIHRvIGNvbXBhcmUgcGFnZVxyXG4gICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKFwiLmdvLWNvbXBhcmVcIik/LmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBwYXJhbXMgPSBzZWxlY3RlZENvbXBhcmlzb25zLm1hcCh0aXRsZSA9PiBlbmNvZGVVUklDb21wb25lbnQodGl0bGUpKS5qb2luKCcsJyk7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IGAvY29tcGFyZT9pdGVtcz0ke3BhcmFtc31gO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFByb2R1Y3QgY2FyZCBcIkNvbXBhcmVcIiBidXR0b24gY2xpY2tcclxuICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgaWYgKGUudGFyZ2V0LmNsb3Nlc3QoXCIuY29tcGFyZS1saW5rXCIpKSB7XHJcbiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBjYXJkID0gZS50YXJnZXQuY2xvc2VzdChcIi5wcm9kdWN0LWNhcmRcIik7XHJcbiAgICAgICAgICAgICAgICBjb25zdCB0aXRsZSA9IGNhcmQucXVlcnlTZWxlY3RvcihcIi5wcm9kdWN0LXRpdGxlXCIpPy5pbm5lclRleHQudHJpbSgpO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgaWNvbiA9IGUudGFyZ2V0LmNsb3Nlc3QoXCIuY29tcGFyZS1saW5rXCIpLnF1ZXJ5U2VsZWN0b3IoXCJpXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0aXRsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghc2VsZWN0ZWRDb21wYXJpc29ucy5pbmNsdWRlcyh0aXRsZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRDb21wYXJpc29ucy5wdXNoKHRpdGxlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbi5jbGFzc0xpc3QucmVwbGFjZShcImZhLWV4Y2hhbmdlLWFsdFwiLCBcImZhLWNoZWNrXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZW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lc2l6ZT0nICsgZCArICcmdmlld21vZGU9JyArIGUgKyAnJmN1cnJlbnR0YWI9JyArIGYgKyAnJnBhZ2VudW1iZXI9JyArIGcgKyAnJmFydGljbGVwYWdlPScgKyBoO1xyXG5cclxuLy8gICAgICAgIHdpbmRvdy5sb2NhdGlvbiA9IHVybDtcclxuLy8gICAgfVxyXG5cclxuLy8gICAgZnVuY3Rpb24gcmVmcmVzaENvbXBhcmVMaXN0KCkge1xyXG5cclxuLy8gICAgICAgIFByb2R1Y3RDb21wYXJlQXBpLmdldENvbXBhcmVJdGVtc0NvbXBvbmVudChcclxuLy8gICAgICAgICAgICBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbi8vICAgICAgICAgICAgICAgIGpRdWVyeSgnLmNvbXBhcmUtbWVudSAuY29tcGFyZS1saXN0JywgbmFtZXNwYWNlKS5odG1sKHJlc3VsdCk7XHJcbi8vICAgICAgICAgICAgICAgIHZhciBuZXdDb3VudCA9IGpRdWVyeSgnLmNvbXBhcmUtbWVudSAuY29tcGFyZS1saXN0IC5jb21wYXJlLWl0ZW0nKS5sZW5ndGg7XHJcblxyXG4vLyAgICAgICAgICAgICAgICBjb21wYXJlQ291bnQgPSBuZXdDb3VudDtcclxuXHJcbi8vICAgICAgICAgICAgICAgIGlmIChuZXdDb3VudCA+IDApIHtcclxuLy8gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmJhZGdlLWNvbXBhcmUtcHJvZHVjdHMnLCBuYW1lc3BhY2UpLnRleHQobmV3Q291bnQpO1xyXG4vLyAgICAgICAgICAgICAgICB9XHJcbi8vICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4vLyAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuYmFkZ2UtY29tcGFyZS1wcm9kdWN0cycsIG5hbWVzcGFjZSkudGV4dCgnJyk7XHJcbi8vICAgICAgICAgICAgICAgIH1cclxuXHJcbi8vICAgICAgICAgICAgICAgIGlmIChyZXN1bHQubGVuZ3RoID4gMCk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0aDtcclxuXHJcbi8vICAgICAgICAgICAgaWYgKGNvdW50IDwgNSkge1xyXG4vLyAgICAgICAgICAgICAgICB2YXIgYnV0dG9uID0galF1ZXJ5KHRoaXMpO1xyXG5cclxuLy8gICAgICAgICAgICAgICAgaWYgKCFidXR0b24uaGFzQ2xhc3MoJ3NlbGVjdGVkJykpIHtcclxuLy8gICAgICAgICAgICAgICAgICAgIGJ1dHRvbi5hZGRDbGFzcygnc2VsZWN0ZWQnKTtcclxuXHJcbi8vICAgICAgICAgICAgICAgICAgICB2YXIgcGlkID0gYnV0dG9uLmRhdGEoJ3BpZCcpO1xyXG4vLyAgICAgICAgICAgICAgICAgICAgdmFyIGljb24gPSBidXR0b24uZmluZCgnLmNvbXBhcmUtaWNvbicpO1xyXG5cclxuLy8gICAgICAgICAgICAgICAgICAgIGljb24ucmVtb3ZlQ2xhc3MoJ2ZhLXN5bmMtYWx0JykuYWRkQ2xhc3MoJ2ZhLWNoZWNrJyk7XHJcblxyXG4vLyAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuY29tcGFyZS1tZW51IC5hY3Rpb25zJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbi8vICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5jb21wYXJlLW1lbnUgLmVtcHR5LW1lc3NhZ2UnLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuXHJcbi8vICAgICAgICAgICAgICAgICAgICBjb21wYXJlQ291bnQrKztcclxuXHJcbi8vICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5iYWRnZS1jb21wYXJlLXByb2R1Y3RzJywgbmFtZXNwYWNlKS50ZXh0KGNvbXBhcmVDb3VudCk7XHJcblxyXG4vLyAgICAgICAgICAgICAgICAgICAgLy8gY2FsbCBwcm9kdWN0IGNvbXBhcmUgYXBpXHJcbi8vICAgICAgICAgICAgICAgICAgICBQcm9kdWN0Q29tcGFyZUFwaS5hZGRJdGVtKHBpZCxcclxuLy8gICAgICAgICAgICAgICA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tZXNwYWNlKS5hdHRyKCd2YWx1ZScpO1xyXG4vLyAgICAgICAgICAgICAgICB2YXIgcG5hbWUgPSBqUXVlcnkoJ2lucHV0WyBuYW1lPW1vZGFscHJvZHVjdG5hbWUgXScsIG5hbWVzcGFjZSkuYXR0cigndmFsdWUnKTtcclxuXHJcbi8vICAgICAgICAgICAgICAgIHZhciBkYXRhID1cclxuLy8gICAgICAgICAgICAgICAge1xyXG4vLyAgICAgICAgICAgICAgICAgICAgY29kZTogcGlkXHJcbi8vICAgICAgICAgICAgICAgIH07XHJcblxyXG4vLyAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KFxyXG4vLyAgICAgICAgICAgICAgICAgICAge1xyXG4vLyAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsXHJcbi8vICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuLy8gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHByb2R1Y3REZXRhaWxzRW5kcG9pbnQsXHJcbi8vICAgICAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7IHdpdGhDcmVkZW50aWFsczogdHJ1ZSB9XHJcbi8vICAgICAgICAgICAgICAgICAgICB9KTtcclxuXHJcbi8vICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4vLyAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjcHJvZHVjdC1wcmV2aWV3LW1vZGFsIC5zcGlubmVyJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcbi8vICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNwcm9kdWN0LXByZXZpZXctbW9kYWwgLmFqYXgtY29udGVudCcsIG5hbWVzcGFjZSkuaHRtbChkYXRhLmh0bWwpLnNob3coKTtcclxuXHJcbi8vICAgICAgICAgICAgICAgICAgICBwcm9kdWN0TGlua3NMaWJyYXJ5LmluaXRMaW5rc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WVyeSh0aGlzKS5kYXRhKCdhY2NvdW50SWQnKTtcclxuXHJcbi8vICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4vLyAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignQWRkaW5nLi4uJywgYnV0dG9uKTtcclxuXHJcbi8vICAgICAgICAgICAgLy8gY2FsbCBzaG9wcGluZyBjYXJ0IGFwaVxyXG4vLyAgICAgICAgICAgIFNob3BwaW5nQ2FydEFwaS5hZGRJdGVtVG9DYXJ0KGFjY291bnRJZCwgY29kZSwgcXVhbnRpdHksXHJcbi8vICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkYXRhKSB7XHJcbi8vICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4vLyAgICAgICAgICAgICAgICB9LFxyXG4vLyAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbi8vICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuLy8gICAgICAgICAgICAgICAgfSlcclxuXHJcbi8vICAgICAgICAgICAgLy8gdHJhY2sgYWRkIHRvIGNhcnRcclxuLy8gICAgICAgICAgICB2YXIgaXRlbU5hbWUgPSBqUXVlcnkodGhpcykuZGF0YSgnaXRlbU5hbWUnKTtcclxuLy8gICAgICAgICAgICB2YXIgaXRlbVByaWNlID0galF1ZXJ5KHRoaXMpLmRhdGEoJ2l0ZW1QcmljZScpO1xyXG4vLyAgICAgICAgICAgIHZhciBtYW51ZmFjdHVyZXIgPSBqUXVlcnkodGhpcykuZGF0YSgnbWFudWZhY3R1cmVyJyk7XHJcbi8vICAgICAgICAgICAgdmFyIHByaW1hcnlDYXRlZ29yeSA9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1ZXJ5KHRoaXMpLmRhdGEoJ2hpdHR5cGUnKTtcclxuLy8gICAgICAgICAgICB0cmFja0hpdChoaXRUeXBlLCBoaXRJZCk7XHJcbi8vICAgICAgICB9KTtcclxuXHJcbi8vICAgICAgICBmdW5jdGlvbiB0cmFja0hpdChoaXRUeXBlLCBoaXRJZCkge1xyXG4vLyAgICAgICAgICAgIC8vdmFyIHBocmFzZSA9IGpRdWVyeSgnaW5wdXRbbmFtZT1waHJhc2VdJywgbmFtZXNwYWNlKS52YWwoKTtcclxuLy8gICAgICAgICAgICAvL2lmIChwaHJhc2UgIT09IFwiXCIpIHtcclxuLy8gICAgICAgICAgICAvLyAgICB2YXIgdHJhY2tJZCA9IGpRdWVyeSgnaW5wdXRbbmFtZT10cmFja0lkXScsIG5hbWVzcGFjZSkudmFsKCk7XHJcbi8vICAgICAgICAgICAgLy8gICAgdmFyIHVybCA9IGpRdWVyeSgnaW5wdXRbbmFtZT10cmFja0l0ZW1DbGlja1VybF0nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4vLyAgICAgICAgICAgIC8vICAgIGpRdWVyeS5hamF4KFxyXG4vLyAgICAgICAgICAgIC8vICAgICAgICB7XHJcbi8vICAgICAgICAgICAgLy8gICAgICAgICAgICB0eXBlOiAnUE9TVCcsXHJcbi8vICAgICAgICAgICAgLy8gICAgICAgICAgICBkYXRhOiB7ICdoaXRUeXBlJzogaGl0VHlwZSwgJ2hpdElkJzogaGl0SWQsICd0cmFja0lkJzogdHJhY2tJZCwgJ3NlYXJjaFRlcm0nOiBwaHJhc2UgfSxcclxuLy8gICAgICAgICAgICAvLyAgICAgICAgICAgIHVybDogdXJsXHJcbi8vICAgICAgICAgICAgLy8gICAgICAgIH0pO1xyXG4vLyAgICAgICAgICAgIC8vfVxyXG4vLyAgICAgICAgfVxyXG5cclxuLy8gICAgICAgIC8vdG9nZ2xlIHRoZSB2aWV3IGljb25zXHJcbi8vICAgICAgICAvL2pRdWVyeSgnLmFjdGl2ZS10b2dnbGUnLCBuYW1lc3BhY2UpLm9uKCdjbGljaycsIGZ1bmN0aW9uICgpIHtcclxuLy8gICAgICAgIC8vICAgIHRvZ2dsZVZpZXdJY29ucygpO1xyXG4vLyAgICAgICAgLy99KTtcclxuLy8gICAgICAgIC8vLy9HQTQgU2VsZWN0LUNvbnRlbnRcclxuLy8gICAgICAgIC8valF1ZXJ5KCcuZ2E0LXNlbGVjdC1jb250ZW50JywgbmFtZXNwYWNlKS5vbignY2xpY2snLCBmdW5jdGlvbiAoKSB7XHJcbi8vICAgICAgICAvLyAgICB2YXIgY29udGVudFR5cGUgPSAkKHRoaXMpLmRhdGEoJ2NvbnRlbnQtdHlwZScpO1xyXG4vLyAgICAgICAgLy8gICAgdmFyIGl0ZW1JZCA9ICQodGhpcykuZGF0YSgnaGl0aWQnKTtcclxuLy8gICAgICAgIC8vICAgIGRhdGFMYXllci5wdXNoKHtcclxuLy8gICAgICAgIC8vICAgICAgICAnY29udGVudF90eXBlJzogY29udGVudFR5cGUsXHJcbi8vICAgICAgICAvLyAgICAgICAgJ2l0ZW1faWQnOiBpdGVtSWQsXHJcbi8vICAgICAgICAvLyAgICAgICAgJ2V2ZW50JzogJ3NlbGVjdF9jb250ZW50J1xyXG4vLyAgICAgICAgLy8gICAgfSk7XHJcbi8vICAgICAgICAvL30pO1xyXG4vLyAgICB9XHJcblxyXG5cclxuLy8gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4vLyAgICAgICAgaWYgKGpRdWVyeShuYW1lc3BhY2UpLmxlbmd0aCA8IDEpIHtcclxuLy8gICAgICAgICAgICByZXR1cm47XHJcbi8vICAgICAgICB9XHJcblxyXG4vLyAgICAgICAgaW5pdEhhbmRsZXJzKCk7XHJcbi8vICAgICAgICByZWZyZXNoQ29tcGFyZUxpc3QoKTtcclxuXHJcbi8vICAgICAgICAvLy0tLS0tIFJlcGxhY2UgdGFibGUgdmlldyB3aXRoIGdyaWQgdmlldyBiZWxvdyA3MDBweFxy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ICAgICAgIHR5cGU6ICdQT1NUJyxcclxuLy8gICAgICAgIC8vICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4vLyAgICAgICAgLy8gICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHtcclxuLy8gICAgICAgIC8vICAgICAgICAgICAgUXVlcnk6ICQoJyNzZWFyY2gtaW5wdXQnKS52YWwoKSB8fCBcIlwiLFxyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBQYWdlOiAxLFxyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBQYWdlU2l6ZTogMTAsXHJcbi8vICAgICAgICAvLyAgICAgICAgICAgIEN1c3RvbWVyTnVtYmVyOiAnMTIzNDUnLFxyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBGYWNldEZpbHRlcnM6IGZhY2V0RmlsdGVycyxcclxuLy8gICAgICAgIC8vICAgICAgICAgICAgU29ydEJ5OiAnJ1xyXG4vLyAgICAgICAgLy8gICAgICAgIH0pLFxyXG4vLyAgICAgICAgLy8gICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXNwb25zZSkge1xyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBjb25zb2xlLmxvZyhcIkFQSSBSZXNwb25zZTpcIiwgcmVzcG9uc2UpO1xyXG4vLyAgICAgICAgLy8gICAgICAgICAgICAkKCcjc2VhcmNoLXJlc3VsdHMtY29udGFpbmVyJykuaHRtbChKU09OLnN0cmluZ2lmeShyZXNwb25zZSkpO1xyXG4vLyAgICAgICAgLy8gICAgICAgIH0sXHJcbi8vICAgICAgICAvLyAgICAgICAgZXJyb3I6IGZ1bmN0aW9uICh4aHIsIHN0YXR1cywgZXJyb3IpIHtcclxuLy8gICAgICAgIC8vICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkFQSSBFcnJvcjpcIiwgeGhyLnJlc3BvbnNlVGV4dCB8fCBlcnJvcik7XHJcbi8vICAgICAgICAvLyAgICAgICAgfVx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gICAgIHJldHVybjtcclxuLy8gICAgICAgIC8vICAgIH1cclxuXHJcbi8vICAgICAgICAvLyAgICBjb25zb2xlLmxvZyhcIvCfmoAgQVBJIGNhbGwgd2l0aCBmaWx0ZXJzOlwiLCBmaWx0ZXJzKTtcclxuXHJcbi8vICAgICAgICAvLyAgICBsZXQgZmlsdGVyT2JqZWN0cyA9IGZpbHRlcnMubWFwKGYgPT4ge1xyXG4vLyAgICAgICAgLy8gICAgICAgIGxldCBbZmllbGQsIHZhbHVlXSA9IGYuc3BsaXQoJzonKTtcclxuLy8gICAgICAgIC8vICAgICAgICBpZiAoIWZpZWxkIHx8ICF2YWx1ZSkge1xyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBjb25zb2xlLndhcm4oYOKaoO+4jyBTa2lwcGluZyBpbnZhbGlkIGZpbHRlcjogJHtmfWApO1xyXG4vLyAgICAgICAgLy8gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuLy8gICAgICAgIC8vICAgICAgICB9XHJcbi8vICAgICAgICAvLyAgICAgICAgcmV0dXJuIHsgRmllbGQ6IGZpZWxkLCBWYWx1ZTogdmFsdWUgfTtcclxuLy8gICAgICAgIC8vICAgIH0pLmZpbHRlcihCb29sZWFuKTsgIC8vIFJlbW92ZSBudWxsIGVudHJpZXNcclxuXHJcbi8vICAgICAgICAvLyAgICBjb25zb2xlLmxvZyhcIvCfk4ogRmlsdGVyIG9iamVjdHMgZm9yIEFQSTpcIiwgZmlsdGVyT2JqZWN0cyk7XHJcblxyXG4vLyAgICAgICAgLy8gICAgJC5hamF4KHtcclxuLy8gICAgICAgIC8vICAgICAgICB1cmw6ICcvU2VhcmNoQXBpL0dldFNlYXJjaFJlc3VsdHMnLFxyXG4vLyAgICAgICAgLy8gICAgICAgIHR5cGU6ICdQT1NUJyxcclxuLy8gICAgICAgIC8vICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4vLyAgICAgICAgLy8gICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHtcclxuLy8gICAgICAgIC8vICAgICAgICAgICAgUXVlcnk6ICQoJyNzZWFyY2gtaW5wdXQnKS52YWwoKSB8fCBcIlwiLFxyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBQYWdlOiAxLFxyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBQYWdlU2l6ZTogMTAsXHJcbi8vICAgICAgICAvLyAgICAgICAgICAgIEN1c3RvbWVyTnVtYmVyOiAnMTIzNDUnLFxyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBGYWNldEZpbHRlcnM6IGZpbHRlck9iamVjdHMsXHJcbi8vICAgICAgICAvLyAgICAgICAgICAgIFNvcnRCeTogJydcclxuLy8gICAgICAgIC8vICAgICAgICB9KSxcclxuLy8gICAgICAgIC8vICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuLy8gICAgICAgIC8vICAgICAgICAgICAgY29uc29sZS5sb2coXCLinIUgQVBJIFJlc3BvbnNlOlwiLCByZXNwb25zZSk7XHJcbi8vICAgICAgICAvLyAgICAgICAgICAgICQoJyNzZWFyY2gtcmVzdWx0cy1jb250YWluZXInKS5odG1sKEpTT04uc3RyaW5naWZ5KHJlc3BvbnNlKSk7XHJcbi8vICAgICAgICAvLyAgICAgICAgfSxcclxuLy8gICAgICAgIC8vICAgICAgICBlcnJvcjogZnVuY3Rpb24gKHhociwgc3RhdHVzLCBlcnJvcikge1xyXG4vLyAgICAgICAgLy8gICAgICAgICAgICBjb25zb2xlLmVycm9yKFwi4p2MIEFQSSBFcnJvcjpcIiwgeGhyLnJlc3BvbnNlVGV4dCB8fCBlcnJvcik7XHJcbi8vICAgICAgICAvLyAgICAgICAgfVxyXG4vLyAgICAgICAgLy8gICAgfSk7XHJcbi8vICAgICAgICAvL31cclxuXHJcbi8vICAgICAgICAvLy8vIE9uIHBhZ2UgbG9hZCwgYXBwbHkgZmlsdGVycyBmcm9tIHRoZSBVUkxcclx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1bHRzKHNlbGVjdGVkRmlsdGVyLCBxdWVyeSkge1xyXG4vLyAgICAgICAgICAgIGNvbnNvbGUubG9nKCfwn5qAIEFQSSBjYWxsIHdpdGggc2VsZWN0ZWQgZmlsdGVyOicsIHNlbGVjdGVkRmlsdGVyKTtcclxuXHJcbi8vICAgICAgICAgICAgbGV0IHJlcXVlc3RCb2R5ID0ge1xyXG4vLyAgICAgICAgICAgICAgICBRdWVyeTogcXVlcnksICAvLyBTZXQgdGhlIGV4dHJhY3RlZCBxdWVyeSBoZXJlXHJcbi8vICAgICAgICAgICAgICAgIFBhZ2U6IDEsXHJcbi8vICAgICAgICAgICAgICAgIFBhZ2VTaXplOiAxMCxcclxuLy8gICAgICAgICAgICAgICAgQ3VzdG9tZXJOdW1iZXI6ICcnLFxyXG4vLyAgICAgICAgICAgICAgICBGYWNldEZpbHRlcnM6IFtzZWxlY3RlZEZpbHRlcl0sXHJcbi8vICAgICAgICAgICAgICAgIFNvcnRCeTogJydcclxuLy8gICAgICAgICAgICB9O1xyXG5cclxuLy8gICAgICAgICAgICBjb25zb2xlLmxvZyhcIvCfk4ogUmVxdWVzdCBib2R5IGZvciBBUEk6XCIsIHJlcXVlc3RCb2R5KTtcclxuXHJcbi8vICAgICAgICAgICAgJC5hamF4KHtcclxuLy8gICAgICAgICAgICAgICAgdXJsOiAnL3NlYXJjaC1yZXN1bHRzL0dldEZpbHRlcmVkUmVzdWx0cycsXHJcbi8vICAgICAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuLy8gICAgICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi9qc29uJyxcclxuLy8gICAgICAgICAgICAgICAgZGF0YTogSlNPTi5zdHJpbmdpZnkocmVxdWVzdEJvZHkpLFxyXG4vLyAgICAgICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuLy8gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwi4pyFIEFQS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gICAgdmFyICRsaW5lVG90YWwgPSAkdHIuZmluZChcIi5saW5lLXRvdGFsXCIpO1xyXG4gICAgICAgIHZhciAkcXVhbnRpdHlUb1NoaXAgPSAkdHIuZmluZChcIi5xdWFudGl0eS10by1zaGlwXCIpO1xyXG4gICAgICAgIHNhdmluZ05vdGlmaWNhdGlvbi5zaG93KCk7XHJcblxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0gd2luZG93LmpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgdXJsOiB1cGRhdGVDYXJ0TGluZUl0ZW1FbmRwb2ludCxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgQWNjb3VudElkOiB3aW5kb3cuY2FydERldGFpbHMuQWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgQ2FydExpbmVJZDogaWQsXHJcbiAgICAgICAgICAgICAgICBRdWFudGl0eU9yZGVyZWQ6IHF1YW50aXR5XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkOyBjaGFyc2V0PVVURi04JyxcclxuICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgaWYgKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIHVwZGF0ZVRvdGFscyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICRsaW5lVG90YWwuaHRtbChkYXRhLkxpbmVUb3RhbClcclxuICAgICAgICAgICAgICAgICRxdWFudGl0eVRvU2hpcC5odG1sKHF1YW50aXR5KTtcclxuICAgICAgICAgICAgICAgIHNhdmluZ05vdGlmaWNhdGlvbi5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5FcnJvck1lc3NhZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoXCJFcnJvciB1cGRhdGluZyBwcm9kdWN0IHF1YW50aXR5XCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIkVycm9yIHVwZGF0aW5nIHByb2R1Y3QgcXVhbnRpdHlcIik7XHJcbiAgICAgICAgICAgIHNhdmluZ05vdGlmaWNhdGlvbi5oaWRlKCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGhhbmRsZVVwZGF0ZUxpbmVJdGVtUHJpY2VDaGFuZ2UoKSB7XHJcblxyXG4gICAgICAgIGlmICh3aW5kb3cuY2FydERldGFpbHMuQ2FuQ2hhbmdlUHJpY2UpIHtcclxuICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuICAgICAgICAgICAgdmFyICR0ciA9ICR0aGlzLmNsb3Nlc3QoXCIuaXRlbS1yb3dcIik7XHJcbiAgICAgICAgICAgIHZhciBzYXZpbmdOb3RpZmljYXRpb24gPSAkdHIuZmluZChcIi5zYXZpbmctcHJpY2Utbm90aWZpY2F0aW9uXCIpO1xyXG4gICAgICAgICAgICB2YXIgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICB2YXIgcHJpY2UgPSAkdGhpcy52YWwoKTtcclxuICAgICAgICAgICAgdmFyICRsaW5lVG90YWwgPSAkdHIuZmluZChcIi5saW5lLXRvdGFsXCIpO1xyXG4gICAgICAgICAgICBzYXZpbmdOb3RpZmljYXRpb24uc2hvdygpO1xyXG5cclxuICAgICAgICAgICAgdmFyIHJlcXVlc3QgPSB3aW5kb3cualF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgIHVybDogdXBkYXRlQ2FydExpbmVJdGVtRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgQWNjb3VudElkOiB3aW5kb3cuY2FydERldGFpbHMuQWNjb3VudElkLFxyXG4gICAgICAgICAgICAgICAgICAgIENhcnRMaW5lSWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgIEFjdHVhbFByaWNlOiBwcmljZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZDsgY2hhcnNldD1VVEYtOCcsXHJcbiAgICAgICAgICAgICAgICB4aHJGaWVsZHM6IHtcclxuICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgIGlmIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlVG90YWxzKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICRsaW5lVG90YWwuaHRtbChkYXRhLkxpbmVUb3RhbClcclxuICAgICAgICAgICAgICAgICAgICBzYXZpbmdOb3RpZmljYXRpb24uaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAg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clxuICAgICAgICAkKCd0YWJsZS5wcm9kdWN0LWxpc3QtZGVza3RvcCB0Ym9keSB0ci5pdGVtLXJvdycsIG5hbWVzcGFjZSkuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIGNvbnN0ICRyb3cgPSAkKHRoaXMpO1xyXG5cclxuICAgICAgICAgICAgY29uc3QgaXRlbSA9IHtcclxuICAgICAgICAgICAgICAgIGNvZGU6ICRyb3cuZmluZCgndGQuaXRlbS1za3UnKS50ZXh0KCkudHJpbSgpLFxyXG4gICAgICAgICAgICAgICAgZGVzY3JpcHRpb246ICRyb3cuZmluZCgnaW5wdXQuaXRlbS1uYW1lJykudmFsKCksXHJcbiAgICAgICAgICAgICAgICB1bml0UHJpY2U6IHBhcnNlRmxvYXQoJHJvdy5maW5kKCdpbnB1dC5pdGVtLXByaWNlJykudmFsKCkpLFxyXG4gICAgICAgICAgICAgICAgcHJpY2VPcmlnaW46ICRyb3cuZmluZCgndGQucHJpY2Utc291cmNlLXZhbHVlJykudGV4dCgpLnRyaW0oKSxcclxuICAgICAgICAgICAgICAgIHF1YW50aXR5OiBwYXJzZUludCgkcm93LmZpbmQoJ2lucHV0Lml0ZW0tcXVhbnRpdHknKS52YWwoKSksXHJcbiAgICAgICAgICAgICAgICBxdWFudGl0eVRvU2hpcDogcGFyc2VJbnQoJHJvdy5maW5kKCd0ZC5xdWFudGl0eS10by1zaGlwJykudGV4dCgpLnRyaW0oKSksXHJcbiAgICAgICAgICAgICAgICB0b3RhbDogcGFyc2VGbG9hdCgkcm93LmZpbmQoJ3RkLmxpbmUtdG90YWwnKS50ZXh0KCkucmVwbGFjZSgvW14wLTkuLV0rL2csIFwiXCIpKVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgaXRlbXMucHVzaChpdGVtKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gaXRlbXM7XHJcbiAgICB9XHJcblxyXG4gICAgdGhpcy5pbml0ID0gZnV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iAgICAgICAgLy8tLS0tLSBUb2dnbGUgc3VidG90YWxzXHJcbiAgICAgICAgalF1ZXJ5KCcuc3VidG90YWwtd3JhcHBlcicsIG5hbWVzcGFjZSkub24oJ2NsaWNrJyxcclxuICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcubWFyZ2luLXdyYXBwZXInLCBuYW1lKS50b2dnbGUoKTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGpRdWVyeSgnLnRyYWNrLWRlbGV0ZScsIG5hbWVzcGFjZSkub24oJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgZGVsZXRlZFNob3BwaW5nQ2FydEl0ZW1zID0gW107XHJcbiAgICAgICAgICAgIHZhciBkZWxldGVkU3ViVG90YWwgPSAwO1xyXG4gICAgICAgICAgICB2YXIgcGFyZW50X2VsZW1lbnQgPSBudWxsO1xyXG4gICAgICAgICAgICAkKCcuY2FydC1kZWxldGU6Y2hlY2tlZCcpLmVhY2goZnVuY3Rpb24gKGkpIHtcclxuICAgICAgICAgICAgICAgIGlmIChqUXVlcnkodGhpcykuaGFzQ2xhc3MoJ21vYmlsZS1kZWxldGUnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudF9lbGVtZW50ID0galF1ZXJ5KHRoaXMpLmNsb3Nlc3QoXCJkaXYucHJvZHVjdC1ib2R5XCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGFyZW50X2VsZW1lbnQgPSBqUXVlcnkodGhpcykuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdmFyIGl0ZW1QcmljZSA9IGpRdWVyeSh0aGlzKS5kYXRhKFwicHJpY2VcIik7XHJcbiAgICAgICAgICAgICAgICB2YXIgaXRlbVF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JcbiAgICAgICAgICAgIHZhciBpdGVtID0gbnVsbDtcclxuICAgICAgICAgICAgaWYgKGNhcnRJdGVtcykge1xyXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjYXJ0SXRlbXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBpdGVtID0gY2FydEl0ZW1zW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGl0ZW0uaXRlbV9saXN0X25hbWUgPSBsaXN0TmFtZTtcclxuICAgICAgICAgICAgICAgICAgICBpdGVtLml0ZW1fbGlzdF9pZCA9ICdsaXN0XycgKyBjYXJ0SXRlbXNbaV0uaXRlbV9saXN0X25hbWU7XHJcbiAgICAgICAgICAgICAgICAgICAgbGlzdEl0ZW1zLnB1c2goaXRlbSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGlicmFyeS50cmFja0dhRXZlbnRUb0RhdGFMYXllcihcImFkZF90b19zaG9wcGluZ19saXN0XCIsIGxpc3RJdGVtcywgdG90YWwsIFwiaXRlbXNfYWRkX3Nob3BwaW5nX2xpc3RcIik7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIG51bWJlciBjaGFuZ2VzXHJcbiAgICAgICAgalF1ZXJ5KCdpbnB1dFt0eXBlPW51bWJlcl0nLCBuYW1lc3BhY2UpLmNoYW5nZShmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICB2YXIgdXBkYXRlRmllbGQgPSBqUXVlcnkodGhpcykuZGF0YSgndXBkYXRlLWZpZWxkJyk7XHJcblxyXG4gICAgICAgICAgICAvLyBpZiB0aGUgdXBkYXRlZCBmaWVsZCBpcyB0aGUgcHJpY2UgZmllbGQsIHRoZW4gd2UgbmVlZCB0byBpbmRpY2F0ZSB0aGF0IHRoZSBwcmljZSBzb3VyY2UgaGFzIGNoYW5nZWRcclxuICAgICAgICA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AgdXJsOiBzYXZlUXVvdGVEZXRhaWxzRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogeyBwdXJjaGFzZU9yZGVyTnVtYmVyLCB1bml0TnVtYmVyIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZDsgY2hhcnNldD1VVEYtOCcsXHJcbiAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy9ub3cgd2FybiBvbiBvdGhlciB1cGRhdGVkIGZpZWxkc1xyXG4gICAgICAgICAgICAgICAgICAgIHdhcm4oY2xpY2tlZCwgaXNRdW90ZUZvcm0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHBvT3JVbml0Q2hhbmdlZCA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIHBvT3JVbml0Q2hhbmdlZE1vYmlsZSA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvL25vIHBvIG9yIHVuaXQgbnVtYmVyIGNoYW5nZXMgLSBqdXN0IHdhcm4gb24gb3RoZXIgdXBkYXRlc1xyXG4gICAgICAgICAgICAgICAgd2FybihjbGlja2VkLCBpc1F1b3RlRm9ybSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdhcm4oY2xpY2tlZCwgaXNRdW90ZUZvcm0pIHtcclxuICAgICAgICAgICAgLy93YXJuIGlmIHVwZGF0ZXMgaGF2ZSBub3QgYmVlbiBzYXZlZCBvciBqdXN0IGV4ZWN1dGUgdGhlIGNoZWNrb3V0IGxpbmsgb3IgcXVvdGUgZm9ybVxyXG4gICAgICAgICAgICBpZiAoaGFzQ2hhbmdlcykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpcm0oJ0FyZSB5b3Ugc3VyZSB5b3Ugd2FudCB0byBjb250aW51ZSB3aXRob3V0IHNhdmluZyB5b3VyIGNoYW5nZXM/JykpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNRdW90ZUZvcm0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZVNhdmVBc1F1b3RlKGNsaWNrZWQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGlja2VkLmNsb3Nlc3QoJ2Zvcm0nKS5zdWJtaXQoKTsgLy9zdWJtaXQgcXVvdGUgY29udmVyc2lvblxyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWYgPSBjbGlja2VkLmF0dHIoJ2hyZWYnKTsgLy9leGVjdXRlIGNoZWNrb3V0IGxpbmtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaXNRdW90ZUZvcm0pIHtcclxuICAgICAgICAgICAgICAgICAgICBkaXNhYmxlU2F2ZUFzUXVvdGUoY2xpY2tlZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgY2xpY2tlZC5jbG9zZXN0KCdmb3JtJykuc3VibWl0KCk7IC8vc3VibWl0IHF1b3RlIGNvbnZlcnNpb25cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICA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AgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyAtLS0tLS0gTGlzdGVuIGZvciBsaXN0IHNhdmVcclxuICAgICAgICAkKFwiI2NyZWF0ZS1saXN0LWZvcm1cIikuc3VibWl0KGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuXHJcbiAgICAgICAgICAgIGNvbnN0IGFjY291bnRJZCA9ICQoXCIjQWNjb3VudElkXCIpLnZhbCgpO1xyXG4gICAgICAgICAgICBjb25zdCBsaXN0TmFtZSA9ICQoXCIjTmFtZVwiKS52YWwoKTtcclxuICAgICAgICAgICAgY29uc3QgZGVzY3JpcHRpb24gPSAkKFwiI0Rlc2NyaXB0aW9uXCIpLnZhbCgpO1xyXG4gICAgICAgICAgICBjb25zdCBjb2RlID0gXCJcIjtcclxuXHJcbiAgICAgICAgICAgIC8vIGNhbGwgc2hvcHBpbmcgbGlzdCBhcGlcclxuICAgICAgICAgICAgU2hvcHBpbmdMaXN0QXBpLmNyZWF0ZVNob3BwaW5nTGlzdChhY2NvdW50SWQsIGxpc3ROYW1lLCBkZXNjcmlwdGlvbiwgY29kZSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChyZXNwb25zZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbiA9IGluZGV4RW5kcG9pbnRcclxuICAgICAgICAgICAgICAgICAgICAgICAgKyAnP21lc3NhZ2U9JyArIHJlc3BvbnNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJyZpc1N1Y2Nlc3M9dHJ1ZSc7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uID0gZm9ybUVuZHBvaW50XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICsgJz9lcnJvcj0nIC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xKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gdXBkYXRlU2VsZWN0aW9uVG90YWxzQW5kQnV0dG9ucygpIHtcclxuICAgICAgICAgICAgdmFyIHN1YlRvdGFsID0gMDtcclxuICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcclxuICAgICAgICAgICAgdmFyIHN1YlRvdGFsQWxsID0gMDtcclxuICAgICAgICAgICAgdmFyIGhhc1VuYXZhaWxhYmxlSXRlbXMgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgIGl0ZW1zLm1hcChmdW5jdGlvbiAoaXRlbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGlzU2VsZWN0ZWQoaXRlbS5JZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICArK2NvdW50O1xyXG4gICAgICAgICAgICAgICAgICAgIHN1YlRvdGFsICs9IGl0ZW0uTGluZVRvdGFsO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoIWl0ZW0uSXNBdmFpbGFibGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaGFzVW5hdmFpbGFibGVJdGVtcyA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgc3ViVG90YWxBbGwgKz0gaXRlbS5MaW5lVG90YWw7IC8vZm9yIGFsbCBpdGVtc1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHdpbmRvdy5qUXVlcnkoXCIjc2VsZWN0ZWRcIiwgbmFtZXNwYWNlKS5odG1sKGNvdW50KTtcclxuICAgICAgICAgICAgd2luZG93LmpRdWVyeShcIiNzdWJ0b3RhbC1zZWxlY3RlZFwiLCBuYW1lc3BhY2UpLmh0bWwobGlicmFyeS5mb3JtYXRVU0Qoc3ViVG90YWwpKTtcclxuICAgICAgICAgICAgJHJlbW92ZUJ1dHRvbnMucHJv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JvZHVjdHMgaW5wdXQuaXRlbS1hdmFpbGFibGVbdHlwZT1jaGVja2JveF1cIiwgbmFtZXNwYWNlKTtcclxuICAgICAgICAgICAgc2VsZWN0ZWQgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIGlmIChjaGVja2VkKSB7XHJcbiAgICAgICAgICAgICAgICBpdGVtcy5tYXAoZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbS5Jc0F2YWlsYWJsZSAhPSBmYWxzZSkgeyAgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkLnB1c2goaXRlbS5JZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICRjaGVja0JveGVzLnByb3AoJ2NoZWNrZWQnLCBjaGVja2VkKTtcclxuICAgICAgICAgICAgdXBkYXRlU2VsZWN0aW9uVG90YWxzQW5kQnV0dG9ucygpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlVXBkYXRlTGluZUl0ZW1RdWFudGl0eUNoYW5nZSgpIHtcclxuICAgICAgICAgICAgdmFyICR0aGlzID0gd2luZG93LmpRdWVyeSh0aGlzKTtcclxuXHJcbiAgICAgICAgICAgIC8vIGdldCB2YXJpYWJsZXNcclxuICAgICAgICAgICAgY29uc3QgYWNjb3VudElkID0gd2luZG93LnNob3BwaW5nTGlzdERldGFpbHMuQWNjb3VudElkO1xyXG4gICAgICAgICAgICBjb25zdCBsaXN0TmFtZSA9IHdpbmRvdy5zaG9wcGluZ0xpc3REZXRhaWxzLk5hbWU7XHJcbiAgICAgICAgICAgIGNvbnN0ICR0ciA9ICR0aGlzLmNsb3Nlc3QoXCJ0clwiKTtcclxuICAgICAgICAgICAgY29uc3QgaWQgPSAkdHIuZGF0YShcImlkXCIpO1xyXG4gICAgICAgICAgICB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cicsIGxpYnJhcnkuZGVib3VuY2UoaGFuZGxlVXBkYXRlTGluZUl0ZW1RdWFudGl0eUNoYW5nZSwgNTAwKSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB1cGRhdGVQcm9kdWN0cyh1cGRhdGVkSXRlbXMpIHtcclxuICAgICAgICAgICAgaXRlbXMgPSB1cGRhdGVkSXRlbXM7XHJcblxyXG4gICAgICAgICAgICB2YXIgJHNob3BwaW5nTGlzdFByb2R1Y3RzID0gd2luZG93LmpRdWVyeShcIiNzaG9wcGluZy1saXN0LXByb2R1Y3RzXCIsIG5hbWVzcGFjZSk7XHJcblxyXG4gICAgICAgICAgICAkc2hvcHBpbmdMaXN0UHJvZHVjdHMuaHRtbChcIlwiKTtcclxuXHJcbiAgICAgICAgICAgIGl0ZW1zLm1hcChmdW5jdGlvbiAoaXRlbSwgaW5kZXgpIHtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9ICcnO1xyXG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0uUmVwbGFjZW1lbnRNZXNzYWdlcyAmJiBpdGVtLlJlcGxhY2VtZW50TWVzc2FnZXMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGl0ZW0uUmVwbGFjZW1lbnRNZXNzYWdlcy5mb3JFYWNoKGZ1bmN0aW9uIChtZXNzYWdlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtZXNzYWdlICYmIG1lc3NhZ2UubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCArPSAnIDxkaXYgY2xhc3M9XCJhbGVydCBhbGVydC13YXJuaW5nIGFsZXJ0LWRpc21pc3NpYmxlIGZhZGUgc2hvd1wiPidcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIG1lc3NhZ2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImNsb3NlXCIgZGF0YS1kaXNtaXNzPVwiYWxlcnRcIiBhcmlhLWxhYmVsPVwiQ2xvc2VcIj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPHNwYW4gYXJpYS1oaWRkZW49XCJ0cnVlXCI+JnRpbWVzOzwvc3Bhbj4nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnPC9idXR0b24+J1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJzwvZGl2Pic7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgQWx0UHJvZHVjdEltYWdlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgIGlmIChpdGVtLklzQXZhaWxhYmxlID09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgQWx0UHJvZHVjdEltYWdlID0gXCJJdGVtIE5PVCBhdmFpbGFibGVcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICRzaG9wcGluZ0xpc3RQcm9kdWN0cy5wcmVwZW5kKCcgXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRyIGRhdGEtaWQ9XCInICsgaXRlbS5JZCArICdcIiBkYXRhLWNvZGU9XCInICsgaXRlbS5TS1UgKyAnXCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgZGF0YS10aXRsZT1cIlNlbGVjdDpcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT1cImNoZWNrYm94XCInICArICgoaXRlbS5Jc0F2YWlsYWJsZSA9PSBmYWxzZSkgPyAnJyA6ICcgY2xhc3M9XCJpdGVtLWF2YWlsYWJsZVwiICcpICsgKGlzU2VsZWN0Z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gKyBpdGVtLkRpc3BsYXlOYW1lICsgJ1wiIGRhdGEtaXRlbS1wcmljZT1cIicgKyBpdGVtLkFjdHVhbFByaWNlICsgJ1wiIGRhdGEtaXRlbS1za3U9XCInICsgaXRlbS5TS1UgKyAnXCI+J1xyXG4gICAgICAgICAgICAgICAgICAgICsgaXRlbS5EaXNwbGF5TmFtZSArICc8L2E+JyArIGh0bWwgKyAnPC90ZD4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBkYXRhLXRpdGxlPVwiUHJpY2U6XCIgY2xhc3M9XCJ0ZXh0LXJpZ2h0XCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4+JyArIGxpYnJhcnkuZm9ybWF0VVNEKGl0ZW0uQWN0dWFsUHJpY2UpICsgJzwvc3Bhbj5cXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD5cXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtdGl0bGU9XCJRdWFudGl0eTpcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT1cIm51bWJlclwiIHJlcXVpcmVkPVwicmVxdWlyZWRcIiBtaW49XCIxXCIgbWF4PVwiMTAwMFwiIHZhbHVlPVwiJyArIGl0ZW0uUXVhbnRpdHkgKyAnXCI+IFxcXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPiBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIGRhdGEtdGl0bGU9XCJUb3RhbDpcIiBjbGFzcz1cInRleHQtcmlnaHRcIj4gXFxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3Ryb25nPicgKyBsaWJyYXJ5LmZvcm1hdFVTRChpdGVtLkxpbmVUb3RhbCkgKyAnPC9zdHJvbmc+ICBcXFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90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B0b3RhbCk7XHJcbiAgICAgICAgICAgICAgICB1cGRhdGVTZWxlY3Rpb25Ub3RhbHNBbmRCdXR0b25zKCk7IC8vbmVlZCB0aGlzIHRvIGxvYWQgc3ViVG90YWxBbGwgdmFyaWFibGUgaW5pdGlhbGx5XHJcblxyXG4gICAgICAgICAgICAgICAgZmlyc3RMb2FkID0gZmFsc2U7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVSZW1vdmVQcm9kdWN0c0Zyb21MaXN0KGUpIHtcclxuICAgICAgICAgICAgaWYgKGUpIHtcclxuICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdmFyIG1lc3NhZ2UgPSBqUXVlcnkoJ2lucHV0W25hbWU9cmVtb3ZlQ29uZmlybWF0aW9uTWVzc2FnZV0nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICBpZiAod2luZG93LmNvbmZpcm0obWVzc2FnZSkpIHtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBnZXQgdmFyaWFibGVzXHJcbiAgICAgICAgICAgICAgICBjb25zdCBhY2NvdW50SWQgPSB3aW5kb3cuc2hvcHBpbmdMaXN0RGV0YWlscy5BY2NvdW50SWQ7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBuYW1lID0gd2luZG93LnNob3BwaW5nTGlzdERldGFpbHMuTmFtZTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVJdGVtSWRzID0gc2VsZWN0ZWQ7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY2FsbCBzaG9wcGluZyBsaXN0IGFwaVxyXG4gICAgICAgICAgICAgICAgU2hvcHBpbmdMaXN0QXBpLnJlbW92ZVByb2R1Y3QoYWNjb3VudElkLCBuYW1lLCBsaW5lSXRlbUlkcyxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSAmJiBkYXRhLkl0ZW1zKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdHJhY2tlZEl0ZW1zID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdG90YWwgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQubWFwKGZ1bmN0aW9uIChsaW5lSXRlbUlkLCBjb3VudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtID0gaXRlbVdpdGhMaW5lSXRlbUlkKGxpbmVJdGVtSWQpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbSAhPT0gdW5kZWZpbmVkICYmIGl0ZW0gIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvZGUgPSBpdGVtLlNLVTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG90YWwgKz0gaXRlbS5BY3R1YWxQcmljZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGdhSXRlbSA9IGxpYnJhcnkuY3JlYXRlR0FJdGVtKGNvZGUsIGl0ZW0ucXVhbnRpdHksIGl0ZW0uQWN0dWFsUHJpY2UsIGl0ZW0uRGlzcGxheU5hbWUsIG51bGwsIG51bGwsIG51bGwsIGNvdW50KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2tlZEl0ZW1zLnB1c2goZ2FJdGVtKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpYnJhcnkudHJhY2tHYUV2ZW50VG9EYXRhTGF5ZXIoXCJyZW1vdmVfZnJvbV9zaG9wcGluZ19saXN0XCIsIHRyYWNrZWRJdGVtcywgdG90YWwsIFwiaXRlbXNfcmVtb3ZlX3Nob3BwaW5nX2xpc3RcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGNoZWNrQWxsSW5wdXRzLnByb3AoJ2NoZWNrZWQnLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVQcm9kdWN0cyhkYXRhLkl0ZW1zKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVNlbGVjdGlvblRvdGFsc0FuZEJ1dHRvbnMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoXCJFcnJvciByZW1vdmluZyBwcm9kdWN0IGZyb20gc2hvcHBpbmcgbGlzdFwiKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaXRlbVdpdGhMaW5lSXRlbUlkKGlkKSB7XHJcbiAgICAgICAgICAgIHZhciBmb3VuZCA9IG51bGw7XHJcblxyXG4gICAgICAgICAgICBpdGVtcy5tYXAoZnVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChpdGVtLklkID09PSBpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kID0gaXRlbTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gZm91bmQ7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiBoYW5kbGVBZGRUb0NhcnRGcm9tTGlzdChlKSB7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuXHJcbiAgICAgICAgICAgIHZhciBidXR0b24gPSAkKHRoaXMpO1xyXG4gICAgICAgICAgICB2YXIgbXNnID0gJy4uLic7XHJcbiAgICAgICAgICAgIHZhciB0cmFja2VkSXRlbXMgPSBbXTtcclxuICAgICAgICAgICAgdmFyIHByb2R1Y3RMaXN0ID0gW107XHJcbiAgICAgICAgICAgIHZhciBwcm9kdWN0ID0gbnVsbDtcclxuICAgICAgICAgICAgdmFyIHRvdGFsID0gMDtcclxuICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcclxuXHJcbiAgICAgICAgICAgIHNlbGVjdGVkLm1hcChmdW5jdGlvbiAobGluZUl0ZW1JZCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGl0ZW0gPSBpdGVtV2l0aExpbmVJdGVtSWQobGluZUl0ZW1JZCk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGl0ZW0gIT09IHVuZGVmaW5lZCAmJiBpdGVtICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvZGUgPSBpdGVtLlNLVTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcXVhbnRpdHkgPSBpdGVtLlF1YW50aXR5O1xyXG4gICAgICAgICAgICAgICAgICAgIHByb2R1Y3QgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIENvZGU6IGNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFF1YW50aXR5OiBxdWFudGl0eVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHRvdGFsICs9IGl0ZW0uQWN0dWFsUHJpY2U7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGdhSXRlbSA9IGxpYnJhcnkuY3JlYXRlR0FJdGVtKGNvZGUsIHF1YW50aXR5LCBpdGVtLkFjdHVhbFByaWNlLCBpdGVtLkRpc3BsYXlOYW1lLCBudWxsLCBudWxsLCBudWxsLCBjb3VudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdHJhY2tlZEl0ZW1zLnB1c2goZ2FJdGVtKTtcclxuICAgICAgICAgICAgICAgICAgICBwcm9kdWN0TGlzdC5wdXNoKHByb2R1Y3QpO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvdW50ICs9IDE7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIkVycm9yIGFkZGluZyBpdGVtIHRvIGNhcnQuXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBjYXJ0LmJ1dHRvbi5mYWRlT3V0KDkwMCwgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaWJyYXJ5LnJlc2V0QWRkVG9DYXJ0QnV0dG9uQ29udGVudChjYXJ0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5zaG93QWRkVG9DYXJ0RmFpbHVyZShjYXJ0KTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICB2YXIgbXNnID0gJyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyArJyArIGNvdW50ICsgJyAmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsnO1xyXG5cclxuICAgICAgICAgICAgLy8gZ2V0IHZhcmlhYmxlc1xyXG4gICAgICAgICAgICBjb25zdCBhY2NvdW50SWQgPSB3aW5kb3cuc2hvcHBpbmdMaXN0RGV0YWlscy5BY2NvdW50SWQ7XHJcblxyXG4gICAgICAgICAgICAvLyB1c2UgYnV0dG9uIGFuaW1hdG9yXHJcbiAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCd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AgICAgICAgICAgIGNvbnN0IG5hbWUgPSB3aW5kb3cuc2hvcHBpbmdMaXN0RGV0YWlscy5OYW1lO1xyXG4gICAgICAgICAgICBjb25zdCBjb2RlID0gJGFkZFByb2R1Y3RDb2RlLnZhbCgpO1xyXG4gICAgICAgICAgICBjb25zdCBxdWFudGl0eSA9ICRhZGRQcm9kdWN0UXVhbnRpdHkudmFsKCk7XHJcbiAgICAgICAgICAgIGNvbnN0IGl0ZW1zID0gW1xyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgcXVhbnRpdHlcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgXVxyXG5cclxuICAgICAgICAgICAgdmFyIGFuaW1hdGlvbiA9IEJ1dHRvbkFuaW1hdG9yLnN0YXJ0QW5pbWF0aW9uKCdBZGRpbmcuLi4nLCBidXR0b24pO1xyXG5cclxuICAgICAgICAgICAgLy8gY2FsbCBzaG9wcGluZyBsaXN0IGFwaVxyXG4gICAgICAgICAgICBTaG9wcGluZ0xpc3RBcGkuYWRkUHJvZHVjdChhY2NvdW50SWQsIG5hbWUsIGl0ZW1zLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSAmJiBkYXRhLlN1Y2Nlc3MgPT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBTaG9wcGluZ0xpc3RBcGkuZ2V0U2hvcHBpbmdMaXN0KGFjY291bnRJZCwgbmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRyYWNrZWRJdGVtcyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNrZWRJdGVtcy5wdXNoKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbV9pZDogY29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IDAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1YW50aXR5OiBxdWFudGl0eVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpYnJhcnkudHJhY2tHYUV2ZW50VG9EYXRhTGF5ZXIoXCJhZGRfdG9fc2hvcHBpbmdfbGlzdFwiLCB0cmFja2VkSXRlbXMsIG51bGwsIFwiaXRlbXNfYWRkX3Nob3BwaW5nX2xpc3RcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlUHJvZHVjdHMoZGF0YS5JdGVtcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlU2VsZWN0aW9uVG90YWxzQW5kQnV0dG9ucygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKFwiVW5hYmxlIHRvIGFkZCBwcm9kdWN0IFwiICsgY29kZSArIFwiIHRvIHNob3BwaW5nIGxpc3QuICBcIiArIGRhdGE/Lk1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciB0aGUgdGV4dCBib3hcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy52YWxpZGF0ZUNoYWR3ZWxsU0tVJywgbmFtZXNwYWNlKS52YWwoJycpLmZvY3VzKCk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRXJyb3IhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShcIlVuYWJsZSB0byBhZGQgcHJvZHVjdCBcIiArIGNvZGUgKyBcIiB0byBzaG9wcGluZyBsaXN0XCIpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiB1cGRhdGVTaG9wcGluZ0xpc3RUYWJsZSgpIHtcclxuICAgICAgICAgICAgJG1haW5XYWl0aW5nLnNob3coKTtcclxuXHJcbiAgICAgICAgICAgIC8vIGdldCB2YXJpYWJsZXNcclxuICAgICAgICAgICAgdmFyIGFjY291bnRJZCA9IHdpbmRvdy5zaG9wcGluZ0xpc3REZXRhaWxzLkFjY291bnRJZDtcclxuICAgICAgICAgICAgdmFyIG5hbWUgPSB3aW5kb3cuc2hvcHBpbmdMaXN0RGV0YWlscy5OYW1lO1xyXG5cclxuICAgICAgICAgICAgLy8gY2FsbCBzaG9wcGluZyBsaXN0IGFwaVxyXG4gICAgICAgICAgICBTaG9wcGluZ0xpc3RBcGkuZ2V0U2hvcHBpbmdMaXN0KGFjY291bnRJZCwgbmFtZSxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChkYXRhKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEgJiYgZGF0YS5JdGVtcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVQcm9kdWN0cyhkYXRhLkl0ZW1zKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgJG1haW5XYWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKFwiRXJyb3IgcmV0cmlldmluZyBzaG9wcGluZyBsaXN0XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICRwcm9kdWN0TGlzdENvbnRhaW5lci5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgJG1haW5XYWl0aW5nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gaGFuZGxlU2F2ZUJ1dHRvbkNsaWNrZWQoZSkge1xyXG4gICAgICAgICAgICBpZiAoZSkge1xyXG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBnZXQgaW5wdXRcclxuICAgICAgICAgICAgdmFyIG5hbWUgPSBqUXVlcnkoJyNzaG9wcGluZy1saXN0LW5hbWUnLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgZGVzY3JpcHRpb24gPSBqUXVlcnkoJyNzaG9wcGluZy1saXN0LWRlc2MnLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgc3VjY2VzcyA9IHRydWU7XHJcblxyXG4gICAgICAgICAgICAvLyB2YWxpZGF0ZSBpbnB1dFxyXG4gICAgICAgICAgICBpZiAoIWxpYnJhcnkuaGFzVmFsdWUobmFtZSkpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLm5hbWUtcmVxdWlyZWQnLCBuYW1lc3BhY2UpLnNob3coKTtcclx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IGpRdWVyeSh0aGlzKS5zaWJsaW5ncygnaW5wdXRbbmFtZT1OYW1lXScpLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgdmFyIGFjY291bnRJZCA9IGpRdWVyeSh0aGlzKS5zaWJsaW5ncygnaW5wdXRbbmFtZT1BY2NvdW50SWRdJykudmFsKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY2FsbCB0aGUgc2hvcHBpbmcgbGlzdCBhcGlcclxuICAgICAgICAgICAgICAgIFNob3BwaW5nTGlzdEFwaS5kZWxldGVTaG9wcGluZ0xpc3QoYWNjb3VudElkLCBsaXN0TmFtZSxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24gPSBpbmRleEVuZHBvaW50XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICc/bWVzc2FnZT0nICsgZGF0YVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBcIiZpc1N1Y2Nlc3M9dHJ1ZVwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uID0gaW5kZXhFbmRwb2ludFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnP21lc3NhZ2U9JyArIGVyci5yZXNwb25zZVRleHRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgXCImaXNTdWNjZXNzPWZhbHNlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH07XHJcbn1cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVuY3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XR1cm4gZGF0YVNvdXJjZS5kYXRhKClcclxuICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAoZikge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGYuSXNTZWxlY3RlZCA9PT0gdHJ1ZTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoZikge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICBpdGVtTnVtYmVyOiBmLkNvZGUsXHJcbiAgICAgICAgICAgICAgICAgICAgaXRlbURlc2NyaXB0aW9uOiBmLkRpc3BsYXlOYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgIHF1YW50aXR5OiBmLlF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgICAgIHNwZWNPcmRDYXRlZ29yeTogZi5TcGVjT3JkQ2F0ZWdvcnksXHJcbiAgICAgICAgICAgICAgICAgICAgbGFzdE9yZGVyOiBmLkxhc3RPcmRlclxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRNb2RhbFNlbGVjdGVkSXRlbXMoKSB7XHJcbiAgICAgICAgdmFyIG1vZGFsRGF0YVNvdXJjZSA9ICQoJyNtb2RhbC10YWJsZScsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLmRhdGEoJ2tlbmRvR3JpZCcpXHJcbiAgICAgICAgICAgIC5kYXRhU291cmNlO1xyXG4gICAgICAgIHJldHVybiBtb2RhbERhdGFTb3VyY2UuZGF0YSgpXHJcbiAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKGYpIHtcclxuICAgICAgICAgICAgICAgIHZhciBsYXN0T3JkZXJEYXRlID0ga2VuZG8udG9TdHJpbmcoZi5sYXN0T3JkZXIsICdNTS9kZC95eXl5Jyk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1OdW1iZXI6IGYuaXRlbU51bWJlcixcclxuICAgICAgICAgICAgICAgICAgICBpdGVtRGVzY3JpcHRpb246IGYuaXRlbURlc2NyaXB0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgIHF1YW50aXR5OiBmLnF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgICAgIHNwZWNPcmRDYXRlZ29yeTogZi5zcGVjT3JkQ2F0ZWdvcnksXHJcbiAgICAgICAgICAgICAgICAgICAgbGFzdE9yZGVyOiBsYXN0T3JkZXJEYXRlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHJlbW92ZVNlbGVjdGlvbnMoKSB7XHJcbiAgICAgICAgdmFyIGl0ZW1zID0gZGF0YVNvdXJjZS5kYXRhKCk7XHJcbiAgICAgICAgaXRlbXMuZm9yRWFjaChmdW5jdGlvbiAoaSkge1xyXG4gICAgICAgICAgICBpLklzU2VsZWN0ZWQgPSBmYWxzZTtcclxuICAgICAgICB9KTtcclxuICAgICAgICAka2VuZG9HcmlkLnJlZnJlc2goKTtcclxuICAgICAgICAka2VuZG9MaXN0LnJlZnJlc2goKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBxdWFudGl0eUVkaXRvcihjb250YWluZXIsIG9wdGlvbnMpIHtcclxuICAgICAgICAkKCc8aW5wdXQgZGF0YS1iaW5kPVwidmFsdWU6JyArIG9wdGlvbnMuZmllbGQgKyAnXCIvPicpXHJcbiAgICAgICAgICAgIC5hcHBlbmRUbyhjb250YWluZXIpXHJcbiAgICAgICAgICAgIC5rZW5kb051bWVyaWNUZXh0Qm94KHtcclxuICAgICAgICAgICAgICAgIGRlY2ltYWxzOiAwLFxyXG4gICAgICAgICAgICAgICAgZm9ybWF0OiBcIm4wXCIsXHJcbiAgICAgICAgICAgICAgICBtaW46IDFcclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgdGhpcy5pbml0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGlmIChqUXVlcnkobmFtZXNwYWNlKS5sZW5ndGggPCAxKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vLS0tLS0gQnVpbGQgS2VuZG8gRGF0YVNvdXJjZSBmb3IgR3JpZCAmIExpc3RWaWV3XHJcbiAgICAgICAgZGF0YVNvdXJjZSA9IG5ldyBrZW5kby5kYXRhLkRhdGFTb3VyY2Uoe1xyXG4gICAgICAgICAgICBkYXRhOiB3aW5kb3cuc3BlY2lhbE9yZGVySGlzdG9yeURldGFpbHMuUHJvZHVjdHMsXHJcbiAgICAgICAgICAgIHNjaGVtYToge1xyXG4gICAgICAgICAgICAgICAgbW9kZWw6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZDogXCJJZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBJZDogeyB0eXBlOiBcInN0cmluZ1wiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ29kZTogeyB0eXBlOiBcInN0cmluZ1wiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgRGlzcGxheU5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEludm9pY2VOdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExhc3RPcmRlcjogeyB0eXBlOiBcImRhdGVcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIE9yZGVyTnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIsIGVkaXRhYmxlOiBmYWxzZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBRdWFudGl0eTogeyB0eXBlOiBcIm51bWJlclwiLCBlZGl0YWJsZTogdHJ1ZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBJc1NlbGVjdGVkOiB7IHR5cGU6IFwiYm9vbGVhblwiLCBlZGl0YWJsZTogdHJ1ZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBTcGVjT3JkQ2F0ZWdvcnk6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IGZhbHNlIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHBhZ2VTaXplOiB3aW5kb3cuc3BlY2lhbE9yZGVySGlzdG9yeURldGFpbHMuR3JpZFNldHRpbmdzLkRlZmF1bHRQYWdlU2l6ZSxcclxuICAgICAgICB9KTtcclxuICAgICAgICAvLy0tLS0tIEluaXQgS2VuZG8gR3JpZCAoRm9yIERlc2t0b3ApXHJcbiAgICAgICAgJGtlbmRvR3JpZCA9IGpRdWVyeSgnI2dyaWQnLCBuYW1lc3BhY2UpLmtlbmRvR3JpZCh7XHJcbiAgICAgICAgICAgIGRhdGFTb3VyY2U6IGRhdGFTb3VyY2UsXHJcbiAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIGVkaXRhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcgJyxcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCI0MHB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiSXNTZWxlY3RlZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiAnPGlucHV0IHR5cGU9XCJjaGVja2JveFwiICM9IElzU2VsZWN0ZWQgPyBcXCdjaGVja2VkPVwiY2hlY2tlZFwiXFwnIDogXCJcIiAjIGNsYXNzPVwiaXRlbS1zZWxlY3RlZFwiIC8+JyxcclxuICAgICAgICAgICAgICAgICAgICBlZGl0YWJsZTogZnVuY3Rpb24gKGUpIHsgcmV0dXJuIGZhbHNlOyB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIlF1YW50aXR5XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiUXR5XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0OiBcInswOm4wfVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGVkaXRvcjogcXVhbnRpdHlFZGl0b3IsXHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiNDVweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkNvZGVcIiwgdGl0bGU6IFwiSXRlbVwiLCB3aWR0aDogXCIxMDBweFwiLCBmaWx0ZXJhYmxlOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkRpc3BsYXlOYW1lXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiRGVzY3JpcHRpb25cIixcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIyNTBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHRydWVcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiTGFzdE9yZGVyXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZm9ybWF0OiBcInswOiBNTS9kZC95eXl5fVwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkxhc3QgT3JkZXJcIixcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCI4NXB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogZmFsc2VcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiT3JkZXJOdW1iZXJcIixcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJPcmRlciBOdW1iZXJcIixcclxuICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxMjVweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcIkludm9pY2VOdW1iZXJcIixcclxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJJbnZvaWNlIE51bWJlclwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjEzNXB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogZmFsc2VcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgc29ydGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgIHBhZ2VhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICBwYWdlU2l6ZXM6IHdpbmRvdy5zcGVjaWFsT3JkZXJIaXN0b3J5RGV0YWlscy5HcmlkU2V0dGluZ3MuUGFnZVNpemVzLFxyXG4gICAgICAgIC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biAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IFwiSWRcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtTnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIsIGVkaXRhYmxlOiBmYWxzZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbURlc2NyaXB0aW9uOiB7IHR5cGU6IFwic3RyaW5nXCIsIGVkaXRhYmxlOiBmYWxzZSB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpdHk6IHsgdHlwZTogXCJudW1iZXJcIiwgZWRpdGFibGU6IHRydWUgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNPcmRDYXRlZ29yeTogeyB0eXBlOiBcInN0cmluZ1wiLCBlZGl0YWJsZTogZmFsc2UgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RPcmRlcjogeyB0eXBlOiBcImRhdGVcIiwgZWRpdGFibGU6IGZhbHNlIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbnM6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJpdGVtTnVtYmVyXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiSXRlbVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjEwMHB4XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwicXVhbnRpdHlcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJRdHlcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQ6IFwiezA6bjB9XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yOiBxdWFudGl0eUVkaXRvcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCI3NXB4XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgbW9kYWwgaGVhZGVyXHJcbiAgICAgICAgICAgICAgICAkKCcubW9kYWwtaGVhZGVyIGgzJywgbmFtZXNwYWNlKS5odG1sKCQodGhpcykuZGF0YSgnZG9jdHlwZScpICsgJyBUaGlzJyk7XHJcblxyXG5cclxuICAgICAgICAgICAgICAgIC8vIGNsZWFyIGRhdGEgaW4gbW9kYWwgXHJcbiAgICAgICAgICAgICAgICAkKCdbZGF0YS1kaXNtaXNzPW1vZGFsXScpLm9uKCdjbGljaycsXHJcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR0ID0gJCh0aGlzKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldCA9ICR0WzBdLmhyZWYgfHwgJHQuZGF0YShcInRhcmdldFwiKSB8fCAkdC5wYXJlbnRzKCcubW9kYWwnKSB8fCBbXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0YXJnZXQpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmluZChcImlucHV0LHRleHRhcmVhLHNlbGVjdFwiKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnZhbCgnJylcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5lbmQoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuXHJcblxyXG4gICAgICAgICAgICAgICAgJCgnI2NvbmZpcm1hdGlvbi1tb2RhbCcpLm9uKCdrZXl1cCBrZXlwcmVzcycsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGtleUNvZGUgPSBlLmtleUNvZGUgfHwgZS53aGljaDtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5Q29kZSA9PT0gMTMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgJCgnI2NvbmZpcm1hdGlvbi1tb2RhbCcsIG5hbWVzcGFjZSkubW9kYWwoJ3Nob3cnKTtcclxuXHJcbiAgICAgICAgICAgICAgICBkb2NfdHlwZSA9ICQodGhpcykuZGF0YSgnZG9jdHlwZScpO1xyXG5cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIC0tLS1cclxuICAgICAgICAkKFwiI3NvLXN1Ym1pdC1mb3JtXCIpLnZhbGlkYXRlKHtcclxuICAgICAgICAgICAgLy9ydWxlczoge1xyXG4gICAgICAgICAgICAvLyAgICBwb051bWJlcjoge1xyXG4gICAgICAgICAgICAvLyAgICAgICAgcmVxdWlyZWQ6IHdpbmRvdy5zcGVjaWFsT3JkZXJIaXN0b3J5RGV0YWlscy5Jc1BvUmVxdWlyZWRcclxuICAgICAgICAgICAgLy8gICAgfVxyXG4gICAgICAgICAgICAvL30sXHJcbiAgICAgICAgICAgIC8vbWVzc2FnZXM6IHtcclxuICAgICAgICAgICAgLy8gICAgcG9OdW1iZXI6IHtcclxuICAgICAgICAgICAgLy8gICAgICAgIHJlcXVpcmVkOiBcIlBPIyBpcyByZXF1aXJlZFwiXHJcbiAgICAgICAgICAgIC8vICAgIH1cclxuICAgICAgICAgICAgLy99LFxyXG4gICAgICAgICAgICBzdWJtaXRIYW5kbGVyOiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gZGlzYWJsZSBidXR0b25cclxuICAgICAgICAgICAgICAgICQoJy5zdWJtaXQnLCBuYW1lc3BhY2UpLmF0dHIoXCJkaXNhYmxlZFwiLCB0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyB0b2dnbGUgbG9hZGluZ1xyXG4gICAgICAgICAgICAgICAgdG9nZ2xlTG9hZGluZyh0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBnZXQgaXRlbXMgJiBpbnB1dHNcclxuICAgICAgICAgICAgICAgIHZhciBtb2RhbEl0ZW1zID0gZ2V0TW9kYWxTZWxlY3RlZEl0ZW1zKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIHBvTnVtYmVyID0gJCgnaW5wdXRbbmFtZT1wb051bWJlcl0nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICAgICAgdmFyIHVuaXROdW1iZXIgPSAkKCdpbnB1dFtuYW1lPXVuaXROdW1iZXJdJywgbmFtZXNwYWNlKS52YWwoKTtcclxuICAgICAgICAgICAgICAgIHZhciBub3RlcyA9ICQoJ3RleHRhcmVhW25hbWU9bm90ZXNdJywgbmFtZXNwYWNlKS52YWwoKTtcclxuXHJcbiAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgICAgICB2YXIgbW9kZWwgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgU2FsZXNfRG9jX1R5cGU6IGRvY190eXBlLFxyXG4gICAgICAgICAgICAgICAgICAgIFBvTnVtYmVyOiBwb051bWJlcixcclxuICAgICAgICAgICAgICAgICAgICBVbml0OiB1bml0TnVtYmVyLFxyXG4gICAgICAgICAgICAgICAgICAgIE5vdGVzOiBub3RlcyxcclxuICAgICAgICAgICAgICAgICAgICBMaW5lSXRlbXM6IG1vZGFsSXRlbXNcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCA9ICQuYWpheCh7XHJcbiAgICAgICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cuc3BlY2lhbE9yZGVySGlzdG9yeURldGFpbHMuU2VuZE9yZGVyUXVvdGVUb1NhbGVzUGFkRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IG1vZGVsLFxyXG4gICAgICAgICAgICAgICAgICAgIHhockZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhID09PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNob3cgc3VjY2VzcyBtZXNzYWdlIFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRTdWNjZXNzTWVzc2FnZSgnLnN1Y2Nlc3MtbWVzc2FnZScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuc3BlY2lhbE9yZGVySGlzdG9yeURldGFpbHMuUmVxdWVzdFN1Y2Nlc3NNZXNzYWdlKTtcclxuXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1bnNlbGVjdCB0aGUgc2VsZWN0ZWQgaXRlbXNcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlU2VsZWN0aW9ucygpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmUtZW5hYmxlIHRoZSBidXR0b25cclxuICAgICAgICAgICAgICAgICAgICAgICAgJCgnLnN1Ym1pdCcsIG5hbWVzcGFjZSkuYXR0cihcImRpc2FibGVkXCIsIGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGRpc2FibGUgbG9hZGluZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsZWFyIHRoZSBtb2RhbCB2YWx1ZXNcclxuICAgICAgICAgICAgICAgICAgICAgICAgJCgnaW5wdXRbbmFtZT1wb051bWJlcl0nLCBuYW1lc3BhY2UpLnZhbCgnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJ2lucHV0W25hbWU9dW5pdE51bWJlcl0nLCBuYW1lc3BhY2UpLnZhbCgnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJ3RleHRhcmVhW25hbWU9bm90ZXNdJywgbmFtZXNwYWNlKS52YWwoJycpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgJCgnI2NvbmZpcm1hdGlvbi1tb2RhbCcsIG5hbWVzcGFjZSkubW9kYWwoJ2hpZGUnKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKCcuZXJyb3ItbWVzc2FnZXMnLCBuYW1lc3BhY2UsIHdpbmRvdy5zcGVjaWFsT3JkZXJIaXN0b3J5RGV0YWlscy5HZW5lcmljRXJyb3JNZXNzYWdlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlLWVuYWJsZSB0aGUgYnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJy5zdWJtaXQnLCBuYW1lc3BhY2UpLmF0dHIoXCJkaXNhYmxlZFwiLCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0b2dnbGUgbG9hZGluZ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKCcuZXJyb3ItbWVzc2FnZXMnLCBuYW1lc3BhY2UsIHdpbmRvdy5zcGVjaWFsT3JkZXJIaXN0b3J5RGV0YWlscy5HZW5lcmljRXJyb3JNZXNzYWdlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gcmUtZW5hYmxlIHRoZSBidXR0b25cclxuICAgICAgICAgICAgICAgICAgICAkKCcuc3VibWl0JywgbmFtZXNwYWNlKS5hdHRyKFwiZGlzYWJsZWRcIiwgZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyB0b2dnbG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RGF0YS50eXBlXHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIGltYWdlc1RvTG9hZENvdW50ZXItLTtcclxuICAgICAgICBpZiAoaW1hZ2VzVG9Mb2FkQ291bnRlciA8PSAwKSB7XHJcbiAgICAgICAgICAgIC8vIHJlZnJlc2ggdGhlIGtlbmRvIGxpc3QgdmlldyB0byB1cGRhdGUgdGhlIEhUTUxcclxuICAgICAgICAgICAgJGtlbmRvTGlzdFZpZXcucmVmcmVzaCgpO1xyXG4gICAgICAgICAgICB0b2dnbGVMb2FkaW5nKGZhbHNlKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gb25EZWxldGVSb3dDbGlja2VkKGUpIHtcclxuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgIHZhciBpZCA9ICQodGhpcykuZGF0YSgnaWQnKTtcclxuICAgICAgICB2YXIgZGF0YUl0ZW0gPSBrZW5kb0RhdGFTb3VyY2UuZ2V0KGlkKTtcclxuICAgICAgICBrZW5kb0RhdGFTb3VyY2UucmVtb3ZlKGRhdGFJdGVtKTtcclxuICAgICAgICBsaW5lc0NvdW50ZXItLTtcclxuICAgICAgICB0b2dnbGVBZGRSb3dEaXNhYmxlZChmYWxzZSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gb25BZGRSb3dDbGlja2VkKGUpIHtcclxuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgaWYgKGxpbmVzQ291bnRlciA8IHdpbmRvdy5tb2RlbC5NYXhMaW5lc1BlclJlcXVlc3QpIHtcclxuICAgICAgICAgICAga2VuZG9EYXRhU291cmNlLmFkZChnZXROZXdSb3dJdGVtKCkpO1xyXG4gICAgICAgICAgICBsaW5lc0NvdW50ZXIrKztcclxuXHJcbiAgICAgICAgICAgIC8vIGRldGVybWluZSBpZiB3ZSBuZWVkIHRvIGRpc2FibGUgdGhlIGFkZCBid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nVuY3Rpb24gKGl0ZW0pIHtcclxuICAgICAgICAgICAgdmFyIGltYWdlRGF0YUFycmF5ID0gaXRlbS5pbWFnZURhdGE7XHJcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBpbWFnZURhdGFBcnJheS5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGltYWdlRGF0YUFycmF5W2ldLmltYWdlSWQgPT09IGltYWdlSWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBpbWFnZURhdGFBcnJheS5zcGxpY2UoaSwgMSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gcmVmcmVzaCB0aGUga2VuZG8gbGlzdCB2aWV3IHRvIHVwZGF0ZSB0aGUgSFRNTFxyXG4gICAgICAgICRrZW5kb0xpc3RWaWV3LnJlZnJlc2goKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRJbWFnZURhdGFIdG1sKGRhdGEpIHtcclxuICAgICAgICB2YXIgaHRtbCA9ICc8dWwgY2xhc3M9XCJpbWFnZXMtbGlzdFwiPic7XHJcbiAgICAgICAgZGF0YS5pbWFnZURhdGEuZm9yRWFjaChmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBodG1sICs9ICc8bGkgY2xhc3M9XCJpbWFnZS1saXN0LWl0ZW1cIj4nXHJcbiAgICAgICAgICAgICAgICArICc8aW1nIHNyYz1cIicgKyBlLmNvbnRlbnQgKyAnXCIgLz4nXHJcbiAgICAgICAgICAgICAgICArICc8c3BhbiBjbGFzcz1cImltYWdlLW5hbWVcIj4nICsgZS5uYW1lICsgXCI8L3NwYW4+XCJcclxuICAgICAgICAgICAgICAgICsgJzxidXR0b24gY2xhc3M9XCJpbWFnZS1kZWxldGUtYnV0dG9uIGstYnV0dG9uIGstYnV0dG9uLWljb24gay1mbGF0IGstdXBsb2FkLWFjdGlvblwiIGRhdGEtaW1hZ2VpZD1cIicgKyBlLmltYWdlSWQgKyAnXCI+PHNwYW4gY2xhc3M9XCJrLWljb24gay1pLWNsb3NlIGstaS14XCIgdGl0bGU9XCJSZW1vdmVcIj48L3NwYW4+PC9idXR0b24+J1xyXG4gICAgICAgICAgICAgICAgKyAnPC9saT4nO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHJldHVybiBodG1sICsgJzwvdWw+JztcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXROZXdSb3dJdGVtKCkge1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIGlkOiBnZW5lcmFsTGlicmFyeS5nZW5lcmF0ZVVVSUR2NCgpLFxyXG4gICAgICAgICAgICBsaW5lTnVtYmVyOiAwLFxyXG4gICAgICAgICAgICBpdGVtTnVtYmVyOiBcIlwiLFxyXG4gICAgICAgICAgICBkZXNjcmlwdGlvbjogXCJcIixcclxuICAgICAgICAgICAgcXVhbnRpdHk6IDEsXHJcbiAgICAgICAgICAgIGltYWdlRGF0YTogW11cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldExpbmVJdGVtcygpIHtcclxuICAgICAgICB2YXIgZ3JpZERhdGEgPSBrZW5kb0RhdGFTb3VyY2UuZGF0YSgpO1xyXG4gICAgICAgIHJldHVybiBncmlkRGF0YS5tYXAoZnVuY3Rpb24gKGYpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IGYubGluZU51bWJlcixcclxuICAgICAgICAgICAgICAgIGl0ZW1OdW1iZXI6IGYuaXRlbU51bWJlcixcclxuICAgICAgICAgICAgICAgIGl0ZW1EZXNjcmlwdGlvbjogZi5kZXNjcmlwdGlvbixcclxuICAgICAgICAgICAgICAgIHF1YW50aXR5OiBmLnF1YW50aXR5LFxyXG4gICAgICAgICAgICAgICAgaW1hZ2VEYXRhOiBmLmltYWdlRGF0YS5tYXAoZnVuY3Rpb24gKGkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBpLmNvbnRlbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGkubmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogaS50eXBlXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHZhbGlkYXRlTGluZXMoKSB7XHJcbiAgICAgICAgalF1ZXJ5KCcuZXJyb3ItbWVzc2FnZXMnLCBuYW1lc3BhY2UpLmh0bWwoJycpO1xyXG4gICAgICAgIHZhciBzdWNjZXNzID0gdHJ1ZTtcclxuICAgICAgICB2YXIgZXJyb3JzID0gW107XHJcbiAgICAgICAgdmFyIGxpbmVzID0gZ2V0TGluZUl0ZW1zKCk7XHJcbiAgICAgICAgaWYgKCFsaW5lcyB8fCBsaW5lcy5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgZXJyb3JzLnB1c2goJ0F0IGxlYXN0IDEgbGluZSBpdGVtIGlzIHJlcXVpcmVkJyk7XHJcbiAgICAgICAgICAgIHN1Y2Nlc3MgPSBmYWxzZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpbmVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IGxpbmVzW2ldO1xyXG4gICAgICAgICAgICAgICAgLy8gdmVyaWZ5IHRoZSBpdGVtIGRlc2NyaXB0aW9uIGxlbmd0aCBcclxuICAgICAgICAgICAgICAgIGlmIChsaW5lLml0ZW1EZXNjcmlwdGlvbi5sZW5ndGggPiA3MCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKCdMaW5lICcgKyBsaW5lLmxpbmVOdW1iZXIgKyAnIHRoZSBpdGVtIGRlc2NyaXB0aW9uIGxlbmd0aCBzaG91bGQgYmUgNzAgY2hhcmFjdGVycyBvciBsZXNzLicpO1xyXG4gICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIC8vIHZlcmlmeSB0aGUgbnVtYmVyIG9mIGltYWdlcyBwZXIgbGluZVxyXG4gICAgICAgICAgICAgICAgaWYgKGxpbmUuaW1hZ2VEYXRhICYmIGxpbmUuaW1hZ2VEYXRhLmxlbmd0aCA+IHdpbmRvdy5tb2RlbC5NYXhJbWFnZXNQZXJMaW5lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goJ0xpbmUgJyArIGxpbmUubGluZU51bWJlciArICcgaGFzIHRvbyBtYW55IGltYWdlcy4gIFBsZWFzZSBsaW1pdCB0aGUgbnVtYmVyIG9mIGltYWdlcyB0byAnICsgd2luZG93Lm1vZGVsLk1heEltYWdlc1BlckxpbmUgKyAnIHBlciBsaW5lLicpO1xyXG4gICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3MgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIC8vIHZlcmlmeSBhdCBsZWFzdCBpdGVtIG51bWJlciBvciBkZXNjcmlwdGlvbiBpcyBwb3B1bGF0ZWRcclxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGxpbmUuaXRlbURlc2NyaXB0aW9uID09PSBudWxsIHx8IGxpbmUuaXRlbURlc2NyaXB0aW9uID09PSB1bmRlZmluZWQgfHwgbGluZS5pdGVtRGVzY3JpcHRpb24gPT09ICcnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goJ0xpbmUgJyArIGxpbmUubGluZU51bWJlciArICdQbGVhc2UgZW50ZXIgYW4gaXRlbSBkZXNjcmlwdGlvbi4nKTtcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gdmVyaWZ5IHF1YW50aXR5XHJcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChsaW5lLnF1YW50aXR5IDw9IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJvcnMucHVzaCgnTGluZSAnICsgbGluZS5saW5lTnVtYmVyICsgJyBoYXMgYW4gaW52YWxpZCBxdWFudGl0eS4gIFBsZWFzZSBlbnRlciBhIHF1YW50aXR5IG9mIDEgb3IgbW9yZS4nKTtcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChlcnJvcnMgJiYgZXJyb3JzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlcnJvcnMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGdlbmVyYWxMaWJyYXJ5LmFkZEVycm9yTWVzc2FnZSgnLmVycm9yLW1lc3NhZ2VzJywgbmFtZXNwYWNlLCBlcnJvcnNbaV0pO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gc3VjY2VzcztcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiB0b2dnbGVBZGRSb3dEaXNhYmxlZChpc0Rpc2FibGVkKSB7XHJcbiAgICAgICAgalF1ZXJ5KCcuay1hZGQtaXRlbScsIG5hbWVzcGFjZSkucHJvcCgnZGlzYWJsZWQnLCBpc0Rpc2FibGVkKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiByZWZyZXNoTGluZU51bWJlc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NlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVOdW1iZXI6IHsgdHlwZTogXCJudW1iZXJcIiwgZWRpdGFibGU6IGZhbHNlIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1OdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IHRydWUgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb246IHsgdHlwZTogXCJzdHJpbmdcIiwgZWRpdGFibGU6IHRydWUgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcXVhbnRpdHk6IHsgdHlwZTogXCJudW1iZXJcIiwgZWRpdGFibGU6IHRydWUgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgY2hhbmdlOiByZWZyZXNoTGluZU51bWJlcnNcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gLS0tLS0gSW5pdGlhbGl6ZSBLZW5kbyBHcmlkIChEZXNrdG9wIFZpZXcpXHJcbiAgICAgICAgJGtlbmRvR3JpZCA9IGpRdWVyeSgnI2tlbmRvLWdyaWQnLCBuYW1lc3BhY2UpXHJcbiAgICAgICAgICAgIC5rZW5kb0dyaWQoe1xyXG4gICAgICAgICAgICAgICAgZGF0YVNvdXJjZToga2VuZG9EYXRhU291cmNlLFxyXG4gICAgICAgICAgICAgICAgY29sdW1uczogW1xyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwibGluZU51bWJlclwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCIjXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjM1cHhcIlxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJpdGVtTnVtYmVyXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkl0ZW0jXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjE1MHB4XCJcclxuICAgICAgICAgICAgICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcImRlc2NyaXB0aW9uXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIkRlc2NyaXB0aW9uXCJcclxuICAgICAgICAgICAgICAgICAgICB9LCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcInF1YW50aXR5XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIlF0eVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxNTBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXQ6ICd7MDpuMH0nXHJcbiAgICAgICAgICAgICAgICAgICAgfSwge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ1JlZmVyZW5jZSBJbWFnZShzKScsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBnZXRJbWFnZURhdGFIdG1sXHJcbiAgICAgICAgICAgICAgICAgICAgfSwge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCImbmJzcDtcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGtlbmRvLnRlbXBsYXRlKCQoJyNjb21tYW5kLXRlbXBsYXRlJywgbmFtZXNwYWNlKS5odG1sKCkpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIyNTBweFwiXHJcbiAgICAgICAgICAgICAgICAgICAgfV0sXHJcbiAgICAgICAgICAgICAgICBlZGl0YWJsZTogdHJ1ZVxyXG4gICAgICAgICAgICB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ICAgICAgICAgdmFyIGludmFsaWRGaWxlcyA9IFtdO1xyXG4gICAgICAgICAgICB2YXIgb2Zmc2V0ID0gMDtcclxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmZpbGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgZmlsZSA9IHRoaXMuZmlsZXNbaV07XHJcbiAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgIGlmICghZ2VuZXJhbExpYnJhcnkudmFsaWRGaWxlVHlwZShmaWxlLm5hbWUsIG1vZGVsLlVwbG9hZEZpbGVUeXBlc0ZvclJlZ2V4KSkge1xyXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCsrO1xyXG4gICAgICAgICAgICAgICAgICAgIGludmFsaWRGaWxlcy5wdXNoKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZTogZmlsZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogJ0ZpbGUgPHN0cm9uZz4nICsgZmlsZS5uYW1lICsgJyBpcyBub3QgYSBzdXBwb3J0ZWQgZmlsZS4gIFBsZWFzZSBvbmx5IHVwbG9vYWQgZmlsZXMgdGhhdCBhcmUgb24gb2YgdGhlIGZvbGxvd2luZzogJyArIG1vZGVsLlVwbG9hZEZpbGVUeXBlc0ZvclJlZ2V4ICsgJzwvc3Ryb25nPidcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZmlsZS5zaXplID4gd2luZG93Lm1vZGVsLk1heEZpbGVzU2l6ZUluQnl0ZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICBvZmZzZXQrKztcclxuICAgICAgICAgICAgICAgICAgICBpbnZhbGlkRmlsZXMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGU6IGZpbGUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdGaWxlIDxzdHJvbmc+JyArIGZpbGUubmFtZSArICc8L3N0cm9uZz4gZXhjZWVkcyB0aGUgbWF4aW11bSBzdXBwb3J0ZWQgc2l6ZSBvZiA8c3Ryb25nPicgKyBzaXplTGltaXQgKyAnPC9zdHJvbmc+J1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgdGhlIHVzZXIgaGFzIG5vdCBhbHJlYWR5IGFkZGVkIHRoZSBtYXhpbXVtIGFtb3VudCBvZiBpbWFnZXMgdG8gdGhlIGxpbmVcclxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKChpICsgMSAtIG9mZnNldCkgPiBpbWFnZVNwYWNlc1JlbWFpbmluZykge1xyXG4gICAgICAgICAgICAgICAgICAgIGludmFsaWRGaWxlcy5wdXNoKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZTogZmlsZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogJ0ZpbGUgPHN0cm9uZz4nICsgZmlsZS5uYW1lICsgJzwvc3Ryb25nPiBjb3VsZCBub3QgYmUgbG9hZGVkIGJlY2F1c2UgeW91IGhhdmUgcmVhY2hlZCB0aGUgbWF4aW11bSBudW1iZXIgb2YgaW1hZ2VzIHBlciBsaW5lLiAnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArICcoPHN0cm9uZz4nICsgd2luZG93Lm1vZGVsLk1heEltYWdlc1BlckxpbmUgKyAnPC9zdHJvbmc+IGltYWdlcyBwZXIgbGluZSknXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAvLyBwcm9jZWVkIHRvIGxvYWQgdGhlIGltYWdlXHJcbiAgICAgICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBzaG93IGxvYWRpbmdcclxuICAgICAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlc1RvTG9hZENvdW50ZXIrKztcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlYWRlciA9IG5ldyBGaWxlUmVhZGVyKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZGVyLm9ubG9hZGVuZCA9IChmdW5jdGlvbiAoZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHByZXBhcmUgaW1hZ2UgJiBvbmxvYWQgZnVuY3Rpb25cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpbWFnZSA9IG5ldyBJbWFnZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2Uub25sb2FkID0gKGZ1bmN0aW9uIChpbWFnZSwgZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBmaW5hbGx5IGNhbGwgb25JbWFnZUxvYWQgYW5kIHBhc3MgaW4gdGhlIGV2ZW50IGRldGFpbHMsIGltYWdlLCBhbmQgZmlsZSBkYXRhXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uSW1hZ2VMb2FkKGUsIGltYWdlLCBmaWxlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KShpbWFnZSwgZmlsZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgdGhlIGltYWdlIHNvdXJjZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2Uuc3JjID0gZS50YXJnZXQucmVzdWx0O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSkoZmlsZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZGVyLnJlYWRBc0RhdGFVUkwoZmlsZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICAvLyBzaG93IGVycm9ycyBmb3IgaW52YWxpZCBmaWxlc1xyXG4gICAgICAgICAgICBpZiAoaW52YWxpZEZpbGVzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgaW52YWxpZEZpbGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGJhZEZpbGUgPSBpbnZhbGlkRmlsZXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKCcuZXJyb3ItbWVzc2FnZXMnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhZEZpbGUubWVzc2FnZSk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBjbGVhciBmaWxlIGlucHV0XHJcbiAgICAgICAgICAgICQoXCI6ZmlsZVwiLCBuYW1lc3BhY2UpLnZhbCgnJyk7XHJcblxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyAtLS0tLSBIYW5kbGUgSW1hZ2UgRGVsZXRlIEJ1dHRvbiBFdmVudFxyXG4gICAgICAgICQoZG9jdW1lbnQpLm9uKCdjbGljaycsICcuaW1hZ2UtZGVsZXRlLWJ1dHRvbicsIG9uUmVtb3ZlSW1hZ2VDbGlja2VkKTtcclxuXHJcbiAgICAgICAgLy8gLS0tLS0gSGFuZGxlIFN1Ym1pdCBCdXR0b24gQ2xpY2tlZFxyXG4gICAgICAgIGpRdWVyeShcIiNzcGVjaWFsX2Zvcm1cIikudmFsaWRhdGUoe1xyXG4gICAgICAgICAgICBydWxlczoge1xyXG4gICAgICAgICAgICAgICAgc29UeXBlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6IHRydWVcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgbWVzc2FnZXM6IHtcclxuICAgICAgICAgICAgICAgIHNvVHlwZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB3aW5kb3cubW9kZWwuQ2F0ZWdvcnlSZXF1aXJlZEVycm9yTWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzdWJtaXRIYW5kbGVyOiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gZGlzYWJsZSBidXR0b25cclxuICAgICAgICAgICAgICAgICQoJyNzdWJtaXRCdG4nLCBuYW1lc3BhY2UpLmF0dHIoXCJkaXNhYmxlZFwiLCB0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoJy5zdWNjZXNzLW1lc3NhZ2UnLCBuYW1lc3BhY2UpLmh0bWwoJycpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGhpZGUgc3VjY2VzcyBESVYgaW4gY2FzZSB0aGV5IGhhdmUgYWxyZWFkeSBtYWRlIGEgcHJldmlvdXMgcmVxdWVzdFxyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcuc3VjY2Vzcy1tZXNzYWdlJywgbmFtZXNwYWNlKS5odG1sKCcnKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIXZhbGlkYXRlTGluZXMoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICQoJyNzdWJtaXRCdG4nLCBuYW1lc3BhY2UpLmF0dHIoXCJkaXNhYmxlZFwiLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIHRvZ2dsZSBsb2FkaW5nXHJcbiAgICAgICAgICAgICAgICB0b2dnbGVMb2FkaW5nKHRydWUpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGdldCBkYXRhXHJcbiAgICAgICAgICAgICAgICB2YXIgbW9kZWwgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgU2FsZXNfRG9jX1R5cGU6ICQoU0FMRVNfRE9DX1RZUEVfUVVFUlkpLnZhbCgpLFxyXG4gICAgICAgICAgICAgICAgICAgIFBvTnVtYmVyOiAkKCdpbnB1dFtuYW1lPVBvTnVtYmVyXScsIG5hbWVzcGFjZSkudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgVW5pdDogJCgnaW5wdXRbbmFtZT1Vbml0XScsIG5hbWVzcGFjZSkudmFsKCksXHJcbiAgICAgICAgICAgICAgICAgICAgU29UeXBlOiAkKCcjc29UeXBlJykuZmluZChcIjpzZWxlY3RlZFwiKS50ZXh0KCksXHJcbiAgICAgICAgICAgICAgICAgICAgTm90ZXM6ICQoJ3RleHRhcmVhW25hbWU9Tm90ZXNdJywgbmFtZXNwYWNlKS52YWwoKSxcclxuICAgICAgICAgICAgICAgICAgICBMaW5lMTogYWRkcmVzcy5MaW5lMSxcclxuICAgICAgICAgICAgICAgICAgICBMaW5lMjogYWRkcmVzcy5MaW5lMixcclxuICAgICAgICAgICAgICAgICAgICBDaXR5OiBhZGRyZXNzLkNpdHksXHJcbiAgICAgICAgICAgICAgICAgICAgU3RhdGU6IGFkZHJlc3MuU3RhdGUsXHJcbiAgICAgICAgICAgICAgICAgICAgUG9zdGFsQ29kZTogYWRkcmVzcy5Qb3N0YWxDb2RlLFxyXG4gICAgICAgICAgICAgICAgICAgIERheXRpbWVQaG9uZU51bWJlcjogYWRkcmVzcy5EYXl0aW1lUGhvbmVOdW1iZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgRW1haWw6IGFkZHJlc3MuRW1haWwsXHJcbiAgICAgICAgICAgICAgICAgICAgbGluZUl0ZW1zOiBnZXRMaW5lSXRlbXMoKVxyXG4gICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBjcmVhdGUgdGhlIHJlcXVlc3RcclxuICAgICAgICAgICAgICAgIHZhciByZXF1ZXN0ID0gJC5hamF4KHtcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHdpbmRvdy5tb2RlbC5DcmVhdGVTcGVjaWFsT3JkZXJFbmRwb2ludCxcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogbW9kZWwsXHJcbiAgICAgICAgICAgICAgICAgICAgeGhyRmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBzdWNjZXNzXHJcbiAgICAgICAgICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5DcmVhdGVTYWxlc0RvY3VtZW50U3VjY2VzcyA9PT0gdHJ1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3VjY2Vzc01lc3NhZ2UgPSAkKFNBTEVTX0RPQ19UWVBFX1FVRVJZKS52YWwoKSA9PSBTQUxFU19ET0NfVFlQRV9RVU9URVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB3aW5kb3cubW9kZWwuUmVxdWVzdFN1Y2Nlc3NRdW90ZU1lc3NhZ2UgOiB3aW5kb3cubW9kZWwuUmVxdWVzdFN1Y2Nlc3NNZXNzYWdlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzaG93IHN1Y2Nlc3MgbWVzc2FnZSBcclxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkU3VjY2Vzc01lc3NhZ2UoJy5zdWNjZXNzLW1lc3NhZ2UnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc01lc3NhZ2UpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmUtZW5hYmxlZCBzdWJtaXQgYnV0dG9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJyNzdWJtaXRCdG4nLCBuYW1lc3BhY2UpLmF0dHIoXCJkaXNhYmxlZFwiLCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjbGVhciB0aGUgZm9ybVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhckZvcm0oKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRvZ2dsZSBsb2FkaW5nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvZ2dsZUxvYWRpbmcoZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoJy5lcnJvci1tZXNzYWdlcycsIG5hbWVzcGFjZSwgd2luZG93Lm1vZGVsLkdlbmVyaWNFcnJvck1lc3NhZ2UpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgJCgnI3N1Ym1pdEJ0bicsIG5hbWVzcGFjZSkuYXR0cihcImRpc2FibGVkXCIsIGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRvZ2dsZSBsb2FkaW5nXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvZ2dsZUxvYWRpbmcoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBlcnJvclxyXG4gICAgICAgICAgICAgICAgcmVxdWVzdC5mYWlsKGZ1bmN0aW9uIChlcnJvcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYWxMaWJyYXJ5LmFkZEVycm9yTWVzc2FnZSgnLmVycm9yLW1lc3NhZ2VzJywgbmFtZXNwYWNlLCB3aW5kb3cubW9kZWwuR2VuZXJpY0Vycm9yTWVzc2FnZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbG9nTGlicmFyeS5sb2dFcnJvclRvU2VydmVyKCcwJywgJ1NwZWNpYWxPcmRlckZvcm1FcnJvcicsIEpTT04uc3RyaW5naWZ5KGVycm9yKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICQoJyNzdWJtaXRCdG4nLCBuYW1lc3BhY2UpLmF0dHIoXCJkaXNhYmxlZFwiLCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIHRvZ2dsZSBsb2FkaW5nXHJcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlTG9hZGluZyhmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgIH07XHJcbn1cclxuXHJcbi8vLS0tLS0gV2hlbiBwYWdlIGxvYWRzXHJcbmpRdWVyeShkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24gKCkge1xyXG4gICAgbmV3IENvbXBvbmVudCgpLmluaXQoKTtcclxufSk7IiwiXHJcbmZ1bmN0aW9uIENvbXBvbmVudCgpXHJcbntcclxuICAgIHZ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Zvcm0nKVxyXG4gICAgICAgICAgICAkZm9ybS52YWxpZGF0ZSgpO1xyXG4gICAgICAgICAgICBpZiAoJGZvcm0udmFsaWQoKSkge1xyXG4gICAgICAgICAgICAgICAgY3VycmVudF9mcyA9ICQodGhpcykucGFyZW50KCkucGFyZW50KCk7XHJcbiAgICAgICAgICAgICAgICBuZXh0X2ZzID0gJCh0aGlzKS5wYXJlbnQoKS5wYXJlbnQoKS5uZXh0KCk7XHJcbiAgICAgICAgICAgICAgICBTaG93U3RlcChjdXJyZW50X2ZzLCBuZXh0X2ZzKTtcclxuICAgICAgICAgICAgICAgIC8vc2Nyb2xsIHRvIHRvcCBvZiBmb3JtXHJcblxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgc2Nyb2xsVG9BbmNob3IoV0laQVJEX1RPUF9BTkNIT1JfTkFNRSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgalF1ZXJ5KE5BTUVTUEFDRSkub24oJ2NsaWNrJywgJyNuZXh0LXBhY2thZ2UnLCBmdW5jdGlvbiAoZSkge1xyXG5cclxuICAgICAgICAgICAgLy9lbnN1cmUgYSBwYWNrYWdlIHdhcyBzZWxlY3RlZC5cclxuICAgICAgICAgICAgaWYgKCQoUEFDS0FHRV9TRUxFQ1RPUiArICc6Y2hlY2tlZCcpLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAkKFBBQ0tBR0VfRVJST1JfU0VMRUNUT1IpLnNob3coKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgICQoUEFDS0FHRV9FUlJPUl9TRUxFQ1RPUikuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgdmFyIGJvb3RoVHlwZSA9IEdld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BVkFJTEJMRV9CT09USF9TRUxFQ1RPUikucmVtb3ZlQ2xhc3MoQVZBSUxCTEVfQk9PVEhfQ0xBU1MpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkKFNNQUxMX0JPT1RIX1NFTEVDVE9SICsgVU5BVkFJTEJMRV9CT09USF9TRUxFQ1RPUikuYWRkQ2xhc3MoQVZBSUxCTEVfQk9PVEhfQ0xBU1MpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkKFNNQUxMX0JPT1RIX1NFTEVDVE9SICsgVU5BVkFJTEJMRV9CT09USF9TRUxFQ1RPUikucmVtb3ZlQ2xhc3MoVU5BVkFJTEJMRV9CT09USF9DTEFTUyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEdvVG9OZXh0U3RlcCgkKHRoaXMpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBOT19CT09USDpcclxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBBZGRUb0NhcnQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy9HbyB0byBjb25maXJtIHN0ZXBcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudF9mcyA9ICQodGhpcykucGFyZW50KCkucGFyZW50KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHRfZnMgPSAkKHRoaXMpLnBhcmVudCgpLnBhcmVudCgpLm5leHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgU2hvd1N0ZXAoY3VycmVudF9mcywgbmV4dF9mcy5uZXh0KCkpOy8vbW92ZSBhaGVhZCAyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIGpRdWVyeShOQU1FU1BBQ0UpLm9uKCdibHVyJywgJy5vcHRpb24tcXVhbnRpdHknLCBmdW5jdGlvbiAoZSkge1xyXG5cclxuICAgICAgICAgICAgdmFyIHF1YW50aXR5ID0gTnVtYmVyKCQodGhpcykudmFsKCkpO1xyXG4gICAgICAgICAgICB2YXIgbWF4ID0gTnVtYmVyKCQodGhpcykuYXR0cignbWF4JykpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHF1YW50aXR5IDwgMSB8fCBxdWFudGl0eSA+IG1heCkgeyAvL3Jlc2V0IHRvIDEuXHJcbiAgICAgICAgICAgICAgICAkKHRoaXMpLnZhbCgxKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBqUXVlcnkoTkFNRVNQQUNFKS5vbignY2xpY2snLCAnI25leHQtYm9vdGgnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBpZiAoJChIRE5fU0VMQ1RFRF9CT09USF9DT0RFX1FVRVJZKS52YWwoKSkge1xyXG4gICAgICAgICAgICAgICAgQWRkVG9DYXJ0KCk7XHJcbiAgICAgICAgICAgICAgICBHb1RvTmV4dFN0ZXAoJCh0aGlzKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkKEJPT1RIX0VSUk9SX1NFTEVDVE9SKS5zaG93KCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy9wcmV2aW91cyBidXR0b25zXHJcbiAgICAgICAgalF1ZXJ5KE5BTUVTUEFDRSkub24oJ2NsaWNrJywgXCIucHJldmlvdXNcIiwgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgR29Ub1ByZXZpb3VzKCQodGhpcykpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIGpRdWVyeShOQU1FU1BBQ0UpLm9uKCdjbGljaycsICcjcHJldmlvdXMtYm9vdGgnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBDbGVhclNlbGV0ZWRCb290aCgpO1xyXG4gICAgICAgICAgICBHb1RvUHJldmlvdXMoJCh0aGlzKSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgalF1ZXJ5KE5BTUVTUEFDRSkub24oJ2NsaWNrJywgXCIjcHJldmlvdXMtY29uZmlybVwiLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICB2YXIgYm9vdGhUeXBlID0gR2V0U2VsZWN0ZWRCb290aFR5cGUoKTtcclxuICAgICAgICAgICAgaWYgKGJvb3RoVHlwZSAmJiBib290aFR5cGUgIT09IE5PX0JPT1RIKSB7XHJcbiAgICAgICAgICAgICAgICBHb1RvUHJldmlvdXMoJCh0aGlzKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7IC8vZ28gYmFjayB0d28gc3RlcHMgLy9UT0RPOiBGSVhcclxuXHJcbiAgICAgICAgICAgICAgICBHb1RvUHJldmlvdXMoJCh0aGlzKSk7XHJcbiAgICAgICAgICAgICAgICBHb1RvUHJldmlvdXMoJCgnI3ByZXZpb3VzLWJvb3RoJykpO1xyXG5cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIE9uIENyZWF0ZSBUcmFuc2FjdGlvbiBNb2RhbCBTaG93blxyXG4gICAgICAgICQoJyNjcmVhdGUtdHJhbnNhY3Rpb24tbW9kYWwnKS5vbignc2hvdy5icy5tb2RhbCcsXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBnZXQgdG90YWxzXHJcbiAgICAgICAgICAgICAgICB2YXIgdG90YWwgPSAkKCcjY29uZmlybS10b3RhbCcpLnRleHQoKTtcclxuICAgICAgICAgICAgICAgIC8vIHNldCBtb2RhbCB2YWx1ZXNcclxuICAgICAgICAgICAgICAgICQoJyNjcmVhdGUtdHJhbnNhY3Rpb24t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FX1FVRVJZKS52YWwoJycpO1xyXG4gICAgfVxyXG4gICAgZnVuY3Rpb24gQWRkVG9DYXJ0KCkge1xyXG4gICAgICAgIFNob3dTcGlubmVyKCk7XHJcbiAgICAgICAgdmFyIGFkZFRvQ2FydEVuZHBvaW50ID0gJCgnI2FkZC10by1jYXJ0LWVuZHBvaW50JykudmFsKCk7XHJcbiAgICAgICAgdmFyIHBheW1lbnRCdXR0b24gPSAkKCcjcGF5bWVudC1zdWJtaXQnKTtcclxuICAgICAgICBwYXltZW50QnV0dG9uLmhpZGUoKTtcclxuICAgICAgICB2YXIgZm9ybURhdGEgPSBHZXRGb3JtRGF0YSgpO1xyXG4gICAgICAgIC8vIHBvc3QgdG8gY29udHJvbGxlclxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcclxuICAgICAgICAgICAgdXJsOiBhZGRUb0NhcnRFbmRwb2ludCxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgUGFja2FnZUNvZGU6IGZvcm1EYXRhLnBhY2thZ2VDb2RlLFxyXG4gICAgICAgICAgICAgICAgU2VsZWN0ZWRCb290aENvZGU6IGZvcm1EYXRhLnNlbGVjdGVkQm9vdGhDb2RlLFxyXG4gICAgICAgICAgICAgICAgQm9vdGhEaXNwbGF5TmFtZTogZm9ybURhdGEuYm9vdGhOYW1lLFxyXG4gICAgICAgICAgICAgICAgT3B0aW9uczogZm9ybURhdGEub3B0aW9uRGF0YVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB4aHJGaWVsZHM6XHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICBpZiAoZGF0YS5zdWNjZXNzKSB7XHJcbiAgICAgICAgICAgICAgICBQb3B1bGF0ZUNvbmZpcm0oZGF0YS50b3RhbClcclxuICAgICAgICAgICAgICAgIHBheW1lbnRCdXR0b24uc2hvdygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKEdFTkVSSUNfRVJST1JfTUVTU0FHRSk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuZXJyb3JNZXNzYWdlcykge1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuZXJyb3JNZXNzYWdlcy5mb3JFYWNoKGZ1bmN0aW9uIChpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZEVycm9yTWVzc2FnZShpKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNjcm9sbFRvQW5jaG9yKFdJWkFSRF9UT1BfQU5DSE9SX05BTUUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIEhpZGVTcGlubmVyKCk7XHJcblxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXF1ZXN0LmZhaWwoZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAvLyBoaWRlIHRoZSB0cmFuc2FjdGlvbiBtb2RhbFxyXG4gICAgICAgICAgICBIaWRlU3Bpbm5lcigpO1xyXG4gICAgICAgICAgICBwYXltZW50QnV0dG9uLmhpZGUoKTtcclxuICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKEdFTkVSSUNfRVJST1JfTUVTU0FHRSk7XHJcbiAgICAgICAgICAgIHNjcm9sbFRvQW5jaG9yKFdJWkFSRF9UT1BfQU5DSE9SX05BTUUpO1xyXG5cclxuICAgICAgICAgICAgLy8gbG9nIGVycm9yIHRvIHRoZSBzZXJ2ZXJcclxuICAgICAgICAgICAgbG9nTGlicmFyeS5sb2dFcnJvclRvU2VydmVyKGVyci5zdGF0dXMsIGVyci5yZXNwb25zZVRleHQsIGVycm9yTm90ZVByZWZpeCArICdjb21wbGV0ZVJlZ2lzdHJhdGlvbicpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG4gICAgZnVuY3Rpb24gUG9wdWxhdGVDb25maXJtKHRvdGFsKSB7XHJcbiAgICAgICAgdmFyIGZvcm1EYXRhID0gR2V0Rm9ybURhdGEoKTtcclxuICAgICAgICAkKCcjY29uZmlybS10b3RhbCcpLnRleHQodG90YWwpO1xyXG4gICAgICAgICQoJyNjb25maXJtLWF0dGVuZGVlcycpLnRleHQoZm9ybURhdGEuYXR0ZW5kZWVzKTtcclxuICAgICAgICAkKCcjY29uZmlybS1jb250YWN0JykudGV4dChmb3JtRGF0YS5jb250YWN0KTtcclxuICAgICAgICAkKCcjY29uZmlybS1jb250YWN0LWVtYWlsJykudGV4dChmb3JtRGF0YS5jb250YWN0RW1haWwpO1xyXG4gICAgICAgICQoJyNjb25maXJtLWNvbnRhY3QtcGhvbmUnKS50ZXh0KGZvcm1EYXRhLmNvbnRhY3RQaG9uZSk7XHJcbiAgICAgICAgJCgnI2NvbmZpcm0tb3B0aW9ucycpLnRleHQoZm9ybURhdGEub3B0aW9uc1RleHQpO1xyXG4gICAgICAgICQoJyNjb25maXJtLXBhY2thZ2UnKS50ZXh0KGZvcm1EYXRhLnBhY2thZ2UpO1xyXG4gICAgICAgICQoJyNjb25maXJtLXNlbGVjdGVkLWJvb3RoJykudGV4dChmb3JtRGF0YS5zZWxlY3RlZEJvb3RoTmFtZSk7XHJcbiAgICAgICAgJCgnI2NvbmZpcm0tYm9vdGgtbmFtZScpLnRleHQoZm9ybURhdGEuYm9vdGhOYW1lKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBDbGVhclNlbGV0ZWRCb290aCgpIHtcclxuICAgICAgICAkKFNFTEVDVEVEX0JPT1RIX1NFTEVDVE9SKS5hZGRDbGFzcyhBVkFJTEJMRV9CT09USF9DTEFTUyk7XHJcbiAgICAgICAgJChTRUxFQ1RFRF9CT09USF9TRUxFQ1RPUikucmVtb3ZlQ2xhc3MoU0VMRUNURURfQk9PVEhfQ0xBU1MpO1xyXG4gICAgICAgIGNsZWFyQm9vdGhIaWRkZW5GaWVsZHMoKTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBHZXRGb3JtRGF0YSgpIHtcclxuXHJcbiAgICAgICAgdmFyIG9wdGlvbnMgPSAnJztcclxuICAgICAgICB2YXIgc2VsZWN0ZWRPcHRpb25EYXRhID0gW107XHJcblxyXG4gICAgICAgICQoJ2lucHV0W25hbWU9XCJ0cmFkZS1zaG93LW9wdGlvblwiXTpjaGVja2VkJykuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIG9wdGlvbnMgKz0gJCh0aGlzKS5kYXRhKCdkaXNwbGF5JykgKyBcIiwgXCI7XHJcbiAgICAgICAgICAgIGxldCBvcHRpb25WYWx1ZSA9ICQodGhpcykudmFsKCk7XHJcbiAgICAgICAgICAgIGxldCBvcHRpb25RdWFudGl0eVF1ZXJ5ID0gJyNpbnB1dC0nICsgb3B0aW9uVmFsdWUgKyAnLXF1YW50aXR5JztcclxuICAgICAgICAgICAgbGV0IG9wdGlvblF1YW50aXR5ID0gMTtcclxuICAgICAgICAgICAgaWYgKCQob3B0aW9uUXVhbnRpdHlRdWVyeSkpIHtcclxuICAgICAgICAgICAgICAgIG9wdGlvblF1YW50aXR5ID0gJChvcHRpb25RdWFudGl0eVF1ZXJ5KS52YWwoKTtcclxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25RdWFudGl0eSA+IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IG9wdGlvblF1YW50aXR5OyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucyArPSAkKHRoaXMpLmRhdGEoJ2Rpc3BsYXknKSArIFwiLCBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Ugey8vZW5zdXJlIHdlIHBhc3MgaW4gYXQgbGVhc3Qgb25lLlxyXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvblF1YW50aXR5ID0gMTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgb3B0aW9uU2VsZWN0aW9uID0ge1xyXG4gICAgICAgICAgICAgICAgY29kZTogb3B0aW9uVmFsdWUsXHJcbiAgICAgICAgICAgICAgICBxdWFudGl0eTogb3B0aW9uUXVhbnRpdHlcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgY29uc29sZS5sb2cob3B0aW9uU2VsZWN0aW9uKTtcclxuICAgICAgICAgICAgc2VsZWN0ZWRPcHRpb25EYXRhLnB1c2gob3B0aW9uU2VsZWN0aW9uKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICBpZiAob3B0aW9ucy5sZW5ndGggPiAyKSB7Ly9zbGljZSBvZmYgZXh0cmFuZW91cyBjaGFyc1xyXG4gICAgICAgICAgICBvcHRpb24gPSBvcHRpb25zLnNsaWNlKDAsIC0yKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdmFyIGRhdGEgPSB7XHJcbiAgICAgICAgICAgIGF0dGVuZGVlMTogJCgnI2lucHV0LWF0dGVuZGVlLTEnKS52YWwoKS50cmltKCksXHJcbiAgICAgICAgICAgIGF0dGVuZGVlMjogJCgnI2lucHV0LWF0dGVuZGVlLTInKS52YWwoKS50cmltKCksXHJcbiAgICAgICAgICAgIGF0dGVuZGVlMzogJCgnI2lucHV0LWF0dGVuZGVlLTMnKS52YWwoKS50cmltKCksXHJcbiAgICAgICAgICAgIGF0dGVuZGVlNDogJCgnI2lucHV0LWF0dGVuZGVlLTQnKS52YWwoKS50cmltKCksXHJcbiAgICAgICAgIC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AgICAgICAgICAgdHJhZGVTaG93Q29udGFjdE5hbWU6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNvbnRhY3RFbWFpbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIGVtYWlsOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgY29udGFjdFBob25lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgcGhvbmVVUzogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGF0dGVuZGVlMToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiB0cnVlXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBtZXNzYWdlczoge1xyXG4gICAgICAgICAgICAgICAgYm9vdGhOYW1lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2UgZW50ZXIgYSBib290aCBuYW1lLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB0cmFkZVNob3dDb250YWN0TmFtZToge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGEgY29udGFjdCBuYW1lLidcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICwgY29udGFjdFBob25lOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6ICdQbGVhc2UgZW50ZXIgYSBwaG9uZSBudW1iZXIuJ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNvbnRhY3RFbWFpbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkOiAnUGxlYXNlIGVudGVyIGFuIGVtYWlsLidcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBhdHRlbmRlZTE6IHtcclxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogJ1BsZWFzZSBlbnRlciBlbnRlciBhbiBhdHRlbmRlZSBuYW1lLidcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3JQbGFjZW1lbnQ6IGZ1bmN0aW9uIChlcnJvciwgZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgZXJyb3IuaW5zZXJ0QWZ0ZXIoZWxlbWVudCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICB9XHJcblxyXG5cclxuXHJcbiAgICBmdW5jdGlvbiBjb21wbGV0ZVJlZ2lzdHJhdGlvbih0cnhSZXNwb25zZSkge1xyXG4gICAgICAgIFNob3dTcGlubmVyKCk7XHJcbiAgICAgICAgLy8gZ2V0IGRhdGFcclxuICAgICAgICB2YXIgY29tcGxldGVSZWdpc3RyYXRpb25FbmRwb2ludCA9ICQoJyNjb21wbGV0ZS1yZWdpc3RyYXRpb24tZW5kcG9pbnQnKS52YWwoKTtcclxuICAgICAgICB2YXIgZm9ybURhdGEgPSBHZXRGb3JtRGF0YSgpO1xyXG4gICAgICAgIC8vIHBvc3QgdG8gY29udHJvbGxlclxyXG4gICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoe1xyXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcclxuICAgICAgICAgICAgdXJsOiBjb21wbGV0ZVJlZ2lzdHJhdGlvbkVuZHBvaW50LFxyXG4gICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICBhdHRlbmRlZXM6IGZvcm1EYXRhLmF0dGVuZGVlcyxcclxuICAgICAgICAgICAgICAgIFBhY2thZ2VDb2RlOiBmb3JtRGF0YS5wYWNrYWdlQ29kZSxcclxuICAgICAgICAgICAgICAgIFNlbGVjdGVkQm9vdGhDb2RlOiBmb3JtRGF0YS5zZWxlY3RlZEJvb3RoQ29kZSxcclxuICAgICAgICAgICAgICAgIEJvb3RoRGlzcGxheU5hbWU6IGZvcm1EYXRhLmJvb3RoTmFtZSxcclxuICAgICAgICAgICAgICAgIG9wdGlvbkRhdGE6IGZvcm1EYXRhLm9wdGlvbkRhdGEsXHJcbiAgICAgICAgICAgICAgICBJbnZvaWNlTGF0ZXI6ICQoJyNjaGVja2JveC1pbnZvaWNlLUxhdGVyJykuaXMoXCI6Y2hlY2tlZFwiKSxcclxuICAgICAgICAgICAgICAgIENvbnRhY3ROYW1lOiBmb3JtRGF0YS5jb250YWN0LFxyXG4gICAgICAgICAgICAgICAgQ29udGFjdEVtYWlsOiBmb3JtRGF0YS5jb250YWN0RW1haWwsXHJcbiAgICAgICAgICAgICAgICBDb250YWN0UGhvbmU6IGZvcm1EYXRhLmNvbnRhY3RQaG9uZSxcclxuICAgICAgICAgICAgICAgIEF0dGVuZGVlMTogZm9ybURhdGEuYXR0ZW5kZWUxLFxyXG4gICAgICAgICAgICAgICAgQXR0ZW5kZWUyOiBmb3JtRGF0YS5hdHRlbmRlZTIsXHJcbiAgICAgICAgICAgICAgICBBdHRlbmRlZTM6IGZvcm1EYXRhLmF0dGVuZGVlMyxcclxuICAgICAgICAgICAgICAgIEF0dGVuZGVlNDogZm9ybURhdGEuYXR0ZW5kZWU0LFxyXG4gICAgICAgICAgICAgICAgQmlsbFRvQWNjb3VudDogdHJ4UmVzcG9uc2UgPT09ICdCaWxsVG9BY2NvdW50JyxcclxuICAgICAgICAgICAgICAgIHBheW1lbnQ6IHtcclxuICAgICAgICAgICAgICAgICAgICBhdXRoQ29kZTogKHRyeFJlc3BvbnNlKSA/IHRyeFJlc3BvbnNlLkF1dGhDb2RlIDogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbklkOiAodHJ4UmVzcG9uc2UpID8gdHJ4UmVzcG9uc2UuVHJ4S2V5IDogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBhY2NvdW50OiAodHJ4UmVzcG9uc2UpID8gdHJ4UmVzcG9uc2UuQWNjb3VudCA6IG51bGwsXHJcbiAgICAgICAgICAgICAgICAgICAgYWNjb3VudFR5cGU6ICh0cnhSZXNwb25zZSkgPyB0cnhSZXNwb25zZS5BY2NvdW50VHlwZSA6IG51bGxcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgeGhyRmllbGRzOlxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICByZXF1ZXN0LmRvbmUoZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgSGlkZVNwaW5uZXIoKTtcclxuICAgICAgICAgICAgalF1ZXJ5KCcjY3JlYXRlLXRyYW5zYWN0aW9uLW1vZGFsJywgTkFNRVNQQUNFKS5tb2RhbCgnaGlkZScpO1xyXG4gICAgICAgICAgICAvLyBnaXZlIHRoZSB1c2VyIGEgbW9tZW50IHRvIHZpZXcgdGhlIHN1Y2Nlc3MgbWVzc2FnZSwgYW5kIHRoZW4gcmVkaXJlY3QgdGhlbVxyXG4gICAgICAgICAgICBpZiAoZGF0YS5zdWNjZXNzKSB7XHJcbiAgICAgICAgICAgICAgICBHb1RvTmV4dFN0ZXAoJCgnI3BheW1lbnQtc3VibWl0JykpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgYWRkRXJyb3JNZXNzYWdlKEdFTkVSSUNfRVJST1JfTUVTU0FHRSk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgK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LXVzZXItYWNjb3VudC1udW1iZXInLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgIHZhciBhdHRlbmRlZXMgPSBnZXRBdHRlbmRlZXNBcnJheSgpO1xyXG5cclxuICAgICAgICAvLyBwb3N0IHRvIGNvbnRyb2xsZXJcclxuICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXHJcbiAgICAgICAgICAgIHVybDogY29tcGxldGVSZWdpc3RyYXRpb25FbmRwb2ludCxcclxuICAgICAgICAgICAgZGF0YToge1xyXG4gICAgICAgICAgICAgICAgcHJvcGVydHlOYW1lOiBwcm9wZXJ0eU5hbWUsXHJcbiAgICAgICAgICAgICAgICBwcm9tb0NvZGU6IHByb21vQ29kZSxcclxuICAgICAgICAgICAgICAgIHBvTnVtYmVyOiBwb051bWJlcixcclxuICAgICAgICAgICAgICAgIGNsYXNzQ29kZTogY2xhc3NDb2RlLFxyXG4gICAgICAgICAgICAgICAgYXR0ZW5kZWVzOiBhdHRlbmRlZXMsXHJcbiAgICAgICAgICAgICAgICBjb250YWN0OiBjb250YWN0TmFtZSxcclxuICAgICAgICAgICAgICAgIGVtYWlsOiBjb250YWN0RW1haWwsXHJcbiAgICAgICAgICAgICAgICBwbGFjZWRCeVVzZXJBY2NvdW50TnVtYmVyOiB1c2VyQWNjb3VudE51bWJlcixcclxuICAgICAgICAgICAgICAgIHBheW1lbnQ6IHtcclxuICAgICAgICAgICAgICAgICAgICBhdXRoQ29kZTogKHRyeFJlc3BvbnNlKSA/IHRyeFJlc3BvbnNlLkF1dGhDb2RlIDogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbklkOiAodHJ4UmVzcG9uc2UpID8gdHJ4UmVzcG9uc2UuVHJ4S2V5IDogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBhY2NvdW50OiAodHJ4UmVzcG9uc2UpID8gdHJ4UmV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vbnNlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gY2xlYXIgcHJvbW8gY29kZSBpbnB1dFxyXG4gICAgICAgICAgICAgICAgJCgnI3Byb21vLWNvZGUtaW5wdXQnLCBuYW1lc3BhY2UpLnZhbCgnJyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gc2hvdyBwcm9tbyBhcHBsaWVkIG1lc3NhZ2VcclxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5EaXNjb3VudCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAkKCcjcHJvbW8tY29kZS1tZXNzYWdlJywgbmFtZXNwYWNlKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAudGV4dChwcm9tb0NvZGVBcHBsaWVkTWVzc2FnZSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgLnNsaWRlRG93bignc2xvdycpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC5kZWxheSg1MDAwKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuc2xpZGVVcCgnc2xvdycpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAkKCcjcHJvbW8tY29kZS1tZXNzYWdlJywgbmFtZXNwYWNlKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAudGV4dChpbnZhbGlkUHJvbW9Db2RlTWVzc2FnZSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgLnNsaWRlRG93bignc2xvdycpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC5kZWxheSg1MDAwKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuc2xpZGVVcCgnc2xvdycpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICBhZGRFcnJvck1lc3NhZ2UoZ2VuZXJpY0Vycm9yTWVzc2FnZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gbG9nIGVycm9yIHRvIHRoZSBzZXJ2ZXJcclxuICAgICAgICAgICAgICAgIGxvZ0xpYnJhcnkubG9nRXJyb3JUb1NlcnZlcihlcnIuc3RhdHVzLCBlcnIucmVzcG9uc2VUZXh0LCBlcnJvck5vdGVQcmVmaXggKyAnZ2V0UHJpY2luZycpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBnZXRQcmljaW5nKHN1Y2Nlc3NDYWxsQmFjaywgZmFpbENhbGxCYWNrKSB7XHJcbiAgICAgICAgdmFyIHByb21vQ29kZSA9ICQoJyNwcm9tby1jb2RlLWlucHV0JywgbmFtZXNwYWNlKS52YWwoKTtcclxuXHJcbiAgICAgICAgLy8gY3JlYXRlIHJlcXVlc3RcclxuICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXHJcbiAgICAgICAgICAgIHVybDogZ2V0UHJpY2luZ0VuZHBvaW50LFxyXG4gICAgICAgICAgICBkYXRhOiB7XHJcbiAgICAgICAgICAgICAgICBwcm9tb0NvZGU6IHByb21vQ29kZVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB4aHJGaWVsZHM6XHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJlcXVlc3QuZG9uZShmdW5jdGlvbiAoZGF0YSkge1xyXG5cclxuICAgICAgICAgICAgLy8gc2V0IHJlc3VsdHNcclxuICAgICAgICAgICAgc2V0TW9uZXlWYWx1ZXMoZGF0YS5TZWF0cyxcclxuICAgICAgICAgICAgICAgIGRhdGEuU3VidG90YWwsXHJcbiAgICAgICAgICAgICAgICBkYXRhLkRpc2NvdW50LFxyXG4gICAgICAgICAgICA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5nKGZ1bmN0aW9uIChyZXNwb25zZSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFyZ3MgPT09ICdpbmNyZW1lbnQnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIHJvd1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBuZXdSb3cgPSAkKGdldE5ld0F0dGVuZGVlUm93KHdpbmRvdy5kYXRhTW9kZWwuTnVtYmVyT2ZTZWF0cyAtIDEpKTtcclxuICAgICAgICAgICAgICAgICAgICAkKG5ld1JvdylcclxuICAgICAgICAgICAgICAgICAgICAgICAgLmhpZGUoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuYXBwZW5kVG8oJyNhdHRlbmRlZS1saXN0IHRib2R5JywgbmFtZXNwYWNlKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuZmFkZUluKCdzbG93JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2dnbGVBZGRSZW1vdmVBdHRlbmRlZUJ1dHRvbnNFbmFibGVkKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBsYXN0IHJvd1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI2F0dGVuZGVlLWxpc3QgdGJvZHkgdHI6bGFzdCcsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgLmZhZGVPdXQoJ3Nsb3cnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnI2F0dGVuZGVlLWxpc3QgdGJvZHkgdHI6bGFzdCcsIG5hbWVzcGFjZSkucmVtb3ZlKCk7XH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AgICAgIGpRdWVyeSgnLmNoZWNrb3V0LWJ1dHRvbi1zcGlubmVyJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGdldCBwcmljaW5nIGluZm8gZm9yIGNsYXNzXHJcbiAgICAgICAgICAgICAgICAgICAgZ2V0UHJpY2luZyhcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHJlc3BvbnNlKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRvdGFsID0gcmVzcG9uc2UuVG90YWw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodG90YWwgPiAwKSB7Ly9zZXQgdXAgcGF5bWVudCBtb2RlbFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdWJ0b3RhbCA9IHJlc3BvbnNlLlN1YnRvdGFsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXggPSByZXNwb25zZS5UYXg7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRpc2NvdW50ID0gcmVzcG9uc2UuRGlzY291bnQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvdXJzZUNvZGVBbmRDbGFzc05hbWUgPSBqUXVlcnkoJyNjb3Vyc2UtY29kZS1hbmQtY2xhc3MtbmFtZScsIG5hbWVzcGFjZSkuaHRtbCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdHRlbmRlZXMgPSBnZXRBdHRlbmRlZXNBcnJheSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhZGQgZGF0YSB0byB0aGUgcGF5bWVudCByZXZpZXcgc2VjdGlvbiBvZiB0aGUgbW9kYWxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNjcmVhdGUtdHJh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9uLWRpc2NvdW50LWNvbnRhaW5lcicpLnNob3coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjY3JlYXRlLXRyYW5zYWN0aW9uLW1vZGFsICN0cmFuc2FjdGlvbi1tb2RhbC10b3RhbC12YWx1ZScpLmh0bWwoZ2VuZXJhbExpYnJhcnkuZm9ybWF0VVNEKHRvdGFsKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjY3JlYXRlLXRyYW5zYWN0aW9uLW1vZGFsICN0cmFuc2FjdGlvbi1kb2N1bWVudC1pdGVtcycpLnZhbChKU09OLnN0cmluZ2lmeShhdHRlbmRlZXMpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBoaWRlIHRoZSBzcGlubmVyXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcuY2hlY2tvdXQtYnV0dG9uLXNwaW5uZXInLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hvdyB0aGUgdHJhbnNhY3Rpb24gbW9kYWxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJyNjcmVhdGUtdHJhbnNhY3Rpb24tbW9kYWwnLCBuYW1lc3BhY2UpLm1vZGFsKCdzaG93Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsvL25vIHBheW1lbnQgcmVxdWlyZWRcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZVJlZ2lzdHJhdGlvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmNoZWNrb3V0LWJ1dHRvbi1zcGlubmVyJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGhpZGUgdGhlIHNwaW5uZXJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmNoZWNrb3V0LWJ1dHRvbi1zcGlubmVyJywgbmFtZXNwYWNlKS5oaWRlKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmUtZW5hYmxlIGNoZWNrb3V0IGJ1dHRvblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuUHJvY2Vzc2luZ0J1dHRvblJlc2V0KFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLmNoZWNrb3V0LWJ1dHRvbicsIG5hbWVzcGFjZSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIE9uIFRyYW5zYWN0aW9uIEFwcHJvdmVkIFxyXG4gICAgICAgIGpRdWVyeSh3aW5kb3cpXHJcbiAgICAgICAgICAgIC5vbignbW9kYWwuT25UcmFuc2FjdGlvbkFwcHJvdmVkJyxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlLCBkYXRhKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIC8vIGRhdGEgd2lsbCBlaXRoZXIgcmVwcmVzZW50IHRoZSBCaWxsIFRvIEFjY291bnQgcGF5bWVudCBvcHRpb24gb3IgY29udGFpbiB0aGUgdHJhbnNhY3Rpb24gcmVzcG9uc2UgZGF0YVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhID09PSAnQmlsbFRvQWNjb3VudCcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2FsbCBjb21wbGV0ZSByZWdpc3RyYXRpb24gd2l0aG91dCBhbnkgcGFyYW1ldGVycy4gIFRoZSBBUEkgY29udHJvbGxlciB3aWxsIGhhbmRsZSB0aGUgcmVzdFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZVJlZ2lzdHJhdGlvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHBhc3MgYXV0aCByZXN1bHRzIHRvIGNvbXBsZXRlIHJlZ2lzdHJhdGlvblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZVJlZ2lzdHJhdGlvbihkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICB9O1xyXG59XHJcblxyXG5cclxuLy8tLS0tLSBXaGVuIHBhZ2UgbG9hZHNcclxualF1ZXJ5KGRvY3VtZW50KVxyXG4gICAgLnJlYWR5KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBuZXcgQ29tcG9uZW50KCkuaW5pdCgpO1xyXG4gICAgfSk7IiwiZnVuY3Rpb24gQ29tcG9uZW50KCkge1xyXG4gICAgdmFyIG5hbWVzcGFjZSA9ICcuQ2hhZHdlbGwtUGFnZXMtVW5pdmVyc2l0eUluc3RydWN0b3JQYWdlJztcclxuICAgIHZhciBrZW5kb0RhdGFTb3VyY2UgPSB7fTtcclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoJChuYW1lc3BhY2UpLmxlbmd0aCA8IDEpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvLyAtLS0tLSBCdWlsZCBLZW5kbyBEYXRhU291cmNlIGZvciBHcmlkICYgTGlzdFZpZXdcclxuICAgICAgICBrZW5kb0RhdGFTb3VyY2UgPSBuZXcga2VuZG8uZGF0YS5EYXRhU291cmNlKHtcclxuICAgICAgICAgICAgZGF0YTogd2luZG93Lm1vZGVsLkF0dGVuZGVlcyxcclxuICAgICAgICAgICAgc2NoZW1hOiB7XHJcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczoge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBGaXJzdE5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBMYXN0TmFtZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEVtYWlsOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgSXNDaGVja2VkSW46IHsgdHlwZTogXCJib29sZWFuXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2hlY2tJbkRhdGU6IHsgdHlwZTogXCJkYXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2hlY2tlZEluQnk6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBOb3RlczogeyB0eXBlOiBcInN0cmluZ1wiIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHBhZ2VTaXplOiAxMCxcclxuICAgICAgICAgICAgcGFnZWFibGU6IHtcclxuICAgICAgICAgICAgICAgIHBhZ2VTaXplczogdHJ1ZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIC0tLS0tIElua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sgZmllbGQ6IFwiRW1haWxcIiwgdGl0bGU6IFwiRW1haWxcIiwgd2lkdGg6IFwiMjUwcHhcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiSXNDaGVja2VkSW5cIiwgdGl0bGU6IFwiQ2hlY2tlZEluXCIsIHRlbXBsYXRlOiBcIiM9IElzQ2hlY2tlZEluID8gJ1llcycgOiAnTm8nICNcIiwgd2lkdGg6IFwiOTBweFwiLCBmaWx0ZXJhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZDogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJDaGVja0luRGF0ZVwiLCB0aXRsZTogXCJDaGVja0luIERhdGVcIiwgZm9ybWF0OiBcInswOk1NL2RkL3l5eXl9XCIsIHdpZHRoOiBcIjE4MHB4XCIsIGZpbHRlcmFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNlbGw6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdpZHRoOiBcIjE4MHB4XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgeyBmaWVsZDogXCJDaGVja2VkSW5CeVwiLCB0aXRsZTogXCJDaGVja0luIEJ5XCIsIHdpZHRoOiBcIjE1MHB4X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3cubW9kZWwuQXR0ZW5kZWVzLFxyXG4gICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEZpcnN0TmFtZTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExhc3ROYW1lOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgRW1haWw6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBQcm9wZXJ0eU5hbWU6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBBY2NvdW50TnVtYmVyOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgSXNDaGVja2VkSW46IHsgdHlwZTogXCJib29sZWFuXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2hlY2tJbkRhdGU6IHsgdHlwZTogXCJkYXRlXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2hlY2tlZEluQnk6IHsgdHlwZTogXCJzdHJpbmdcIiB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwYWdlU2l6ZTogMTAsXHJcbiAgICAgICAgICAgIHBhZ2VhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICBwYWdlU2l6ZXM6IHRydWVcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gLS0tLS0gSW5pdGlhbGl6ZSBLZW5kbyBHcmlkIChEZXNrdG9wIFZpZXcpXHJcbiAgICAgICAgZ2V0T3JkZXJzRGV0YWlscyg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B0aXRsZTogXCJFbWFpbFwiLCB3aWR0aDogXCIyNTBweFwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgeyBmaWVsZDogXCJQcm9wZXJ0eU5hbWVcIiwgdGl0bGU6IFwiUHJvcGVydHkgTmFtZVwiLCB3aWR0aDogXCIxNTBweFwiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgeyBmaWVsZDogXCJBY2NvdW50TnVtYmVyXCIsIHRpdGxlOiBcIkFjY291bnROdW1iZXJcIiwgd2lkdGg6IFwiMTUwcHhcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQ6IFwiSXNDaGVja2VkSW5cIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwiQ2hlY2tlZEluXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBcIiM9IElzQ2hlY2tlZEluID8gJ1llcycgOiAnTm8nICNcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiOTBweFwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZWxsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZDogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJDaGVja0luRGF0ZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJDaGVja0luIERhdGVcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0OiBcInswOk1NL2RkL3l5eXl9XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiBcIjE4MHB4XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcmFibGU6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNlbGw6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdpZHRoOiBcIjE4MHB4XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgeyBmaWVsZDogXCJDaGVja2VkSW5CeVwiLCB0aXRsZTogXCJDaGVja0luIEJ5XCIsIHdpZHRoOiBcIjE1MHB4XCIgfVxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIHBhZ2VhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgc29ydGFibGU6IHRydWUsXHJcbiAgICAgICAgICAgICAgICBzY3JvbGxhYmxlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgZmlsdGVyYWJsZTogeyBtb2RlOiBcInJvd1wiIH1cclxuICAgICAgICAgICAgfSkuZGF0YSgna2VuZG9HcmlkJyk7XHJcblxyXG4gICAgfVxyXG59XHJcblxyXG4vLy0tLS0tIFdoZW4gcGFnZSBsb2Fkc1xyXG4kKGRvY3VtZW50KVxyXG4gICAgLnJlYWR5KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBuZXcgQ29tcG9uZW50KCkuaW5pdCgpO1xyXG4gICAgfSk7XHJcbiIsImZ1bmN0aW9uIENvbXBvbmVudCgpIHtcclxuXHJcbiAgICB2YXIgbmFtZXNwYWNlID0gJy5DaGFkd2VsbC1QYWdlcy1Vbml2ZXJzaXR5UmVnaXN0cmF0aW9uT3JkZXJQYWdlJztcclxuICAgIHZhciBrZW5kb0RhdGFTb3VyY2UgPSB7fTtcclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoJChuYW1lc3BhY2UpLmxlbmd0aCA8IDEpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvLyAtLS0tLSBCdWlsZCBLZW5kbyBEYXRhU291cmNlIGZvciBHcmlkICYgTGlzdFZpZXdcclxuICAgICAgICBrZW5kb0RhdGFTb3VyY2UgPSBuZXcga2VuZG8uZGF0YS5EYXRhU291cmNlKHtcclxuICAgICAgICAgICAgdHJhbnNwb3J0OiB7XHJcbiAgICAgICAgICAgICAgICByZWFkOiBmdW5jdGlvbiAob3B0aW9ucykge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IG1vZGVsLkdldFVuaXZlcnNpdHlPcmRlcnNVcmwsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogSlNPTi5zdHJpbmdpZnkob3B0aW9ucy5kYXRhKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5zdWNjZXNzKHJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgIGRhdGE6IGZ1bmN0aW9uIChyZXNwb25zZSkgeyByZXR1cm4gcmVzcG9uc2UuZGF0YTsgfSxcclxuICAgICAgICAgICAgICAgIHRvdGFsOiBmdW5jdGlvbiAocmVzcG9uc2UpIHsgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHJlc3BvbnNlLnRvdGFsKTsgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwYWdlU2l6ZTogbW9kZWwuR3JpZFBhZ2VTaXplLFxyXG4gICAgICAgICAgICBzZXJ2ZXJQYWdpbmc6IHRydWUsXHJcbiAgICAgICAgICAgIHBhZ2VhYmxlOiB7XHJcbiAgICAgICAgICAgICAgICBwYWdlU2l6ZXM6IHRydWVcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLyAtLS0tLSBJbml0aWFsaXplIEtlbmRvIEdyaWQgKERlc2t0b3AgVmlldylcclxuICAgICAgICAka2VuZG9HcmlkID0galF1ZXJ5KCcja2VuZG8tZ3JpZCcsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLmtlbmRvR3JpZCh7XHJcbiAgICAgICAgICAgICAgICBkYXRhU291cmNlOiBrZW5kb0RhdGFTb3VyY2UsXHJcbiAgICAgICAgICAgICAgICBjb2x1bW5zOiBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZDogXCJjbGFzc05hbWVcIiwgdGl0bGU6IFwiQ2xhc3MgTmFtZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogXCIxNTBweFwiXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkOiBcImNsYXNzQ29kZVwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCJDbGFzcyBDb2RlXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAg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gICAgalF1ZXJ5KCcuaXRlbS1jb25maXJtZWQtbWVzc2FnZVtkYXRhLWl0ZW0tbnVtYmVyPScgKyBjb2RlICsgJ10nKS5zaG93KCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSgnLndhcnJhbnR5LWJ1dHRvbnNbZGF0YS1pdGVtLW51bWJlcj0nICsgY29kZSArICddJykuaGlkZSgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGpRdWVyeShcIi53YXJyYW50eS1idXR0b25zOnZpc2libGVcIikubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLmJhY2stdG8tY2hlY2tvdXQnKS5zaG93KCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH0pO1xyXG5cclxuXHJcbiAgICBqUXVlcnkoJ2lucHV0W3R5cGU9cmFkaW9dW25hbWU9ZmFpbGVkVW5pdF0nKS5vbignY2hhbmdlJywgZnVuY3Rpb24gKCkge1xyXG5cclxuICAgICAgICBzd2l0Y2ggKGpRdWVyeSh0aGlzKS52YWwoKSkge1xyXG4gICAgICAgICAgICBjYXNlIHdpbmRvdy5PcmlnaW5hbFRvVW5pdEFuc3dlcjpcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLm1vZGVsLW51bWJlcicsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcuc2VyaWFsLW51bWJlcicsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcuaW52b2ljZS1udW1iZXInLCBuYW1lc3BhY2UpLmhpZGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoJyNtb2RlbE51bWJlcicsIG5hbWVzcGFjZSkucHJvcCgncmVxdWlyZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnI3NlcmlhbE51bWJlcicsIG5hbWVzcGFjZSkucHJvcCgncmVx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EFwaS5maWx0ZXJBY2NvdW50cyhhY2NvdW50TmFtZSwgYWNjb3VudE51bWJlciwgJycsIGZ1bmN0aW9uIChhY2NvdW50cykge1xyXG4gICAgICAgICAgICAvLyBHZXQgdGhlIGFjY291bnRzIGxpc3QgZGl2XHJcbiAgICAgICAgICAgIHZhciBhY2NvdW50c0RpdiA9ICQoJy5hY2NvdW50LWxpc3QnKTtcclxuXHJcbiAgICAgICAgICAgIC8vY2xlYXIgdGhlIGxpc3QgKHRvIGF2b2lkIGR1cGxpY2F0ZSkgYW5kIHJlLXBvcHVsYXRlIGl0IGJlbG93XHJcbiAgICAgICAgICAgIGlmIChhY2NvdW50c0RpdlswXSAmJiBhY2NvdW50c0RpdlswXS5pbm5lclRleHQpIHtcclxuICAgICAgICAgICAgICAgIGFjY291bnRzRGl2WzBdLmlubmVyVGV4dCA9ICcnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvbnN0IHVuaXF1ZUFjY291bnRUZXh0cyA9IFtdO1xyXG5cclxuICAgICAgICAgICAgLy8gSXRlcmF0ZSB0aHJvdWdoIHRoZSBhY2NvdW50cyBhcnJheSBhbmQgY3JlYXRlIHRoZSBwIGVsZW1lbnRzXHJcbiAgICAgICAgICAgIGFjY291bnRzLmZvckVhY2goZnVuY3Rpb24gKGFjY291bnQpIHtcclxuICAgICAgICAgICAgICAgIC8vdG8gYXZvaWQgYWRkaW5nIGR1cGxpY2F0ZSBhY2NvdW50XHJcbiAgICAgICAgICAgICAgICBpZiAodW5pcXVlQWNjb3VudFRleHRzLmluY2x1ZGVzKGFjY291bnQuVGV4dCkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHVuaXF1ZUFjY291bnRUZXh0cy5wdXNoKGFjY291bnQuVGV4dCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIGEgbmV3IHAgZWxlbWVudFxyXG4gICAgICAgICAgICAgICAgdmFyIHBFbGVtZW50ID0gJCgnPHA+PC9wPicpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIFNldCB0aGUgZGF0YS1pZCBhdHRyaWJ1dGUsIGRhdGEtdHlwZSBhdHRyaWJ1dGUsIGFuZCBjbGFzcyAoaWYgYWNjb3VudCBpcyBvbiBob2xkKVxyXG4gICAgICAgICAgICAgICAgcEVsZW1lbnQuYXR0cignZGF0YS1pZCcsIGFjY291bnQuVmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgcEVsZW1lbnQuYXR0cignZGF0YS10eXBlJywgYWNjb3VudC5UeXBlKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoYWNjb3VudC5PbkhvbGQgJiYgc2hvd09uSG9sZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHBFbGVtZW50LmFkZENsYXNzKCdvbi1ob2xkJyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gU2V0IHRoZSB0ZXh0IG9mIHRoZSBwIGVsZW1lbnRcclxuICAgICAgICAgICAgICAgIHBFbGVtZW50LnRleHQoYWNjb3VudC5UZXh0KTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgYW4gPGk+IGVsZW1lbnQgZm9yIHRoZSBGb250IEF3ZXNvbWUgaWNvblxyXG4gICAgICAgICAgICAgICAgaWYgKGFjY291bnQuVHlwZSA9PT0gXCJJbXBlcnNvbmF0ZVwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGljb25FbGVtZW50ID0gJCgnPGkgY2xhc3M9XCJmYSBmYS1zb2xpZCBmYS11c2VyIG1yLTJcIj48L2k+Jyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUHJlcGVuZCB0aGUgaWNvbiB0byB0aGUgcCBlbGVtZW50XHJcbiAgICAgICAgICAgICAgICBwRWxlbWVudC5wcmVwZW5kKGljb25FbGVtZW50KTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBBcHBlbmQgdGhlIHAgZWxlbWVudCB0byB0aGUgaW1wZXJzb25hdGUtbGlzdCBkaXZcclxuICAgICAgICAgICAgICAgIGFjY291bnRzRGl2LmFwcGVuZChwRWxlbWVudCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICBpZiAoalF1ZXJ5KG5hbWVzcGFjZSkubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBoYW5kbGUgcmVzZXQgaW1wZXJzb25hdGlvblxyXG4gICAgICAgICQoJyNyZXNldEltcGVyc29uYXRpb25Gb3JtJywgbmFtZXNwYWNlKS5vbignc3VibWl0JywgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcblxyXG4gICAgICAgICAgICB2YXIgcmV0dXJuVXJsID0gJCgnI3Jlc2V0SW1wZXJzb25hdGlvbkZvcm0gaW5wdXRbbmFtZT1cInJldHVyblVybFwiXScsIG5hbWVzcGFjZSkudmFsKCk7XHJcblxyXG4gICAgICAgICAgICAvLyBDYWxsIHRoZSByZXNldEltcGVyc29uYXRpb24gbWV0aG9kIGZyb20gU2hhcmVkQXBpTGlicmFyeVxyXG4gICAgICAgICAgICBTaGFyZWRBcGkucmVzZXRJbXBlcnNvbmF0aW9uKHJldHVyblVybCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIGFjY291bnQgZmlsdGVyIHR5cGUgYWhlYWRcclxuICAgICAgICBqUXVlcnkoJy5hY2NvdW50LXR5cGUtYWhlYWQnLCB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1xyXG4gICAgICAgICAgICBpZiAoaW1wZXJzb25hdGUpIHtcclxuICAgICAgICAgICAgICAgIFNoYXJlZEFwaS5pbXBlcnNvbmF0ZUFjY291bnQoaWQsIHJldHVyblVybCxcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBidXR0b24gPSAkKCcjaW1wZXJzb25hdGlvbicsIG5hbWVzcGFjZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignJywgYnV0dG9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJDb3VsZCBub3QgaW1wZXJzb25hdGUgYWNjb3VudFwiKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gQ2FsbCB0aGUgc2V0Q3VycmVudEFjY291bnQgbWV0aG9kIGZyb20gU2hhcmVkQXBpTGlicmFyeVxyXG4gICAgICAgICAgICBTaGFyZWRBcGkuc2V0Q3VycmVudEFjY291bnQoaWQsIHJldHVyblVybCxcclxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgYnV0dG9uID0gJCgnI2ltcGVyc29uYXRpb24nLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignJywgYnV0dG9uKTtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkNvdWxkIG5vdCBzZWx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lvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIGVtYWlsUmVzdWx0TWVzc2FnZS5odG1sKCcnKTtcclxuICAgICAgICBcclxuICAgICAgICAgICAgdmFyIGRhdGEgPVxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBjb2RlOiBqUXVlcnkodGhpcykuZGF0YSgncGlkJyksXHJcbiAgICAgICAgICAgICAgICBlbWFpbDogJCgnI2VtYWlsJykuZmluZChcIjpzZWxlY3RlZFwiKS50ZXh0KClcclxuICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgIHZhciBhbmltYXRpb24gPSBCdXR0b25BbmltYXRvci5zdGFydEFuaW1hdGlvbignV29ya2luZy4uLicsICQodGhpcykpO1xyXG4gICAgICAgICAgICBqUXVlcnkuYWpheChcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgdXJsOiB3aW5kb3cubW9kZWwuQWRkU3Vic2NyaXB0aW9uRW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeShkYXRhKSxcclxuICAgICAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogXCJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04XCIsXHJcbiAgICAgICAgICAgICAgICB0aW1lb3V0OiAyMDAwMCxcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3BvbnNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlID09PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dTdWNjZXNzQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJEb25lXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbXNnID0gXCJBbGwgc2V0LiAgRW1haWwgd2lsbCBiZSBzZW50IHRvIFwiICsgZGF0YS5lbWFpbCArIFwiIHdoZW4gdGhlIGl0ZW0gXCIgKyBkYXRhLmNvZGUgKyBcIiBpcyBiYWNrIGluIHN0b2NrLiBcIjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZW1haWxSZXN1bHRNZXNzYWdlLmFwcGVuZCgnPGRpdiBjbGFzcz1cImFsZXJ0LXN1Y2Nlc3MgcC03XCI+Jm5ic3A7JyArIG1zZyArICc8L2Rpdj4nKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbWFpbFJlc3VsdE1lc3NhZ2UuaHRtbCgnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCcjYmFjay1pbi1zdG9jay1ub3RpZnktbW9kYWwnKS5tb2RhbCgnaGlkZScpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgNTAwMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG1zZyA9IFwiRXJyb3IuICBGYWlsZWQgdG8gcHJvY2VzcyByZXF1ZXN0LiAgUGxlYXNlIHRyeSBhZ2FpbiBsYXRlci4gXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVtYWlsUmVzdWx0TWVzc2FnZS5hcHBlbmQoJzxkaXYgY2xhc3M9XCJhbGVydCBhbGVydC1kYW5nZXIgcC03XCI+Jm5ic3A7JyArIG1zZyArICc8L2Rpdj4nKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQnV0dG9uQW5pbWF0b3Iuc2hvd0Vycm9yQW5pbWF0aW9uKGFuaW1hdGlvbiwgXCJFcnJvclwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbWFpbFJlc3VsdE1lc3NhZ2UuaHRtbCgnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCA3MDAwKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uIChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24pIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbXNnID0gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRleHRTdGF0dXMgPT09IFwidGltZW91dFwiKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZSB0aW1lb3V0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZyA9ICdFcnJvci4gIFJlcXVlc3QgdGltZWQgb3V0LiBQbGVhc2UgdHJ5IGFnYWluIGxhdGVyLic7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSGFuZGxlIG90aGVyIGVycm9yc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBtc2cgPSBcIkVycm9yLiAgUGxlYXNlIHRyeSBhZ2FpbiBsYXRlci4gIEZhaWxlZCB0byBwZXJmb3JtIHJlcXVlc3QgXCIgKyB0ZXh0U3RhdHVzICsgZXJyb3JUaHJvd247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVtYWlsUmVzdWx0TWVzc2FnZS5hcHBlbmQoJzxkaXYgY2xhc3M9XCJhbGVydCBhbGVydC1kYW5nZXIgcC03XCI+Jm5ic3A7JyArIG1zZyArICc8L2Rpdj4nKTtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93RXJyb3JBbmltYXRpb24oYW5pbWF0aW9uLCBcIkVycm9yXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVtYWlsUmVzdWx0TWVzc2FnZS5odG1sKCcnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgNzAwMCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uKClcclxuICAgIHtcclxuICAgICAgICBpZiAoIGpRdWVyeSggbmFtZXNwYWNlICkubGVuZ3RoIDwgMSApXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBlbWFpbFJlc3VsdE1lc3NhZ2UgPSBqUXVlcnkoJyNlbWFpbFJlc3VsdE1lc3NhZ2UnLCBuYW1lc3BhY2UpO1xyXG4gICAgICAgIGVtYWlsUmVzdWx0TWVzc2FnZS5odG1sKCcnKTtcclxuICAgICBcclxuICAgICAgICAkKCcuYnRuLWJhY2staW4tc3RvY2stbm90aWZ5JykuYXR0cignZGlzYWJsZWQnLCB0cnVlKTtcclxuXHJcbiAgICAgICAgdmFyIGlzRW1wbG95ZWUgPSB3aW5kb3cubW9kZWwuSXNFbXBsb3llZTtcclxuICAgICAgICBcclxuICAgICAgICBpZiAoIWlzRW1wbG95ZWUpIHsgICAgICAgICAgICBcclxuICAgICAgICAgICAgJCgnLmJ0bi1iYWNrLWluL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KS5jbGljayggZnVuY3Rpb24oKVxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAgalF1ZXJ5KCAnLmFkZC10by1saXN0LW1lc3NhZ2UnICAgICAgICwgbmFtZXNwYWNlICkuaGlkZSgpO1xyXG4gICAgICAgICAgICBqUXVlcnkoICcuYWRkLXRvLWxpc3QtZXJyb3ItbWVzc2FnZScgLCBuYW1lc3BhY2UgKS5oaWRlKCk7XHJcblxyXG4gICAgICAgICAgICBjb25zdCBkYXRhID0ge1xyXG4gICAgICAgICAgICAgICAgRW1haWxBZGRyZXNzOiBqUXVlcnkoJyNlbWFpbGFkZHJlc3MnLCBuYW1lc3BhY2UpLnZhbCgpXHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICB2YXIgcmVxdWVzdCA9IGpRdWVyeS5hamF4KFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHVybDogXCIvYXBpL3N1YnNjcmliZS9zdWJzY3JpYmUtdG8tZW1haWwtbGlzdFwiLFxyXG4gICAgICAgICAgICAgICAgZGF0YTogSlNPTi5zdHJpbmdpZnkoZGF0YSksXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VHlwZTogXCJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04XCJcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXF1ZXN0LmZhaWwoIGZ1bmN0aW9uKClcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCAnLmFkZC10by1saXN0LWVycm9yLW1lc3NhZ2UnLCBuYW1lc3BhY2UgKS5zaG93KCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVxdWVzdC5kb25lKCBmdW5jdGlvbiggZGF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gICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICAgICAgICAgIHVybDogZW5kcG9pbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjb25zb2xlLmxvZyggJ1N1Y2Nlc3MnICwgZW5kcG9pbnQgLCByZXN1bHQgKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgbW9iaWxlIGFjY291bnQgbWVudSB0b2dnbGVcclxuICAgICAgICBqUXVlcnkoJy5idG4tYWNjb3VudCcsIG5hbWVzcGFjZSkuY2xpY2soZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5taW5pLWNhcnQtY29udGVudCcsIG5hbWVzcGFjZSkuZmFkZU91dCgpO1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5tb2JpbGUtc2VhcmNoICwgLm1vYmlsZS1tZW51cycsIG5hbWVzcGFjZSkuc2xpZGVVcCgpO1xyXG5cclxuICAgICAgICAgICAgalF1ZXJ5KCcubW9iaWxlLWFjY291bnQtbWVudScsIG5hbWVzcGFjZSkuc2xpZGVUb2dnbGUoKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8tLS0tLSBIYW5kbGUgbW9iaWxlIHNlYXJjaCB0b2dnbGVcclxuICAgICAgICBqUXVlcnkoJy5idG4tc2VhcmNoJywgbmFtZXNwYWNlKS5jbGljayhmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIGpRdWVyeSgnLm1pbmktY2FydC1jb250ZW50JywgbmFtZXNwYWNlKS5mYWRlT3V0KCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSgnLm1vYmlsZS1hY2NvdW50LW1lbnUgLCAubW9iaWxlLW1lbnVzJywgbmFt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ICAgICAgICAgICBqUXVlcnkodGhpcykuZmluZCgnLmZhLWNoZXZyb24tZG93bicpLnRvZ2dsZSgpO1xyXG4gICAgICAgICAgICBqUXVlcnkodGhpcykuZmluZCgnLmxpbmstaXRlbS1jaGlsZHJlbicpLnNsaWRlVG9nZ2xlKCk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIGVtcHR5IG1lbnUgbGlua3NcclxuICAgICAgICBqUXVlcnkoJy5wcmltYXJ5LW1lbnUtbGluayAsIC5zZWNvbmRhcnktbWVudS1saW5rICwgLnRlcnRpZXJ5LW1lbnUtbGluaycsIG5hbWVzcGFjZSkuY2xpY2soZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIGlmIChqUXVlcnkodGhpcykuYXR0cignaHJlZicpID09ICcjJykge1xyXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEluaXQgbmF2aWdhdGlvbiBtZW51cyAocGVyIC93d3dyb290L3NtYXJ0LW1lbnVzLyouanMpXHJcbiAgICAgICAgalF1ZXJ5KCcuY2hhZHdlbGwtbWVudScsIG5hbWVzcGFjZSkuc21hcnRtZW51cyhcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbWFpbk1lbnVTdWJPZmZzZXRYOiAtMSxcclxuICAgICAgICAgICAgICAgIG1haW5NZW51U3ViT2Zmc2V0WTogMSxcclxuICAgICAgICAgICAgICAgIHN1Yk1lbnVzU3ViT2Zmc2V0WDogNixcclxuICAgICAgICAgICAgICAgIHN1Yk1lbnVzU3ViT2Zmc2V0WTogLTZcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIGNvbXBvbmVudCBzdGlja2luZXNzXHJcbiAgICAgICAgalF1ZXJ5KHdpbmRvdyk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dGVtXHJcbiAgICAgICAgICAgIFNob3BwaW5nQ2FydEFwaS5yZW1vdmVJdGVtRnJvbUNhcnQoaXRlbWlkLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGpzb24pIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5taW5pLWNhcnQtY29udGVudCcsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vLy8tLS0tLSBSZWZyZXNoIGVudGlyZSBwYWdlIChvbmx5IGlmIGN1cnJlbnQgcGFnZSBpcyBzaG9wcGluZyBjYXJ0KVxyXG4gICAgICAgICAgICAgICAgICAgIC8vaWYgKHdpbmRvdy5sb2NhdGlvbi5ocmVmLnRvTG93ZXJDYXNlKCkuaW5kZXhPZignL3Nob3BwaW5nLWNhcnQnKSA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyAgICB3aW5kb3cubG9jYXRpb24gPSB3aW5kb3cubG9jYXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgLy99XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sICdFcnJvciEnKTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIFRvZ2dsZSBtaW5pIGNhcnQgdmlzaWJpbGl0eSBvbiBjbGlja1xyXG4gICAgICAgIGpRdWVyeShuYW1lc3BhY2UpLm9uKCdjbGljaycsICcuYnRuLW1pbmljYXJ0JywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBqUXVlcnkoJy5tb2JpbGUtc2VhcmNoICwgLm1vYmlsZS1tZW51cyAsIC5tb2JpbGUtYWNjb3VudC1tZW51JywgbmFtZXNwYWNlMikuc2xpZGVVcCgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKCFqUXVlcnkoJy5taW5pLWNhcnQtY29udGVudCcsIG5hbWVzcGFjZSkuaXMoJzp2aXNpYmxlJykpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLm1pbmktY2FydC1jb250ZW50JywgbmFtZXNwYWNlKS5mYWRlSW4oKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnLm1pbmktY2FydC1jb250ZW50JywgbmFtZXNwYWNlKS5mYWRlT3V0KCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgalF1ZXJ5KG5hbWVzcGFjZSkub24oJ2NsaWNrJywgJy5idG4tcmVtb3ZlJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgcGFyZW50X2VsZW1lbnQgPSBqUXVlcnkodGhpcykuY2xvc2VzdChcInRyXCIpO1xyXG4gICAgICAgICAgICB2YXIgbWluaUNhcnRQcmljZSA9IGpRdWVyeShwYXJlbnRfZWxlbWVudCkuZmluZChcIi5pdGVtLXByaWNlXCIpLmh0bWwoKS5yZXBsYWNlKCckJywgJycpLnJlcGxhY2UoJywnLCAnJyk7O1xyXG4gICAgICAgICAgICB2YXIgbWluaUNhcnRRdWFudGl0eSA9IGpRdWVyeShwYXJlbnRfZWxlbWVudCkuZmluZChcIi5pdGVtLXF1YW50aXR5XCIpLmh0bWwoKTtcclxuICAgICAgICAgICAgdmFyIG1pbmlDYXJ0U2t1ID0galF1ZXJ5KHBhcmVudF9lbGVtZW50KS5maW5kKFwiLm1pbmktY2FydC1za3VcIikudmFsKCk7XHJcbiAgICAgICAgICAgIHZhciBtaW5pQ2FydE5hbWUgPSBqUXVlcnkocGFyZW50X2VsZW1lbnQpLmZpbmQoXCIuZGlzcGxheS1uYW1lLXRleHRcIikuaHRtbCgpO1xyXG4gICAgICAgICAgICBsaWJyYXJ5LnRyYWNrUmVtb3ZlRnJvbUNhcnQobWluaUNhcnRTa3UsIG1pbmlDYXJ0UXVhbnRpdHksIG1pbmlDYXJ0UHJpY2UsIG1pbmlDYXJ0TmFtZSwgbWluaUNhcnRQcmljZSk7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gQ2xvc2UgbWluaSBjYXJ0XHJcbiAgICAgICAgalF1ZXJ5KG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLm9uKCdjbGljaycsXHJcbiAgICAgICAgICAgICAgICAnLmJ0bi1taW5pY2FydC1jbG9zZScsXHJcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5tb2JpbGUtc2VhcmNoICwgLm1vYmlsZS1tZW51cyAsIC5tb2JpbGUtYWNjb3VudC1tZW51JywgbmFtZXNwYWNlMikuc2xpZGVVcCgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoIWpRdWVyeSgnLm1pbmktY2FydC1jb250ZW50JywgbmFtZXNwYWNlKS5pcygnOnZpc2libGUnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5taW5pLWNhcnQtY29udGVudCcsIG5hbWVzcGFjZSkuZmFkZUluKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkoJy5taW5pLWNhcnQtY29udGVudCcsIG5hbWVzcGFjZSkuZmFkZU91dCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhpZGUgbWluaSBjYXJ0IG9uIGRlc2t0b3AgbW91c2UgbG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3cuYWRkcmVzc1NlbGVjdG9yRGF0YU1vZGVsLkFkZHJlc3NPcHRpb25zLFxyXG4gICAgICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgICAgICAgIG1vZGVsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgQWRkcmVzc0lkOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICBDb250YWN0OiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICBMaW5lMTogeyB0eXBlOiBcInN0cmluZ1wiIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgTGluZTI6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIENpdHk6IHsgdHlwZTogXCJzdHJpbmdcIiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIFN0YXRlOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICBQb3N0YWxDb2RlOiB7IHR5cGU6IFwic3RyaW5nXCIgfSxcclxuICAgICAgICAgICAgICAgICAgICBEYXl0aW1lUGhvbmVOdW1iZXI6IHsgdHlwZTogXCJzdHJpbmdcIiB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBpbml0TW9kYWxMaXN0VmlldygpIHtcclxuICAgICAgIGpRdWVyeSgnI3NoaXBwaW5nLWFkZHJlc3Mtb3B0aW9ucy1ncmlkJywgbmFtZXNwYWNlKVxyXG4gICAgICAgICAgICAua2VuZG9MaXN0Vmlldyh7XHJcbiAgICAgICAgICAgICAgICBkYXRhU291cmNlOiBkYXRhU291cmNlLFxyXG4gICAgICAgICAgICAgICAgdGVtcGxhdGU6IGtlbmRvLnRlbXBsYXRlKGpRdWVyeShcIiNhZGRyZXNzLXNlbGVjdG9yLWxpc3Qtdmlldy10ZW1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gICAgaWYgKHdhbGxldHMpIHtcclxuICAgICAgICAgICAgbG9hZFBheW1lbnRPcHRpb25zKHdhbGxldHMpO1xyXG4gICAgICAgICAgICBzZXREZWZhdWx0UGF5bWVudE9wdGlvbigpO1xyXG4gICAgICAgICAgICB0b2dnbGVEaXNwbGF5Rm9yU2VsZWN0ZWRPcHRpb24oKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gZ2V0IHdhbGxldHMgYW5kIHRoZW4gbG9hZCBwYXltZW50IG9wdGlvbnNcclxuICAgICAgICBQYXltZW50QXBpLmdldEN1c3RvbWVyV2FsbGV0cyhmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgbG9hZFBheW1lbnRPcHRpb25zKHJlc3BvbnNlLkRhdGEpO1xyXG4gICAgICAgICAgICBzZXREZWZhdWx0UGF5bWVudE9wdGlvbigpO1xyXG4gICAgICAgICAgICB0b2dnbGVEaXNwbGF5Rm9yU2VsZWN0ZWRPcHRpb24oKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgICAgICBmdW5jdGlvbiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICBnZW5lcmFsTGlicmFyeS5hZGRFcnJvck1lc3NhZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgJy5jcmVhdGUtdHJhbnNhY3Rpb24tZXJyb3JzJyxcclxuICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgJ1VuYWJsZSB0byBsb2FkIHNhdmVkIHBheW1lbnQgbWV0aG9kcydcclxuICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICBsb2FkUGF5bWVudE9wdGlvbnMoW10pO1xyXG4gICAgICAgICAgICAgICAgc2V0RGVmYXVsdFBheW1lbnRPcHRpb24oKTtcclxuICAgICAgICAgICAgICAgIHRvZ2dsZURpc3BsYXlGb3JTZWxlY3RlZE9wdGlvbigpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBmdW5jdGlvbiBsb2FkUGF5bWVudE9wdGlvbnMod2FsbGV0cykge1xyXG4gICAgICAgIC8vIGNsZWFyIHBheW1lbnQgb3B0aW9uc1xyXG4gICAgICAgIHBheW1lbnRPcHRpb25zID0gW107XHJcblxyXG4gICAgICAgIC8vIGxvb3AgdGhyb3VnaCB3YWxsZXRzIGFuZCBjcmVhdGUgcGF5bWVudCBvcHRpb25zXHJcbiAgICAgICAgaWYgKHdhbGxldHMgJiYgd2FsbGV0cy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHdhbGxldHMuZm9yRWFjaChmdW5jdGlvbiAodykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCh3LklzQ3JlZGl0Q2FyZCAmJiB3aW5kb3cud2luZG93LnRyYW5zYWN0aW9uTW9kZWwuQ2FuVXNlU2F2ZWRDcmVkaXRDYXJkcylcclxuICAgICAgICAgICAgICAgICAgICB8fCAoIXcuSXNDcmVkaXRDYXJkICYmIHdpbmRvdy53aW5kb3cudHJhbnNhY3Rpb25Nb2RlbC5DYW5Vc2VTYXZlZEVDaGVja3MpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgPSB3LklzQ3JlZGl0Q2FyZCA/ICdDYXJkJyA6ICdBY2NvdW50JztcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZGVzYyA9IHcuSWRlbnRpZmllciA/ICcgKCcgKyB3LklkZW50aWZpZXIgKyAnKScgOiAnJztcclxuICAgICAgICAgICAgICAgICAgICBwYXltZW50T3B0aW9ucy5wdXNoKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjcmVhdGVQYXltZW50T3B0aW9uKHcuSUQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlICsgJyBlbmRpbmcgaW4gJyArIHcuQWNjb3VudExhc3Q0ICsgZGVzYyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcuQWNjb3VudCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcuSXNDcmVkaXRDYXJkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdy5Jc0RlZmF1bHQpXHJcbiAgICAgICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBhZGQgYWRkaXRpb25hbCBwYXltZW50IG9wdGlvbnMgaWYgZW5hYmxlZFxyXG4gICAgICAgIGlmICh3aW5kb3cudHJhbnNhY3Rpb25Nb2RlbC5DYW5CaWxsVG9BY2NvdW50ICYmIHdpbmRvdy50cmFuc2FjdGlvbk1vZGVsLkFjY291bnROdW1iZXIpIHtcclxuICAgICAgICAgICAgdmFyIGFjY291bnQgPSB3aW5kb3cudHJhbnNhY3Rpb25Nb2RlbC5BY2NvdW50TnVtYmVyICsgJyAtICcgKyB3aW5kb3cudHJhbnNhY3Rpb25Nb2RlbC5BY2NvdW50TmFtZTtcclxuICAgICAgICAgICAgcGF5bWVudE9wdGlvbnMucHVzaChcclxuICAgICAgICAgICAgICAgIGNyZWF0ZVBheW1lbnRPcHRpb24oYmlsbFRvQWNjb3VudElkLCAnQmlsbCB0byBDaGFkd2VsbCBBY2NvdW50JywgYWNjb3VudCwgZmFsc2UsIGZhbHNlKVxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHdpbmRvdy50cmFuc2FjdGlvbk1vZGVsLkNhbkFkZENyZWRpdENhcmQpIHtcclxuICAgICAgICAgICAgcGF5bWVudE9wdGlvbnMucHVzaChcclxuICAgICAgICAgICAgICAgIGNyZWF0ZVBheW1lbnRPcHRpb24obmV3Q3JlZGl0Q2FyZElkLCAnTmV3IENyZWRpdCBDYXJkJywgbnVsbCwgdHJ1ZSwgZmFsc2UpXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAg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AnKERlZmF1bHQpJyA6ICcnO1xyXG5cclxuICAgICAgICBpZiAoaWQgPT09IGJpbGxUb0FjY291bnRJZCkge1xyXG4gICAgICAgICAgICBjbGFzc2VzLnB1c2goYnRhSWNvbkNsYXNzKTtcclxuICAgICAgICAgICAgdHlwZSA9ICdBY2NvdW50JztcclxuICAgICAgICB9IGVsc2UgaWYgKGlzQ3JlZGl0Q2FyZCkge1xyXG4gICAgICAgICAgICBjbGFzc2VzLnB1c2goY2NJY29uQ2xhc3MpO1xyXG4gICAgICAgICAgICB0eXBlID0gJ0NhcmQnO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGNsYXNzZXMucHVzaChlY0ljb25DbGFzcyk7XHJcbiAgICAgICAgICAgIHR5cGUgPSAnRUNoZWNrJztcclxuICAgICAgICB9XHJcbiAgICAgICAgY2xhc3Nlcy5wdXNoKGlkID09PSBuZXdDcmVkaXRDYXJkSWQgfHwgaWQgPT09IG5ld0VDaGVja0lkID8gJ3RleHQtcHJpbWFyeScgOiAnJyk7XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIElEOiBpZCxcclxuICAgICAgICAgICAgVGV4dDogdGV4dCxcclxuICAgICAgICAgICAgVmFsdWU6IHZhbHVlLFxyXG4gICAgICAgICAgICBJc0NyZWRpdENhcmQ6IGlzQ3JlZGl0Q2FyZCxcclxuICAgICAgICAgICAgQ2xhc3NlczogY2xhc3Nlcy5qb2luKCcgJyksXHJcbiAgICAgICAgICAgIFR5cGU6IHR5cGUsXHJcbiAgICAgICAgICAgIElzRGVmYXVsdDogaXNEZWZhdWx0LFxyXG4gICAgICAgICAgICBEZWZhdWx0SHRtbDogZGVmYXVsdEh0bWxcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIG9uUGF5bWVudE9wdGlvbkNoYW5nZWQoZSkge1xyXG4gICAgICAgIC8vIGNsZWFyIGN1cnJlbnQgaW5wdXRzXHJcbiAgICAgICAgY2xlYXJNb2RhbElucHV0cygpO1xyXG5cclxuICAgICAgICB0b2dnbGVEaXNwbGF5Rm9yU2VsZWN0ZWRPcHRpb24oZSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gdG9nZ2xlRGlzcGxheUZvclNlbGVjdGVkT3B0aW9uKGUpIHtcclxuICAgICAgICBpZiAoIXBheW1lbnRPcHRpb25zKVxyXG4gICAgICAgICAgICByZXR1cm47XHJcblxyXG4gICAgICAgIHZhciBzZWxlY3RlZCA9IGdldFNlbGVjdGVkUGF5bWVudE9wdGlvbigpO1xyXG4gICAgICAgIGlmICghc2VsZWN0ZWQpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBkZXRlcm1pbmUgZm9ybSB0byBkaXNwbGF5XHJcbiAgICAgICAgaWYgKHNlbGVjdGVkLklEID09PSBuZXdDcmVkaXRDYXJkSWQpIHtcclxuICAgICAgICAgICAgJG5ld0VDRm9ybS5oaWRlKCk7XHJcbiAgICAgICAgICAgICRzYXZlZEZvcm0uaGlkZSgpO1xyXG4gICAgICAgICAgICAkbmV3Q0NGb3JtLmZhZGVJbignc2xvdycpO1xyXG4gICAgICAgICAgICAkc3VibWl0QnV0dG9uLnZhbCgnUGF5IFdpdGggQ2FyZCcpO1xyXG4gICAgICAgICAgICAkc3VibWl0QnV0dG9uLnNob3coKTtcclxuICAgICAgICB9IGVsc2UgaWYgKHNlbGVjdGVkLklEID09PSBuZXdFQ2hlY2tJZCkge1xyXG4gICAgICAgICAgICAkc2F2ZWRGb3JtLmhpZGUoKTtcclxuICAgICAgICAgICAgJG5ld0NDRm9ybS5oaWRlKCk7XHJcbiAgICAgICAgICAgICRuZXdFQ0Zvcm0uZmFkZUluKCdzbG93Jyk7XHJcbiAgICAgICAgICAgICRzdWJtaXRCdXR0b24udmFsKCdQYXkgV2l0aCBFQ2hlY2snKTtcclxuICAgICAgICAgICAgJHN1Ym1p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VFQ2hlY2tEZWZhdWx0T3B0aW9uO1xyXG4gICAgICAgICAgICBpZiAoZGVmYXVsdFRvRUNoZWNrKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBtYWtlIGVDaGVjayB0aGUgZGVmYXVsdCBvcHRpb24sIGZpcnN0IGZpbmQgYW55IHNhdmVkIGVDaGVja3NcclxuICAgICAgICAgICAgICAgIHZhciBlQ2hlY2tPcHRpb24gPSBwYXltZW50T3B0aW9ucy5maW5kKGZ1bmN0aW9uIChmKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGYuSXNDcmVkaXRDYXJkID09PSBmYWxzZSAmJiBmLklEICE9PSBuZXdFQ2hlY2tJZDtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgLy8gaWYgdGhlcmUgYXJlIG5vIHNhdmVkIGVDaGVja3MsIHRoZW4gZmluZCB0aGUgbmV3IGVDaGVjayBvcHRpb25cclxuICAgICAgICAgICAgICAgIGlmICghZUNoZWNrT3B0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZUNoZWNrT3B0aW9uID0gcGF5bWVudE9wdGlvbnMuZmluZChmdW5jdGlvbiAoZikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZi5JRCA9PT0gbmV3RUNoZWNrSWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoZUNoZWNrT3B0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZGVmID0gZUNoZWNrT3B0aW9uO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIGlmIHRoZXJlIGlzIHN0aWxsIG5vIHZhbGlkIG9wdGlvbiwgZGVmYXVsdCB0byB0aGUgZmlyc3QgcGF5bWVudCBtZXRob2RcclxuICAgICAgICAgICAgaWYgKCFkZWYpIHt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xuICAgICAgICAgICAgICAgIHRlbXBsYXRlOiAnPHNwYW4gY2xhc3M9XCIjOiBDbGFzc2VzICNcIiA+ICM6IFRleHQgIzwvc3Bhbj4nLFxyXG4gICAgICAgICAgICAgICAgY2hhbmdlOiBvblBheW1lbnRPcHRpb25DaGFuZ2VkXHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAvLy0tLS0tIEhhbmRsZSBGb3JtIFN1Ym1pdFxyXG4gICAgICAgIGpRdWVyeSgnI2NyZWF0ZS10cmFuc2FjdGlvbi1mb3JtJywgbmFtZXNwYWNlKS52YWxpZGF0ZShcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgc3VibWl0SGFuZGxlcjogZnVuY3Rpb24gKGZvcm0pIHtcclxuICAgICAgICAgICAgICAgICAgICBjbGVhck1lc3NhZ2VzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc3VibWl0VHJhbnNhY3Rpb24oKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vLS0tLS0gSGFuZGxlIE1vZGFsIENsb3NlXHJcbiAgICAgICAgJCgnI2NyZWF0ZS10cmFuc2FjdGlvbi1tb2RhbCcsIG5hbWVzcGFjZSlcclxuICAgICAgICAgICAgLm9uKCdoaWRkZW4uYnMubW9kYWwnLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGRldGVybWluZSBpZiB3YWxsZXRzIG5lZWQgcmVsb2FkZWRcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVsb2FkV2FsbGV0c0FmdGVyVHJhbnNhY3Rpb24pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbG9hZFdhbGxldHMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsb2FkV2FsbGV0c0FmdGVyVHJhbnNhY3Rpb24gPSBmYWxzZTtcclxuICAgICAgICAgICAg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ZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBqUXVlcnkobW9kYWxTZWxlY3RvciwgbmFtZXNwYWNlKS5tb2RhbCgnaGlkZScpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhck1vZGFsSW5wdXRzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICQod2luZG93KS50cmlnZ2VyKHdhbGxldENyZWF0ZWRFdmVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSwgMTAwMCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRXJyb3IhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHNob3cgZXJyb3IgbWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgICAgIGdlbmVyYWxMaWJyYXJ5LmFkZEVycm9yTWVzc2FnZShcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzU2VsZWN0b3IsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzcGFjZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UuTWVzc2FnZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb24sIFwiRXJyb3IhXCIpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIHNob3cgZXJyb3IgbWVzc2FnZVxyXG4gICAgICAgICAgICAgICAgZ2VuZXJhbExpYnJhcnkuYWRkRXJyb3JNZXNzYWdlKFxyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yc1NlbGVjdG9yLFxyXG4gICAgICAgICAgICAgICA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mFtZXNwYWNlKS5hdHRyKCd2YWx1ZScpO1xyXG4gICAgICAgICAgICB2YXIgZnJvbSA9IGpRdWVyeSgnI2VtYWlsLWEtZnJpZW5kLWZyb20nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgcmVjaXBpZW50ID0galF1ZXJ5KCcjZW1haWwtYS1mcmllbmQtdG8nLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgbWVzc2FnZSA9IGpRdWVyeSgnI2VtYWlsLWEtZnJpZW5kLW1lc3NhZ2UnLCBuYW1lc3BhY2UpLnZhbCgpO1xyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgdmFyIGRhdGEgPVxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBzZW5kZXI6IGZyb20sXHJcbiAgICAgICAgICAgICAgICByZWNpcGllbnQ6IHJlY2lwaWVudCxcclxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsXHJcbiAgICAgICAgICAgICAgICBjb2RlOiBwaWRcclxuICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgIHZhciByZXF1ZXN0ID0galF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IFwiL0VtYWlsQUZyaWVuZC9FbWFpbC1BLUZyaWVuZFwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGFcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBcclxuICAgICAgICAgICAgcmVxdWVzdC5kb25lKGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgalF1ZXJ5KCcjZW1haWwtYS1mcmllbmQtc3VjY2VzcycsIG5hbWVzcGFjZSkuc2hvdygpO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlcXVlc3QuZmFpbChmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSgnI2VtYWlsLWEtZnJpZW5kLWVycm9yJywgbmFtZXNwYWNlKS5zaG93KCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uKClcclxuICAgIHtcclxuICAgICAgICBpZiAoIGpRdWVyeSggbmFtZXNwYWNlICkubGVuZ3RoIDwgMSApXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpbml0SGFuZGxlcnMoKTtcclxuICAgIH07XHJcbn1cclxuXHJcblxyXG4vLy0tLS0tIFdoZW4gcGFnZSBsb2Fkc1xyXG5qUXVlcnkoIGRvY3VtZW50ICkucmVhZHkoIGZ1bmN0aW9uKClcclxue1xyXG4gICAgbmV3IENvbXBvbmVudCgpLmluaXQoKTtcclxufSk7XHJcbiIsIlxyXG5mdW5jdGlvbiBDb21wb25lbnQoKVxyXG57XHJcbiAgICB2YXIgbmFtZXNwYWNlID0gJy5DaGFkd2VsbC1TaGFyZWQtTGF5b3V0JztcclxuXHJcblxyXG4gIFxyXG5cclxuICAgIHRoaXMuaW5pdCA9IGZ1bmN0aW9uKClcclxuICAgIHtcclxuICAgICAgICAvL09EUCBjb21tZXJjZSB0cmFja2luZyBzY3JpcHQgXHJcbiAgICAgICAgICAgIC8vIFByb2R1Y3QgZGV0YWlsIHZpZXdcclxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdwcm9kdWN0Q29kZScpKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcHJvZHVjdENvZGUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncHJvZHVjdENvZGUnKTtcclxuICAgICAgICAgICAgICAgIHphaXVzLmV2ZW50KCdwcm9kdWN0JywgeyBhY3Rpb246ICdkZXRhaWwnLCBwcm9kdWN0X2lkOiBwcm9kdWN0Q29kZS52YWx1ZSB9KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdqc0NoZWNrb3V0Rm9ybScpKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcHJvZHVjdENvZGUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncHJvZHVjdENvZGUnKTtcclxuICAgICAgICAgICAgICAgIHphaXVzLmV2ZW50KCdjaGVja291dCcsIHsgYWN0aW9uOiAnc3RhcnQnIH0pO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAod2luZG93LmxvY2F0aW9uLmhyZWYuaW5kZXhPZihcIm9yZGVyLWNvbmZpcm1hdGlvblwiKSA+IDApIHtcclxuICAgICAgICAgICAgICAgIHZhciBwcm9kdWN0Q29kZSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdwcm9kdWN0Q29kZScpO1xyXG4gICAgICAgICAgICAgICAgemFpdXMuZXZlbnQoJ2NoZWNrb3V0JywgeyBhY3Rpb246ICdjb21wbGV0ZScgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8gQWRkIHRvIGNhcnRcclxuICAgICAgICAgICAgJChkb2N1bWVudCkuZmluZCgnLmFkZFRvQ2FydCcpLmVhY2goZnVuY3Rpb24gKGksIGUpIHtcclxuICAgICAgICAgICAgICAgICQoZSkuY2xpY2soZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJCh0aGlzKS5hdHRyKCdkYXRhJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgemFpdXMuZXZlbnQoJ3Byb2R1Y3QnLCB7IGFjdGlvbjogJ2FkZF90b19jYXJ0JywgcHJvZHVjdF9pZDogY29kZSB9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIC8vIEFkZCB0byB3aXNobGlzdFxyXG4gICAgICAgICAgICAkKGRvY3VtZW50KS5maW5kKCcuYWRkVG9XaXNobGlzdCcpLmVhY2goZnVuY3Rpb24gKGksIGUpIHtcclxuICAgICAgICAgICAgICAgICQoZSkuY2xpY2soZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJCh0aGlzKS5hdHRyKCdkYXRhJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgemFpdXMuZXZlbnQoJ3Byb2R1Y3QnLCB7IGFjdGlvbjogJ2FkZF90b193aXNobGlzdCcsIHByb2R1Y3RfaWQ6IGNvZGUgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAvLyBSZW1vdmUgZnJvbSBjYXJ0XHJcbiAgICAgICAgICAgICQoJyNqcy1jYXJ0LXBvcG92ZXInKS5vbignY2xpY2snLCAnLmpzUmVtb3ZlQ2FydEl0ZW0nLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICQodGhpcykuYXR0cignY29kZScpO1xyXG4gICAgICAgICAgICAgICAgemFpdXMuZXZlbnQoJ3Byb2R1Y3QnLCB7IGFjdGlvbjogJ3JlbW92ZV9mcm9tX2NhcnQnLCBwcm9kdWN0X2lkOiBjb2RlIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICQoJy5sYXJnZS1jYXJ0Jykub24oJ2NsaWNrJywgJy5qc1JlbW92ZUNhcnRJdGVtJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAkKHRoaXMpLmF0dHIoJ2NvZGUnKTtcclxuICAgICAgICAgICAgICAgIHphaXVzLmV2ZW50KCdwcm9kdWN0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vdXNlbHNcclxuICAgICAgICBqUXVlcnkoJy5wcm9kdWN0LXNwZWNpYWxzJywgbmFtZXNwYWNlKS5vd2xDYXJvdXNlbChcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbmF2OiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGxvb3A6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgZG90czogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIG1hcmdpbjogNDAsXHJcbiAgICAgICAgICAgICAgICBvblJlc2l6ZTogZnVuY3Rpb24gKCkgeyBub3JtYWxpemVQcm9kdWN0SGVpZ2h0cygpIH0sXHJcbiAgICAgICAgICAgICAgICBvbkluaXRpYWxpemVkOiBmdW5jdGlvbiAoKSB7IG5vcm1hbGl6ZVByb2R1Y3RIZWlnaHRzKCkgfSxcclxuICAgICAgICAgICAgICAgIHJlc3BvbnNpdmU6XHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgMDogeyBpdGVtczogMSB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDM4MDogeyBpdGVtczogMiB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDUwMDogeyBpdGVtczogMyB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDkwMDogeyBpdGVtczogNSB9LFxyXG4gICAgICAgICAgICAgICAgICAgIDEzMDA6IHsgaXRlbXM6IDYgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgalF1ZXJ5KCcudHJhY2stdmlldy1jYXJvdXNlbC1pdGVtJywgbmFtZXNwYWNlKS5vbignY2xpY2snLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBza3UgPSAkKHRoaXMpLmRhdGEoJ3NrdScpO1xyXG4gICAgICAgICAgICB2YXIgcHJpY2UgPSAkKHRoaXMpLmRhdGEoJ3ByaWNlJyk7XHJcbiAgICAgICAgICAgIHZhciBkaXNw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JycsIGNvbG9yOiAnJyB9KTtcclxuICAgICAgICAgICAgc2VsZi5yZXNldEJ1dHRvbkNvbnRlbnQoYW5pbWF0aW9uKTtcclxuICAgICAgICB9LCAyMDAwKTtcclxuICAgIH07XHJcblxyXG4gICAgQnV0dG9uQW5pbWF0b3IucHJvdG90eXBlLnJlc2V0QW5pbWF0aW9uID0gZnVuY3Rpb24gKGFuaW1hdGlvbikge1xyXG4gICAgICAgIGFuaW1hdGlvbi5idXR0b24uY3NzKHsgdHJhbnNpdGlvbjogJ2FsbCAwLjNzIGVhc2UtaW4tb3V0JywgYmFja2dyb3VuZENvbG9yOiAnJywgY29sb3I6ICcnIH0pO1xyXG4gICAgICAgIHRoaXMucmVzZXRCdXR0b25Db250ZW50KGFuaW1hdGlvbik7XHJcbiAgICB9O1xyXG5cclxuICAgIHdpbmRvdy5CdXR0b25BbmltYXRvciA9IG5ldyBCdXR0b25BbmltYXRvcigpO1xyXG59KShqUXVlcnkpOyIsIihmdW5jdGlvbiAoJCkge1xyXG4gICAgZnVuY3Rpb24gQ2hlY2tib3hBbmltYXRvcigpIHsgfVxyXG5cclxuICAgIENoZWNrYm94QW5pbWF0b3IucHJvdG90eXBlLmdldEFuaW1hdGlvblN0eWxlID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIHJldHVybiAnY3Vyc29yOiBub3QtYWxsb3dlZDsnO1xyXG4gICAgfTtcclxuXHJcbiAgICBDaGVja2JveEFuaW1hdG9yLnByb3RvdHlwZS5jcmVhdGVMb2FkZXIgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgcmV0dXJuICQoJzxkaXY+PC9kaXY+JykuY3NzKHtcclxuICAgICAgICAgICAgZGlzcGxheTogJ2lubGluZS1ibG9jaycsXHJcbiAgICAgICAgICAgIHdpZHRoOiAnMTVweCcsXHJcbiAgICAgICAgICAgIGhlaWdodDogJzE1cHgnLFxyXG4gICAgICAgICAgICBib3JkZXI6ICczcHggc29saWQgI2YzZjNmMycsIC8qIExpZ2h0IGdyZXkgKi9cclxuICAgICAgICAgICAgYm9yZGVyVG9wOiAnM3B4IHNvbGlkICMzNDk4ZGInLCAvKiBCbHVlICovXHJcbiAgICAgICAgICAgIGJvcmRlclJhZGl1czogJzUwJScsXHJcbiAgICAgICAgICAgIGFuaW1hdGlvbjogJ3NwaW4gMnMgbGluZWFyIGluZmluaXRlJ1xyXG4gICAgICAgIH0pO1xyXG4gICAgfTtcclxuXHJcbiAgICBDaGVja2JveEFuaW1hdG9yLnByb3RvdHlwZS5zdGFydEFuaW1hdGlvbiA9IGZ1bmN0aW9uIChjaGVja2JveCkge1xyXG4gICAgICAgIHZhciAkY2hlY2tib3ggPSAkKGNoZWNrYm94KTtcclxuICAgICAgICB2YXIgaXNGcm96ZW4gPSAkY2hlY2tib3guYXR0cignZnJvemVuJyk7XHJcbiAgICAgICAgaWYgKGlzRnJvemVuKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHZhciBhbmltYXRpb24gPSB7XHJcbiAgICAgICAgICAgIGNoZWNrYm94OiAkY2hlY2tib3gsXHJcbiAgICAgICAgICAgIG9yaWdpbmFsU3R5bGU6ICRjaGVja2JveC5hdHRyKCdzdHlsZScpIHx8ICcnLFxyXG4gICAgICAgICAgICBhbmltYXRpbmc6IGZhbHNlXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgJGNoZWNrYm94LmF0dHIoJ2Rpc2FibGVkJywgdHJ1ZSlcclxuICAgICAgICAgICAgLmF0dHIoJ2Zyb3plbicsIHRydWUpXHJcbiAgICAgICAgICAgIC5hdHRyKCdzdHlsZScsIGFuaW1hdGlvbi5vcmlnaW5hbFN0eWxlICsgJzsgJyArIHRoaXMuZ2V0QW5pbWF0aW9uU3R5bGUoKSk7XHJcblxyXG4gICAgICAgIHZhciBsb2FkZXIgPSB0aGlzLmNyZWF0ZUxvYWRlcigpO1xyXG4gICAgICAgICRjaGVja2JveC5hZnRlcihsb2FkZXIpO1xyXG4gICAgICAgIGFuaW1hdGlvbi5sb2FkZXIgPSBsb2FkZXI7XHJcblxyXG4gICAgICAgIHJldHVybiBhbmltYXRpb247XHJcbiAgICB9O1xyXG5cclxuICAgIENoZWNrYm94QW5pbWF0b3IucHJvdG90eXBlLmVuZEFuaW1hdGlvbiA9IGZ1bmN0aW9uIChhbmltYXRpb24pIHtcclxuICAgICAgICBhbmltYXRpb24uY2hlY2tib3gucmVtb3ZlQXR0cignZGlzYWJsZWQnKVxyXG4gICAgICAgICAgICAucmVtb3ZlQXR0cignZnJvemVuJylcclxuICAgICAgICAgICAgLmF0dHIoJ3N0eWxlJywgYW5pbWF0aW9uLm9yaWdpbmFsU3R5bGUpO1xyXG5cclxuICAgICAgICBpZiAoYW5pbWF0aW9uLmxvYWRlcikge1xyXG4gICAgICAgICAgICBhbmltYXRpb24ubG9hZGVyLnJlbW92ZSgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBhbmltYXRpb24uYW5pbWF0aW5nID0gZmFsc2U7XHJcbiAgICB9O1xyXG5cclxuICAgIENoZWNrYm94QW5pbWF0b3IucHJvdG90eXBlLnNob3dTdWNjZXNzQW5pbWF0aW9uID0gZnVuY3Rpb24gKGFuaW1hdGlvbikge1xyXG4gICAgICAgIGlmIChhbmltYXRpb24uYW5pbWF0aW5nKSByZXR1cm47XHJcbiAgICAgICAgYW5pbWF0aW9uLmFuaW1hdGluZyA9IHRydWU7XHJcblxyXG4gICAgICAgIGlmIChhbmltYXRpb24ubG9hZGVyKSB7XHJcbiAgICAgICAgICAgIGFuaW1hdGlvbi5sb2FkZXIuY3NzKHtcclxuICAgICAgICAgICAgICAgIGJvcmRlclRvcENvbG9yOiAnIzI4YTc0NScsIC8vIEdyZWVuLCBmb3Igc3VjY2Vzc1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0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2b3JpdGUnKSkudG9Mb3dlckNhc2UoKSA9PT0gJ3RydWUnO1xyXG4gICAgICAgICAgICBjb25zdCBjb2RlID0gZWxlbWVudC5kYXRhKCdjb2RlJyk7XHJcblxyXG4gICAgICAgICAgICAvLyB0b2dnbGUgZmF2b3JpdGUgaWNvblxyXG4gICAgICAgICAgICB0b2dnbGVGYXZvcml0ZUljb24oZWxlbWVudCwgaXNGYXZvcml0ZSk7XHJcblxyXG4gICAgICAgICAgICAvLyBtYWtlIGFwaSBjYWxsXHJcbiAgICAgICAgICAgIGlmIChpc0Zhdm9yaXRlKSB7XHJcbiAgICAgICAgICAgICAgICAkc2VsZi5yZW1vdmVQcm9kdWN0KGNvZGUsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBzdWNjZXNzIGNhbGxiYWNrXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVsZW1lbnQsIGNvZGUsICFpc0Zhdm9yaXRlKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuIHRvIG9yaWdpbmFsIHN0YXRlXHJcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlRmF2b3JpdGVJY29uKGVsZW1lbnQsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkc2VsZi5hZGRQcm9kdWN0KGNvZGUsIDEsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBzdWNjZXNzIGNhbGxiYWNrXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKG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nVuY3Rpb24gZ2V0Qm94KG5hbWVzcGFjZSwgc2VsZWN0b3IpIHtcclxuICAgICAgICByZXR1cm4galF1ZXJ5KHNlbGVjdG9yLCBuYW1lc3BhY2UpLmdldCgwKS5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcclxuICAgIH1cclxuXHJcbiAgICB0aGlzLnN0aWNreVRvSGVhZGVyQm90dG9tID0gZnVuY3Rpb24gKCRlbGVtZW50VG9TdGlja3kpIHtcclxuICAgICAgICAvLyBzZXQgei1pbmRleCBcclxuICAgICAgICAkZWxlbWVudFRvU3RpY2t5LmNzcygnei1pbmRleCcsICcxMCcpO1xyXG5cclxuICAgICAgICAvLyBnZXQgb3JpZ2luYWwgdG9wIHBvc2l0aW9uXHJcbiAgICAgICAgdmFyIG9yaWdpbmFsVG9wID0gJGVsZW1lbnRUb1N0aWNreS5vZmZzZXQoKS50b3A7XHJcblxyXG4gICAgICAgIC8vIHJlZ2lzdGVyIHdpbmRvdyBldmVudHMgXHJcbiAgICAgICAgJCh3aW5kb3cpLnJlc2l6ZShzdGlja3lUb0JvdHRvbSk7XHJcbiAgICAgICAgJCh3aW5kb3cpLnNjcm9sbChzdGlja3lUb0JvdHRvbSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHN0aWNreVRvQm90dG9tKCkge1xyXG4gICAgICAgICAgICAvLyBnZXQgaGVhZGVyIChkZXNrdG9wIC8gbW9iaWxlKVxyXG4gICAgICAgICAgICB2YXIgJGhlYWRlciA9ICQoJy5oZWFkZXItYm90dG9tJywgZG9jdW1lbnQpO1xyXG4gICAgICAgICAgICBpZiAoISRoZWFkZXIuaXMoJzp2aXNpYmxlJykpIHtcclxuICAgICAgICAgICAgICAgICRoZWFkZXIgPSAkKCcucm93LXR3bycsIGRvY3VtZW50KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gZ2V0IHRhcmdldCBib3R0b21cclxuICAgICAgICAgICAgdmFyIHRhcmdldEJvdHRvbSA9ICRoZWFkZXIub2Zmc2V0KCkudG9wICsgJGhlYWRlci5vdXRlckhlaWdodCgpO1xyXG5cclxuICAgICAgICAgICAgLy8gZ2V0IGVsZW1lbnQgdG9wXHJcbiAgICAgICAgICAgIHZhciBlbGVtZW50VG9wID0gJGVsZW1lbnRUb1N0aWNreS5vZmZzZXQoKS50b3A7XHJcblxyXG4gICAgICAgICAgICAvLyBnZXQgZWxlbWVudCBwYXJlbnRcclxuICAgICAgICAgICAgdmFyICRwYXJlbnQgPSAkZWxlbWVudFRvU3RpY2t5LnBhcmVudCgpO1xyXG5cclxuICAgICAgICAgICAgLy8gaWYgZWxlbWVudCB0b3AgaXMgbGVzcyB0aGFuIHRhcmdldCBib3R0b21cclxuICAgICAgICAgICAgaWYgKGVsZW1lbnRUb3AgPCB0YXJnZXRCb3R0b20pIHtcclxuICAgICAgICAgICAgICAgIC8vIHNldCBlbGVtZW50IHRvcCB0byB0YXJnZXQgYm90dG9tXHJcbiAgICAgICAgICAgICAgICAkZWxlbWVudFRvU3RpY2t5Lm9mZnNldCh7IHRvcDogdGFyZ2V0Qm90dG9tIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGxvY2sgZWxlbWVudCBib3R0b20gdG8gcGFyZW50IGJvdHRvbSBcclxuICAgICAgICAgICAgICAgIHZhciBwYXJlbnRCb3R0b20gPSAkcGFyZW50Lm9mZnNldCgpLnRvcCArICRwYXJlbnQub3V0ZXJIZWlnaHQoKTtcclxuICAgICAgICAgICAgICAgIGlmICgkZWxlbWVudFRvU3RpY2t5Lm9mZnNldCgpLnRvcCArICRlbGVtZW50VG9TdGlja3kub3V0ZXJIZWlnaHQoKSA+IHBhcmVudEJvdHRvbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICRlbGVtZW50VG9TdGlja3kub2Zmc2V0KHsgdG9wOiBwYXJlbnRCb3R0b20gLSAkZWxlbWVudFRvU3RpY2t5Lm91dGVySGVpZ2h0KCkgfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZWxlbWVudFRvcCA+IG9yaWdpbmFsVG9wKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBjbGFtcCBlbGVtZW50IHRvcCBiZXR3ZWVuIG9yaWdpbmFsIHRvcCBhbmQgdGFyZ2V0IGJvdHRvbVxyXG4gICAgICAgICAgICAgICAgJGVsZW1lbnRUb1N0aWNreS5vZmZzZXQoeyB0b3A6IE1hdGgubWF4KG9yaWdpbmFsVG9wLCB0YXJnZXRCb3R0b20pIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGxvY2sgZWxlbWVudCBib3R0b20gdG8gcGFyZW50IHRvcCBcclxuICAgICAgICAgICAgICAgIGlmICgkZWxlbWVudFRvU3RpY2t5Lm9mZnNldCgpLnRvcCA8ICRwYXJlbnQub2Zmc2V0KCkudG9wKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGVsZW1lbnRUb1N0aWNreS5vZmZzZXQoeyB0b3A6ICRwYXJlbnQub2Zmc2V0KCkudG9wIH0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIGlmIGVsZW1lbnQgaXMgYmFjayB0byBvcmlnaW5hbCBwb3NpdGlvbiwgbWFrZSBzdXJlIGl0IGRvZXMgbm90IGludGVyc2VjdCB0aGUgbmV4dCBlbGVtZW50XHJcbiAgICAgICAgICAgICAgICBpZiAoJGVsZW1lbnRUb1N0aWNreS5vZmZzZXQoKS50b3AgPT0gb3JpZ2luYWxUb3ApIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgJG5leHQgPSAkZWxlbWVudFRvU3RpY2t5Lm5leHQoKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoJG5leHQubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmV4dFRvcCA9ICRuZXh0Lm9mZnNldCgpLnRvcDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRlbGVtZW50VG9TdGlja3kub2Zmc2V0KCkudG9wICsgJGVsZW1lbnRUb1N0aWNreS5vdXRlckhlaWdodCgpID4gbmV4dFRvcCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGVsZW1lbnRUb1N0aWNreS5vZmZzZXQoeyB0b3A6IG5leHRUb3AgLSAkZWxlbWVudFRvU3RpY2t5Lm91dGVySGVpZ2h0KCkgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuICAgIHRoaXMubWF0Y2hCb3R0b21FZGdlID0gZnVuY3Rpb24gKG5hbWVzcGFjZSwgZTEsIGUyKSB7XHJcbiAgICAgICAgdmFyIGEgPSBnZXRCb3gobmFtZXNwYWNlLCBlMSk7XHJcbiAgICAgICAgdmFyIGIgPSBnZXRCb3gobmFtZXNwYWNlLCBlMik7XHJcbiAgICAgICAgdmFyIGhkID0gKGEudG9wICsgYS5oZWlnaHQpIC0gKGIudG9wICsgYi5oZWlnaHQpO1xyXG5cclxuICAgICAgICBpZiAoaGQgPj0gMCkge1xyXG4gICAgICAgICAgICB2YXIgaCA9IGpRdWVyeShlMiwgbmFtZXNwYWNlKS5oZWlnaHQoKTtcclxuXHJcbiAgICAgICAgICAgIGpRdWVyeShlMiwgbmFtZXNwYWNlKS5oZWlnaHQoaCArIGhkKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIHZhciBoID0galF1ZXJ5KGUxLCBuYW1lc3BhY2UpLmhlaWdodCgpO1xyXG5cclxuICAgICAgICAgICAgalF1ZXJ5KGUxLCBuYW1lc3BhY2UpLmhlaWdodChoICsgTWF0aC5hYnMoaGQpKTtcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuXHJcbiAgICB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gICAgICAgIGNhcnQuc3VjY2Vzcy5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICBjYXJ0LmJ1dHRvbi5zaG93KCk7XHJcblxyXG4gICAgICAgICAgICB9LCAzMDAwKTtcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG5cclxuICAgIHRoaXMuc2hvd0FkZFRvQ2FydEZhaWx1cmUgPSBmdW5jdGlvbiAoY2FydCkge1xyXG4gICAgICAgIGNhcnQuZmFpbHVyZS5mYWRlSW4oMTAwMCwgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGNhcnQuZmFpbHVyZS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICBjYXJ0LmJ1dHRvbi5zaG93KCk7XHJcblxyXG4gICAgICAgICAgICB9LCAzMDAwKTtcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG5cclxuXHJcbiAgICB0aGlzLmhhbmRsZUFkZFRvQ2FydCA9IGZ1bmN0aW9uIChtZXNzYWdlLCBidXR0b24sIGNvZGUsIHF1YW50aXR5LCBhY2NvdW50SWQpIHtcclxuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgdmFyIGNhcnQgPSB0aGlzLmdldEFkZFRvQ2FydChtZXNzYWdlLCBidXR0b24pO1xyXG5cclxuICAgICAgICBjb25zdCBkYXRhID0ge1xyXG4gICAgICAgICAgICBDb2RlOiBjb2RlLFxyXG4gICAgICAgICAgICBRdWFudGl0eTogcXVhbnRpdHksXHJcbiAgICAgICAgICAgIEFjY291bnRJZDogYWNjb3VudElkXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgalF1ZXJ5LmFqYXgoXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIHVybDogJy9hcGkvU2hvcHBpbmdDYXJ0L0FkZC1Uby1DYXJ0LycsXHJcbiAgICAgICAgICAgIC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XJzZVN0cmluZ1RvTnVtYmVyKHZhbHVlKTtcclxuICAgICAgICAgICAgICAgIGRhdGFMYXllci5wdXNoKHtcclxuICAgICAgICAgICAgICAgICAgICBcImV2ZW50XCI6IGV2ZW50TmFtZSwgJ2Vjb21tZXJjZSc6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgW2l0ZW1zVmFyaWFibGVOYW1lXTogdHJhY2tlZEl0ZW1zLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW5jeTogXCJVU0RcIixcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhTGF5ZXIucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgXCJldmVudFwiOiBldmVudE5hbWUsICdlY29tbWVyY2UnOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFtpdGVtc1ZhcmlhYmxlTmFtZV06IHRyYWNrZWRJdGVtc1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuXHJcblxyXG4gICAgdGhpcy5yZWZyZXNoTWluaUNhcnQgPSBmdW5jdGlvbiAoY2FydCwgc2hvd0ZhaWx1cmVNZXNzYWdlKSB7XHJcbiAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkgeyAgLy80NDk2OiBhZGQgYSB3YWl0IGZvciBjYXJ0IHRvIGZ1bGx5IHVwZGF0ZSBvbiB0aGUgYmFjay1lbmQuXHJcbiAgICAgICAgICAgIGpRdWVyeS5hamF4KHtcclxuICAgICAgICAgICAgICAgIHVybDogJy9hcGkvU2hvcHBpbmdDYXJ0L1JlZnJlc2gvJyxcclxuICAgICAgICAgICAgICAgIHR5cGU6ICdHRVQnLFxyXG4gICAgICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSgnLkNoYWR3ZWxsLVNoYXJlZC1NaW5pU2hvcHBpbmdDYXJ0V3JhcHBlciAuYWpheC1yZWZyZXNoJykuaHRtbChyZXN1bHQpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FydCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXJ0LmJ1dHRvbi5mYWRlT3V0KDkwMCwgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5yZXNldEFkZFRvQ2FydEJ1dHRvbkNvbnRlbnQoY2FydCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2hvd0ZhaWx1cmVNZXNzYWdlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlicmFyeS5zaG93QWRkVG9DYXJ0RmFpbHVyZShjYXJ0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuc2hvd0FkZFRvQ2FydFN1Y2Nlc3MoY2FydCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSwgMTAwKTtcclxuICAgIH07XHJcblxyXG4gICAgdGhpcy5hZGRTdWNjZXNzTWVzc2FnZSA9IGZ1bmN0aW9uIChzZWxlY3RvciwgbmFtZXNwY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PSBpbWFnZS53aWR0aCxcclxuICAgICAgICAgICAgaGVpZ2h0ID0gaW1hZ2UuaGVpZ2h0O1xyXG4gICAgICAgIGlmICh3aWR0aCA+IGhlaWdodCkge1xyXG4gICAgICAgICAgICBpZiAod2lkdGggPiBtYXhTaXplKSB7XHJcbiAgICAgICAgICAgICAgICBoZWlnaHQgKj0gbWF4U2l6ZSAvIHdpZHRoO1xyXG4gICAgICAgICAgICAgICAgd2lkdGggPSBtYXhTaXplO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKGhlaWdodCA+IG1heFNpemUpIHtcclxuICAgICAgICAgICAgICAgIHdpZHRoICo9IG1heFNpemUgLyBoZWlnaHQ7XHJcbiAgICAgICAgICAgICAgICBoZWlnaHQgPSBtYXhTaXplO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNhbnZhcy53aWR0aCA9IHdpZHRoO1xyXG4gICAgICAgIGNhbnZhcy5oZWlnaHQgPSBoZWlnaHQ7XHJcbiAgICAgICAgY2FudmFzLmdldENvbnRleHQoJzJkJykuZHJhd0ltYWdlKGltYWdlLCAwLCAwLCB3aWR0aCwgaGVpZ2h0KTtcclxuICAgICAgICByZXR1cm4gY2FudmFzLnRvRGF0YVVSTCgnaW1hZ2UvanBlZycpO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIGV2YWx1YXRlcyBzaW1wbGUgYWRkaXRpb24gYW5kIHN1YnRyYWN0aW9uIGV4cHJlc3Npb25zIGZyb20gYSBzdHJpbmdcclxuICAgIHRoaXMuZXZhbHVhdGVFeHByZXNzaW9uID0gZnVuY3Rpb24gKHMpIHtcclxuICAgICAgICByZXR1cm4gKHMucmVwbGFjZSgvXFxzL2csICcnKS5tYXRjaCgvWytcXC1dPyhbMC05XFwuXSspL2cpIHx8IFtdKVxyXG4gICAgICAgICAgICAucmVkdWNlKGZ1bmN0aW9uIChzdW0sIHZhbHVl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4gICAgICAgIHZhciBpc0Zyb3plbiA9IGxpbmsuYXR0cignZnJvemVuJyk7XHJcbiAgICAgICAgaWYgKGlzRnJvemVuKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHZhciBvcmlnaW5hbFRleHQgPSBsaW5rLmh0bWwoKTtcclxuICAgICAgICB2YXIgYW5pbWF0aW9uID0ge1xyXG4gICAgICAgICAgICBsaW5rOiBsaW5rLFxyXG4gICAgICAgICAgICBvcmlnaW5hbFRleHQ6IG9yaWdpbmFsVGV4dCxcclxuICAgICAgICAgICAgYW5pbWF0aW5nOiBmYWxzZSxcclxuICAgICAgICAgICAgb3JpZ2luYWxTdHlsZTogbGluay5hdHRyKCdzdHlsZScpIHx8ICcnLFxyXG4gICAgICAgICAgICBvcmlnaW5hbENvbG9yOiBsaW5rLmNzcygnY29sb3InKVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGxpbmsuYXR0cignc3R5bGUnLCBhbmltYXRpb24ub3JpZ2luYWxTdHlsZSArICc7ICcgKyB0aGlzLmdldEFuaW1hdGlvblN0eWxlKCkpXHJcbiAgICAgICAgICAgIC5hdHRyKCdmcm96ZW4nLCB0cnVlKTtcclxuICAgICAgICBsaW5rLmh0bWwoY29udGVudCk7XHJcblxyXG4gICAgICAgIHJldHVybiBhbmltYXRpb247XHJcbiAgICB9O1xyXG5cclxuICAgIExpbmtBbmltYXRvci5wcm90b3R5cGUucmVzZXRMaW5rQ29udGVudCA9IGZ1bmN0aW9uIChhbmltYXRpb24pIHtcclxuICAgICAgICBhbmltYXRpb24ubGluay5odG1sKGFuaW1hdGlvbi5vcmlnaW5hbFRleHQpLmF0dHIoJ3N0eWxlJywgYW5pbWF0aW9uLm9yaWdpbmFsU3R5bGUpO1xyXG4gICAgICAgIGFuaW1hdGlvbi5saW5rLnJlbW92ZUF0dHIoJ2Zyb3plbicpO1xyXG4gICAgICAgIGFuaW1hdGlvbi5saW5rLmNz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AgICAgICAge1xyXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIixcclxuICAgICAgICAgICAgICAgIHVybDogXCIvbG9nbWVzc2FnZS9sb2dwYXltZW50bWV0aG9kZXJyb3JcIixcclxuICAgICAgICAgICAgICAgIGRhdGE6IHsgZXJyb3Jjb2RlOiBlYywgZXJyb3Jtc2c6IGVtLCBub3RlOiBuIH0sXHJcbiAgICAgICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxyXG4gICAgICAgICAgICAgICAgeGhyRmllbGRzOlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG4gICAgdGhpcy5sb2dFcnJvclRvU2VydmVyID0gZnVuY3Rpb24gKGVjLCBlbSwgbikge1xyXG4gICAgICAgIGpRdWVyeS5hamF4KFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICAgICAgdXJsOiBcIi9sb2dtZXNzYWdlL2xvZ2Vycm9yXCIsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiB7IGVycm9yY29kZTogZWMsIGVycm9ybXNnOiBlbSwgbm90ZTogbiB9LFxyXG4gICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgIHhockZpZWxkczpcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWVcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICB9O1xyXG59XHJcblxyXG4vLy0tLS0tIE1ha2UgdGhpcyBjb21wb25lbnQgYXZhaWxhYmxlIHRvIG90aGVyc1xyXG5tb2R1bGUuZXhwb3J0cyA9I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kZW50aWZpZXIsIG1ha2VEZWZhdWx0KSB7XHJcbiAgICAgICAgLy8gb25seSBncmFiIHRoZSBsYXN0IHR3byBjaGFycyBmcm9tIHRoZSB5ZWFyXHJcbiAgICAgICAgaWYgKGV4cFllYXIgJiYgZXhwWWVhci5sZW5ndGggPT09IDQpIHtcclxuICAgICAgICAgICAgZXhwWWVhciA9IGV4cFllYXIuc3Vic3RyaW5nKDIsIDQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoIW1ha2VEZWZhdWx0KVxyXG4gICAgICAgICAgICBtYWtlRGVmYXVsdCA9IGZhbHNlO1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIElEOiBpZCxcclxuICAgICAgICAgICAgQWNjb3VudDogbnVtYmVyLFxyXG4gICAgICAgICAgICBFeHBEYXRlOiBleHBNb250aCArIGV4cFllYXIsXHJcbiAgICAgICAgICAgIEZpcnN0TmFtZTogZmlyc3ROYW1lLFxyXG4gICAgICAgICAgICBMYXN0TmFtZTogbGFzdE5hbWUsXHJcbiAgICAgICAgICAgIElkZW50aWZpZXI6IGlkZW50aWZpZXIsXHJcbiAgICAgICAgICAgIElzRGVmYXVsdDogbWFrZURlZmF1bHRcclxuICAgICAgICB9O1xyXG4gICAgfTtcclxuXHJcbiAgICBQYXltZW50QXBpLnByb3RvdHlwZS5jcmVhdGVFQ2hlY2tNb2RlbCA9IGZ1bmN0aW9uIChpZCwgYWNjb3VudCwgcm91dGluZ051bWJlciwgZmlyc3ROYW1lLCBsYXN0TmFtZSwgYWNjb3VudFR5cGUsIGlkZW50aWZpZXIsIG1ha2VEZWZhdWx0KSB7XHJcbiAgICAgICAgaWYgKCFtYWtlRGVmYXVsdClcclxuICAgICAgICAgICAgbWFrZURlZmF1bHQgPSBmYWxzZTtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBJRDogaWQsXHJcbiAgICAgICAgICAgIEFjY291bnQ6IGFjY291bnQsXHJcbiAgICAgICAgIC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XG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh0cmFuc2FjdGlvbiksXHJcbiAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgY29udGVudFR5cGU6IFwiYXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOFwiLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBzdWNjZXNzQ2FsbGJhY2ssXHJcbiAgICAgICAgICAgIGVycm9yOiBlcnJvckNhbGxiYWNrXHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIFBheW1lbnRBcGkucHJvdG90eXBlLnN1Ym1pdEF1dGhvcml6YXRpb25UcmFuc2FjdGlvbiA9IGZ1bmN0aW9uICh3YWxsZXQsIGFtb3VudCwgaXNDcmVkaXRDYXJkLCBwYXltZW50RGV0YWlscywgc3VjY2Vzc0NhbGxiYWNrLCBlcnJvckNhbGxiYWNrKSB7XHJcbiAgICAgICAgdmFyIGN1cnJlbmN5ID0gJ1VTRCc7XHJcbiAgICAgICAgdmFyIHR5cGUgPSAnQXV0aG9yaXphdGlvbic7XHJcblxyXG4gICAgICAgIHZhciB0cmFuc2FjdGlvbiA9IHtcclxuICAgICAgICAgICAgd2FsbGV0OiB3YWxsZXQsXHJcbiAgICAgICAgICAgIGFtb3VudDogYW1vdW50LFxyXG4gICAgICAgICAgICBjdXJyZW5jeTogY3VycmVuY3ksXHJcbiAgICAgICAgICAgIHR5cGU6IHR5cGUsXHJcbiAgICAgICAgICAgIGlzQ3JlZGl0Q2FyZDogaXNDcmVkaXRDYXJkLFxyXG4gICAgICAgICAgICBDVlY6IHdhbGxldC5DVlYsXHJcbiAgICAgICAgICAgIFBheW1lbnREZXRhaWxzOiBwYXltZW50RGV0YWlsc1xyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIG1ldGhvZDogX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ldmlld01vZGVsKSB7XHJcblxyXG4gICAgICAgIGlmIChJblByZXZpZXdNb2RlbCkge1xyXG4gICAgICAgICAgICAkKCcuZW1haWwtYS1mcmllbmQtbGluaycpLmhpZGUoKTtcclxuICAgICAgICAgICAgdGhpcy5iaW5kRmF2b3JpdGVzKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICB2YXIgcHJvZHVjdENvZGUgPSAkKCcucHJvZHVjdC1jb2RlJykudmFsKCk7XHJcbiAgICAgICAgICAgIHRoaXMuaW5pdFByb2R1Y3RDb2Rlcyhwcm9kdWN0Q29kZSk7XHJcbiAgICAgICAgICAgIHRoaXMuSW5pdEVtYWlsTW9kZWwocHJvZHVjdENvZGUpO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBoYW5kbGUgb24gYWRkIHByb2R1Y3RcclxuICAgICAgICAkKCcuZm9ybS1hZGQtcHJvZHVjdCcpLm9uKCdzdWJtaXQnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICBcclxuICAgICAgICAgICAgLy8gZ2V0IHZhcmlhYmxlc1xyXG4gICAgICAgICAgICB2YXIgYnV0dG9uID0gJCh0aGlzKS5maW5kKCcuYnRuLWFkZC1wcm9kdWN0LXRvLXNsLW1vZGFsJyk7XHJcbiAgICAgICAgICAgIHZhciBsaXN0TmFtZSA9ICQodGhpcykuZmluZCgnLmRkbC1zaG9wcGluZy1saXN0JykudmFsKCk7XHJcbiAgICAgICAgICAgIHZhciB3cmFwcGVyID0galF1ZXJ5KHRoaXMpLmNsb3Nlc3QoXCIuZHJvcGRvd24tbWVudS1hZGQtdG8tbGlzdFwiKTtcclxuICAgICAgICAgICAgdmFyIGl0ZW1OYW1lID0gd3JhcHBlci5kYXRhKCdpdGVtTmFtZScpO1xyXG4gICAgICAgICAgICB2YXIgYWNjb3VudElkID0gJCh0aGlzKS5maW5kKCcuYWNjb3VudC1pZCcpLnZhbCgpO1xyXG4gICAgICAgICAgICB2YXIgY29kZSA9ICQodGhpcykuZmluZCgnLnByb2R1Y3QtY29kZScpLnZhbCgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKGNvZGUpIHtcclxuICAgICAgICAgICAgICAgIGZsdXNoTGlzdCgpO1xyXG4gICAgICAgICAgICAgICAgUHJvZHVjdExpc3RNYW5hZ2VyLmFkZEl0ZW1Db2RlKENvbnRleHQuU2hvcHBpbmdMaXN0LCBjb2RlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgaXRlbXMgPSBnZXRJdGVtcygpO1xyXG5cclxuICAgICAgICAgICAgc2V0TG9hZGluZ1N0YXRlKHRydWUpO1xyXG5cclxuICAgICAgICAgICAgLy8gdXNlIGJ1dHRvbiBhbmltYXRvclxyXG4gICAgICAgICAgICB2YXIgYW5pbWF0aW9uID0gQnV0dG9uQW5pbWF0b3Iuc3RhcnRBbmltYXRpb24oJ0FkZGluZy4uLicsIGJ1dHRvbik7XHJcblxyXG4gICAgICAgICAgICAvLyBjYWxsIHNob3BwaW5nIGxpc3QgYXBpXHJcbiAgICAgICAgICAgIFNob3BwaW5nTGlzdEFwaS5hZGRQcm9kdWN0KGFjY291bnRJZCwgbGlzdE5hbWUsIGl0ZW1zLFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBCdXR0b25BbmltYXRvci5zaG93U3VjY2Vzc0FuaW1hdGlvbihhbmltYXRpb24sIFwiQWRkZWQhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNldExvYWRpbmdTdGF0ZShmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIEJ1dHRvbkFuaW1hdG9yLnNob3dFcnJvckFuaW1hdGlvbihhbmltYXRpb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xpc3RzKCkge1xyXG4gICAgICAgIFNob3BwaW5nTGlzdEFwaS5nZXRBbGxTaG9wcGluZ0xpc3RzKFxyXG4gICAgICAgICAgICBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgLy8gRmluZCBhbGwgc2VsZWN0IGVsZW1lbnRzIHdpdGggdGhlIGNsYXNzICdkZGwtc2hvcHBpbmctbGlzdCdcclxuICAgICAgICAgICAgICAgIHZhciBzaG9wcGluZ0xpc3REcm9wZG93bnMgPSAkKCcuZGRsLXNob3BwaW5nLWxpc3QnKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBJdGVyYXRlIG92ZXIgZWFjaCBzZWxlY3QgZWxlbWVudFxyXG4gICAgICAgICAgICAgICAgc2hvcHBpbmdMaXN0RHJvcGRvd25zLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBjdXJyZW50RHJvcGRvd24gPSAkKHRoaXMpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBDbGVhciBhbnkgZXhpc3Rpbmcgb3B0aW9ucyBpbiB0aGUgZHJvcGRvd25cclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50RHJvcGRvd24uZW1wdHkoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlcmUgYXJlIGl0ZW1zIGluIHRoZSBsaXN0XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBTaG93IHRoZSBwYXJlbnQgZm9ybVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50RHJvcGRvd24uY2xvc2VzdCgnZm9ybScpLmZhZGVJbigpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9wdWxhdGUgdGhlIGN1cnJlbnQgc2VsZWN0IGVsZW1lbnQgd2l0aCB0aGUgZGF0YVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAkLmVhY2goZGF0YSwgZnVuY3Rpb24gKGluZGV4LCBsaXN0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb3B0aW9uID0gJCgnPG9wdGlvbj4nLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGxpc3QuTmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiBsaXN0Lk5hbWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudERyb3Bkb3duLmFwcGVuZChvcHRpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBIaWRlIHRoZSBwYXJlbnQgZm9ybSBpZiB0aGVyZSBhcmUgbm8gaXRlbXMgaW4gdGhlIGxpc3RcclxuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudERyb3Bkb3duLmNsb3Nlc3QoJ2Zvcm0nKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIChlcnIpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgIH1cclxufVxyXG5cclxuXHJcbi8vLS0tLS0gTWFrZSB0aGlzIGNvbXBvbmVudCBhdmFpbGFibGUgdG8gb3RoZXJzXHJcbm1vZHVsZS5leHBvcnRzID0gQ29tcG9uZW50OyIsIihmdW5jdGlvbiAoKSB7XHJcbiAgICB2YXIgaXRlbXNCeUNvbnRleHQgPSBuZXcgTWFwKCk7XHJcblxyXG4gICAgZn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ICAgICAgICAgICAgICAgc2VsZi5nZXRRdWlja09yZGVyQ2FydChhY2NvdW50SWQsIHN1Y2Nlc3NDYWxsYmFjaywgZXJyb3JDYWxsYmFjayk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NDYWxsYmFjayhyZXN1bHQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBlcnJvcjogZXJyb3JDYWxsYmFja1xyXG4gICAgICAgIH0pO1xyXG4gICAgfTtcclxuXHJcbiAgICBRdWlja09yZGVyQXBpLnByb3RvdHlwZS5yZW1vdmVBbGxGcm9tUXVpY2tPcmRlciA9IGZ1bmN0aW9uIChhY2NvdW50SWQsIHN1Y2Nlc3NDYWxsYmFjaywgZXJyb3JDYWxsYmFjaywgcmVsb2FkQ2FydCkge1xyXG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICB1cmw6IGFwaVVybCArICcvUmVtb3ZlLUFsbC1Gcm9tLVF1aWNrLU9yZGVyJyxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7IEFjY291bnRJZDogYWNjb3VudElkIH0pLFxyXG4gICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocmVsb2FkQ2FydCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZ2V0UXVpY2tPcmRlckNhcnQoYWNjb3VudElkLCBzdWNjZXNzQ2FsbGJhY2ssIGVycm9yQ2FsbGJhY2spO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzQ2FsbGJhY2socmVzdWx0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3I6IGVycm9yQ2FsbGJhY2tcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG4gICAgUXVpY2tPcmRlckFwaS5wcm90b3R5cGUuYWRkVG9RdWlja09yZGVyID0gZnVuY3Rpb24gKGFjY291bnRJZCwgY29kZSwgcXVhbnRpdHksIHN1Y2Nlc3NDYWxsYmFjaywgZXJyb3JDYWxsYmFjaywgcmVsb2FkQ2FydCkge1xyXG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICB1cmw6IGFwaVVybCArICcvQWRkLVRvLVF1aWNrLU9yZGVyJyxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7IEFjY291bnRJZDogYWNjb3VudElkLCBDb2RlOiBjb2RlLCBRdWFudGl0eTogcXVhbnRpdHkgfSksXHJcbiAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgIGlmIChyZWxvYWRDYXJ0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5nZXRRdWlja09yZGVyQ2FydChhY2NvdW50SWQsIHN1Y2Nlc3NDYWxsYmFjaywgZXJyb3JDYWxsYmFjayk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzdWNjZXNzQ2FsbGJhY2socmVzdWx0KTtcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3I6IGVycm9yQ2FsbGJhY2tcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG4gIC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G93ZXJDYXNlKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgdmFyIGZvdW5kID1cclxuICAgICAgICAgICAgICAgICAgICAoIGFTZXQgPyBhLmluZGV4T2YoIGF2ICkgPj0gMCA6IHRydWUgKSAmJlxyXG4gICAgICAgICAgICAgICAgICAgICggYlNldCA/IGIuaW5kZXhPZiggYnYgKSA+PSAwIDogdHJ1ZSApO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICggZm91bmQgKVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHRvdGFsKys7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSggdGhpcyApLnNob3coKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoIHRoaXMgKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgalF1ZXJ5KCAnLnJlY2VudC1jYXRlZ29yaWVzLXNlYXJjaC1jb3VudCcgLCBuYW1lc3BhY2UgKS50ZXh0KCB0b3RhbCA+IDAgPyB0b3RhbCA6ICdObycgKTtcclxuICAgICAgICAgICAgalF1ZXJ5KCAnLnJlY2VudC1jYXRlZ29yaWVzLXNlYXJjaC10ZXh0JyAgLCBuYW1lc3BhY2UgKS50ZXh0KCAnUmVjZW50IFB1cmNoYXNlcyBGb3VuZCcgKTtcclxuXHJcbiAgICAgICAgICAgIGpRdWVyeSggJy5yZWNlbnQtcHVyY2hhc2UtcmVzdWx0cyAnICsgc2VsZWN0b3IxICsgJyAnICsgc2VsZWN0b3IyICwgbmFtZXNwYWNlICkuZWFjaCggZnVuY3Rpb24oKVxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICB2YXIgdHJzID0galF1ZXJ5KCB0aGlzICkuZmluZCggJ3RyJyApO1xyXG5cclxuICAgICAgICAgICAgICAgIHZhciB0b3RhbEhpZGRlbiA9IDA7XHJcblxyXG4gICAgICAgICAgICAgICAgdHJzLmVhY2goIGZ1bmN0aW9uKClcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcyA9IGpRdWVyeSggdGhpcyApLmF0dHIoICdzdHlsZScgKTtcclxuICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIHMgIT0gdW5kZWZpbmVkICYmIHMudHJpbSgpLnRvTG93ZXJDYXNlKCkgPT0gJ2Rpc3BsYXk6IG5vbmU7JyApXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbEhpZGRlbisrO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICggdHJzLmxlbmd0aCA9PSB0b3RhbEhpZGRlbiApXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCB0aGlzICkuY2xvc2VzdCggc2VsZWN0b3IxICkuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeSggdGhpcyApLmNsb3Nlc3QoIHNlbGVjdG9yMSApLnNob3coKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG5cclxuXHJcbiAgICAgICAgLy8tLS0tLSBSZXNldCByZWNlbnQgcHVyY2hhc2VzXHJcbiAgICAgICAgalF1ZXJ5KCAnLnJlY2VudC1wdXJjaGFzZXMtc2VhcmNoLWZvcm0gaW5wdXRbdHlwZT1yZXNldF0nICwgbmFtZXNwYWNlICkuY2xpY2soIGZ1b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eTogJ25vbmUnLFxyXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lczoge1xyXG4gICAgICAgICAgICAgICAgICAgIHJvb3Q6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZm9ybTogXCJzZWFyY2gtYXV0by1jb21wbGV0ZS1mb3JtXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQ6IFwic2VhcmNoLWF1dG8tY29tcGxldGUtaW5wdXRcIixcclxuICAgICAgICAgICAgICAgICAgICBpbnB1dFdyYXBwZXI6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRXcmFwcGVyUHJlZml4OiBcImhpZGUtc2VhcmNoLWVsZW1lbnRcIixcclxuICAgICAgICAgICAgICAgICAgICBpbnB1dFdyYXBwZXJTdWZmaXg6IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgcGFuZWw6IFwic2VhcmNoLWF1dG8tY29tcGxldGUtcGFuZWxcIixcclxuICAgICAgICAgICAgICAgICAgICBwYW5lbExheW91dDogXCJcIixcclxuICAgICAgICAgICAgICAgICAgICBsaXN0OiBcIlwiLFxyXG4gICAgICAgICAgICAgICAgICAgIGl0ZW06IFwiXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgbG9hZGluZ0luZGljYXRvcjogXCJcIixcclxuICAgICAgICAgICAgICAgICAgICBjbGVhckJ1dHRvbjogXCJzZWFyY2gtYm94LWNsZWFyLWJ1dHRvblwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHN1Ym1pdEJ1dHRvbjogXCJcIlxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHBsdWdpbnM6IFtyZWNlbnRTZWFyY2hlc1BsdWdpbl0sXHJcbiAgICAgICAgICAgICAgICByZW5kZXIoeyBlbGVtZW50cywgc3RhdGUsIHJlbmRlciwgaHRtbCB9LCByb290KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyByZWNlbnRTZWFyY2hlc1BsdWdpbiwgcHJvZHVjdHMsIHF1ZXJ5U3VnZ2VzdGlvbnMgfSA9IGVsZW1lbnRzO1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHF1ZXJ5ID0gc3RhdGUucXVlcnkudHJpbSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlbmRlcihcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbGBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYWEtUGFuZWxMYXlvdXQgYWEtUGFuZWwtLXNjcm9sbGFibGVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhYS1QYW5lbFNlY3Rpb25zXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhYS1QYW5lbFNlY3Rpb24tLWxlZnRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYXV0b2NvbXBsZXRlLXNlY3Rpb25cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhdXRvY29tcGxldGUtc2VjdGlvbl9fdGl0bGVcIj5SZWNlbnQgc2VhcmNoZXM8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7cmVjZW50U2VhcmNoZXNQbHVnaW59XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImF1dG9jb21wbGV0ZS1zZWN0aW9uXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYXV0b2NvbXBsZXRlLXNlY3Rpb25fX3RpdGxlXCI+U3VnZ2VzdGlvbnM8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR7cXVlcnlTdWdnZXN0aW9uc31cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhYS1QYW5lbFNlY3Rpb24tLXJpZ2h0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHtwcm9kdWN0c31cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAke3F1ZXJ5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBodG1sYFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhdXRvY29tcGxldGUtdmlldy1hbGxcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYXV0b2NvbXBsZXRlLXZpZXctYWxsX19idXR0b25cIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLXF1ZXJ5PVwiJHtxdWVyeX1cIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmlldyBhbGwgcmVzdWx0cyBmb3IgXCIke3F1ZXJ5fVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJyd9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb3RcclxuICAgICAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEFmdGVyIHRoZSBIVE1MIGlzIGluamVjdGVkLCBsaXN0ZW4gZm9yIHRoZSB2aWV3IGFsbCBidXR0b24gY2xpY2tcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB2aWV3QWxsQnV0dG9uID0gcm9vdC5xdWVyeVNlbGVjdG9yKCcuYXV0b2NvbXBsZXRlLXZpZXctYWxsX19idXR0b24nKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodmlld0FsbEJ1dHRvbikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2aWV3QWxsQnV0dG9uLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBxdWVyeSA9IHRoaXMuZ2V0QXR0cmlidXRlKCdkYXRhLXF1ZXJ5Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocXVlcnkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcmMucGVyZm9ybVNlYXJjaChxdWVyeSwgcHJvZHVjdHNJbmRleCwgZmFsc2UpOyAvLyBkaXNhYmxlIHByb2R1Y3QgbnVtYmVyIG1hdGNoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRTb3VyY2VzKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIHJldHVybiBsaXN0IG9mIHNvdXJjZXNcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VJZDogJ3Byb2R1Y3RzJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZldGNoZXMgaXRlbXMgZnJvbSB0aGlzIHNvdXJjZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0SXRlbXMoeyBxdWVyeSB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXNlIHRoZSBzZWFyY2ggY2xpZW50XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlYXJjaENsaWVudC5zZWFyY2goW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleE5hbWU6IHByb2R1Y3RzSW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHsgcXVlcnksIGhpdHNQZXJQYWdlOiA1IH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pLnRoZW4ocmVzcG9uc2UgPT4gcmVzcG9uc2UucmVzdWx0c1swXT8uaGl0cyB8fCBbXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbSh7IGl0ZW0sIGh0bWwgfSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbWFnZVVybCA9IGl0ZW0uaW1hZ2VzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGAke2l0ZW0uaW1hZ2VzfT93aWR0aD01MCZoZWlnaHQ9NTBgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICdodHRwczovL3ZpYS5wbGFjZWhvbGRlci5jb20vMTAwP3RleHQ9Tm8rSW1hZ2UnXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaHRtbGBcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJhdXRvY29tcGxldGUtaXRlbVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW1nIHNyYz1cIiR7aW1hZ2VVcmx9XCIgXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJhdXRvY29tcGxldGUtaXRlbV9faW1hZ2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uZXJyb3I9XCJ0aGlzLnNyYz0naHR0cHM6Ly92aWEucGxhY2Vob2xkZXIuY29tLzEwMD90ZXh0PU5vK0ltYWdlJztcIiAvPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYXV0b2NvbXBsZXRlLWl0ZW1fX2NvbnRlbnRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImF1dG9jb21wbGV0ZS1pdGVtX19udW1iZXJcIj4ke2l0ZW0uSXRlbV9OdW1iZXJ9PC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiYXV0b2NvbXBsZXRlLWl0ZW1fX3RpdGxlXCI+JHtpdGVtLlRpdGxlfTwvc3Bhbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5gO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRJdGVtVXJsKHsgaXRlbSB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW0uUmVsYXRpdmVQYXRoO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uU2VsZWN0KHsgaXRlbSwgZXZlbnQsIGl0ZW1VcmwgfSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG9wZW5Jbk5ldyA9IGV2ZW50Py5tZXRhS2V5IHx8IGV2ZW50Py5jdHJsS2V5IHx8IGV2ZW50Py5idXR0b24gPT09IDE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3JjLnBlcmZvcm1TZWFyY2goaXRlbVVybCwgcHJvZHVjdHNJbmRleCwgZmFsc2UsIG9wZW5Jbk5ldywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZUlkOiAncXVlcnlTdWdnZXN0aW9ucycsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRJdGVtcyh7IHF1ZXJ5IH0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VhcmNoQ2xpZW50LnNlYXJjaChbXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4TmFtZTogcHJvZHVjdFN1Z2dlc3Rpb25zSW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVyeSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaXRzUGVyUGFnZTogNVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSkudGhlbihyZXNwb25zZSA9PiByZXNwb25zZS5yZXN1bHRzWzBdPy5oaXRzIHx8IFtdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtKHsgaXRlbSwgaHRtbCB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBodG1sYFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImF1dG9jb21wbGV0ZS1zdWdnZXN0aW9uXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiYXV0b2NvbXBsZXRlLXN1Z2dlc3Rpb25fX3RleHRcIj4ke2l0ZW0ucXVlcnl9PC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+YDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb25TZWxlY3QoeyBpdGVtLCBldmVudCwgaXRlbVVybCB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3BlbkluTmV3ID0gZXZlbnQ/Lm1ldGFLZXkgfHwgZXZlbnQ/LmN0cmxLZXkgfHwgZXZlbnQ/LmJ1dHRvbiA9PT0gMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcmMuYXV0b0NvbXBsZXRlSW5zdGFuY2Uuc2V0UXVlcnkoaXRlbS5xdWVyeSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3JjLnBlcmZvcm1TZWFyY2goaXRlbS5xdWVyeSwgcHJvZHVjdHNJbmRleCwgZmFsc2UsIG9wZW5Jbk5ldyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgb25TdWJtaXQoeyBzdGF0ZSB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3JjLnBlcmZvcm1TZWFyY2goc3RhdGUucXVlcnkudHJpbSgpLCBwcm9kdWN0c0luZGV4LCB0cnVlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgLy8gU3luYyBxdWVyeSB0byBpbnN0YW50IHNlYXJjaCBpZiBhdmFpbGFibGVcclxuICAgICAgICAgICAgICAgICAgICBzcmMuX3N5bmNRdWVyeVRvSW5zdGFudFNlYXJjaChzdGF0ZS5xdWVyeSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgb25SZXNldCgpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBTeW5jIHF1ZXJ5IHRvIGluc3RhbnQgc2VhcmNoIGlmIGF2YWlsYWJsZVxyXG4gICAgICAgICAgICAgICAgICAgIHNyYy5fc3luY1F1ZXJ5VG9JbnN0YW50U2VhcmNoKCcnKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBvblN0YXRlQ2hhbmdlKHsgcHJldlN0YXRlLCBzdGF0ZSB9KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gU3luYyBxdWVyeSB0byBpbnN0YW50IHNlYXJjaCBpZiBhdmFpbGFibGVcclxuICAgICAgICAgICAgICAgICAgICBpZiAocHJldlN0YXRlICYmIHByZXZTdGF0ZS5xdWVyeSAhPT0gc3RhdGUucXVlcnkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjLl9zeW5jUXVlcnlUb0luc3RhbnRTZWFyY2goc3RhdGUucXVlcnkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHNyYy5hdXRvQ29tcGxldGVJbnN0YW5jZSA9IGluc3RhbmNlO1xyXG5cclxuICAgICAgICAgICAgLy8gUnVuIGFueSBxdWV1ZWQgY2FsbGJhY2tzXHJcbiAgICAgICAgICAgIHRoaXMuX2F1dG9Db21wbGV0ZVJlYWR5Q2FsbGJhY2tzLmZvckVhY2goY2IgPT4gY2IoaW5zdGFuY2UpKTtcclxuICAgICAgICAgICAgdGhpcy5fYXV0b0NvbXBsZXRlUmVhZHlDYWxsYmFja3MgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIHJldHVybiBpbnN0YW5jZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKCdBbGdvbGlhIGF1dG9jb21wbGV0ZSBpcyBub3QgZGVmaW5lZCcpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBTZWFyY2hMaWJyYXJ5LnByb3RvdHlwZS5nZXRBdXRvQ29tcGxldGVTZWFyY2hDbGllbnQgPSBmdW5jdGlvbiAoZW5kcG9pbnQpIHtcclxuICAgICAgICAvLyBjcmVhdGUgYSBjdXN0b20gc2VhcmNoIGNsaWVudCB0aGF0IHVzZXMgdGhlIHNlYXJjaCBlbmRwb2ludCBpbnB1dCB2YWx1ZVxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIHNlYXJjaChyZXF1ZXN0cykge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgdHJhbnNmb3JtZWRSZXF1ZXN0cyA9IHJlcXVlc3RzLm1hcChyZXF1ZXN0ID0+ICh7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gTW92ZSBgaW5kZXhOYW1lYCBpbnNpZGUgYHBhcmFtc2BcclxuICAgICAgICAgICAgICAgICAgICAuLi5yZXF1ZXN0LnBhcmFtcyxcclxuICAgICAgICAgICAgICAgICAgICBpbmRleE5hbWU6IHJlcXVlc3QuaW5kZXhOYW1lLFxyXG5cclxuICAgICAgICAgICAgICAgICAgICAvLyBFbnN1cmUgYGZhY2V0c2AgaXMgYWx3YXlzIGFuIGFycmF5XHJcbiAgICAgICAgICAgICAgICAgICAgZmFjZXRzOiBBcnJheS5pc0FycmF5KHJlcXVlc3QucGFyYW1zLmZhY2V0cylcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyByZXF1ZXN0LnBhcmFtcy5mYWNldHNcclxuICAgICAgICAgICAgICAgICAgICAgICAgOiBbcmVxdWVzdC5wYXJhbXMuZmFjZXRzXVxyXG5cclxuICAgICAgICAgICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmV0Y2goZW5kcG9pbnQsIHtcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdwb3N0JyxcclxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7IHJlcXVlc3RzOiB0cmFuc2Zvcm1lZFJlcXVlc3RzIH0pLFxyXG4gICAgICAgICAgICAgICAgfSkudGhlbihyZXMgPT4gcmVzLmpzb24oKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG4gICAgfVxyXG5cclxuICAgIFNlYXJjaExpYnJhcnkucHJvdG90eXBlLmdldFNlYXJjaEhpc3RvcnlQbHVnaW4gPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgcmV0dXJuIGNyZWF0ZUxvY2FsU3RvcmFnZVJlY2VudFNlYXJjaGVzUGx1Z2luKHtcclxuICAgICAgICAgICAga2V5OiAnbXVsdGktY29sdW1uLWxheW91dC1leGFtcGxlJyxcclxuICAgICAgICAgICAgbGltaXQ6IDIsXHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgU2VhcmNoTGlicmFyeS5wcm90b3R5cGUucGVyZm9ybVNlYXJjaCA9IGZ1bmN0aW9uIChxdWVyeSwgcHJvZHVjdHNJbmRleCwgZW5hYmxlUHJvZHVjdE51bWJlck1hdGNoID0gdHJ1ZSwgb3BlbkluTmV3V2luZG93ID0gZmFsc2UsIHJvdXRlRGlyZWN0bHkgPSBmYWxzZSkge1xyXG4gICAgICAgIGlmICghcXVlcnkpIHJldHVybjtcclxuICAgICAgICB2YXIgc3JjID0gdGhpcztcclxuXHJcbiAgICAgICAgLy8gY2hlY2sgaWYgdGhlIHF1ZXJ5IGlzIGEgZGlyZWN0IHJvdXRlXHJcbiAgICAgICAgaWYgKH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2FsbGJhY2ssIGVycm9yQ2FsbGJhY2spIHtcclxuICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICB1cmw6IGFwaVVybCArICcvQ2xlYXItSGVhZGVyLUFsZXJ0JyxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBzdWNjZXNzQ2FsbGJhY2ssXHJcbiAgICAgICAgICAgIGVycm9yOiBlcnJvckNhbGxiYWNrXHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIFNoYXJlZEFwaS5wcm90b3R5cGUuc2V0Q3VycmVudEFjY291bnQgPSBmdW5jdGlvbiAoaWQsIHJldHVyblVybCwgZXJyb3JDYWxsYmFjaykge1xyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogYXBpVXJsICsgJy9TZXQtQ3VycmVudC1BY2NvdW50JyxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7IElkOiBpZCwgUmV0dXJuVXJsOiByZXR1cm5VcmwgfSksXHJcbiAgICAgICAgICAgIGNvbnRlbnRUeXBlOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXMpIHtcclxuICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5ocmVmID0gcmVzO1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBlcnJvcjogZXJyb3JDYWxsYmFja1xyXG4gICAgICAgIH0pO1xyXG4gICAgfTtcclxuXHJcbiAgICBTaGFyZWRBcGkucHJvdG90eXBlLmltcGVyc29uYXRlQWNjb3VudCA9IGZ1bmN0aW9uIChpZCwgcmV0dXJuVXJsLCBlcnJvckNhbGxiYWNrKSB7XHJcbiAgICAgICAgJC5hamF4KHtcclxuICAgICAgICAgICAgdXJsOiBhcGlVcmwgKyAnL0ltcGVyc29uYXRlLUFjY291bnQnLFxyXG4gICAgICAgICAgICB0eXBlOiAnUE9TVCcsXHJcbiAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHsgSWQ6IGlkLCBSZXR1cm5Vcmw6IHJldHVyblVybCB9KSxcclxuICAgICAgICAgICAgY29udGVudFR5cGU6ICdhcHBsaWNhdGlvbi9qc29uJyxcclxuICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlcykge1xyXG4gICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLmhyZWYgPSByZXM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGVycm9yOiBlcnJvckNhbGxiYWNrXHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIFNoYXJlZEFwaS5wcm90b3R5cGUucmVzZXRJbXBlcnNvbmF0aW9uID0gZnVuY3Rpb24gKHJldHVyblVybCwgZXJyb3JDYWxsYmFjaykge1xyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogYXBpVXJsICsgJy9SZXNldC1JbXBlcnNvbmF0aW9uJyxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7IFJldHVyblVybDogcmV0dXJuVXJsIH0pLFxyXG4gICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBmdW5jdGlvbiAocmVzKSB7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IHJlcztcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgZXJyb3I6IGVycm9yQ2FsbGJhY2tcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG4gICAgU2hhcmVkQXBpLnByb3RvdHlwZS5maWx0ZXJBY2NvdW50cyA9IGZ1bmN0aW9uIChhY2NvdW50TmFtZSwgYWNjb3VudE51bWJlciwgcGFyZW50Q29tcGFueSwgc3VjY2Vzc0NhbGxiYWNrLCBlcnJvckNhbGxiYWNrKSB7XHJcbiAgICAgICAgJC5hamF4KHtcclxuICAgICAgICAgICAgdXJsOiBhcGlVcmwgKyAnL0ZpbHRlci1BY2NvdW50cy1Uby1TZWxlY3QnLFxyXG4gICAgICAgICAgICB0eXBlOiAnUE9TVCcsXHJcbiAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHtcclxuICAgICAgICAgICAgICAgIEFjY291bnROYW1lOiBhY2NvdW50TmFtZSxcclxuICAgICAgICAgICAgICAgIEFjY291bnROdW1iZXI6IGFjY291bnROdW1iZXIsXHJcbiAgICAgICAgICAgICAgICBQYXJlbnRDb21wYW55OiBwYXJlbnRDb21wYW55XHJcbiAgICAgICAgICAgIH0pLFxyXG4gICAgICAgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBzdWNjZXNzQ2FsbGJhY2ssXHJcbiAgICAgICAgICAgIGVycm9yOiBlcnJvckNhbGxiYWNrXHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIFNoYXJlZEFwaS5wcm90b3R5cGUuc2V0TmF2QmVoYXZpb3IgPSBmdW5jdGlvbiAoYmVoYXZpb3IsIHN1Y2Nlc3NDYWxsYmFjaywgZXJyb3JDYWxsYmFjaykge1xyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIHVybDogYXBpVXJsICsgJy9TZXQtTmF2LUJlaGF2aW9yJyxcclxuICAgICAgICAgICAgdHlwZTogJ1BPU1QnLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7IFZhbHVlOiBiZWhhdmlvciB9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gKyAnL1JlbW92ZS1MaW5lLUl0ZW0nLFxyXG4gICAgICAgICAgICB0eXBlOiAnUE9TVCcsXHJcbiAgICAgICAgICAgIGRhdGE6IEpTT04uc3RyaW5naWZ5KHsgTGluZUl0ZW1JZDogaWQgfSksXHJcbiAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBcImFwcGxpY2F0aW9uL2pzb25cIixcclxuICAgICAgICAgICAgc3VjY2VzczogZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZWZyZXNoQ2FydChzdWNjZXNzQ2FsbGJhY2ssIGVycm9yQ2FsbGJhY2ssIHJlc3VsdCk7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGVycm9yOiBlcnJvckNhbGxiYWNrXHJcbiAgICAgICAgfSk7XHJcbiAgICB9O1xyXG5cclxuICAgIFNob3BwaW5nQ2FydEFwaS5wcm90b3R5cGUucmVmcmVzaENhcnQgPSBmdW5jdGlvbiAoc3VjY2Vzc0NhbGxiYWNrLCBlcnJvckNhbGxiYWNrLCBzdWNjZXNzRGF0YSkge1xyXG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICB1cmw6IGFwaVVybCArICcvUmVmcmVzaC1DYXJ0JyxcclxuICAgICAgICAgICAgdHlwZTogJ0dFVCcsXHJcbiAgICAgICAgICAgIHN1Y2Nlc3M6IGZ1bmN0aW9uIChyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYudXBkYXRlTWluaUNhcnQocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgIGlmIChzdWNjZXNzQ2FsbGJhY2spIHtcclxuICAgICAgICAgICAgICAgICAgICBzdWNjZXNzQ2FsbGJhY2soc3VjY2Vzc0RhdGEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBlcnJvcjogZXJyb3JDYWx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AgICAgICBjb250ZW50VHlwZTogJ2FwcGxpY2F0aW9uL2pzb24nLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7XHJcbiAgICAgICAgICAgICAgICBOYW1lOiBsaXN0TmFtZSxcclxuICAgICAgICAgICAgICAgIERlc2NyaXB0aW9uOiBkZXNjcmlwdGlvbixcclxuICAgICAgICAgICAgICAgIFByZXZpb3VzQ2FydE5hbWU6IHByZXZpb3VzTGlzdE5hbWVcclxuICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgIHN1Y2Nlc3M6IHN1Y2Nlc3NDYWxsYmFjayxcclxuICAgICAgICAgICAgZXJyb3I6IGVycm9yQ2FsbGJhY2tcclxuICAgICAgICB9KTtcclxuICAgIH07XHJcblxyXG4gICAgU2hvcHBpbmdMaXN0QXBpLnByb3RvdHlwZS5yZW1vdmVQcm9kdWN0ID0gZnVuY3Rpb24gKGFjY291bnRJZCwgbGlzdE5hbWUsIGxpbmVJdGVtSWRzLCBzdWNjZXNzQ2FsbGJhY2ssIGVycm9yQ2FsbGJhY2spIHtcclxuICAgICAgICBjb25zdCByZXF1ZXN0ID0ge1xyXG4gICAgICAgICAgICBBY2NvdW50SWQ6IGFjY291bnRJZCxcclxuICAgICAgICAgICAgTmFtZTogbGlzdE5hbWUsXHJcbiAgICAgICAgICAgIExpbmVJdGVtSWRzOiBsaW5lSXRlbUlkcyxcclxuICAgICAgICB9O1xyXG4gICAgICAgICQuYWpheCh7XHJcbiAgICAgICAgICAgIHR5cGU6IFwiUE9TVFwiLFxyXG4gICAgICAgICAgICB1cmw6IGFwaVVybCArIFwiL1JlbW92ZS1Qcm9kdWN0LUZyb20tTGlzdFwiLFxyXG4gICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeShyZXF1ZXN0KSxcclxuICAgICAgICAgICAgY29udGVudFR5cGU6IFwiYXBwbGljYXRpb24vanNvblwiLFxyXG4gICAgICAgICAgICBzdWNjZXNzOiBzdWNjZXN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KSB7XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgIT09IFwic3RyaW5nXCIpIHZhbHVlID0gU3RyaW5nKHZhbHVlKTtcclxuXHJcbiAgICAgICAgICAgIC8vIEhhbmRsZSBtb3RvciBzaGFmdCBzaXplcyAoZS5nLiwgXCIxLzJcXFwiIHggMy0xLzJcXFwiXCIpXHJcbiAgICAgICAgICAgIGxldCBtYXRjaCA9IHZhbHVlLm1hdGNoKC8oW1xcZC9dKylcIlxccyp4XFxzKihbXFxkLy1dKylcIi8pO1xyXG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJtb3RvclwiLFxyXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiBwYXJzZUZyYWN0aW9uKG1hdGNoWzFdKSxcclxuICAgICAgICAgICAgICAgICAgICBsZW5ndGg6IHBhcnNlRnJhY3Rpb24obWF0Y2hbMl0pLFxyXG4gICAgICAgICAgICAgICAgICAgIHN0cjogdmFsdWVcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIEhhbmRsZSBudW1iZXJzIHdpdGggJyMnIHByZWZpeCAoZS5nLiwgXCIjMTYxXCIpXHJcbiAgICAgICAgICAgIGlmICh2YWx1ZS5zdGFydHNXaXRoKFwiI1wiKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHsgdHlwZTogXCJoYXNoXCIsIG51bTogcGFyc2VJbnQodmFsdWUuc2xpY2UoMSksIDEwKSwgc3RyOiB2YWx1ZSB9O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBIYW5kbGUgZGVjaW1hbCBudW1iZXJzIChlLmcuLCBcIi4wMjMxXCIpXHJcbiAgICAgICAgICAgIGlmICghaXNOYU4ocGFyc2VGbG9hdCh2YWx1ZSkpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4geyB0eXBlOiBcImRlY2ltYWxcIiwgbnVtOiBwYXJzZUZsb2F0KHZhbHVlKSwgc3RyOiB2YWx1ZSB9O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBIYW5kbGUgZ2VuZXJhbCB0ZXh0IChlLmcuLCBcIigyKSAxNiBvei5cIikgLSBQbGFjZSB0aGVzZSBsYXN0XHJcbiAgICAgICAgICAgIHJldHVybiB7IHR5cGU6IFwidGV4dFwiLCBzdHI6IHZhbHVlIH07XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgZnVuY3Rpb24gcGFyc2VGcmFjdGlvbihmcmFjdGlvbikge1xyXG4gICAgICAgICAgICBpZiAoZnJhY3Rpb24uaW5jbHVkZXMoXCIvXCIpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZnJhY3Rpb24uc3BsaXQoXCItXCIpLnJlZHVjZSgoYWNjLCBwYXJ0KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcnQuaW5jbHVkZXMoXCIvXCIpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBbbnVtLCBkZW5vbV0gPSBwYXJ0LnNwbGl0KFwiL1wiKS5tYXAoTnVtYmVyKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIG51bSAvIGRlbm9tO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgTnVtYmVyKHBhcnQpO1xyXG4gICAgICAgICAgICAgICAgfSwgMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHBhcnNlRmxvYXQoZnJhY3Rpb24pO1xyXG4gICAgICAgIH07XHJcbiAgICB9O1xyXG5cclxuICAgIC8vIEF0dGFjaCB0byBnbG9iYWwgd2luZG93IG9iamVjdCBmb3IgZXh0ZXJuYWwgdX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