From 8985868d96b97658c38eea5f4489f43ceacd70d7 Mon Sep 17 00:00:00 2001 From: Abhinav Srivastava Date: Fri, 8 Mar 2024 14:15:33 -0800 Subject: [PATCH] March 2024 Release of the APL 2024.1 compliant APL Client Library For more details on this release refer to CHANGELOG.md To learn about APL see: https://developer.amazon.com/docs/alexa-presentation-language/understand-apl.html --- .../APLClient/AplCoreConnectionManager.h | 4 + APLClient/include/APLClient/AplSession.h | 43 +++ .../include/APLClient/AplViewhostConfig.h | 3 + APLClient/src/AplCoreConnectionManager.cpp | 4 +- APLClient/src/AplCoreGuiRenderer.cpp | 5 +- APLClient/src/AplSession.cpp | 69 ++++ APLClient/src/AplViewhostConfig.cpp | 11 + APLClient/src/CMakeLists.txt | 3 +- APLClient/test/AplSessionTest.cpp | 152 ++++++++ CHANGELOG.md | 10 + README.md | 8 +- .../@types/apl-html/lib/Content.d.ts | 13 +- .../@types/apl-html/lib/dts/Content.d.ts | 6 +- .../@types/apl-html/lib/dts/Logger.d.ts | 10 - .../@types/apl-html/lib/dts/Module.d.ts | 1 + .../apl-html/lib/enums/PropertyKey.d.ts | 362 +++++++++--------- apl-client-js/index.js | 6 +- apl-client-js/package.json | 4 +- 18 files changed, 510 insertions(+), 204 deletions(-) create mode 100644 APLClient/include/APLClient/AplSession.h create mode 100644 APLClient/src/AplSession.cpp create mode 100644 APLClient/test/AplSessionTest.cpp delete mode 100644 apl-client-js/@types/apl-html/lib/dts/Logger.d.ts diff --git a/APLClient/include/APLClient/AplCoreConnectionManager.h b/APLClient/include/APLClient/AplCoreConnectionManager.h index 3a34ac8..0734138 100644 --- a/APLClient/include/APLClient/AplCoreConnectionManager.h +++ b/APLClient/include/APLClient/AplCoreConnectionManager.h @@ -278,6 +278,10 @@ class AplCoreConnectionManager return m_Metrics; } + const AplViewhostConfigPtr getViewhostConfig() const { + return m_viewhostConfig; + } + private: /** * Sends viewport scaling information to the client diff --git a/APLClient/include/APLClient/AplSession.h b/APLClient/include/APLClient/AplSession.h new file mode 100644 index 0000000..3b4a6e0 --- /dev/null +++ b/APLClient/include/APLClient/AplSession.h @@ -0,0 +1,43 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0/ + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#ifndef APL_CLIENT_LIBRARY_APL_SESSION_H_ +#define APL_CLIENT_LIBRARY_APL_SESSION_H_ + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wreorder" +#pragma push_macro("DEBUG") +#undef DEBUG +#include +#pragma pop_macro("DEBUG") +#pragma GCC diagnostic pop + +namespace APLClient { + +class AplSession : public apl::Session { +public: + AplSession(bool isLogCommandEnabled); + void write(const char *filename, const char *func, const char *value) override; + void write(apl::LogCommandMessage&& message) override; + +private: + const apl::SessionPtr m_defaultSession = apl::makeDefaultSession(); + const bool m_isLogCommandEnabled; + std::string getLogInfoFrom(const apl::LogCommandMessage& message); +}; + +} // namespace APLClient + +#endif // APL_CLIENT_LIBRARY_APL_SESSION_H_ \ No newline at end of file diff --git a/APLClient/include/APLClient/AplViewhostConfig.h b/APLClient/include/APLClient/AplViewhostConfig.h index b0f7633..14839ed 100644 --- a/APLClient/include/APLClient/AplViewhostConfig.h +++ b/APLClient/include/APLClient/AplViewhostConfig.h @@ -52,6 +52,7 @@ class AplViewhostConfig final { AplViewhostConfig& disallowDialog(bool disallow); AplViewhostConfig& scrollCommandDuration(unsigned int milliseconds); AplViewhostConfig& animationQuality(const AnimationQuality& quality); + AplViewhostConfig& isLogCommandEnabled(bool isLogCommandEnabled); unsigned int viewportWidth() const; unsigned int viewportHeight() const; @@ -68,6 +69,7 @@ class AplViewhostConfig final { bool disallowDialog() const; unsigned int scrollCommandDuration() const; AnimationQuality animationQuality() const; + bool isLogCommandEnabled() const; private: unsigned int m_viewportWidth = 0; @@ -85,6 +87,7 @@ class AplViewhostConfig final { bool m_disallowDialog = false; unsigned int m_scrollCommandDuration = 1000; AnimationQuality m_animationQuality = AnimationQuality::NORMAL; + bool m_isLogCommandEnabled = false; }; using AplViewhostConfigPtr = std::shared_ptr; diff --git a/APLClient/src/AplCoreConnectionManager.cpp b/APLClient/src/AplCoreConnectionManager.cpp index b43e999..f65cfd1 100644 --- a/APLClient/src/AplCoreConnectionManager.cpp +++ b/APLClient/src/AplCoreConnectionManager.cpp @@ -250,7 +250,7 @@ double AplCoreConnectionManager::getOptionalValue( double defaultValue) { double value = defaultValue; const auto& valueIt = jsonNode.FindMember(key); - if (valueIt != jsonNode.MemberEnd()) { + if (valueIt != jsonNode.MemberEnd() && valueIt->value.IsNumber()) { value = valueIt->value.GetDouble(); } @@ -263,7 +263,7 @@ std::string AplCoreConnectionManager::getOptionalValue( const std::string& defaultValue) { std::string value = defaultValue; const auto& valueIt = jsonNode.FindMember(key); - if (valueIt != jsonNode.MemberEnd()) { + if (valueIt != jsonNode.MemberEnd() && valueIt->value.IsString()) { value = valueIt->value.GetString(); } diff --git a/APLClient/src/AplCoreGuiRenderer.cpp b/APLClient/src/AplCoreGuiRenderer.cpp index da350ce..3952fea 100644 --- a/APLClient/src/AplCoreGuiRenderer.cpp +++ b/APLClient/src/AplCoreGuiRenderer.cpp @@ -17,6 +17,7 @@ #include #include "APLClient/AplCoreGuiRenderer.h" +#include "APLClient/AplSession.h" namespace APLClient { @@ -71,7 +72,9 @@ void AplCoreGuiRenderer::renderDocument( "APL-Web.Content.error"); tContentCreate->start(); - auto content = apl::Content::create(std::move(document), apl::makeDefaultSession(), + const auto aplViewhostConfig = m_aplCoreConnectionManager->getViewhostConfig(); + const bool isLogCommandEnabled = aplViewhostConfig ? aplViewhostConfig->isLogCommandEnabled() : false; + auto content = apl::Content::create(std::move(document), std::make_shared(isLogCommandEnabled), m_aplCoreConnectionManager->getMetrics(), m_aplCoreConnectionManager->getRootConfig()); if (!content) { diff --git a/APLClient/src/AplSession.cpp b/APLClient/src/AplSession.cpp new file mode 100644 index 0000000..6356fe8 --- /dev/null +++ b/APLClient/src/AplSession.cpp @@ -0,0 +1,69 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0/ + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include +#include +#include + +#include "APLClient/AplSession.h" + +namespace APLClient { + +AplSession::AplSession(bool isLogCommandEnabled) + : apl::Session(), + m_isLogCommandEnabled(isLogCommandEnabled) { +} + +void AplSession::write(const char *filename, const char *func, const char *value) { + m_defaultSession->write(filename, func, value); +} + +void AplSession::write(apl::LogCommandMessage&& message) { + if (m_isLogCommandEnabled) { + std::string info = getLogInfoFrom(message); + + apl::LoggerFactory::instance().getLogger(message.level, "Log", "Command") + .session(*this) + .log("%s %s", message.text.c_str(), info.c_str()); + } +} + +std::string AplSession::getLogInfoFrom(const apl::LogCommandMessage& message) { + rapidjson::StringBuffer buffer; + rapidjson::Writer writer(buffer); + rapidjson::Document serializer; + + writer.StartObject(); + + // Add arguments array if it's not empty + if (!message.arguments.empty()) { + writer.Key("arguments"); + rapidjson::Value serializedArguments = message.arguments.serialize(serializer.GetAllocator()); + serializedArguments.Accept(writer); // Serialize into the writer directly + } + + // Add origin object if it's not empty + if (!message.origin.empty()) { + writer.Key("origin"); + rapidjson::Value serializedOrigin = message.origin.serialize(serializer.GetAllocator()); + serializedOrigin.Accept(writer); + } + + writer.EndObject(); + + return buffer.GetString(); +} + +} // namespace APLClient \ No newline at end of file diff --git a/APLClient/src/AplViewhostConfig.cpp b/APLClient/src/AplViewhostConfig.cpp index 2d1c4c7..155ade9 100644 --- a/APLClient/src/AplViewhostConfig.cpp +++ b/APLClient/src/AplViewhostConfig.cpp @@ -101,6 +101,12 @@ AplViewhostConfig::animationQuality(const AnimationQuality& quality) { return *this; } +AplViewhostConfig& +AplViewhostConfig::isLogCommandEnabled(bool isLogCommandEnabled) { + m_isLogCommandEnabled = isLogCommandEnabled; + return *this; +} + unsigned int AplViewhostConfig::viewportWidth() const { return m_viewportWidth; @@ -171,4 +177,9 @@ AplViewhostConfig::animationQuality() const { return m_animationQuality; } +bool +AplViewhostConfig::isLogCommandEnabled() const { + return m_isLogCommandEnabled; +} + } // namespace APLClient \ No newline at end of file diff --git a/APLClient/src/CMakeLists.txt b/APLClient/src/CMakeLists.txt index 40e7302..32eecb5 100644 --- a/APLClient/src/CMakeLists.txt +++ b/APLClient/src/CMakeLists.txt @@ -24,7 +24,8 @@ AplCoreMetrics.cpp AplCoreTextMeasurement.cpp AplCoreLocaleMethods.cpp AplClientRenderer.cpp -AplViewhostConfig.cpp) +AplViewhostConfig.cpp +AplSession.cpp) target_include_directories(APLClient PUBLIC "${APLClient_SOURCE_DIR}/include") diff --git a/APLClient/test/AplSessionTest.cpp b/APLClient/test/AplSessionTest.cpp new file mode 100644 index 0000000..078fc6a --- /dev/null +++ b/APLClient/test/AplSessionTest.cpp @@ -0,0 +1,152 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0/ + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#include "APLClient/AplSession.h" + +#include +#include + +namespace APLClient { +namespace test { + +using namespace ::testing; + +static const std::string TEXT = "test text"; +static const std::string ARGUMENTS = "test arguments"; +static const std::string ORIGIN = "test origin"; + +class AplSessionTest : public ::testing::Test { +public: + void SetUp() override; + std::string CaptureLog(apl::LogCommandMessage&& message); + bool FindText(std::string text, std::string logContents); + +protected: + std::shared_ptr m_aplSession; +}; + +void AplSessionTest::SetUp() { + m_aplSession = std::make_shared(true); +} + +std::string AplSessionTest::CaptureLog(apl::LogCommandMessage&& message) { + // Redirect stdout to a file + std::string logFile = "CapturedLogCommand.txt"; + freopen(logFile.c_str(),"w", stdout); + + // Write the log message + m_aplSession->write(std::move(message)); + + // Redirect stdout back to terminal + freopen("/dev/tty","w", stdout); + + // Read log file + std::ifstream in(logFile); + std::string logContents((std::istreambuf_iterator(in)), + std::istreambuf_iterator()); + + // Close and delete the temp log file + in.close(); + std::remove(logFile.c_str()); + + return logContents; +} + +bool AplSessionTest::FindText(std::string text, std::string logContents) { + return logContents.find(text) != std::string::npos; +} + +TEST_F(AplSessionTest, WriteLogCommandMessage) { + apl::LogCommandMessage message { + TEXT, + apl::LogLevel::kInfo, + apl::Object(ARGUMENTS), + apl::Object(ORIGIN) + }; + + std::string logContents = CaptureLog(std::move(message)); + + EXPECT_TRUE(FindText(TEXT, logContents)); + EXPECT_TRUE(FindText(ARGUMENTS, logContents)); + EXPECT_TRUE(FindText(ARGUMENTS, logContents)); +} + +TEST_F(AplSessionTest, WriteLogCommandMessageWithoutArguments) { + apl::LogCommandMessage message { + TEXT, + apl::LogLevel::kInfo, + NULL, + apl::Object(ORIGIN) + }; + + std::string logContents = CaptureLog(std::move(message)); + + EXPECT_TRUE(FindText(TEXT, logContents)); + EXPECT_FALSE(FindText(ARGUMENTS, logContents)); + EXPECT_TRUE(FindText(ORIGIN, logContents)); +} + +TEST_F(AplSessionTest, WriteLogCommandMessageWithoutOrigin) { + apl::LogCommandMessage message { + TEXT, + apl::LogLevel::kInfo, + apl::Object(ARGUMENTS), + NULL + }; + + std::string logContents = CaptureLog(std::move(message)); + + EXPECT_TRUE(FindText(TEXT, logContents)); + EXPECT_TRUE(FindText(ARGUMENTS, logContents)); + EXPECT_FALSE(FindText(ORIGIN, logContents)); +} + +TEST_F(AplSessionTest, WriteLogCommandMessageWhenDisabled) { + m_aplSession = std::make_shared(false); + + apl::LogCommandMessage message { + TEXT, + apl::LogLevel::kInfo, + apl::Object(ARGUMENTS), + apl::Object(ORIGIN) + }; + + std::string logContents = CaptureLog(std::move(message)); + + EXPECT_FALSE(FindText(TEXT, logContents)); + EXPECT_FALSE(FindText(ARGUMENTS, logContents)); + EXPECT_FALSE(FindText(ORIGIN, logContents)); +} + +TEST_F(AplSessionTest, WriteLogWithFilenameFuncAndValue) { + std::string logFile = "CapturedLogCommand.txt"; + freopen(logFile.c_str(),"w", stdout); + + m_aplSession->write("filename", "function", "test value"); + + freopen("/dev/tty","w", stdout); + + std::ifstream in(logFile); + std::string logContents((std::istreambuf_iterator(in)), + std::istreambuf_iterator()); + + in.close(); + std::remove(logFile.c_str()); + + EXPECT_TRUE(FindText("test value", logContents)); +} + +} // namespace test +} // namespace APLClient \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7daca..76b266c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog for apl-client-library +## [2024.1] +This release adds support for version 2024.1 of the APL specification. Please also see APL Core Library for changes: [apl-core-library CHANGELOG](https://github.com/alexa/apl-core-library/blob/master/CHANGELOG.md) + +### Added +- Add Log Command + +### Changed + +- Bug fixes + ## [2023.3] This release adds support for version 2023.3 of the APL specification. Please also see APL Core Library for changes: [apl-core-library CHANGELOG](https://github.com/alexa/apl-core-library/blob/master/CHANGELOG.md) diff --git a/README.md b/README.md index 367b2ce..29f887e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Alexa Presentation Language (APL) Client Library

- - - - + + + +

## Introduction diff --git a/apl-client-js/@types/apl-html/lib/Content.d.ts b/apl-client-js/@types/apl-html/lib/Content.d.ts index 211ae69..c7a52f1 100644 --- a/apl-client-js/@types/apl-html/lib/Content.d.ts +++ b/apl-client-js/@types/apl-html/lib/Content.d.ts @@ -6,13 +6,24 @@ * Holds all of the documents and data necessary to inflate an APL component hierarchy. */ export declare class Content { + private doc; private data; /** * Creates an instance of a Content object. a single Content instance * can be used with multiple [[APLRenderer]]s. * @param doc The main APL document + * @param data The data used for the main document + * @param logCommandCallback The callback to send back the log info */ - static create(doc: string, data?: string): Content; + static create(doc: string, data?: string, logCommandCallback?: APL.LogCommandCallback): Content; + /** + * Creates an instance of a Content object. a single Content instance + * can be used with multiple [[APLRenderer]]s. + * @param doc The main APL document + * @param data The data used for the main document + * @param logCommandCallback The callback to send back the log info + */ + static recreate(other: Content, logCommandCallback?: APL.LogCommandCallback): Content; /** * APL doc settings. * @private diff --git a/apl-client-js/@types/apl-html/lib/dts/Content.d.ts b/apl-client-js/@types/apl-html/lib/dts/Content.d.ts index 3c7c396..1adb4cf 100644 --- a/apl-client-js/@types/apl-html/lib/dts/Content.d.ts +++ b/apl-client-js/@types/apl-html/lib/dts/Content.d.ts @@ -12,8 +12,12 @@ declare namespace APL { public reference(): ImportRef; public source(): string; } + export type LogCommandCallback = (level: number, message: string, args: object) => void; + export class Session { + public static create(logCommandCallback?: LogCommandCallback): Session; + } export class Content extends Deletable { - public static create(document: string): Content; + public static create(document: string, session: Session): Content; public refresh(metrics: Metrics, config: RootConfig): void; public getRequestedPackages(): Set; public addPackage(request: ImportRequest, data: string): void; diff --git a/apl-client-js/@types/apl-html/lib/dts/Logger.d.ts b/apl-client-js/@types/apl-html/lib/dts/Logger.d.ts deleted file mode 100644 index e2a1e2c..0000000 --- a/apl-client-js/@types/apl-html/lib/dts/Logger.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ -declare namespace APL { - export type CoreLogTransport = (level: number, log: string) => void; - export class Logger extends Deletable { - public static setLogTransport(transport: CoreLogTransport): void; - } -} diff --git a/apl-client-js/@types/apl-html/lib/dts/Module.d.ts b/apl-client-js/@types/apl-html/lib/dts/Module.d.ts index bcb41d0..fb07b63 100644 --- a/apl-client-js/@types/apl-html/lib/dts/Module.d.ts +++ b/apl-client-js/@types/apl-html/lib/dts/Module.d.ts @@ -87,6 +87,7 @@ declare namespace APL { public AudioPlayerFactory: typeof AudioPlayerFactory; public MediaPlayer: typeof MediaPlayer; public MediaPlayerFactory: typeof MediaPlayerFactory; + public Session: typeof Session; } } declare var Module: APL.Module; diff --git a/apl-client-js/@types/apl-html/lib/enums/PropertyKey.d.ts b/apl-client-js/@types/apl-html/lib/enums/PropertyKey.d.ts index a510e36..9ea1dab 100644 --- a/apl-client-js/@types/apl-html/lib/enums/PropertyKey.d.ts +++ b/apl-client-js/@types/apl-html/lib/enums/PropertyKey.d.ts @@ -7,183 +7,187 @@ export declare enum PropertyKey { kPropertyScrollDirection = 0, kPropertyAccessibilityActions = 1, kPropertyAccessibilityActionsAssigned = 2, - kPropertyAccessibilityLabel = 3, - kPropertyAlign = 4, - kPropertyAlignItems = 5, - kPropertyAlignSelf = 6, - kPropertyAudioTrack = 7, - kPropertyAutoplay = 8, - kPropertyMuted = 9, - kPropertyBackgroundColor = 10, - kPropertyBackgroundAssigned = 11, - kPropertyBackground = 12, - kPropertyBorderBottomLeftRadius = 13, - kPropertyBorderBottomRightRadius = 14, - kPropertyBorderColor = 15, - kPropertyBorderRadius = 16, - kPropertyBorderRadii = 17, - kPropertyBorderStrokeWidth = 18, - kPropertyBorderTopLeftRadius = 19, - kPropertyBorderTopRightRadius = 20, - kPropertyBorderWidth = 21, - kPropertyBottom = 22, - kPropertyBounds = 23, - kPropertyCenterId = 24, - kPropertyCenterIndex = 25, - kPropertyChildHeight = 26, - kPropertyChildWidth = 27, - kPropertyChecked = 28, - kPropertyColor = 29, - kPropertyColorKaraokeTarget = 30, - kPropertyColorNonKaraoke = 31, - kPropertyCurrentPage = 32, - kPropertyDescription = 33, - kPropertyDirection = 34, - kPropertyDisabled = 35, - kPropertyDisplay = 36, - kPropertyDrawnBorderWidth = 37, - kPropertyEmbeddedDocument = 38, - kPropertyEnd = 39, - kPropertyEntities = 40, - kPropertyEnvironment = 41, - kPropertyFastScrollScale = 42, - kPropertyFilters = 43, - kPropertyFirstId = 44, - kPropertyFirstIndex = 45, - kPropertyFocusable = 46, - kPropertyFontFamily = 47, - kPropertyFontSize = 48, - kPropertyFontStyle = 49, - kPropertyFontWeight = 50, - kPropertyHandleTick = 51, - kPropertyHighlightColor = 52, - kPropertyHint = 53, - kPropertyHintColor = 54, - kPropertyHintStyle = 55, - kPropertyHintWeight = 56, - kPropertyGestures = 57, - kPropertyGraphic = 58, - kPropertyGrow = 59, - kPropertyHandleKeyDown = 60, - kPropertyHandleKeyUp = 61, - kPropertyHeight = 62, - kPropertyId = 63, - kPropertyInitialPage = 64, - kPropertyInnerBounds = 65, - kPropertyItemsPerCourse = 66, - kPropertyJustifyContent = 67, - kPropertyKeyboardBehaviorOnFocus = 68, - kPropertyKeyboardType = 69, - kPropertyLayoutDirection = 70, - kPropertyLayoutDirectionAssigned = 71, - kPropertyLeft = 72, - kPropertyLetterSpacing = 73, - kPropertyLineHeight = 74, - kPropertyMaxHeight = 75, - kPropertyMaxLength = 76, - kPropertyMaxLines = 77, - kPropertyMaxWidth = 78, - kPropertyMediaBounds = 79, - kPropertyMediaState = 80, - kPropertyMinHeight = 81, - kPropertyMinWidth = 82, - kPropertyNavigation = 83, - kPropertyNextFocusDown = 84, - kPropertyNextFocusForward = 85, - kPropertyNextFocusLeft = 86, - kPropertyNextFocusRight = 87, - kPropertyNextFocusUp = 88, - kPropertyNotifyChildrenChanged = 89, - kPropertyNumbered = 90, - kPropertyNumbering = 91, - kPropertyOnBlur = 92, - kPropertyOnCancel = 93, - kPropertyOnChildrenChanged = 94, - kPropertyOnDown = 95, - kPropertyOnEnd = 96, - kPropertyOnFail = 97, - kPropertyOnFocus = 98, - kPropertyOnLoad = 99, - kPropertyOnMount = 100, - kPropertyOnMove = 101, - kPropertyOnSpeechMark = 102, - kPropertyHandlePageMove = 103, - kPropertyOnPageChanged = 104, - kPropertyOnPause = 105, - kPropertyOnPlay = 106, - kPropertyOnPress = 107, - kPropertyOnScroll = 108, - kPropertyOnSubmit = 109, - kPropertyOnTextChange = 110, - kPropertyOnUp = 111, - kPropertyOnTimeUpdate = 112, - kPropertyOnTrackFail = 113, - kPropertyOnTrackReady = 114, - kPropertyOnTrackUpdate = 115, - kPropertyOpacity = 116, - kPropertyOverlayColor = 117, - kPropertyOverlayGradient = 118, - kPropertyPadding = 119, - kPropertyPaddingBottom = 120, - kPropertyPaddingEnd = 121, - kPropertyPaddingLeft = 122, - kPropertyPaddingRight = 123, - kPropertyPaddingTop = 124, - kPropertyPaddingStart = 125, - kPropertyPageDirection = 126, - kPropertyPageId = 127, - kPropertyPageIndex = 128, - kPropertyParameters = 129, - kPropertyPlayingState = 130, - kPropertyPosition = 131, - kPropertyPreserve = 132, - kPropertyRangeKaraokeTarget = 133, - kPropertyResourceId = 134, - kPropertyResourceOnFatalError = 135, - kPropertyResourceState = 136, - kPropertyResourceType = 137, - kPropertyRight = 138, - kPropertyRole = 139, - kPropertyScale = 140, - kPropertyScrollAnimation = 141, - kPropertyScrollOffset = 142, - kPropertyScrollPercent = 143, - kPropertyScrollPosition = 144, - kPropertySecureInput = 145, - kPropertySelectOnFocus = 146, - kPropertyShadowColor = 147, - kPropertyShadowHorizontalOffset = 148, - kPropertyShadowRadius = 149, - kPropertyShadowVerticalOffset = 150, - kPropertyShrink = 151, - kPropertySize = 152, - kPropertySnap = 153, - kPropertySource = 154, - kPropertySpacing = 155, - kPropertySpeech = 156, - kPropertyStart = 157, - kPropertySubmitKeyType = 158, - kPropertyText = 159, - kPropertyTextAlign = 160, - kPropertyTextAlignAssigned = 161, - kPropertyTextAlignVertical = 162, - kPropertyLang = 163, - kPropertyTrackCount = 164, - kPropertyTrackCurrentTime = 165, - kPropertyTrackDuration = 166, - kPropertyTrackEnded = 167, - kPropertyTrackIndex = 168, - kPropertyTrackPaused = 169, - kPropertyTrackState = 170, - kPropertyTransform = 171, - kPropertyTransformAssigned = 172, - kPropertyTop = 173, - kPropertyUser = 174, - kPropertyWidth = 175, - kPropertyOnCursorEnter = 176, - kPropertyOnCursorExit = 177, - kPropertyLaidOut = 178, - kPropertyValidCharacters = 179, - kPropertyVisualHash = 180, - kPropertyWrap = 181 + kPropertyAccessibilityAdjustableRange = 3, + kPropertyAccessibilityAdjustableValue = 4, + kPropertyAccessibilityLabel = 5, + kPropertyAlign = 6, + kPropertyAlignItems = 7, + kPropertyAlignSelf = 8, + kPropertyAudioTrack = 9, + kPropertyAutoplay = 10, + kPropertyMuted = 11, + kPropertyBackgroundColor = 12, + kPropertyBackgroundAssigned = 13, + kPropertyBackground = 14, + kPropertyBorderBottomLeftRadius = 15, + kPropertyBorderBottomRightRadius = 16, + kPropertyBorderColor = 17, + kPropertyBorderRadius = 18, + kPropertyBorderRadii = 19, + kPropertyBorderStrokeWidth = 20, + kPropertyBorderTopLeftRadius = 21, + kPropertyBorderTopRightRadius = 22, + kPropertyBorderWidth = 23, + kPropertyBottom = 24, + kPropertyBounds = 25, + kPropertyCenterId = 26, + kPropertyCenterIndex = 27, + kPropertyChildHeight = 28, + kPropertyChildWidth = 29, + kPropertyChecked = 30, + kPropertyColor = 31, + kPropertyColorKaraokeTarget = 32, + kPropertyColorNonKaraoke = 33, + kPropertyCurrentPage = 34, + kPropertyDescription = 35, + kPropertyDirection = 36, + kPropertyDisabled = 37, + kPropertyDisplay = 38, + kPropertyDrawnBorderWidth = 39, + kPropertyEmbeddedDocument = 40, + kPropertyEnd = 41, + kPropertyEntities = 42, + kPropertyEnvironment = 43, + kPropertyFastScrollScale = 44, + kPropertyFilters = 45, + kPropertyFirstId = 46, + kPropertyFirstIndex = 47, + kPropertyFocusable = 48, + kPropertyFontFamily = 49, + kPropertyFontSize = 50, + kPropertyFontStyle = 51, + kPropertyFontWeight = 52, + kPropertyHandleTick = 53, + kPropertyHandleVisibilityChange = 54, + kPropertyHighlightColor = 55, + kPropertyHint = 56, + kPropertyHintColor = 57, + kPropertyHintStyle = 58, + kPropertyHintWeight = 59, + kPropertyGestures = 60, + kPropertyGraphic = 61, + kPropertyGrow = 62, + kPropertyHandleKeyDown = 63, + kPropertyHandleKeyUp = 64, + kPropertyHeight = 65, + kPropertyId = 66, + kPropertyInitialPage = 67, + kPropertyInnerBounds = 68, + kPropertyItemsPerCourse = 69, + kPropertyJustifyContent = 70, + kPropertyKeyboardBehaviorOnFocus = 71, + kPropertyKeyboardType = 72, + kPropertyLayoutDirection = 73, + kPropertyLayoutDirectionAssigned = 74, + kPropertyLeft = 75, + kPropertyLetterSpacing = 76, + kPropertyLineHeight = 77, + kPropertyMaxHeight = 78, + kPropertyMaxLength = 79, + kPropertyMaxLines = 80, + kPropertyMaxWidth = 81, + kPropertyMediaBounds = 82, + kPropertyMediaState = 83, + kPropertyMinHeight = 84, + kPropertyMinWidth = 85, + kPropertyNavigation = 86, + kPropertyNextFocusDown = 87, + kPropertyNextFocusForward = 88, + kPropertyNextFocusLeft = 89, + kPropertyNextFocusRight = 90, + kPropertyNextFocusUp = 91, + kPropertyNotifyChildrenChanged = 92, + kPropertyNumbered = 93, + kPropertyNumbering = 94, + kPropertyOnBlur = 95, + kPropertyOnCancel = 96, + kPropertyOnChildrenChanged = 97, + kPropertyOnDown = 98, + kPropertyOnEnd = 99, + kPropertyOnFail = 100, + kPropertyOnFocus = 101, + kPropertyOnLoad = 102, + kPropertyOnMount = 103, + kPropertyOnMove = 104, + kPropertyOnSpeechMark = 105, + kPropertyHandlePageMove = 106, + kPropertyOnPageChanged = 107, + kPropertyOnPause = 108, + kPropertyOnPlay = 109, + kPropertyOnPress = 110, + kPropertyOnScroll = 111, + kPropertyOnSubmit = 112, + kPropertyOnTextChange = 113, + kPropertyOnUp = 114, + kPropertyOnTimeUpdate = 115, + kPropertyOnTrackFail = 116, + kPropertyOnTrackReady = 117, + kPropertyOnTrackUpdate = 118, + kPropertyOpacity = 119, + kPropertyOverlayColor = 120, + kPropertyOverlayGradient = 121, + kPropertyPadding = 122, + kPropertyPaddingBottom = 123, + kPropertyPaddingEnd = 124, + kPropertyPaddingLeft = 125, + kPropertyPaddingRight = 126, + kPropertyPaddingTop = 127, + kPropertyPaddingStart = 128, + kPropertyPageDirection = 129, + kPropertyPageId = 130, + kPropertyPageIndex = 131, + kPropertyParameters = 132, + kPropertyPlayingState = 133, + kPropertyPosition = 134, + kPropertyPreserve = 135, + kPropertyRangeKaraokeTarget = 136, + kPropertyResourceId = 137, + kPropertyResourceOnFatalError = 138, + kPropertyResourceState = 139, + kPropertyResourceType = 140, + kPropertyRight = 141, + kPropertyRole = 142, + kPropertyScale = 143, + kPropertyScreenLock = 144, + kPropertyScrollAnimation = 145, + kPropertyScrollOffset = 146, + kPropertyScrollPercent = 147, + kPropertyScrollPosition = 148, + kPropertySecureInput = 149, + kPropertySelectOnFocus = 150, + kPropertyShadowColor = 151, + kPropertyShadowHorizontalOffset = 152, + kPropertyShadowRadius = 153, + kPropertyShadowVerticalOffset = 154, + kPropertyShrink = 155, + kPropertySize = 156, + kPropertySnap = 157, + kPropertySource = 158, + kPropertySpacing = 159, + kPropertySpeech = 160, + kPropertyStart = 161, + kPropertySubmitKeyType = 162, + kPropertyText = 163, + kPropertyTextAlign = 164, + kPropertyTextAlignAssigned = 165, + kPropertyTextAlignVertical = 166, + kPropertyLang = 167, + kPropertyTrackCount = 168, + kPropertyTrackCurrentTime = 169, + kPropertyTrackDuration = 170, + kPropertyTrackEnded = 171, + kPropertyTrackIndex = 172, + kPropertyTrackPaused = 173, + kPropertyTrackState = 174, + kPropertyTransform = 175, + kPropertyTransformAssigned = 176, + kPropertyTop = 177, + kPropertyUser = 178, + kPropertyWidth = 179, + kPropertyOnCursorEnter = 180, + kPropertyOnCursorExit = 181, + kPropertyLaidOut = 182, + kPropertyValidCharacters = 183, + kPropertyVisualHash = 184, + kPropertyWrap = 185 } diff --git a/apl-client-js/index.js b/apl-client-js/index.js index e26fa21..c6bba28 100644 --- a/apl-client-js/index.js +++ b/apl-client-js/index.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.APLClient=t():e.APLClient=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}([function(e,t){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=44)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(145);class i{static initialize(e,t){this.rootLogger.setDefaultLevel(e),this.rootLogger.methodFactory=(e,r,n)=>{const o=i.originalFactory(e,r,n);return r=>{t?t(e,n,r):o(`${e[0].toUpperCase()} ${n}: ${r}`)}},this.rootLogger.setLevel(this.rootLogger.getLevel()),this.initialized=!0}static getLogger(e){return this.initialized||this.initialize("info"),this.rootLogger.getLogger(e)}}i.rootLogger=n,i.originalFactory=i.rootLogger.methodFactory,i.initialized=!1,t.LoggerFactory=i},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{d(n.next(e))}catch(e){o(e)}}function s(e){try{d(n.throw(e))}catch(e){o(e)}}function d(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}d((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(216),o=r(12),a=r(60),s=r(217),d=r(90),u=r(218),c=r(219),l=r(61),p=r(2),f=r(38),h=r(0),y=r(220),m=r(30),g=r(18),v=r(221),b=r(91),P=r(227),k=r(94),S={[a.ComponentType.kComponentTypeContainer]:"Container",[a.ComponentType.kComponentTypeEditText]:"EditText",[a.ComponentType.kComponentTypeFrame]:"Frame",[a.ComponentType.kComponentTypeImage]:"Image",[a.ComponentType.kComponentTypePager]:"Pager",[a.ComponentType.kComponentTypeScrollView]:"ScrollView",[a.ComponentType.kComponentTypeSequence]:"Sequence",[a.ComponentType.kComponentTypeGridSequence]:"GridSequence",[a.ComponentType.kComponentTypeText]:"Text",[a.ComponentType.kComponentTypeTouchWrapper]:"TouchWrapper",[a.ComponentType.kComponentTypeVideo]:"Video",[a.ComponentType.kComponentTypeVectorGraphic]:"VectorGraphic"},T={[l.LayoutDirection.kLayoutDirectionLTR]:"ltr",[l.LayoutDirection.kLayoutDirectionRTL]:"rtl"},E=new Set([a.ComponentType.kComponentTypeFrame,a.ComponentType.kComponentTypePager,a.ComponentType.kComponentTypeScrollView,a.ComponentType.kComponentTypeSequence,a.ComponentType.kComponentTypeGridSequence]),w=new Set([a.ComponentType.kComponentTypeEditText,a.ComponentType.kComponentTypeImage,a.ComponentType.kComponentTypeText,a.ComponentType.kComponentTypeTouchWrapper,a.ComponentType.kComponentTypeVideo]);t.SVG_NS="http://www.w3.org/2000/svg",t.uuidv4=r(63),t.IDENTITY_TRANSFORM="matrix(1.000000,0.000000,0.000000,1.000000,0.000000,0.000000)";class x extends i{constructor(e,t,r,n){if(super(),this.renderer=e,this.component=t,this.factory=r,this.parent=n,this.container=document.createElement("div"),this.$container=o(this.container),this.children=[],this.props={},this.isDestroyed=!1,this.doForceInvisible=!1,this.state={[f.UpdateType.kUpdatePagerPosition]:0,[f.UpdateType.kUpdatePressState]:0,[f.UpdateType.kUpdatePressed]:0,[f.UpdateType.kUpdateScrollPosition]:0,[f.UpdateType.kUpdateTakeFocus]:0},this.executors=new Map,this.propExecutor=(e,...t)=>{for(const r of t)this.executors.set(r,r=>{const n=Object.keys(t);for(const e of n)delete r[parseInt(e,10)];e()});return this.propExecutor},this.setTransform=()=>{if(this.renderer){const e=this.renderer.context.getScaleFactor(),t=v.getScaledTransform(this.props[p.PropertyKey.kPropertyTransform],e);this.$container.css({transform:t})}},this.setOpacity=()=>{this.$container.css("opacity",this.props[p.PropertyKey.kPropertyOpacity])},this.setLayoutDirection=()=>{this.layoutDirection=this.props[p.PropertyKey.kPropertyLayoutDirection],T.hasOwnProperty(this.layoutDirection)||(this.logger.warn(`Layout Direction ${this.layoutDirection} is not supported, defaulting to LTR`),this.layoutDirection=l.LayoutDirection.kLayoutDirectionLTR),this.parent&&this.parent.layoutDirection===this.layoutDirection||(this.container.dir=T[this.layoutDirection])},this.isRtl=()=>this.layoutDirection===l.LayoutDirection.kLayoutDirectionRTL,this.setDisplay=()=>{let e=this.props[p.PropertyKey.kPropertyDisplay];switch(this.hasValidBounds()&&!this.doForceInvisible||(e=s.Display.kDisplayInvisible),e){case s.Display.kDisplayInvisible:case s.Display.kDisplayNone:this.$container.css({display:"none"});break;case s.Display.kDisplayNormal:this.$container.css({display:this.getNormalDisplay()});break;default:this.logger.warn("Incorrect display type: "+e)}},this.setBoundsAndDisplay=()=>{if(this.bounds=this.props[p.PropertyKey.kPropertyBounds],!this.bounds)return;this.setDisplay();let e=0,t=0;if(this.parent&&this.parent.component.getType()===a.ComponentType.kComponentTypeFrame){const r=this.parent.component,n=r.getCalculatedByKey(p.PropertyKey.kPropertyDrawnBorderWidth);e-=n,t-=n;const i=r.getCalculatedByKey(p.PropertyKey.kPropertyBorderRadii),o=r.getCalculatedByKey(p.PropertyKey.kPropertyBounds),a=r.getCalculatedByKey(p.PropertyKey.kPropertyBorderWidth),s=[i.topLeft(),i.topRight(),i.bottomRight(),i.bottomLeft()];0!==a&&(s[0]=Math.max(0,s[0]-a),s[1]=Math.max(0,s[1]-a),s[2]=Math.max(0,s[2]-a),s[3]=Math.max(0,s[3]-a));const d={top:a-this.bounds.top,left:a-this.bounds.left,height:Math.max(0,o.height-2*a),width:Math.max(0,o.width-2*a)},u=[d.width-s[0]-s[1],d.height-s[1]-s[2],d.width-s[2]-s[3],d.height-s[3]-s[0]],c=d.top,l=`path('M${d.left+s[0]},${c} h${u[0]} a${s[1]},${s[1]} 0 0 1 ${s[1]},${s[1]} v${u[1]} a${s[2]},${s[2]} 0 0 1 -${s[2]},${s[2]} h-${u[2]} a${s[3]},${s[3]} 0 0 1 -${s[3]},-${s[3]} v-${u[3]} a${s[0]},${s[0]} 0 0 1 ${s[0]},-${s[0]} z')`;this.$container.css("clip-path",l)}this.bounds={top:this.bounds.top+e,left:this.bounds.left+t,height:this.bounds.height,width:this.bounds.width};for(const e of this.children)e.setBoundsAndDisplay();k.applyAplRectToStyle({domElement:this.container,rectangle:this.bounds}),this.innerBounds=this.props[p.PropertyKey.kPropertyInnerBounds],k.applyPaddingToStyle({domElement:this.container,bounds:this.bounds,innerBounds:this.innerBounds}),this.boundsUpdated()},this.setUserProperties=()=>{if(!this.renderer)return;const e=this.renderer.getDeveloperToolOptions();if(!e)return;const t=this.props[p.PropertyKey.kPropertyUser],r=e.mappingKey;if(r&&t.hasOwnProperty(r)){const e=t[r]+this.id;this.renderer.componentByMappingKey.set(e,this)}const n=e.writeKeys;if(n&&Array.isArray(n))for(const e of n)t.hasOwnProperty(e)&&this.container.setAttribute(["data",e].join("-"),t[e])},this.handleComponentChildrenChange=()=>{for(const e of this.props[p.PropertyKey.kPropertyNotifyChildrenChanged])e.action===g.ChildAction.Insert||(e.action===g.ChildAction.Remove?void 0!==this.container.children[e.uid]&&this.container.children[e.uid].remove():this.logger.warn(`Invalid action type ${e.action} for child ${e.uid}`));this.ensureDisplayedChildren()},this.getCssShadow=()=>`${this.props[p.PropertyKey.kPropertyShadowHorizontalOffset]}px ${this.props[p.PropertyKey.kPropertyShadowVerticalOffset]}px ${this.props[p.PropertyKey.kPropertyShadowRadius]}px ${x.numberToColor(this.props[p.PropertyKey.kPropertyShadowColor])}`,this.setShadow=()=>{this.applyCssShadow(this.getCssShadow())},this.applyCssShadow=e=>{this.$container.css("box-shadow",e)},this.logger=h.LoggerFactory.getLogger(S[t.getType()]||"Component"),this.$container.css({position:"absolute","transform-origin":"0% 0%","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),this.checkComponentTypeAndEnableClipping(),this.id=t.getUniqueId(),this.$container.attr("id",this.id),this.assignedId=t.getId(),e){e.componentMap[this.id]=this,e.componentIdMap[this.assignedId]=this;const r=e.options;r&&r.developerToolOptions&&r.developerToolOptions.includeComponentId&&this.$container.attr("data-componentid",t.getId())}this.container.classList.add("apl-"+this.constructor.name.toLowerCase()),this.parent=n,this.propExecutor(this.setTransform,p.PropertyKey.kPropertyTransform)(this.setLayoutDirection,p.PropertyKey.kPropertyLayoutDirection)(this.setBoundsAndDisplay,p.PropertyKey.kPropertyBounds,p.PropertyKey.kPropertyInnerBounds,p.PropertyKey.kPropertyDisplay)(this.setOpacity,p.PropertyKey.kPropertyOpacity)(this.setUserProperties,p.PropertyKey.kPropertyUser)(this.handleComponentChildrenChange,p.PropertyKey.kPropertyNotifyChildrenChanged)(this.setShadow,p.PropertyKey.kPropertyShadowHorizontalOffset,p.PropertyKey.kPropertyShadowVerticalOffset,p.PropertyKey.kPropertyShadowRadius,p.PropertyKey.kPropertyShadowColor)}init(){const e=this.getDisplayedChildren();for(let t=0;te.id===n.getUniqueId()).shift();e[r]=void 0!==i?i:this.factory(this.renderer,n,this,!0,r)}this.children.forEach(t=>{e.some(e=>e.id===t.id)||t.destroy()}),this.children=e}getDisplayedChildCount(){return this.component.getDisplayedChildCount()}getDisplayedChildren(){const e=[],t=this.component.getDisplayedChildCount();for(let r=0;r{const r=parseInt(t,10);this.props[r]=e[r]}),Object.keys(e).forEach(t=>{const r=parseInt(t,10);if(r in e){const t=this.executors.get(r);t&&t(e)}}),this.onPropertiesUpdated()}updateDirtyProps(){const e=this.component.getDirtyProps();this.setProperties(e)}update(e,t){"string"==typeof t?(this.state[e]=t.toString(),this.component.updateEditText(e,t.toString())):(this.state[e]=t,this.component.update(e,t))}destroy(e=!1){this.container&&this.container.parentElement&&this.container.parentElement.removeChild(this.container),this.isDestroyed=!0,this.parent=void 0,delete this.renderer.componentMap[this.id],delete this.renderer.componentMap[this.assignedId],this.renderer=void 0;for(const t of this.children)t.destroy(e);this.children=void 0,e&&(this.component.delete(),this.component=void 0)}static numberToColor(e){return m.numberToColor(e)}static getGradientSpreadMethod(e){switch(e){case u.GradientSpreadMethod.REFLECT:return"reflect";case u.GradientSpreadMethod.REPEAT:return"repeat";case u.GradientSpreadMethod.PAD:default:return"pad"}}static getGradientUnits(e){switch(e){case c.GradientUnits.kGradientUnitsUserSpace:return"userSpaceOnUse";case c.GradientUnits.kGradientUnitsBoundingBox:default:return"objectBoundingBox"}}static fillAndStrokeConverter(e,t,r,n){return b.fillAndStrokeConverter({value:e,transform:t,parent:r,logger:n})}hasValidBounds(){return this.bounds.width>0&&this.bounds.width<1e6}static getClipPathElementId(e,r){if(!e||""===e)return"";const n=document.createElementNS(t.SVG_NS,"defs"),i=document.createElementNS(t.SVG_NS,"clipPath"),o=document.createElementNS(t.SVG_NS,"path"),a=t.uuidv4().toString();return i.setAttributeNS("","id",a),o.setAttributeNS("","d",e.toString()),i.appendChild(o),n.appendChild(i),r.appendChild(n),`url('#${a}')`}inflateAndAddChild(e,t){const r=this.component.inflateChild(t,e);let n;return r&&(n=this.factory(this.renderer,r,this,!0,e),this.children.splice(e,0,n)),n}remove(){return!!this.component.remove()&&(this.parent&&this.parent.children&&this.parent.children.splice(this.parent.children.indexOf(this),1),this.destroy(!0),!0)}boundsUpdated(){}isLayout(){return!1}sizeToFit(){if(this.renderer&&this.renderer.getLegacyClippingEnabled())return;const e=!!this.bounds,t=!!this.parent,r=this.layoutDirection===l.LayoutDirection.kLayoutDirectionLTR;if(!(e&&t&&r))return;const n=this.parent.component.getType()===a.ComponentType.kComponentTypeContainer,i=this.isLayout();if(!n||!i)return;const o=P.createBoundsFitter({containingBounds:this.parent.bounds,innerBounds:this.bounds,layoutDirection:this.layoutDirection}).fitBounds();if(o===this.bounds)return;const{width:s,height:d}=o,{width:u,height:c}=this.bounds;this.logger.warn(`Component ${this.id} has bounds that is bigger than parent bounds.\nCheck your template correctness.\nAdjusting ${this.id} to parent ${this.parent.id}\nWIDTH: ${u} => ${s}\nHEIGHT: ${c} => ${d}\n`);const p=y.getRectDifference(this.bounds,o);this.bounds=o,this.innerBounds&&((this.innerBounds.width>this.bounds.width||this.innerBounds.height>this.bounds.height)&&(this.innerBounds=y.getRectDifference(this.innerBounds,p)),k.applyAplRectToStyle({domElement:this.container,rectangle:this.bounds}),k.applyPaddingToStyle({domElement:this.container,bounds:this.bounds,innerBounds:this.innerBounds}),this.boundsUpdated())}alignSize(){return this.sizeToFit()}getProperties(){return this.component.getCalculated()}forceInvisible(e){this.doForceInvisible!==e&&(this.doForceInvisible=e,this.setDisplay())}getNormalDisplay(){return""}takeFocus(){return n(this,void 0,void 0,(function*(){const e=(yield this.renderer.context.getFocusableAreas())[this.id];e&&this.renderer.context.setFocus(d.FocusDirection.kFocusDirectionNone,e,this.id)}))}get lang(){return this.props[p.PropertyKey.kPropertyLang]||""}checkComponentTypeAndEnableClipping(){const e=this.component.getType();if(w.has(e))return;const t=this.parent&&E.has(this.parent.component.getType()),r=E.has(e),n=this.renderer&&this.renderer.getLegacyClippingEnabled();this.parent&&!r&&!t&&n||this.enableClipping()}enableClipping(){this.$container.css("overflow","hidden")}}t.Component=x},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.kPropertyScrollDirection=0]="kPropertyScrollDirection",e[e.kPropertyAccessibilityActions=1]="kPropertyAccessibilityActions",e[e.kPropertyAccessibilityActionsAssigned=2]="kPropertyAccessibilityActionsAssigned",e[e.kPropertyAccessibilityLabel=3]="kPropertyAccessibilityLabel",e[e.kPropertyAlign=4]="kPropertyAlign",e[e.kPropertyAlignItems=5]="kPropertyAlignItems",e[e.kPropertyAlignSelf=6]="kPropertyAlignSelf",e[e.kPropertyAudioTrack=7]="kPropertyAudioTrack",e[e.kPropertyAutoplay=8]="kPropertyAutoplay",e[e.kPropertyMuted=9]="kPropertyMuted",e[e.kPropertyBackgroundColor=10]="kPropertyBackgroundColor",e[e.kPropertyBackgroundAssigned=11]="kPropertyBackgroundAssigned",e[e.kPropertyBackground=12]="kPropertyBackground",e[e.kPropertyBorderBottomLeftRadius=13]="kPropertyBorderBottomLeftRadius",e[e.kPropertyBorderBottomRightRadius=14]="kPropertyBorderBottomRightRadius",e[e.kPropertyBorderColor=15]="kPropertyBorderColor",e[e.kPropertyBorderRadius=16]="kPropertyBorderRadius",e[e.kPropertyBorderRadii=17]="kPropertyBorderRadii",e[e.kPropertyBorderStrokeWidth=18]="kPropertyBorderStrokeWidth",e[e.kPropertyBorderTopLeftRadius=19]="kPropertyBorderTopLeftRadius",e[e.kPropertyBorderTopRightRadius=20]="kPropertyBorderTopRightRadius",e[e.kPropertyBorderWidth=21]="kPropertyBorderWidth",e[e.kPropertyBottom=22]="kPropertyBottom",e[e.kPropertyBounds=23]="kPropertyBounds",e[e.kPropertyCenterId=24]="kPropertyCenterId",e[e.kPropertyCenterIndex=25]="kPropertyCenterIndex",e[e.kPropertyChildHeight=26]="kPropertyChildHeight",e[e.kPropertyChildWidth=27]="kPropertyChildWidth",e[e.kPropertyChecked=28]="kPropertyChecked",e[e.kPropertyColor=29]="kPropertyColor",e[e.kPropertyColorKaraokeTarget=30]="kPropertyColorKaraokeTarget",e[e.kPropertyColorNonKaraoke=31]="kPropertyColorNonKaraoke",e[e.kPropertyCurrentPage=32]="kPropertyCurrentPage",e[e.kPropertyDescription=33]="kPropertyDescription",e[e.kPropertyDirection=34]="kPropertyDirection",e[e.kPropertyDisabled=35]="kPropertyDisabled",e[e.kPropertyDisplay=36]="kPropertyDisplay",e[e.kPropertyDrawnBorderWidth=37]="kPropertyDrawnBorderWidth",e[e.kPropertyEmbeddedDocument=38]="kPropertyEmbeddedDocument",e[e.kPropertyEnd=39]="kPropertyEnd",e[e.kPropertyEntities=40]="kPropertyEntities",e[e.kPropertyEnvironment=41]="kPropertyEnvironment",e[e.kPropertyFastScrollScale=42]="kPropertyFastScrollScale",e[e.kPropertyFilters=43]="kPropertyFilters",e[e.kPropertyFirstId=44]="kPropertyFirstId",e[e.kPropertyFirstIndex=45]="kPropertyFirstIndex",e[e.kPropertyFocusable=46]="kPropertyFocusable",e[e.kPropertyFontFamily=47]="kPropertyFontFamily",e[e.kPropertyFontSize=48]="kPropertyFontSize",e[e.kPropertyFontStyle=49]="kPropertyFontStyle",e[e.kPropertyFontWeight=50]="kPropertyFontWeight",e[e.kPropertyHandleTick=51]="kPropertyHandleTick",e[e.kPropertyHighlightColor=52]="kPropertyHighlightColor",e[e.kPropertyHint=53]="kPropertyHint",e[e.kPropertyHintColor=54]="kPropertyHintColor",e[e.kPropertyHintStyle=55]="kPropertyHintStyle",e[e.kPropertyHintWeight=56]="kPropertyHintWeight",e[e.kPropertyGestures=57]="kPropertyGestures",e[e.kPropertyGraphic=58]="kPropertyGraphic",e[e.kPropertyGrow=59]="kPropertyGrow",e[e.kPropertyHandleKeyDown=60]="kPropertyHandleKeyDown",e[e.kPropertyHandleKeyUp=61]="kPropertyHandleKeyUp",e[e.kPropertyHeight=62]="kPropertyHeight",e[e.kPropertyId=63]="kPropertyId",e[e.kPropertyInitialPage=64]="kPropertyInitialPage",e[e.kPropertyInnerBounds=65]="kPropertyInnerBounds",e[e.kPropertyItemsPerCourse=66]="kPropertyItemsPerCourse",e[e.kPropertyJustifyContent=67]="kPropertyJustifyContent",e[e.kPropertyKeyboardBehaviorOnFocus=68]="kPropertyKeyboardBehaviorOnFocus",e[e.kPropertyKeyboardType=69]="kPropertyKeyboardType",e[e.kPropertyLayoutDirection=70]="kPropertyLayoutDirection",e[e.kPropertyLayoutDirectionAssigned=71]="kPropertyLayoutDirectionAssigned",e[e.kPropertyLeft=72]="kPropertyLeft",e[e.kPropertyLetterSpacing=73]="kPropertyLetterSpacing",e[e.kPropertyLineHeight=74]="kPropertyLineHeight",e[e.kPropertyMaxHeight=75]="kPropertyMaxHeight",e[e.kPropertyMaxLength=76]="kPropertyMaxLength",e[e.kPropertyMaxLines=77]="kPropertyMaxLines",e[e.kPropertyMaxWidth=78]="kPropertyMaxWidth",e[e.kPropertyMediaBounds=79]="kPropertyMediaBounds",e[e.kPropertyMediaState=80]="kPropertyMediaState",e[e.kPropertyMinHeight=81]="kPropertyMinHeight",e[e.kPropertyMinWidth=82]="kPropertyMinWidth",e[e.kPropertyNavigation=83]="kPropertyNavigation",e[e.kPropertyNextFocusDown=84]="kPropertyNextFocusDown",e[e.kPropertyNextFocusForward=85]="kPropertyNextFocusForward",e[e.kPropertyNextFocusLeft=86]="kPropertyNextFocusLeft",e[e.kPropertyNextFocusRight=87]="kPropertyNextFocusRight",e[e.kPropertyNextFocusUp=88]="kPropertyNextFocusUp",e[e.kPropertyNotifyChildrenChanged=89]="kPropertyNotifyChildrenChanged",e[e.kPropertyNumbered=90]="kPropertyNumbered",e[e.kPropertyNumbering=91]="kPropertyNumbering",e[e.kPropertyOnBlur=92]="kPropertyOnBlur",e[e.kPropertyOnCancel=93]="kPropertyOnCancel",e[e.kPropertyOnChildrenChanged=94]="kPropertyOnChildrenChanged",e[e.kPropertyOnDown=95]="kPropertyOnDown",e[e.kPropertyOnEnd=96]="kPropertyOnEnd",e[e.kPropertyOnFail=97]="kPropertyOnFail",e[e.kPropertyOnFocus=98]="kPropertyOnFocus",e[e.kPropertyOnLoad=99]="kPropertyOnLoad",e[e.kPropertyOnMount=100]="kPropertyOnMount",e[e.kPropertyOnMove=101]="kPropertyOnMove",e[e.kPropertyOnSpeechMark=102]="kPropertyOnSpeechMark",e[e.kPropertyHandlePageMove=103]="kPropertyHandlePageMove",e[e.kPropertyOnPageChanged=104]="kPropertyOnPageChanged",e[e.kPropertyOnPause=105]="kPropertyOnPause",e[e.kPropertyOnPlay=106]="kPropertyOnPlay",e[e.kPropertyOnPress=107]="kPropertyOnPress",e[e.kPropertyOnScroll=108]="kPropertyOnScroll",e[e.kPropertyOnSubmit=109]="kPropertyOnSubmit",e[e.kPropertyOnTextChange=110]="kPropertyOnTextChange",e[e.kPropertyOnUp=111]="kPropertyOnUp",e[e.kPropertyOnTimeUpdate=112]="kPropertyOnTimeUpdate",e[e.kPropertyOnTrackFail=113]="kPropertyOnTrackFail",e[e.kPropertyOnTrackReady=114]="kPropertyOnTrackReady",e[e.kPropertyOnTrackUpdate=115]="kPropertyOnTrackUpdate",e[e.kPropertyOpacity=116]="kPropertyOpacity",e[e.kPropertyOverlayColor=117]="kPropertyOverlayColor",e[e.kPropertyOverlayGradient=118]="kPropertyOverlayGradient",e[e.kPropertyPadding=119]="kPropertyPadding",e[e.kPropertyPaddingBottom=120]="kPropertyPaddingBottom",e[e.kPropertyPaddingEnd=121]="kPropertyPaddingEnd",e[e.kPropertyPaddingLeft=122]="kPropertyPaddingLeft",e[e.kPropertyPaddingRight=123]="kPropertyPaddingRight",e[e.kPropertyPaddingTop=124]="kPropertyPaddingTop",e[e.kPropertyPaddingStart=125]="kPropertyPaddingStart",e[e.kPropertyPageDirection=126]="kPropertyPageDirection",e[e.kPropertyPageId=127]="kPropertyPageId",e[e.kPropertyPageIndex=128]="kPropertyPageIndex",e[e.kPropertyParameters=129]="kPropertyParameters",e[e.kPropertyPlayingState=130]="kPropertyPlayingState",e[e.kPropertyPosition=131]="kPropertyPosition",e[e.kPropertyPreserve=132]="kPropertyPreserve",e[e.kPropertyRangeKaraokeTarget=133]="kPropertyRangeKaraokeTarget",e[e.kPropertyResourceId=134]="kPropertyResourceId",e[e.kPropertyResourceOnFatalError=135]="kPropertyResourceOnFatalError",e[e.kPropertyResourceState=136]="kPropertyResourceState",e[e.kPropertyResourceType=137]="kPropertyResourceType",e[e.kPropertyRight=138]="kPropertyRight",e[e.kPropertyRole=139]="kPropertyRole",e[e.kPropertyScale=140]="kPropertyScale",e[e.kPropertyScrollAnimation=141]="kPropertyScrollAnimation",e[e.kPropertyScrollOffset=142]="kPropertyScrollOffset",e[e.kPropertyScrollPercent=143]="kPropertyScrollPercent",e[e.kPropertyScrollPosition=144]="kPropertyScrollPosition",e[e.kPropertySecureInput=145]="kPropertySecureInput",e[e.kPropertySelectOnFocus=146]="kPropertySelectOnFocus",e[e.kPropertyShadowColor=147]="kPropertyShadowColor",e[e.kPropertyShadowHorizontalOffset=148]="kPropertyShadowHorizontalOffset",e[e.kPropertyShadowRadius=149]="kPropertyShadowRadius",e[e.kPropertyShadowVerticalOffset=150]="kPropertyShadowVerticalOffset",e[e.kPropertyShrink=151]="kPropertyShrink",e[e.kPropertySize=152]="kPropertySize",e[e.kPropertySnap=153]="kPropertySnap",e[e.kPropertySource=154]="kPropertySource",e[e.kPropertySpacing=155]="kPropertySpacing",e[e.kPropertySpeech=156]="kPropertySpeech",e[e.kPropertyStart=157]="kPropertyStart",e[e.kPropertySubmitKeyType=158]="kPropertySubmitKeyType",e[e.kPropertyText=159]="kPropertyText",e[e.kPropertyTextAlign=160]="kPropertyTextAlign",e[e.kPropertyTextAlignAssigned=161]="kPropertyTextAlignAssigned",e[e.kPropertyTextAlignVertical=162]="kPropertyTextAlignVertical",e[e.kPropertyLang=163]="kPropertyLang",e[e.kPropertyTrackCount=164]="kPropertyTrackCount",e[e.kPropertyTrackCurrentTime=165]="kPropertyTrackCurrentTime",e[e.kPropertyTrackDuration=166]="kPropertyTrackDuration",e[e.kPropertyTrackEnded=167]="kPropertyTrackEnded",e[e.kPropertyTrackIndex=168]="kPropertyTrackIndex",e[e.kPropertyTrackPaused=169]="kPropertyTrackPaused",e[e.kPropertyTrackState=170]="kPropertyTrackState",e[e.kPropertyTransform=171]="kPropertyTransform",e[e.kPropertyTransformAssigned=172]="kPropertyTransformAssigned",e[e.kPropertyTop=173]="kPropertyTop",e[e.kPropertyUser=174]="kPropertyUser",e[e.kPropertyWidth=175]="kPropertyWidth",e[e.kPropertyOnCursorEnter=176]="kPropertyOnCursorEnter",e[e.kPropertyOnCursorExit=177]="kPropertyOnCursorExit",e[e.kPropertyLaidOut=178]="kPropertyLaidOut",e[e.kPropertyValidCharacters=179]="kPropertyValidCharacters",e[e.kPropertyVisualHash=180]="kPropertyVisualHash",e[e.kPropertyWrap=181]="kPropertyWrap"}(t.PropertyKey||(t.PropertyKey={}))},function(e,t){var r=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(52)("wks"),i=r(37),o=r(6).Symbol,a="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict"; +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.APLClient=t():e.APLClient=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}([function(e,t){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=44)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(145);class i{static initialize(e,t){this.rootLogger.setDefaultLevel(e),this.rootLogger.methodFactory=(e,r,n)=>{const o=i.originalFactory(e,r,n);return r=>{t?t(e,n,r):o(`${e[0].toUpperCase()} ${n}: ${r}`)}},this.rootLogger.setLevel(this.rootLogger.getLevel()),this.initialized=!0}static getLogger(e){return this.initialized||this.initialize("info"),this.rootLogger.getLogger(e)}}i.rootLogger=n,i.originalFactory=i.rootLogger.methodFactory,i.initialized=!1,t.LoggerFactory=i},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{d(n.next(e))}catch(e){o(e)}}function s(e){try{d(n.throw(e))}catch(e){o(e)}}function d(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}d((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(216),o=r(12),a=r(60),s=r(217),d=r(90),u=r(218),c=r(219),l=r(61),p=r(2),f=r(38),h=r(0),y=r(220),m=r(30),g=r(18),v=r(221),b=r(91),P=r(227),k=r(94),S={[a.ComponentType.kComponentTypeContainer]:"Container",[a.ComponentType.kComponentTypeEditText]:"EditText",[a.ComponentType.kComponentTypeFrame]:"Frame",[a.ComponentType.kComponentTypeImage]:"Image",[a.ComponentType.kComponentTypePager]:"Pager",[a.ComponentType.kComponentTypeScrollView]:"ScrollView",[a.ComponentType.kComponentTypeSequence]:"Sequence",[a.ComponentType.kComponentTypeGridSequence]:"GridSequence",[a.ComponentType.kComponentTypeText]:"Text",[a.ComponentType.kComponentTypeTouchWrapper]:"TouchWrapper",[a.ComponentType.kComponentTypeVideo]:"Video",[a.ComponentType.kComponentTypeVectorGraphic]:"VectorGraphic"},T={[l.LayoutDirection.kLayoutDirectionLTR]:"ltr",[l.LayoutDirection.kLayoutDirectionRTL]:"rtl"},E=new Set([a.ComponentType.kComponentTypeFrame,a.ComponentType.kComponentTypePager,a.ComponentType.kComponentTypeScrollView,a.ComponentType.kComponentTypeSequence,a.ComponentType.kComponentTypeGridSequence]),w=new Set([a.ComponentType.kComponentTypeEditText,a.ComponentType.kComponentTypeImage,a.ComponentType.kComponentTypeText,a.ComponentType.kComponentTypeTouchWrapper,a.ComponentType.kComponentTypeVideo]);t.SVG_NS="http://www.w3.org/2000/svg",t.uuidv4=r(63),t.IDENTITY_TRANSFORM="matrix(1.000000,0.000000,0.000000,1.000000,0.000000,0.000000)";class x extends i{constructor(e,t,r,n){if(super(),this.renderer=e,this.component=t,this.factory=r,this.parent=n,this.container=document.createElement("div"),this.$container=o(this.container),this.children=[],this.props={},this.isDestroyed=!1,this.doForceInvisible=!1,this.state={[f.UpdateType.kUpdatePagerPosition]:0,[f.UpdateType.kUpdatePressState]:0,[f.UpdateType.kUpdatePressed]:0,[f.UpdateType.kUpdateScrollPosition]:0,[f.UpdateType.kUpdateTakeFocus]:0},this.executors=new Map,this.propExecutor=(e,...t)=>{for(const r of t)this.executors.set(r,r=>{const n=Object.keys(t);for(const e of n)delete r[parseInt(e,10)];e()});return this.propExecutor},this.setTransform=()=>{if(this.renderer){const e=this.renderer.context.getScaleFactor(),t=v.getScaledTransform(this.props[p.PropertyKey.kPropertyTransform],e);this.$container.css({transform:t})}},this.setOpacity=()=>{this.$container.css("opacity",this.props[p.PropertyKey.kPropertyOpacity])},this.setLayoutDirection=()=>{this.layoutDirection=this.props[p.PropertyKey.kPropertyLayoutDirection],T.hasOwnProperty(this.layoutDirection)||(this.logger.warn(`Layout Direction ${this.layoutDirection} is not supported, defaulting to LTR`),this.layoutDirection=l.LayoutDirection.kLayoutDirectionLTR),this.parent&&this.parent.layoutDirection===this.layoutDirection||(this.container.dir=T[this.layoutDirection])},this.isRtl=()=>this.layoutDirection===l.LayoutDirection.kLayoutDirectionRTL,this.setDisplay=()=>{let e=this.props[p.PropertyKey.kPropertyDisplay];switch(this.hasValidBounds()&&!this.doForceInvisible||(e=s.Display.kDisplayInvisible),e){case s.Display.kDisplayInvisible:case s.Display.kDisplayNone:this.$container.css({display:"none"});break;case s.Display.kDisplayNormal:this.$container.css({display:this.getNormalDisplay()});break;default:this.logger.warn("Incorrect display type: "+e)}},this.setBoundsAndDisplay=()=>{if(this.bounds=this.props[p.PropertyKey.kPropertyBounds],!this.bounds)return;this.setDisplay();let e=0,t=0;if(this.parent&&this.parent.component.getType()===a.ComponentType.kComponentTypeFrame){const r=this.parent.component,n=r.getCalculatedByKey(p.PropertyKey.kPropertyDrawnBorderWidth);e-=n,t-=n;const i=r.getCalculatedByKey(p.PropertyKey.kPropertyBorderRadii),o=r.getCalculatedByKey(p.PropertyKey.kPropertyBounds),a=r.getCalculatedByKey(p.PropertyKey.kPropertyBorderWidth),s=[i.topLeft(),i.topRight(),i.bottomRight(),i.bottomLeft()];0!==a&&(s[0]=Math.max(0,s[0]-a),s[1]=Math.max(0,s[1]-a),s[2]=Math.max(0,s[2]-a),s[3]=Math.max(0,s[3]-a));const d={top:a-this.bounds.top,left:a-this.bounds.left,height:Math.max(0,o.height-2*a),width:Math.max(0,o.width-2*a)},u=[d.width-s[0]-s[1],d.height-s[1]-s[2],d.width-s[2]-s[3],d.height-s[3]-s[0]],c=d.top,l=`path('M${d.left+s[0]},${c} h${u[0]} a${s[1]},${s[1]} 0 0 1 ${s[1]},${s[1]} v${u[1]} a${s[2]},${s[2]} 0 0 1 -${s[2]},${s[2]} h-${u[2]} a${s[3]},${s[3]} 0 0 1 -${s[3]},-${s[3]} v-${u[3]} a${s[0]},${s[0]} 0 0 1 ${s[0]},-${s[0]} z')`;this.$container.css("clip-path",l)}this.bounds={top:this.bounds.top+e,left:this.bounds.left+t,height:this.bounds.height,width:this.bounds.width};for(const e of this.children)e.setBoundsAndDisplay();k.applyAplRectToStyle({domElement:this.container,rectangle:this.bounds}),this.innerBounds=this.props[p.PropertyKey.kPropertyInnerBounds],k.applyPaddingToStyle({domElement:this.container,bounds:this.bounds,innerBounds:this.innerBounds}),this.boundsUpdated()},this.setUserProperties=()=>{if(!this.renderer)return;const e=this.renderer.getDeveloperToolOptions();if(!e)return;const t=this.props[p.PropertyKey.kPropertyUser],r=e.mappingKey;if(r&&t.hasOwnProperty(r)){const e=t[r]+this.id;this.renderer.componentByMappingKey.set(e,this)}const n=e.writeKeys;if(n&&Array.isArray(n))for(const e of n)t.hasOwnProperty(e)&&this.container.setAttribute(["data",e].join("-"),t[e])},this.handleComponentChildrenChange=()=>{for(const e of this.props[p.PropertyKey.kPropertyNotifyChildrenChanged])e.action===g.ChildAction.Insert||(e.action===g.ChildAction.Remove?void 0!==this.container.children[e.uid]&&this.container.children[e.uid].remove():this.logger.warn(`Invalid action type ${e.action} for child ${e.uid}`));this.ensureDisplayedChildren()},this.getCssShadow=()=>`${this.props[p.PropertyKey.kPropertyShadowHorizontalOffset]}px ${this.props[p.PropertyKey.kPropertyShadowVerticalOffset]}px ${this.props[p.PropertyKey.kPropertyShadowRadius]}px ${x.numberToColor(this.props[p.PropertyKey.kPropertyShadowColor])}`,this.setShadow=()=>{this.applyCssShadow(this.getCssShadow())},this.applyCssShadow=e=>{this.$container.css("box-shadow",e)},this.logger=h.LoggerFactory.getLogger(S[t.getType()]||"Component"),this.$container.css({position:"absolute","transform-origin":"0% 0%","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),this.checkComponentTypeAndEnableClipping(),this.id=t.getUniqueId(),this.$container.attr("id",this.id),this.assignedId=t.getId(),e){e.componentMap[this.id]=this,e.componentIdMap[this.assignedId]=this;const r=e.options;r&&r.developerToolOptions&&r.developerToolOptions.includeComponentId&&this.$container.attr("data-componentid",t.getId())}this.container.classList.add("apl-"+this.constructor.name.toLowerCase()),this.parent=n,this.propExecutor(this.setTransform,p.PropertyKey.kPropertyTransform)(this.setLayoutDirection,p.PropertyKey.kPropertyLayoutDirection)(this.setBoundsAndDisplay,p.PropertyKey.kPropertyBounds,p.PropertyKey.kPropertyInnerBounds,p.PropertyKey.kPropertyDisplay)(this.setOpacity,p.PropertyKey.kPropertyOpacity)(this.setUserProperties,p.PropertyKey.kPropertyUser)(this.handleComponentChildrenChange,p.PropertyKey.kPropertyNotifyChildrenChanged)(this.setShadow,p.PropertyKey.kPropertyShadowHorizontalOffset,p.PropertyKey.kPropertyShadowVerticalOffset,p.PropertyKey.kPropertyShadowRadius,p.PropertyKey.kPropertyShadowColor)}init(){const e=this.getDisplayedChildren();for(let t=0;te.id===n.getUniqueId()).shift();e[r]=void 0!==i?i:this.factory(this.renderer,n,this,!0,r)}this.children.forEach(t=>{e.some(e=>e.id===t.id)||t.destroy()}),this.children=e}getDisplayedChildCount(){return this.component.getDisplayedChildCount()}getDisplayedChildren(){const e=[],t=this.component.getDisplayedChildCount();for(let r=0;r{const r=parseInt(t,10);this.props[r]=e[r]}),Object.keys(e).forEach(t=>{const r=parseInt(t,10);if(r in e){const t=this.executors.get(r);t&&t(e)}}),this.onPropertiesUpdated()}updateDirtyProps(){const e=this.component.getDirtyProps();this.setProperties(e)}update(e,t){"string"==typeof t?(this.state[e]=t.toString(),this.component.updateEditText(e,t.toString())):(this.state[e]=t,this.component.update(e,t))}destroy(e=!1){this.container&&this.container.parentElement&&this.container.parentElement.removeChild(this.container),this.isDestroyed=!0,this.parent=void 0,delete this.renderer.componentMap[this.id],delete this.renderer.componentMap[this.assignedId],this.renderer=void 0;for(const t of this.children)t.destroy(e);this.children=void 0,e&&(this.component.delete(),this.component=void 0)}static numberToColor(e){return m.numberToColor(e)}static getGradientSpreadMethod(e){switch(e){case u.GradientSpreadMethod.REFLECT:return"reflect";case u.GradientSpreadMethod.REPEAT:return"repeat";case u.GradientSpreadMethod.PAD:default:return"pad"}}static getGradientUnits(e){switch(e){case c.GradientUnits.kGradientUnitsUserSpace:return"userSpaceOnUse";case c.GradientUnits.kGradientUnitsBoundingBox:default:return"objectBoundingBox"}}static fillAndStrokeConverter(e,t,r,n){return b.fillAndStrokeConverter({value:e,transform:t,parent:r,logger:n})}hasValidBounds(){return this.bounds.width>0&&this.bounds.width<1e6}static getClipPathElementId(e,r){if(!e||""===e)return"";const n=document.createElementNS(t.SVG_NS,"defs"),i=document.createElementNS(t.SVG_NS,"clipPath"),o=document.createElementNS(t.SVG_NS,"path"),a=t.uuidv4().toString();return i.setAttributeNS("","id",a),o.setAttributeNS("","d",e.toString()),i.appendChild(o),n.appendChild(i),r.appendChild(n),`url('#${a}')`}inflateAndAddChild(e,t){const r=this.component.inflateChild(t,e);let n;return r&&(n=this.factory(this.renderer,r,this,!0,e),this.children.splice(e,0,n)),n}remove(){return!!this.component.remove()&&(this.parent&&this.parent.children&&this.parent.children.splice(this.parent.children.indexOf(this),1),this.destroy(!0),!0)}boundsUpdated(){}isLayout(){return!1}sizeToFit(){if(this.renderer&&this.renderer.getLegacyClippingEnabled())return;const e=!!this.bounds,t=!!this.parent,r=this.layoutDirection===l.LayoutDirection.kLayoutDirectionLTR;if(!(e&&t&&r))return;const n=this.parent.component.getType()===a.ComponentType.kComponentTypeContainer,i=this.isLayout();if(!n||!i)return;const o=P.createBoundsFitter({containingBounds:this.parent.bounds,innerBounds:this.bounds,layoutDirection:this.layoutDirection}).fitBounds();if(o===this.bounds)return;const{width:s,height:d}=o,{width:u,height:c}=this.bounds;this.logger.warn(`Component ${this.id} has bounds that is bigger than parent bounds.\nCheck your template correctness.\nAdjusting ${this.id} to parent ${this.parent.id}\nWIDTH: ${u} => ${s}\nHEIGHT: ${c} => ${d}\n`);const p=y.getRectDifference(this.bounds,o);this.bounds=o,this.innerBounds&&((this.innerBounds.width>this.bounds.width||this.innerBounds.height>this.bounds.height)&&(this.innerBounds=y.getRectDifference(this.innerBounds,p)),k.applyAplRectToStyle({domElement:this.container,rectangle:this.bounds}),k.applyPaddingToStyle({domElement:this.container,bounds:this.bounds,innerBounds:this.innerBounds}),this.boundsUpdated())}alignSize(){return this.sizeToFit()}getProperties(){return this.component.getCalculated()}forceInvisible(e){this.doForceInvisible!==e&&(this.doForceInvisible=e,this.setDisplay())}getNormalDisplay(){return""}takeFocus(){return n(this,void 0,void 0,(function*(){const e=(yield this.renderer.context.getFocusableAreas())[this.id];e&&this.renderer.context.setFocus(d.FocusDirection.kFocusDirectionNone,e,this.id)}))}get lang(){return this.props[p.PropertyKey.kPropertyLang]||""}checkComponentTypeAndEnableClipping(){const e=this.component.getType();if(w.has(e))return;const t=this.parent&&E.has(this.parent.component.getType()),r=E.has(e),n=this.renderer&&this.renderer.getLegacyClippingEnabled();this.parent&&!r&&!t&&n||this.enableClipping()}enableClipping(){this.$container.css("overflow","hidden")}}t.Component=x},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.kPropertyScrollDirection=0]="kPropertyScrollDirection",e[e.kPropertyAccessibilityActions=1]="kPropertyAccessibilityActions",e[e.kPropertyAccessibilityActionsAssigned=2]="kPropertyAccessibilityActionsAssigned",e[e.kPropertyAccessibilityAdjustableRange=3]="kPropertyAccessibilityAdjustableRange",e[e.kPropertyAccessibilityAdjustableValue=4]="kPropertyAccessibilityAdjustableValue",e[e.kPropertyAccessibilityLabel=5]="kPropertyAccessibilityLabel",e[e.kPropertyAlign=6]="kPropertyAlign",e[e.kPropertyAlignItems=7]="kPropertyAlignItems",e[e.kPropertyAlignSelf=8]="kPropertyAlignSelf",e[e.kPropertyAudioTrack=9]="kPropertyAudioTrack",e[e.kPropertyAutoplay=10]="kPropertyAutoplay",e[e.kPropertyMuted=11]="kPropertyMuted",e[e.kPropertyBackgroundColor=12]="kPropertyBackgroundColor",e[e.kPropertyBackgroundAssigned=13]="kPropertyBackgroundAssigned",e[e.kPropertyBackground=14]="kPropertyBackground",e[e.kPropertyBorderBottomLeftRadius=15]="kPropertyBorderBottomLeftRadius",e[e.kPropertyBorderBottomRightRadius=16]="kPropertyBorderBottomRightRadius",e[e.kPropertyBorderColor=17]="kPropertyBorderColor",e[e.kPropertyBorderRadius=18]="kPropertyBorderRadius",e[e.kPropertyBorderRadii=19]="kPropertyBorderRadii",e[e.kPropertyBorderStrokeWidth=20]="kPropertyBorderStrokeWidth",e[e.kPropertyBorderTopLeftRadius=21]="kPropertyBorderTopLeftRadius",e[e.kPropertyBorderTopRightRadius=22]="kPropertyBorderTopRightRadius",e[e.kPropertyBorderWidth=23]="kPropertyBorderWidth",e[e.kPropertyBottom=24]="kPropertyBottom",e[e.kPropertyBounds=25]="kPropertyBounds",e[e.kPropertyCenterId=26]="kPropertyCenterId",e[e.kPropertyCenterIndex=27]="kPropertyCenterIndex",e[e.kPropertyChildHeight=28]="kPropertyChildHeight",e[e.kPropertyChildWidth=29]="kPropertyChildWidth",e[e.kPropertyChecked=30]="kPropertyChecked",e[e.kPropertyColor=31]="kPropertyColor",e[e.kPropertyColorKaraokeTarget=32]="kPropertyColorKaraokeTarget",e[e.kPropertyColorNonKaraoke=33]="kPropertyColorNonKaraoke",e[e.kPropertyCurrentPage=34]="kPropertyCurrentPage",e[e.kPropertyDescription=35]="kPropertyDescription",e[e.kPropertyDirection=36]="kPropertyDirection",e[e.kPropertyDisabled=37]="kPropertyDisabled",e[e.kPropertyDisplay=38]="kPropertyDisplay",e[e.kPropertyDrawnBorderWidth=39]="kPropertyDrawnBorderWidth",e[e.kPropertyEmbeddedDocument=40]="kPropertyEmbeddedDocument",e[e.kPropertyEnd=41]="kPropertyEnd",e[e.kPropertyEntities=42]="kPropertyEntities",e[e.kPropertyEnvironment=43]="kPropertyEnvironment",e[e.kPropertyFastScrollScale=44]="kPropertyFastScrollScale",e[e.kPropertyFilters=45]="kPropertyFilters",e[e.kPropertyFirstId=46]="kPropertyFirstId",e[e.kPropertyFirstIndex=47]="kPropertyFirstIndex",e[e.kPropertyFocusable=48]="kPropertyFocusable",e[e.kPropertyFontFamily=49]="kPropertyFontFamily",e[e.kPropertyFontSize=50]="kPropertyFontSize",e[e.kPropertyFontStyle=51]="kPropertyFontStyle",e[e.kPropertyFontWeight=52]="kPropertyFontWeight",e[e.kPropertyHandleTick=53]="kPropertyHandleTick",e[e.kPropertyHandleVisibilityChange=54]="kPropertyHandleVisibilityChange",e[e.kPropertyHighlightColor=55]="kPropertyHighlightColor",e[e.kPropertyHint=56]="kPropertyHint",e[e.kPropertyHintColor=57]="kPropertyHintColor",e[e.kPropertyHintStyle=58]="kPropertyHintStyle",e[e.kPropertyHintWeight=59]="kPropertyHintWeight",e[e.kPropertyGestures=60]="kPropertyGestures",e[e.kPropertyGraphic=61]="kPropertyGraphic",e[e.kPropertyGrow=62]="kPropertyGrow",e[e.kPropertyHandleKeyDown=63]="kPropertyHandleKeyDown",e[e.kPropertyHandleKeyUp=64]="kPropertyHandleKeyUp",e[e.kPropertyHeight=65]="kPropertyHeight",e[e.kPropertyId=66]="kPropertyId",e[e.kPropertyInitialPage=67]="kPropertyInitialPage",e[e.kPropertyInnerBounds=68]="kPropertyInnerBounds",e[e.kPropertyItemsPerCourse=69]="kPropertyItemsPerCourse",e[e.kPropertyJustifyContent=70]="kPropertyJustifyContent",e[e.kPropertyKeyboardBehaviorOnFocus=71]="kPropertyKeyboardBehaviorOnFocus",e[e.kPropertyKeyboardType=72]="kPropertyKeyboardType",e[e.kPropertyLayoutDirection=73]="kPropertyLayoutDirection",e[e.kPropertyLayoutDirectionAssigned=74]="kPropertyLayoutDirectionAssigned",e[e.kPropertyLeft=75]="kPropertyLeft",e[e.kPropertyLetterSpacing=76]="kPropertyLetterSpacing",e[e.kPropertyLineHeight=77]="kPropertyLineHeight",e[e.kPropertyMaxHeight=78]="kPropertyMaxHeight",e[e.kPropertyMaxLength=79]="kPropertyMaxLength",e[e.kPropertyMaxLines=80]="kPropertyMaxLines",e[e.kPropertyMaxWidth=81]="kPropertyMaxWidth",e[e.kPropertyMediaBounds=82]="kPropertyMediaBounds",e[e.kPropertyMediaState=83]="kPropertyMediaState",e[e.kPropertyMinHeight=84]="kPropertyMinHeight",e[e.kPropertyMinWidth=85]="kPropertyMinWidth",e[e.kPropertyNavigation=86]="kPropertyNavigation",e[e.kPropertyNextFocusDown=87]="kPropertyNextFocusDown",e[e.kPropertyNextFocusForward=88]="kPropertyNextFocusForward",e[e.kPropertyNextFocusLeft=89]="kPropertyNextFocusLeft",e[e.kPropertyNextFocusRight=90]="kPropertyNextFocusRight",e[e.kPropertyNextFocusUp=91]="kPropertyNextFocusUp",e[e.kPropertyNotifyChildrenChanged=92]="kPropertyNotifyChildrenChanged",e[e.kPropertyNumbered=93]="kPropertyNumbered",e[e.kPropertyNumbering=94]="kPropertyNumbering",e[e.kPropertyOnBlur=95]="kPropertyOnBlur",e[e.kPropertyOnCancel=96]="kPropertyOnCancel",e[e.kPropertyOnChildrenChanged=97]="kPropertyOnChildrenChanged",e[e.kPropertyOnDown=98]="kPropertyOnDown",e[e.kPropertyOnEnd=99]="kPropertyOnEnd",e[e.kPropertyOnFail=100]="kPropertyOnFail",e[e.kPropertyOnFocus=101]="kPropertyOnFocus",e[e.kPropertyOnLoad=102]="kPropertyOnLoad",e[e.kPropertyOnMount=103]="kPropertyOnMount",e[e.kPropertyOnMove=104]="kPropertyOnMove",e[e.kPropertyOnSpeechMark=105]="kPropertyOnSpeechMark",e[e.kPropertyHandlePageMove=106]="kPropertyHandlePageMove",e[e.kPropertyOnPageChanged=107]="kPropertyOnPageChanged",e[e.kPropertyOnPause=108]="kPropertyOnPause",e[e.kPropertyOnPlay=109]="kPropertyOnPlay",e[e.kPropertyOnPress=110]="kPropertyOnPress",e[e.kPropertyOnScroll=111]="kPropertyOnScroll",e[e.kPropertyOnSubmit=112]="kPropertyOnSubmit",e[e.kPropertyOnTextChange=113]="kPropertyOnTextChange",e[e.kPropertyOnUp=114]="kPropertyOnUp",e[e.kPropertyOnTimeUpdate=115]="kPropertyOnTimeUpdate",e[e.kPropertyOnTrackFail=116]="kPropertyOnTrackFail",e[e.kPropertyOnTrackReady=117]="kPropertyOnTrackReady",e[e.kPropertyOnTrackUpdate=118]="kPropertyOnTrackUpdate",e[e.kPropertyOpacity=119]="kPropertyOpacity",e[e.kPropertyOverlayColor=120]="kPropertyOverlayColor",e[e.kPropertyOverlayGradient=121]="kPropertyOverlayGradient",e[e.kPropertyPadding=122]="kPropertyPadding",e[e.kPropertyPaddingBottom=123]="kPropertyPaddingBottom",e[e.kPropertyPaddingEnd=124]="kPropertyPaddingEnd",e[e.kPropertyPaddingLeft=125]="kPropertyPaddingLeft",e[e.kPropertyPaddingRight=126]="kPropertyPaddingRight",e[e.kPropertyPaddingTop=127]="kPropertyPaddingTop",e[e.kPropertyPaddingStart=128]="kPropertyPaddingStart",e[e.kPropertyPageDirection=129]="kPropertyPageDirection",e[e.kPropertyPageId=130]="kPropertyPageId",e[e.kPropertyPageIndex=131]="kPropertyPageIndex",e[e.kPropertyParameters=132]="kPropertyParameters",e[e.kPropertyPlayingState=133]="kPropertyPlayingState",e[e.kPropertyPosition=134]="kPropertyPosition",e[e.kPropertyPreserve=135]="kPropertyPreserve",e[e.kPropertyRangeKaraokeTarget=136]="kPropertyRangeKaraokeTarget",e[e.kPropertyResourceId=137]="kPropertyResourceId",e[e.kPropertyResourceOnFatalError=138]="kPropertyResourceOnFatalError",e[e.kPropertyResourceState=139]="kPropertyResourceState",e[e.kPropertyResourceType=140]="kPropertyResourceType",e[e.kPropertyRight=141]="kPropertyRight",e[e.kPropertyRole=142]="kPropertyRole",e[e.kPropertyScale=143]="kPropertyScale",e[e.kPropertyScreenLock=144]="kPropertyScreenLock",e[e.kPropertyScrollAnimation=145]="kPropertyScrollAnimation",e[e.kPropertyScrollOffset=146]="kPropertyScrollOffset",e[e.kPropertyScrollPercent=147]="kPropertyScrollPercent",e[e.kPropertyScrollPosition=148]="kPropertyScrollPosition",e[e.kPropertySecureInput=149]="kPropertySecureInput",e[e.kPropertySelectOnFocus=150]="kPropertySelectOnFocus",e[e.kPropertyShadowColor=151]="kPropertyShadowColor",e[e.kPropertyShadowHorizontalOffset=152]="kPropertyShadowHorizontalOffset",e[e.kPropertyShadowRadius=153]="kPropertyShadowRadius",e[e.kPropertyShadowVerticalOffset=154]="kPropertyShadowVerticalOffset",e[e.kPropertyShrink=155]="kPropertyShrink",e[e.kPropertySize=156]="kPropertySize",e[e.kPropertySnap=157]="kPropertySnap",e[e.kPropertySource=158]="kPropertySource",e[e.kPropertySpacing=159]="kPropertySpacing",e[e.kPropertySpeech=160]="kPropertySpeech",e[e.kPropertyStart=161]="kPropertyStart",e[e.kPropertySubmitKeyType=162]="kPropertySubmitKeyType",e[e.kPropertyText=163]="kPropertyText",e[e.kPropertyTextAlign=164]="kPropertyTextAlign",e[e.kPropertyTextAlignAssigned=165]="kPropertyTextAlignAssigned",e[e.kPropertyTextAlignVertical=166]="kPropertyTextAlignVertical",e[e.kPropertyLang=167]="kPropertyLang",e[e.kPropertyTrackCount=168]="kPropertyTrackCount",e[e.kPropertyTrackCurrentTime=169]="kPropertyTrackCurrentTime",e[e.kPropertyTrackDuration=170]="kPropertyTrackDuration",e[e.kPropertyTrackEnded=171]="kPropertyTrackEnded",e[e.kPropertyTrackIndex=172]="kPropertyTrackIndex",e[e.kPropertyTrackPaused=173]="kPropertyTrackPaused",e[e.kPropertyTrackState=174]="kPropertyTrackState",e[e.kPropertyTransform=175]="kPropertyTransform",e[e.kPropertyTransformAssigned=176]="kPropertyTransformAssigned",e[e.kPropertyTop=177]="kPropertyTop",e[e.kPropertyUser=178]="kPropertyUser",e[e.kPropertyWidth=179]="kPropertyWidth",e[e.kPropertyOnCursorEnter=180]="kPropertyOnCursorEnter",e[e.kPropertyOnCursorExit=181]="kPropertyOnCursorExit",e[e.kPropertyLaidOut=182]="kPropertyLaidOut",e[e.kPropertyValidCharacters=183]="kPropertyValidCharacters",e[e.kPropertyVisualHash=184]="kPropertyVisualHash",e[e.kPropertyWrap=185]="kPropertyWrap"}(t.PropertyKey||(t.PropertyKey={}))},function(e,t){var r=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(52)("wks"),i=r(37),o=r(6).Symbol,a="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict"; /*! * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 @@ -171,11 +171,11 @@ const n=r(0);t.ElementType={HTML:"HTML",SVG:"SVG"},t.CssUnitType={Pixels:"px",Em /*! * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 - */Object.defineProperty(t,"__esModule",{value:!0});const n=r(117),i=r(61),o=r(0);var a;!function(e){e[e.Image=0]="Image"}(a=t.AlignerType||(t.AlignerType={}));const s={[a.Image]:function(e){const{parentBounds:t,element:r,logger:n,boundLimits:o}=e;let{layoutDirection:a}=e;return d.hasOwnProperty(a)||(n.warn(`LayoutDirection is not supported: ${a}. Defaulting to LTR`),a=i.LayoutDirection.kLayoutDirectionLTR),d[a](t,r,o)}};t.createAligner=function(e){const t={alignerType:a.Image,boundLimits:{maxTop:0,maxLeft:0,minLeft:0}},r=Object.assign(t,e),{parentBounds:i,element:d,layoutDirection:u,alignerType:c,imageAlign:l,boundLimits:p}=r,f=o.LoggerFactory.getLogger("ImageAligner"),h={[n.ImageAlign.kImageAlignBottom]:function(e){return{left:e.setToHorizontalCenter(),top:e.setToBottom()}},[n.ImageAlign.kImageAlignBottomLeft]:function(e){return{left:e.setToLeft(),top:e.setToBottom()}},[n.ImageAlign.kImageAlignBottomRight]:function(e){return{left:e.setToRight(),top:e.setToBottom()}},[n.ImageAlign.kImageAlignCenter]:function(e){return{left:e.setToHorizontalCenter(),top:e.setToVerticalCenter()}},[n.ImageAlign.kImageAlignLeft]:function(e){return{left:e.setToLeft(),top:e.setToVerticalCenter()}},[n.ImageAlign.kImageAlignRight]:function(e){return{left:e.setToRight(),top:e.setToVerticalCenter()}},[n.ImageAlign.kImageAlignTop]:function(e){return{left:e.setToHorizontalCenter(),top:e.setToTop()}},[n.ImageAlign.kImageAlignTopLeft]:function(e){return{left:e.setToLeft(),top:e.setToTop()}},[n.ImageAlign.kImageAlignTopRight]:function(e){return{left:e.setToRight(),top:e.setToTop()}}};return{getAlignment(){const e=s[c]({parentBounds:i,element:d,layoutDirection:u,logger:f,boundLimits:p});return h.hasOwnProperty(l)?h[l](e):(f.warn(`Bad image alignment property key: ${l}. Defaulting to center alignment.`),{left:e.setToHorizontalCenter(),top:e.setToVerticalCenter()})}}};const d={[i.LayoutDirection.kLayoutDirectionLTR]:function(e,t,r){const{width:n,height:i}=e,{width:o,height:a}=t,{maxLeft:s,maxTop:d}=r;return{setToBottom(){const e=i-a;return Math.max(e,d)},setToTop:()=>0,setToLeft:()=>0,setToRight(){const e=n-o;return Math.max(e,s)},setToHorizontalCenter(){const e=(n-o)/2;return Math.max(e,s)},setToVerticalCenter(){const e=(i-a)/2;return Math.max(e,d)}}},[i.LayoutDirection.kLayoutDirectionRTL]:function(e,t,r){const{width:n,height:i}=e,{width:o,height:a}=t,{minLeft:s,maxTop:d}=r;return{setToBottom(){const e=i-a;return Math.max(e,d)},setToTop:()=>0,setToLeft(){const e=o-n;return Math.min(e,s)},setToRight:()=>0,setToHorizontalCenter(){const e=(o-n)/2;return Math.min(e,s)},setToVerticalCenter(){const e=(i-a)/2;return Math.max(e,d)}}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APL_1_0=0,t.APL_1_1=1,t.APL_1_2=2,t.APL_1_3=3,t.APL_1_4=4,t.APL_1_5=5,t.APL_1_6=6,t.APL_1_7=7,t.APL_1_8=8,t.APL_1_9=9,t.APL_2022_1=10,t.APL_2022_2=11,t.APL_2023_1=12,t.APL_2023_2=13,t.APL_2023_3=14,t.APL_LATEST=Number.MAX_VALUE,t.createAplVersionUtils=function(){const e=new Map([["1.0",t.APL_1_0],["1.1",t.APL_1_1],["1.2",t.APL_1_2],["1.3",t.APL_1_3],["1.4",t.APL_1_4],["1.5",t.APL_1_5],["1.6",t.APL_1_6],["1.7",t.APL_1_7],["1.8",t.APL_1_8],["1.9",t.APL_1_9],["2022.1",t.APL_2022_1],["2022.2",t.APL_2022_2],["2023.1",t.APL_2023_1],["2023.2",t.APL_2023_2],["2023.3",t.APL_2023_3]]);return{getVersionCode(r){const n=e.get(r);return void 0!==n?n:t.APL_LATEST}}}},function(e,t,r){"use strict"; + */Object.defineProperty(t,"__esModule",{value:!0});const n=r(117),i=r(61),o=r(0);var a;!function(e){e[e.Image=0]="Image"}(a=t.AlignerType||(t.AlignerType={}));const s={[a.Image]:function(e){const{parentBounds:t,element:r,logger:n,boundLimits:o}=e;let{layoutDirection:a}=e;return d.hasOwnProperty(a)||(n.warn(`LayoutDirection is not supported: ${a}. Defaulting to LTR`),a=i.LayoutDirection.kLayoutDirectionLTR),d[a](t,r,o)}};t.createAligner=function(e){const t={alignerType:a.Image,boundLimits:{maxTop:0,maxLeft:0,minLeft:0}},r=Object.assign(t,e),{parentBounds:i,element:d,layoutDirection:u,alignerType:c,imageAlign:l,boundLimits:p}=r,f=o.LoggerFactory.getLogger("ImageAligner"),h={[n.ImageAlign.kImageAlignBottom]:function(e){return{left:e.setToHorizontalCenter(),top:e.setToBottom()}},[n.ImageAlign.kImageAlignBottomLeft]:function(e){return{left:e.setToLeft(),top:e.setToBottom()}},[n.ImageAlign.kImageAlignBottomRight]:function(e){return{left:e.setToRight(),top:e.setToBottom()}},[n.ImageAlign.kImageAlignCenter]:function(e){return{left:e.setToHorizontalCenter(),top:e.setToVerticalCenter()}},[n.ImageAlign.kImageAlignLeft]:function(e){return{left:e.setToLeft(),top:e.setToVerticalCenter()}},[n.ImageAlign.kImageAlignRight]:function(e){return{left:e.setToRight(),top:e.setToVerticalCenter()}},[n.ImageAlign.kImageAlignTop]:function(e){return{left:e.setToHorizontalCenter(),top:e.setToTop()}},[n.ImageAlign.kImageAlignTopLeft]:function(e){return{left:e.setToLeft(),top:e.setToTop()}},[n.ImageAlign.kImageAlignTopRight]:function(e){return{left:e.setToRight(),top:e.setToTop()}}};return{getAlignment(){const e=s[c]({parentBounds:i,element:d,layoutDirection:u,logger:f,boundLimits:p});return h.hasOwnProperty(l)?h[l](e):(f.warn(`Bad image alignment property key: ${l}. Defaulting to center alignment.`),{left:e.setToHorizontalCenter(),top:e.setToVerticalCenter()})}}};const d={[i.LayoutDirection.kLayoutDirectionLTR]:function(e,t,r){const{width:n,height:i}=e,{width:o,height:a}=t,{maxLeft:s,maxTop:d}=r;return{setToBottom(){const e=i-a;return Math.max(e,d)},setToTop:()=>0,setToLeft:()=>0,setToRight(){const e=n-o;return Math.max(e,s)},setToHorizontalCenter(){const e=(n-o)/2;return Math.max(e,s)},setToVerticalCenter(){const e=(i-a)/2;return Math.max(e,d)}}},[i.LayoutDirection.kLayoutDirectionRTL]:function(e,t,r){const{width:n,height:i}=e,{width:o,height:a}=t,{minLeft:s,maxTop:d}=r;return{setToBottom(){const e=i-a;return Math.max(e,d)},setToTop:()=>0,setToLeft(){const e=o-n;return Math.min(e,s)},setToRight:()=>0,setToHorizontalCenter(){const e=(o-n)/2;return Math.min(e,s)},setToVerticalCenter(){const e=(i-a)/2;return Math.max(e,d)}}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.APL_1_0=0,t.APL_1_1=1,t.APL_1_2=2,t.APL_1_3=3,t.APL_1_4=4,t.APL_1_5=5,t.APL_1_6=6,t.APL_1_7=7,t.APL_1_8=8,t.APL_1_9=9,t.APL_2022_1=10,t.APL_2022_2=11,t.APL_2023_1=12,t.APL_2023_2=13,t.APL_2023_3=14,t.APL_2024_1=14,t.APL_LATEST=Number.MAX_VALUE,t.createAplVersionUtils=function(){const e=new Map([["1.0",t.APL_1_0],["1.1",t.APL_1_1],["1.2",t.APL_1_2],["1.3",t.APL_1_3],["1.4",t.APL_1_4],["1.5",t.APL_1_5],["1.6",t.APL_1_6],["1.7",t.APL_1_7],["1.8",t.APL_1_8],["1.9",t.APL_1_9],["2022.1",t.APL_2022_1],["2022.2",t.APL_2022_2],["2023.1",t.APL_2023_1],["2023.2",t.APL_2023_2],["2023.3",t.APL_2023_3],["2024.1",t.APL_2024_1]]);return{getVersionCode(r){const n=e.get(r);return void 0!==n?n:t.APL_LATEST}}}},function(e,t,r){"use strict"; /*! * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 - */Object.defineProperty(t,"__esModule",{value:!0});const n=r(70);t.isDisplayState=function(e){return e in n.DisplayState}},function(e,t,r){var n=r(252);"string"==typeof n&&(n=[[e.i,n,""]]);r(254)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},function(e,t,r){(t=r(253)(!1)).push([e.i,"/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/* Ember Default */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Rg_v2.ttf');\n}\n\n/* Ember Thin */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Thin.ttf');\n font-weight: 100;\n}\n\n/* Ember Extra Light - remap to Light */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Light.ttf');\n font-weight: 200;\n}\n\n/* Ember Light */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Light.ttf');\n font-weight: 300;\n}\n\n/* Ember Normal (Regular) - v2 */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Rg_v2.ttf');\n font-weight: 400;\n}\n\n/* Ember Medium - v2 */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Md_v2.ttf');\n font-weight: 500;\n}\n\n/* Ember SemiBold */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-SemiBold.ttf');\n font-weight: 600;\n}\n\n/* Ember Bold */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Bd_v2.ttf');\n font-weight: 700;\n}\n\n/* Ember Extra Bold - remap to Heavy */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Heavy.ttf');\n font-weight: 800;\n}\n\n/* Ember Heavy (Black) */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Heavy.ttf');\n font-weight: 900;\n}\n\n/* Ember Thin Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-ThinItalic.ttf');\n font-weight: 100;\n font-style: italic;\n}\n\n/* Ember Extra Light Italic - remap to Light Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-LightItalic.ttf');\n font-weight: 200;\n font-style: italic;\n}\n\n/* Ember Light Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-LightItalic.ttf');\n font-weight: 300;\n font-style: italic;\n}\n\n/* Ember Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-RegularItalic.ttf');\n font-weight: 400;\n font-style: italic;\n}\n\n/* Ember Medium Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-MediumItalic.ttf');\n font-weight: 500;\n font-style: italic;\n}\n\n/* Ember SemiBold Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-SemiBoldItalic.ttf');\n font-weight: 600;\n font-style: italic;\n}\n\n/* Ember Bold Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-BoldItalic.ttf');\n font-weight: 700;\n font-style: italic;\n}\n\n/* Ember Extra Bold Italic - remap to Heavy Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-HeavyItalic.ttf');\n font-weight: 800;\n font-style: italic;\n}\n\n/* Ember HeavyItalic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-HeavyItalic.ttf');\n font-weight: 900;\n font-style: italic;\n}\n\n/* Ember Display Default */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Rg.ttf');\n}\n\n/* Ember Display Thin - remap to Light */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt.ttf');\n font-weight: 100;\n}\n\n/* Ember Display Extra Light - remap to Light */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt.ttf');\n font-weight: 200;\n}\n\n/* Ember Display Light */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt.ttf');\n font-weight: 300;\n}\n\n/* Ember Display Normal (Regular) */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Rg.ttf');\n font-weight: 400;\n}\n\n/* Ember Display Medium */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Md.ttf');\n font-weight: 500;\n}\n\n/* Ember Display SemiBold - remap to Bold */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd.ttf');\n font-weight: 600;\n}\n\n/* Ember Display Bold */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd.ttf');\n font-weight: 700;\n}\n\n/* Ember Display Extra Bold - remap to Heavy */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He.ttf');\n font-weight: 800;\n}\n\n/* Ember Display Heavy */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He.ttf');\n font-weight: 900;\n}\n\n/* Ember Display Thin Italic - remap to Light Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt_It.ttf');\n font-weight: 100;\n font-style: italic;\n}\n\n/* Ember Display Extra Light Italic - remap to Light Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt_It.ttf');\n font-weight: 200;\n font-style: italic;\n}\n\n/* Ember Display Light Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt_It.ttf');\n font-weight: 300;\n font-style: italic;\n}\n\n/* Ember Display Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Rg_It.ttf');\n font-weight: 400;\n font-style: italic;\n}\n\n/* Ember Display Medium Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Md_It.ttf');\n font-weight: 500;\n font-style: italic;\n}\n\n/* Ember Display SemiBold Italic - remap to Bold Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd_It.ttf');\n font-weight: 600;\n font-style: italic;\n}\n\n/* Ember Display Bold Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd_It.ttf');\n font-weight: 700;\n font-style: italic;\n}\n\n/* Ember Display Extra Bold Italic - remap to Heavy Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He_It.ttf');\n font-weight: 800;\n font-style: italic;\n}\n\n/* Ember Display HeavyItalic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He_It.ttf');\n font-weight: 900;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Regular.ttf');\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Regular.ttf');\n font-weight: 400;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Bold.ttf');\n font-weight: 600;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Italic.ttf');\n font-weight: 400;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-BoldItalic.ttf');\n font-weight: 600;\n font-style: italic;\n}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,i,o=e[1]||"",a=e[3];if(!a)return o;if(t&&"function"==typeof btoa){var s=(r=a,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(i," */")),d=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[o].concat(d).concat([s]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o=0&&l.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=r.nc;n&&(e.attrs.nonce=n)}return v(t,e.attrs),y(e,t),t}function v(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function b(e,t){var r,n,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var a=c++;r=u||(u=g(t)),n=S.bind(null,r,a,!1),i=S.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),y(e,t),t}(t),n=E.bind(null,r,t),i=function(){m(r),r.href&&URL.revokeObjectURL(r.href)}):(r=g(t),n=T.bind(null,r),i=function(){m(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=h(e,t);return f(r,t),function(e){for(var n=[],i=0;i0){const e=JSON.parse(t);r.mainTemplate.parameters.forEach(r=>{"payload"===r?this.content.addData(r,t):e[r]?this.content.addData(r,JSON.stringify(e[r])):this.content.addData(r,"{}")})}}}static create(e,t){return new n(e,void 0===t?"":t)}getContent(){return this.content}getRequestedPackages(){return this.content.getRequestedPackages()}addPackage(e,t){this.content.addPackage(e,t)}isError(){return this.content.isError()}isReady(){return this.content.isReady()}isWaiting(){return this.content.isWaiting()&&!this.content.isError()}addData(e,t){this.content.addData(e,t)}refresh(e,t){this.content.refresh(e,t)}getAPLVersion(){return this.content.getAPLVersion()}delete(){this.content.delete(),this.content=void 0}getExtensionRequests(){return this.content.getExtensionRequests()}getExtensionSettings(e){return this.content.getExtensionSettings(e)}getAPLSettings(e){return this.settings[e]}getParameterAt(e){return this.content.getParameterAt(e)}getParameterCount(){return this.content.getParameterCount()}}t.Content=n},function(e,t,r){"use strict"; + */Object.defineProperty(t,"__esModule",{value:!0});const n=r(70);t.isDisplayState=function(e){return e in n.DisplayState}},function(e,t,r){var n=r(252);"string"==typeof n&&(n=[[e.i,n,""]]);r(254)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},function(e,t,r){(t=r(253)(!1)).push([e.i,"/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/* Ember Default */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Rg_v2.ttf');\n}\n\n/* Ember Thin */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Thin.ttf');\n font-weight: 100;\n}\n\n/* Ember Extra Light - remap to Light */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Light.ttf');\n font-weight: 200;\n}\n\n/* Ember Light */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Light.ttf');\n font-weight: 300;\n}\n\n/* Ember Normal (Regular) - v2 */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Rg_v2.ttf');\n font-weight: 400;\n}\n\n/* Ember Medium - v2 */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Md_v2.ttf');\n font-weight: 500;\n}\n\n/* Ember SemiBold */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-SemiBold.ttf');\n font-weight: 600;\n}\n\n/* Ember Bold */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmber_Bd_v2.ttf');\n font-weight: 700;\n}\n\n/* Ember Extra Bold - remap to Heavy */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Heavy.ttf');\n font-weight: 800;\n}\n\n/* Ember Heavy (Black) */\n@font-face {\n font-family: \"amazon-ember\";\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-Heavy.ttf');\n font-weight: 900;\n}\n\n/* Ember Thin Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-ThinItalic.ttf');\n font-weight: 100;\n font-style: italic;\n}\n\n/* Ember Extra Light Italic - remap to Light Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-LightItalic.ttf');\n font-weight: 200;\n font-style: italic;\n}\n\n/* Ember Light Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-LightItalic.ttf');\n font-weight: 300;\n font-style: italic;\n}\n\n/* Ember Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-RegularItalic.ttf');\n font-weight: 400;\n font-style: italic;\n}\n\n/* Ember Medium Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-MediumItalic.ttf');\n font-weight: 500;\n font-style: italic;\n}\n\n/* Ember SemiBold Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-SemiBoldItalic.ttf');\n font-weight: 600;\n font-style: italic;\n}\n\n/* Ember Bold Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-BoldItalic.ttf');\n font-weight: 700;\n font-style: italic;\n}\n\n/* Ember Extra Bold Italic - remap to Heavy Italic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-HeavyItalic.ttf');\n font-weight: 800;\n font-style: italic;\n}\n\n/* Ember HeavyItalic */\n@font-face {\n font-family: 'amazon-ember';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Amazon-Ember-HeavyItalic.ttf');\n font-weight: 900;\n font-style: italic;\n}\n\n/* Ember Display Default */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Rg.ttf');\n}\n\n/* Ember Display Thin - remap to Light */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt.ttf');\n font-weight: 100;\n}\n\n/* Ember Display Extra Light - remap to Light */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt.ttf');\n font-weight: 200;\n}\n\n/* Ember Display Light */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt.ttf');\n font-weight: 300;\n}\n\n/* Ember Display Normal (Regular) */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Rg.ttf');\n font-weight: 400;\n}\n\n/* Ember Display Medium */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Md.ttf');\n font-weight: 500;\n}\n\n/* Ember Display SemiBold - remap to Bold */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd.ttf');\n font-weight: 600;\n}\n\n/* Ember Display Bold */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd.ttf');\n font-weight: 700;\n}\n\n/* Ember Display Extra Bold - remap to Heavy */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He.ttf');\n font-weight: 800;\n}\n\n/* Ember Display Heavy */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He.ttf');\n font-weight: 900;\n}\n\n/* Ember Display Thin Italic - remap to Light Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt_It.ttf');\n font-weight: 100;\n font-style: italic;\n}\n\n/* Ember Display Extra Light Italic - remap to Light Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt_It.ttf');\n font-weight: 200;\n font-style: italic;\n}\n\n/* Ember Display Light Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Lt_It.ttf');\n font-weight: 300;\n font-style: italic;\n}\n\n/* Ember Display Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Rg_It.ttf');\n font-weight: 400;\n font-style: italic;\n}\n\n/* Ember Display Medium Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Md_It.ttf');\n font-weight: 500;\n font-style: italic;\n}\n\n/* Ember Display SemiBold Italic - remap to Bold Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd_It.ttf');\n font-weight: 600;\n font-style: italic;\n}\n\n/* Ember Display Bold Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_Bd_It.ttf');\n font-weight: 700;\n font-style: italic;\n}\n\n/* Ember Display Extra Bold Italic - remap to Heavy Italic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He_It.ttf');\n font-weight: 800;\n font-style: italic;\n}\n\n/* Ember Display HeavyItalic */\n@font-face {\n font-family: 'amazon-ember-display';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/AmazonEmberDisplay_He_It.ttf');\n font-weight: 900;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Regular.ttf');\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Regular.ttf');\n font-weight: 400;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Bold.ttf');\n font-weight: 600;\n font-style: normal;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-Italic.ttf');\n font-weight: 400;\n font-style: italic;\n}\n\n@font-face {\n font-family: 'Bookerly';\n src: url('https://d1gkjrhppbyzyh.cloudfront.net/Bookerly-BoldItalic.ttf');\n font-weight: 600;\n font-style: italic;\n}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,i,o=e[1]||"",a=e[3];if(!a)return o;if(t&&"function"==typeof btoa){var s=(r=a,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(i," */")),d=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[o].concat(d).concat([s]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o=0&&l.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=r.nc;n&&(e.attrs.nonce=n)}return v(t,e.attrs),y(e,t),t}function v(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function b(e,t){var r,n,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var a=c++;r=u||(u=g(t)),n=S.bind(null,r,a,!1),i=S.bind(null,r,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),y(e,t),t}(t),n=E.bind(null,r,t),i=function(){m(r),r.href&&URL.revokeObjectURL(r.href)}):(r=g(t),n=T.bind(null,r),i=function(){m(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=h(e,t);return f(r,t),function(e){for(var n=[],i=0;i0){const r=JSON.parse(t);e.mainTemplate.parameters.forEach(e=>{"payload"===e?this.content.addData(e,t):r[e]?this.content.addData(e,JSON.stringify(r[e])):this.content.addData(e,"{}")})}}}static create(e,t="",r){return new n(e,t,r)}static recreate(e,t){return new n(e.doc,e.data,t)}getContent(){return this.content}getRequestedPackages(){return this.content.getRequestedPackages()}addPackage(e,t){this.content.addPackage(e,t)}isError(){return this.content.isError()}isReady(){return this.content.isReady()}isWaiting(){return this.content.isWaiting()&&!this.content.isError()}addData(e,t){this.content.addData(e,t)}refresh(e,t){this.content.refresh(e,t)}getAPLVersion(){return this.content.getAPLVersion()}delete(){this.content.delete(),this.content=void 0}getExtensionRequests(){return this.content.getExtensionRequests()}getExtensionSettings(e){return this.content.getExtensionSettings(e)}getAPLSettings(e){return this.settings[e]}getParameterAt(e){return this.content.getParameterAt(e)}getParameterCount(){return this.content.getParameterCount()}}t.Content=n},function(e,t,r){"use strict"; /*! * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 diff --git a/apl-client-js/package.json b/apl-client-js/package.json index 7c1fe79..f17c6ee 100644 --- a/apl-client-js/package.json +++ b/apl-client-js/package.json @@ -1,7 +1,7 @@ { "name": "@amzn/apl-client", - "version": "2023.3.0", - "description": "this version supports APL 2023.3", + "version": "2024.1.0", + "description": "this version supports APL 2024.1", "repository": "hash:b7018d9d", "main": "index.js", "types": "./index.d.ts"