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S,kBACT,QAAS,QACT,QAAS,SACT,QAAS,sBACT,QAAS,wBACT,QAAS,SACT,QAAS,UACT,aAAc,SACd,QAAS,aACT,QAAS,YACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,UACT,QAAS,MACT,QAAS,SACT,QAAS,aACT,QAAS,OACT,QAAS,cASAC,EAA2C,CACpD,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,MACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,MACT,QAAS,MACT,QAAS,KACT,QAAS,KACT,aAAc,KACd,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS,KACT,QAAS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":["webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.match.js?f0c8","webpack://Msdyn365.Commerce.Online/./src/price/price.components.tsx?7295","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/utilities/key-codes.ts?1004","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/utilities/string-extensions.ts?3689","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/utilities/html-extensions.ts?9642","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/utilities/player-utility.ts?33e3","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/utilities/utilities.ts?65c9","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.split.js?e6e1","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/helper/localization-helper.ts?26d0","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/helper/closed-caption-helper.ts?8eff","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/helper/player-helper.ts?800e","webpack://Msdyn365.Commerce.Online/./src/rating/rating.component.tsx?1ba8","webpack://Msdyn365.Commerce.Online/./src/order-template/order-templates-list/order-template-products-preview.tsx?832a","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/player.tsx?8176","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/add-to-cart.component.tsx?c15a","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/items-added-to-cart.ts?4f10","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/items-added-to-cart-error-component.tsx?3e3e","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/items-added-to-cart-dialog-component.tsx?3a1e","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/notifications/item-successfully-added-to-cart-notification-component.tsx?1092","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/notifications/item-successfully-added-to-cart-notification.ts?b5b4","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/notifications/multi-items-successfully-added-to-cart-notification-component.tsx?ec23","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/notifications/multi-items-successfully-added-to-cart-notification.ts?4d32","webpack://Msdyn365.Commerce.Online/./src/add-to-cart/product-model.ts?91f1","webpack://Msdyn365.Commerce.Online/./src/order-template/add-order-template-to-cart/add-order-template-to-cart.component.tsx?b3bb","webpack://Msdyn365.Commerce.Online/./src/order-template/rename-order-template/rename-order-template.component.tsx?22f7","webpack://Msdyn365.Commerce.Online/./src/order-template/lines-added-to-cart-dialog/lines-added-to-cart-dialog.component.tsx?3b78","webpack://Msdyn365.Commerce.Online/./src/order-template/order-template-name-dialog/order-template-name-dialog.component.tsx?aa9c","webpack://Msdyn365.Commerce.Online/./src/order-template/order-templates-list/order-template-list.tsx?9a9e","webpack://Msdyn365.Commerce.Online/./src/order-template/add-to-order-template-dialog/add-to-order-template-dialog.component.tsx?94ad","webpack://Msdyn365.Commerce.Online/./src/order-template/lines-added-to-order-template-dialog/lines-added-to-order-template-dialog.component.tsx?8a37","webpack://Msdyn365.Commerce.Online/./src/order-template/add-products-to-order-template/add-products-to-order-template.component.tsx?bf4c","webpack://Msdyn365.Commerce.Online/./src/order-template/duplicate-items-when-adding-to-order-template-dialog/duplicate-items-when-adding-to-order-template-dialog.component.tsx?1ec3","webpack://Msdyn365.Commerce.Online/./src/order-template/item-added-to-order-template-dialog/item-added-to-order-template-dialog.component.tsx?017f","webpack://Msdyn365.Commerce.Online/./src/order-template/add-to-order-template/add-to-order-template.component.tsx?0066","webpack://Msdyn365.Commerce.Online/./src/order-template/item-added-to-cart-dialog/item-added-to-cart-dialog.component.tsx?9757","webpack://Msdyn365.Commerce.Online/./src/order-template/save-cart-to-order-template/save-cart-to-order-template.component.tsx?c47e","webpack://Msdyn365.Commerce.Online/./src/product-card-v2/components/product-component-swatch-v2.tsx?1bc1","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/closed-captions/ttml-settings.ts?ff45","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/closed-captions/ttml-context.ts?2af4","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/closed-captions/ttml-time-parser.ts?72f5","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/closed-captions/ttml-parser.ts?6362","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/closed-captions/video-closed-captions.tsx?4d40","webpack://Msdyn365.Commerce.Online/./src/social-media/social-media.components.tsx?9b27","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/action-toggle/action-toggle.tsx?246b","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/age-gate/age-gate.tsx?96c8","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/data/player-constants.ts?0a75","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/data/player-metadata.ts?24d6","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/closed-captions/video-closed-captions-settings.ts?2fc2","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/menu/menu.tsx?4ce6","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/menu-item/menu-item.tsx?471c","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/play-pause-trigger/play-pause-trigger.tsx?3fa4","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/video-controls/video-controls.tsx?32a5","webpack://Msdyn365.Commerce.Online/./src/carousel/CarouselContext.tsx?5738","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/components/node_modules/react-transition-group/esm/config.js?fb42","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/components/node_modules/react-transition-group/esm/TransitionGroupContext.js?52c4","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/components/node_modules/react-transition-group/esm/utils/reflow.js?ddda","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce/components/node_modules/react-transition-group/esm/Transition.js?196e","webpack://Msdyn365.Commerce.Online/./src/carousel/CarouselItem.tsx?ecad","webpack://Msdyn365.Commerce.Online/./src/carousel/Carousel.tsx?9349","webpack://Msdyn365.Commerce.Online/./src/cart-icon/cart-icon.component.tsx?ef29","webpack://Msdyn365.Commerce.Online/./src/promocode/promocode.component.tsx?37c7","webpack://Msdyn365.Commerce.Online/./src/action-menu/action-menu.component.tsx?7298","webpack://Msdyn365.Commerce.Online/./src/add-to-wishlist/add-to-wishlist.component.tsx?0a03","webpack://Msdyn365.Commerce.Online/./src/cartline/components/cart-line-price-editor.tsx?6767","webpack://Msdyn365.Commerce.Online/./src/cartline/cartlineitem.component.tsx?be39","webpack://Msdyn365.Commerce.Online/./src/product-card/components/product-component-swatch.tsx?a399","webpack://Msdyn365.Commerce.Online/./src/product-card/product.component.tsx?32e2","webpack://Msdyn365.Commerce.Online/./src/product-dimension/dropdown/dropdown.tsx?9ac3","webpack://Msdyn365.Commerce.Online/./src/product-dimension/product-dimension.component.tsx?387b","webpack://Msdyn365.Commerce.Online/./src/product-dimension/swatch/swatch-item.tsx?72c2","webpack://Msdyn365.Commerce.Online/./src/product-dimension/swatch/swatch.tsx?6550","webpack://Msdyn365.Commerce.Online/./src/product-dimensions-matrix/components/product-dimensions-matrix-dimension-item.tsx?0f56","webpack://Msdyn365.Commerce.Online/./src/product-dimensions-matrix/components/product-dimensions-matrix-dimension-selection.tsx?2e77","webpack://Msdyn365.Commerce.Online/./src/product-dimensions-matrix/components/product-dimensions-matrix-enter-all-quantity-button.tsx?43c1","webpack://Msdyn365.Commerce.Online/./src/product-dimensions-matrix/product-dimensions-matrix.tsx?50f3","webpack://Msdyn365.Commerce.Online/./src/refiner/common.tsx?5431","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-apply.component.tsx?c65c","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-choice-summary.component.tsx?bb08","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-footer.component.tsx?922c","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-toggle.component.tsx?191b","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-sort.component.tsx?6742","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-header.component.tsx?f32a","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-item-check.component.tsx?49ea","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-item-daterange.component.tsx?a87f","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-modal.component.tsx?e1db","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner-options.component.tsx?7d6b","webpack://Msdyn365.Commerce.Online/./src/refiner/refiner.component.tsx?4a59","webpack://Msdyn365.Commerce.Online/./src/search-bar/search-bar.component.tsx?4f38","webpack://Msdyn365.Commerce.Online/./src/table/table.component.tsx?d5d2","webpack://Msdyn365.Commerce.Online/./src/wishlist-icon/wishlist-icon.component.tsx?a133","webpack://Msdyn365.Commerce.Online/./src/video-player-utilities/components/data/player-options.ts?0c9c","webpack://Msdyn365.Commerce.Online/./src/product-card-v2/product-v2.component.tsx?2a5e"],"sourcesContent":["'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductType, SalesAgreementPriceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { Button, format, ICollapseProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst defaultPrice: number = 0;\nconst freePrice: number = 0;\n\n/**\n * Interface for price component resources.\n * @param {string} priceRangeSeparator - The price range separator.\n */\nexport interface IPriceComponentResources {\n priceRangeSeparator?: string;\n salesAgreementPricePrompt?: string;\n salesAgreementExpirationDatePrompt?: string;\n salesAgreementCommittedQuantityPrompt?: string;\n salesAgreementRemainingQuantityPrompt?: string;\n}\n\n/**\n * Interface for price component props.\n * @param {boolean} isPriceMinMaxEnabled - Whether the price range feature is enabled or not.\n * @param {IPriceComponentResources} priceResources - The price range resources.\n */\nexport interface IPriceComponentProps extends IComponentProps<{ price: ProductPrice }> {\n className?: string;\n product?: SimpleProduct;\n savingsText?: string;\n freePriceText?: string;\n originalPriceText?: string;\n currentPriceText?: string;\n isPriceMinMaxEnabled?: boolean;\n isSalesAgreementPriceFeatureEnabled?: boolean;\n salesAgreementLineId?: number;\n priceResources?: IPriceComponentResources;\n salesAgreementDetailCollapseProps?: ICollapseProps;\n currencyCode?: string;\n salesAgreementDetailOnClick?(event: React.MouseEvent | React.KeyboardEvent): void;\n}\n\n/**\n * The interface of price component.\n */\nexport interface IPriceComponent extends IComponent {}\n\nconst priceComponentActions = {};\n\n/**\n * Get the original price from price component props.\n * @param props - The IPriceComponentProps.\n * @returns The original price.\n */\nconst getOriginalPrice = (props: IPriceComponentProps): number => {\n return props.data.price.AdjustedPrice ?? props.data.price.TradeAgreementPrice ?? props.data.price.BasePrice ?? defaultPrice;\n};\n\nconst getActivePrice = (props: IPriceComponentProps): number => {\n if (showPriceRangeForMasterProduct(props) && props.data.price.MinVariantPrice !== undefined) {\n return props.data.price.MinVariantPrice;\n }\n\n if (props.data.price.CustomerContextualPrice !== undefined) {\n return props.data.price.CustomerContextualPrice;\n }\n\n return getOriginalPrice(props);\n};\n\n/**\n * Get the formatted currency.\n * @param props - The props.\n * @param price - The price.\n * @param shouldUseFreePriceText - The shouldUseFreePriceText.\n * @returns The formatted currency.\n */\nconst formatCurrency = (\n props: IPriceComponentProps,\n price: number | undefined,\n shouldUseFreePriceText: boolean | undefined,\n currencyCode?: string | undefined\n): string => {\n if (price === undefined) {\n return '';\n }\n\n if (shouldUseFreePriceText && price === freePrice && props.freePriceText) {\n return props.freePriceText;\n }\n\n return props.context.cultureFormatter.formatCurrency(price, currencyCode);\n};\n\nconst showPriceRangeForMasterProduct = (props: IPriceComponentProps): boolean => {\n return (\n (props.isPriceMinMaxEnabled ?? false) &&\n (props.product?.ProductTypeValue === ProductType.Master || props.product?.ProductTypeValue === ProductType.KitMaster) &&\n props.data.price.MinVariantPrice !== undefined &&\n props.data.price.MaxVariantPrice !== undefined\n );\n};\n\n/**\n * ShowStrikethroughPricing.\n * @param props - The props.\n * @returns True if showStrikethroughPricing, false otherwise.\n */\nconst showStrikethroughPricing = (props: IPriceComponentProps): boolean => {\n const originalSalesPrice = getOriginalPrice(props);\n const activeSalesPrice = showPriceRangeForMasterProduct(props)\n ? props.data.price.MinVariantPrice\n : props.data.price.CustomerContextualPrice;\n\n if (activeSalesPrice && originalSalesPrice) {\n return activeSalesPrice < originalSalesPrice;\n }\n\n return false;\n};\n\n/**\n * Render current price.\n * @param props - The props.\n * @returns The JSX.Element.\n */\nconst renderCurrentPrice = (props: IPriceComponentProps): JSX.Element => {\n const maxVariantPrice: string = formatCurrency(props, props.data.price.MaxVariantPrice, false, props.currencyCode);\n const minVariantPrice: string = formatCurrency(props, props.data.price.MinVariantPrice, false, props.currencyCode);\n if (\n props.isPriceMinMaxEnabled &&\n props.data.price.MaxVariantPrice &&\n props.data.price.MinVariantPrice &&\n props.data.price.MaxVariantPrice > props.data.price.MinVariantPrice\n ) {\n return (\n \n \n {minVariantPrice}\n \n \n {props.priceResources?.priceRangeSeparator}\n \n \n {maxVariantPrice}\n \n \n );\n }\n\n return (\n \n {formatCurrency(props, getActivePrice(props), true, props.currencyCode)}\n \n );\n};\n\n/**\n * Render active sales price with original sales price.\n * @param props - The props.\n * @returns The JSX.Element.\n */\nconst renderCurrentPriceWithOriginalPrice = (props: IPriceComponentProps): JSX.Element => {\n const initialPrice: string = formatCurrency(props, getOriginalPrice(props), true);\n\n return (\n <>\n \n {` `}\n {props.originalPriceText}\n {` `}\n {initialPrice}\n {` `}\n {props.currentPriceText}\n {` `}\n {renderCurrentPrice(props)}\n \n \n \n {props.savingsText && {props.savingsText}}\n \n );\n};\n\nconst renderSalesAgreementDetail = (props: IPriceComponentProps): JSX.Element => {\n // In most cases there should be only one sales agreement line.\n // If there are more than one, only the first one will be shown.\n const firstPriceLine: SalesAgreementPriceLine = (props.data.price.AttainablePriceLines ?? [])[0] as SalesAgreementPriceLine;\n return (\n

\n

\n {/* Available date */}\n {` · ${format(\n props.priceResources?.salesAgreementExpirationDatePrompt ?? '',\n props.context.cultureFormatter.formatDate(firstPriceLine.EffectiveDate as Date),\n props.context.cultureFormatter.formatDate(firstPriceLine.ExpirationDate as Date)\n )}`}\n

\n

\n {/* Quantity commitment */}\n {` · ${format(props.priceResources?.salesAgreementCommittedQuantityPrompt ?? '', firstPriceLine.CommittedQuantity)}`}\n

\n

\n {/* Remaining quantity to qualify */}\n {` · ${format(props.priceResources?.salesAgreementRemainingQuantityPrompt ?? '', firstPriceLine.RemainingQuantity)}`}\n

\n

\n );\n};\n\n/**\n * Price.\n * @param props - The props.\n * @returns The JSX.Element.\n */\nconst Price: React.FC = (props: IPriceComponentProps): JSX.Element | null => {\n // CustomerContextualPrice could be zero\n if (props.data.price.CustomerContextualPrice === undefined) {\n return null;\n }\n\n // Determine if contract price is avaiable/applied by:\n // isFeatureEnabled and SA price != 0, for PDP.\n // SA line id != 0, for cart line.\n if (props.isSalesAgreementPriceFeatureEnabled && props.data.price.SalesAgreementPrice !== 0) {\n const [isExpanded, setIsExpanded] = React.useState(false);\n const toggle = () => {\n setIsExpanded(!isExpanded);\n };\n return (\n \n \n

\n {formatCurrency(props, props.data.price.SalesAgreementPrice ?? props.data.price.CustomerContextualPrice, true)}\n

\n \n {props.priceResources?.salesAgreementPricePrompt}\n \n {isExpanded && renderSalesAgreementDetail(props)}\n
\n
\n );\n }\n\n return (\n \n {showStrikethroughPricing(props) ? renderCurrentPriceWithOriginalPrice(props) : renderCurrentPrice(props)}\n \n );\n};\n\n/**\n * The PriceComponent.\n */\nexport const PriceComponent: React.FunctionComponent = msdyn365Commerce.createComponent('Price', {\n component: Price,\n ...priceComponentActions\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * KeyCodes Enum.\n */\nexport enum KeyCodes {\n Back = 8,\n Tab = 9,\n Enter = 13,\n Shift = 16,\n Ctrl = 17,\n Alt = 18,\n Break = 19,\n CapsLock = 20,\n Escape = 27,\n Space = 32,\n PageUp = 33,\n PageDown = 34,\n End = 35,\n Home = 36,\n ArrowLeft = 37,\n ArrowUp = 38,\n ArrowRight = 39,\n ArrowDown = 40,\n Print = 44,\n Insert = 45,\n Delete = 46,\n Colon2 = 59, // Opera and Firefox\n Equals2 = 61, // Opera\n Equals3 = 107, // Firefox\n Minus2 = 109, // Opera and Firefox\n Period = 190,\n WindowsLeft = 91,\n WindowsRight = 92,\n WindowsOpera = 219, // Opera\n Menu = 93,\n NumPad0 = 96,\n NumPad1 = 97,\n NumPad2 = 98,\n NumPad3 = 99,\n NumPad4 = 100,\n NumPad5 = 101,\n NumPad6 = 102,\n NumPad7 = 103,\n NumPad8 = 104,\n NumPad9 = 105,\n NumPadMultiply = 106,\n NumPadPlus = 107,\n NumPadMinus = 109,\n NumPadDot = 110,\n NumPadDivide = 111,\n Function1 = 112,\n Function2 = 113,\n Function3 = 114,\n Function4 = 115,\n Function5 = 116,\n Function6 = 117,\n Function7 = 118,\n Function8 = 119,\n Function9 = 120,\n Function10 = 121,\n Function11 = 122,\n Function12 = 123,\n NavigationUp = 138,\n NavigationDown = 139,\n NavigationLeft = 140,\n NavigationRight = 141,\n NavigationAccept = 142,\n NumLock = 144,\n ScrollLock = 145,\n Colon = 186,\n Equals = 187,\n Comma = 188,\n Minus = 189,\n ForwardSlash = 191,\n Tilde = 192,\n GamepadA = 195,\n GamepadB = 196,\n GamepadX = 197,\n GamepadY = 198,\n GamepadRightButton = 199,\n GamepadLeftButton = 200,\n GamepadLeftTrigger = 201,\n GamepadRightTrigger = 202,\n GamepadDPadUp = 203,\n GamepadDPadDown = 204,\n GamepadDPadLeft = 205,\n GamepadDPadRight = 206,\n GamepadSelect = 207,\n GamepadStart = 208,\n GamepadLeftThumbstick = 209,\n GamepadRightThumbstick = 210,\n GamepadLeftThumbstickUp = 211,\n GamepadLeftThumbstickDown = 212,\n GamepadLeftThumbstickRight = 213,\n GamepadLeftThumbstickLeft = 214,\n GamepadRightThumbstickUp = 215,\n GamepadRightThumbstickDown = 216,\n GamepadRightThumbstickRight = 217,\n GamepadRightThumbstickLeft = 218,\n OpenBracket = 219,\n BackSlash = 220,\n CloseBracket = 221,\n Quote = 222\n}\n\n/**\n * Here for test coverage.\n */\nexport class KeycodesClass {\n public testCoverage(): string {\n return ':(';\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Format the passed string.\n * @param formatSpecifier - FormatSpecifier.\n * @param parameters -- Any number of parameters.\n * @returns The formated string.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function format(formatSpecifier: string, ...parameters: any[]): string {\n if (!formatSpecifier) {\n return '';\n }\n\n return formatSpecifier.replace(/{(\\d+)}/g, (match: string, index: number) => {\n if (index >= parameters.length) {\n return match;\n }\n\n const value = parameters[index];\n\n if (typeof value !== 'number' && !value) {\n return '';\n }\n\n if (typeof value === 'string') {\n return value;\n }\n\n return value.toString();\n });\n}\n\n/**\n * Determines if the specified string is undefined, null, empty, or whitespace.\n * @param value - The string to examine.\n * @returns - True if the value is undefined, null, empty, or whitespace, otherwise false.\n */\nexport function isNullOrWhiteSpace(value: string): boolean {\n return !value || typeof value !== 'string' || !trim(value);\n}\n\n/**\n * Trims leading and trailing whitespace from the string.\n * @param value - The string to examine.\n * @returns - The trimmed string.\n */\nexport function trim(value: string): string {\n // Any flavor of !value (ie. null/undefined/'') should return itself.\n if (!value || typeof value !== 'string') {\n return value;\n }\n\n if (value.trim) {\n return value.trim();\n }\n\n return value.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determines if the specified string starts with the specified value.\n * @param value - The string to look in.\n * @param prefix - The prefix to look for.\n * @param ignoreCase - Ignore Case.\n * @returns - True if the string starts with the prefix, otherwise false.\n */\nexport function startsWith(value: string, prefix: string, ignoreCase: boolean = true): boolean {\n if (!value || !prefix) {\n return false;\n }\n\n if (ignoreCase) {\n value = value.toLocaleLowerCase();\n prefix = prefix.toLocaleLowerCase();\n }\n\n if (value.startsWith) {\n return value.startsWith(prefix);\n }\n\n return value.startsWith(prefix);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { isNullOrWhiteSpace, trim } from './string-extensions';\n\n/**\n * Get the text of the element.\n * @param element - HTML element.\n * @returns The content of the element.\n */\nexport function getText(element?: HTMLElement | Element): string {\n return element ? element.textContent || '' : '';\n}\n\n/**\n * Add a css class to an element.\n * @param element - The element to add the css class to.\n * @param cssClass - The css class to add.\n */\nexport function addClass(element: HTMLElement, cssClass: string): void {\n if (element && !isNullOrWhiteSpace(cssClass) && !hasClass(element, cssClass)) {\n if (element.classList) {\n element.classList.add(cssClass);\n } else {\n element.className = trim(`${element.className} ${cssClass}`);\n }\n }\n}\n\n/**\n * Checks for the presence of a css class on an element.\n * @param element - The element to check the css class of.\n * @param cssClass - The css class to check for.\n * @returns True if the element's className has the specified class, otherwise false.\n */\nexport function hasClass(element: HTMLElement, cssClass: string): boolean {\n if (!element || isNullOrWhiteSpace(cssClass)) {\n return false;\n } else if (element.classList) {\n return element.classList.contains(cssClass);\n }\n return `' ' ${element.className} ' '`.includes(`' ' ${trim(cssClass)} ' '`);\n}\n\n/**\n * Convert node list to array.\n * @param nodeList - Node List.\n * @returns Array of the node list.\n */\nexport function nodeListToArray(\n nodeList: NodeListOf | NodeListOf | HTMLCollection | NodeList | NamedNodeMap\n): T[] {\n if (!nodeList) {\n return [];\n }\n\n const elements: T[] = [];\n\n for (let n = 0; n < nodeList.length; n++) {\n elements.push(nodeList[n]);\n }\n\n return elements;\n}\n\n/**\n * Select elements in a context.\n * @param selector - Can be class, id or tag selector.\n * @param [context] - Any element to scope the selection. It's optional. If not provided document will be assumed.\n * @returns HTMLElement[].\n */\nexport function selectElements(selector: string, context?: HTMLElement): HTMLElement[] {\n return selectElementsT(selector, context);\n}\n\n/**\n * Select elements in a context.\n * @param selector - Can be class, id or tag selector.\n * @param [context] - Any element to scope the selection. It's optional. If not provided document will be assumed.\n * @returns T[].\n */\nexport function selectElementsT(selector: string, context?: HTMLElement): T[] {\n if (isNullOrWhiteSpace(selector) || selector === '#') {\n return [];\n }\n\n const currentContext: HTMLElement | Document = context || document;\n\n // Check if the first character is class or id.\n if (/^[#.]?[\\w-]+$/.test(selector)) {\n // eslint-disable-next-line default-case\n switch (selector[0]) {\n case '.':\n if (currentContext.getElementsByClassName) {\n return nodeListToArray(currentContext.getElementsByClassName(selector.slice(1)));\n }\n return nodeListToArray(currentContext.querySelectorAll(selector));\n\n case '#':\n const element = currentContext.querySelector(selector);\n return (element ? [element] : []);\n }\n\n return nodeListToArray(currentContext.getElementsByTagName(selector));\n }\n\n return nodeListToArray(currentContext.querySelectorAll(selector));\n}\n\n/**\n * Sets or gets CSS properties.\n * @param element - HTML Element.\n * @param property - The CSS property name.\n * @param [value] - The value to set on the CSS property.\n * @returns - The value of the CSS property.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function css(element: HTMLElement | Node, property: string, value?: any): any {\n if (!element) {\n return null;\n }\n\n if (value || value === '') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (element).style[property] = value;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value = (element).style[property];\n\n if (isNullOrWhiteSpace(value)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value = getComputedStyle(element as any);\n value = value[property];\n }\n\n return value;\n }\n}\n\n/**\n * Remove all inner HTML from a parent element - used to delete child elements.\n * @param parentElement - The parent element from which all children should be removed.\n */\nexport function removeInnerHtml(parentElement: HTMLElement): void {\n if (parentElement) {\n parentElement.innerHTML = '';\n }\n}\n\n/**\n * Select first element from the selected elements using provided selector.\n * @param selector - Element selector.\n * @param [context] - An optional context to scope the selection.\n * @returns - The first element from the match.\n */\nexport function selectFirstElement(selector: string, context?: HTMLElement): HTMLElement | null {\n const elementsSelected = selectElementsT(selector, context);\n return !elementsSelected || !elementsSelected.length ? null : elementsSelected[0];\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare let window: any;\n\n/**\n * @name - XDomainRequest\n * @description - typescript declaration for XDomainRequest object.\n * @type {object}\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeclare let XDomainRequest: any;\n\n/**\n * PlayerUtilities class.\n * @classdesc - The PlayerOptions class is used to pass player options settings to the player.\n * It supplies default values which can be overridden via overrides passed to the constructor.\n */\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class PlayerUtility {\n /**\n * @name - pendingAjaxRequests\n * @description - array to hold pending ajax requests.\n * @private\n * @static\n * @returns {any}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private static readonly pendingAjaxRequests: any = [];\n\n /**\n * Gets request data using ajax call.\n * @param url - Url from where to fetch data.\n * @param done - On success callback function.\n * @param failed - On failed callback function.\n */\n public static ajax(url: string, done: Function, failed?: Function): void {\n if (!url) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let ajaxRequest: any = null;\n\n // For IE 9 and below use XDomainRequest\n if (window.XDomainRequest) {\n ajaxRequest = new XDomainRequest();\n\n ajaxRequest.addEventListener('load', () => {\n done && done(ajaxRequest.responseText);\n PlayerUtility._removeFromPendingAjaxRequests(ajaxRequest);\n });\n\n // IE8 and IE9 have a bug where garbage collector will clear XDomainRequest object\n // before the call is completed. Thus add a reference to the object so that request\n // is not aborted by garbage collector.\n PlayerUtility.pendingAjaxRequests.push(ajaxRequest);\n } else if (window.XMLHttpRequest) {\n ajaxRequest = new XMLHttpRequest();\n\n ajaxRequest.onreadystatechange = () => {\n if (ajaxRequest.readyState === 4) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let result: any = null;\n if (ajaxRequest.status === 200) {\n result = ajaxRequest.responseText;\n }\n done && done(result);\n } else {\n // The following console.log useful for debugging and is left in commented out for easy restoration.\n // console.log('Localization-helper: readystate(' + xhttp.readyState + ') status(' + xhttp.status + ')');\n }\n };\n }\n\n // Attach common event handlers and make the request.\n if (ajaxRequest) {\n ajaxRequest.ontimeout = ajaxRequest.addEventListener('error', () => {\n PlayerUtility._removeFromPendingAjaxRequests(ajaxRequest);\n failed && failed();\n });\n ajaxRequest.open('GET', url, true);\n ajaxRequest.send();\n }\n }\n\n /**\n * Removes object from array to hold pending ajax requests.\n * @param obj - Object.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private static _removeFromPendingAjaxRequests(obj: any): void {\n // When the call is completed remove it from the array\n let index = -1;\n for (let i = 0; i < PlayerUtility.pendingAjaxRequests.length; i++) {\n if (obj === PlayerUtility.pendingAjaxRequests[i]) {\n index = i;\n break;\n }\n }\n if (index >= 0) {\n PlayerUtility.pendingAjaxRequests.splice(index, 1);\n }\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Client Dimension Interface.\n */\nexport interface IClientDimension {\n width: number;\n height: number;\n}\n\n/**\n * Dictionary String Interface.\n */\nexport interface IDictionaryStringString {\n [key: string]: string;\n}\n\n/**\n * @interface IGrid\n * @classdesc - The IGrid interface contract.\n */\nexport interface IGrid {\n rows: number;\n columns: number;\n}\n\n/**\n * Clamp position between a range.\n * @param value - Value to be clamped.\n * @param min - Minimum value in range.\n * @param max - Maximum value in range.\n * @returns The clap value if min passed is less than max else returns 0.\n */\nexport function clamp(value: number, min: number, max: number): number {\n if (min <= max) {\n return Math.min(Math.max(value, min), max);\n }\n return 0;\n}\n\n/**\n * Upper case the first letter of the string, if only one char exists on the string, uppercase it.\n * @param value - Value to be upper cased.\n * @returns The upper cased string of the passed value, if it has just one char uppercase it.\n */\nexport function toUpperCaseFirstChar(value: string): string {\n if (value.length > 1) {\n return value.charAt(0).toUpperCase() + value.substr(1);\n }\n if (value.length === 1) {\n return value.charAt(0).toUpperCase();\n }\n return '';\n}\n\n/**\n * HTML collectio to Array.\n * @param nodeList - Html Collection.\n * @returns - An array of the HTML Element.\n */\nexport function htmlCollectionToArray(nodeList: HTMLCollection): HTMLElement[] {\n return Array.prototype.slice.call(nodeList);\n}\n\n/**\n * Get CSS for the Element.\n * @param element - The HTML Element.\n * @param property - The HTML property.\n * @returns - The value of the required property.\n */\nexport function getCSS(element: HTMLElement, property: string): string {\n let style = element.style[property];\n\n if (!style) {\n style = getComputedStyle(element)[property];\n }\n\n return style;\n}\n\n/**\n * Create Throttled Event.\n * @param listener - The Event Listener.\n * @param threshold - The threshold number.\n * @returns The event.\n */\nexport function createThrottledEvent(listener: EventListener, threshold: number): (event: Event) => void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let timer: any;\n let last = 0;\n\n return (event: Event) => {\n const now = Date.now();\n\n if (timer) {\n clearTimeout(timer);\n timer = undefined;\n }\n\n if (last && now < last + threshold) {\n timer = setTimeout(() => {\n last = Date.now();\n listener(event);\n }, threshold - (now - last));\n } else {\n last = now;\n listener(event);\n }\n };\n}\n\n/**\n * Add the Throrrled Event.\n * @param target - Event Targer.\n * @param name - Name of the Event.\n * @param listener - The Event Listener.\n * @param threshold - The Threshold number.\n * @returns - Returns the Throttled Event.\n */\nexport function addThrottledEvent(\n target: EventTarget,\n name: string,\n listener: EventListener,\n threshold: number = 150\n): (event: Event) => void {\n const throttledEventHandler = createThrottledEvent(listener, threshold);\n target.addEventListener(name, throttledEventHandler, false);\n\n return throttledEventHandler;\n}\n\n/**\n * Map the CSS to the modules.\n * @param className - Class name.\n * @param cssModule - CSS modules.\n * @returns - Returns the map CSS.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function mapToCssModules(className: string = '', cssModule: any): string {\n if (!cssModule) {\n return className;\n }\n\n return className\n .split(' ')\n .map((c: string) => cssModule[c] || c)\n .join(' ');\n}\n\n/**\n * Check the raget object is reference.\n * @param target - Target object.\n * @returns Returns boolean.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isRef(target: any): boolean {\n if (!target) {\n return false;\n }\n\n return (>target).current !== undefined;\n}\n\n/**\n * Check if the passed target is element.\n * @param target - Target element.\n * @returns Returns boolean.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isElement(target: any): boolean {\n if (!target) {\n return false;\n }\n\n return (target).addEventListener !== undefined;\n}\n\n/**\n * KeyCodes Enum.\n */\nexport const keyCodes = {\n esc: 27,\n space: 32,\n tab: 9,\n up: 38,\n down: 40,\n enter: 13\n};\n\n/**\n * Map Interface.\n */\ninterface IMap {\n [key: string]: T;\n}\nconst warned: IMap = {};\n\n/**\n * Warn once.\n * @param message - Message to warned.\n */\nexport function warnOnce(message: string): void {\n if (!warned[message]) {\n if (typeof console !== 'undefined') {\n throw new Error(message);\n }\n warned[message] = true;\n }\n}\n\n/**\n * Can use DOM..\n */\nexport const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n/**\n * Find the required DOM element.\n * @param target - Targert Dom Element.\n * @returns - The DOM Element or string or null.\n */\nexport function findDOMElements(target: string): NodeListOf | string | null {\n try {\n if (typeof target === 'string' && canUseDOM) {\n let selection = document.querySelectorAll(target);\n\n if (!selection.length) {\n selection = document.querySelectorAll(`#${target}`);\n }\n\n if (!selection.length) {\n throw new Error();\n }\n return selection;\n }\n\n return target;\n } catch {\n console.error(`The target '${target}' could not be identified in the dom, tip: check spelling`);\n return null;\n }\n}\n\n/**\n * Get the Target element.\n * @param target - Target Element.\n * @returns - Returns the HTMLElement or null or string.\n */\nexport function getTarget(target: string | HTMLElement | React.Ref): HTMLElement | React.Ref | null | string {\n const selection = findDOMElements(target);\n if (selection && selection.length) {\n return selection[0];\n }\n\n return target;\n}\n\n/**\n * Get the Target element.\n * @param target - Target Element.\n * @returns - Returns the HTMLElement or null or string.\n */\nexport function getTargetElement(target: string | HTMLElement | React.Ref): HTMLElement | null {\n const targetElement = getTarget(target);\n if (isRef(targetElement)) {\n return (>targetElement).current;\n }\n if (isElement(targetElement)) {\n return targetElement;\n }\n\n return null;\n}\n\n/**\n * Transition Timeouts.\n */\nexport const TransitionTimeouts = {\n Fade: 150,\n Collapse: 350,\n Modal: 300,\n Carousel: 600\n};\n\n/**\n * Transition Statuses.\n */\nexport type TransitionStatuses = 'entering' | 'entered' | 'exiting' | 'exited';\n\n/**\n * Focusable Elements.\n */\nexport const focusableElements = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'iframe',\n 'object',\n 'embed',\n '[tabindex]:not(.modal)',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])'\n];\n\n/**\n * Extends an object with properties/values from one or more others.\n * @param parameters - The objects to merge together.\n * @returns - The extended object.\n */\n// eslint-disable-next-line complexity, @typescript-eslint/no-explicit-any\nexport function extend(...parameters: any[]): any {\n if (!parameters || !parameters.length) {\n return null;\n }\n\n const recursive = typeof parameters[0] === 'boolean' && parameters[0];\n\n if (parameters.length < 2) {\n return recursive ? null : parameters[0];\n }\n\n if (recursive && parameters.length < 3) {\n return parameters[1];\n }\n\n const target = recursive ? parameters[1] : parameters[0];\n\n for (let paramIndex = recursive ? 2 : 1; paramIndex < parameters.length; paramIndex++) {\n if (parameters[paramIndex] !== undefined) {\n for (const key of Object.keys(parameters[paramIndex])) {\n if (parameters[paramIndex].hasOwnProperty(key)) {\n const source = parameters[paramIndex][key];\n\n if (recursive) {\n let isSourceArray = Array.isArray ? Array.isArray(source) : {}.toString.call(source) === '[object Array]';\n let isTargetArray =\n !!target[key] &&\n (Array.isArray ? Array.isArray(target[key]) : {}.toString.call(target[key]) === '[object Array]');\n let isSourceObject = !isSourceArray && typeof source === 'object';\n let isTargetObject = !isTargetArray && !!target[key] && typeof target[key] === 'object';\n\n if (isSourceArray && isTargetArray) {\n for (const [arrayIndex, element] of source.entries()) {\n isSourceArray = Array.isArray ? Array.isArray(element) : {}.toString.call(element) === '[object Array]';\n isTargetArray =\n !!target[key][arrayIndex] &&\n (Array.isArray\n ? Array.isArray(target[key][arrayIndex])\n : {}.toString.call(target[key][arrayIndex]) === '[object Array]');\n isSourceObject = !isSourceArray && typeof element === 'object';\n isTargetObject = !isTargetArray && !!target[key][arrayIndex] && typeof target[key][arrayIndex] === 'object';\n\n if (isSourceArray) {\n target[key][arrayIndex] = extend(true, isTargetArray ? target[key][arrayIndex] : [], element);\n } else if (isSourceObject) {\n target[key][arrayIndex] = extend(true, isTargetObject ? target[key][arrayIndex] : {}, element);\n } else {\n target[key][arrayIndex] = element;\n }\n }\n continue;\n } else if (isSourceArray) {\n target[key] = extend(true, [], source);\n continue;\n } else if (isSourceObject) {\n target[key] = extend(true, isTargetObject ? target[key] : {}, source);\n continue;\n }\n }\n\n target[key] = source;\n }\n }\n }\n }\n\n return target;\n}\n\n/**\n * Gets the dimension of an element.\n * @param containerElement - The container element.\n * @returns - {IClientDimension} - The client dimension.\n * {IClientDimension.width} - The client width.\n * {IClientDimension.height} - The client height.\n */\nexport function getDimensions(containerElement: HTMLElement): IClientDimension | null {\n if (containerElement === null) {\n return null;\n }\n return {\n width: containerElement.clientWidth,\n height: containerElement.clientHeight\n };\n}\n\n/**\n * Check if the browser is Safari or not.\n * @returns Ture or false.\n */\nexport function isSafari(): boolean {\n if (navigator.vendor && navigator.userAgent) {\n return navigator.vendor.includes('Apple') && !navigator.userAgent.includes('CriOS') && !navigator.userAgent.includes('FxiOS');\n }\n return false;\n}\n","'use strict';\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar MAX_UINT32 = 0xFFFFFFFF;\nvar min = Math.min;\nvar push = uncurryThis([].push);\nvar stringSlice = uncurryThis(''.slice);\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nvar BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length !== 4 ||\n 'ab'.split(/(?:ab)*/).length !== 2 ||\n '.'.split(/(.?)(.?)/).length !== 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length;\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);\n } : nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? call(splitter, separator, O, limit)\n : call(internalSplit, toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (!BUGGY) {\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n }\n\n var C = speciesConstructor(rx, RegExp);\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n push(A, stringSlice(S, p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n push(A, z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n push(A, stringSlice(S, p));\n return A;\n }\n ];\n}, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IPlayerResources } from '../data';\nimport { IDictionaryStringString } from '../utilities';\n\n/**\n * @name - ccCultureLocStrings\n * @description - The localized names for the close caption menu options.\n * @constant\n * @type {IDictionaryStringString}\n */\nexport const ccCultureLocStrings: IDictionaryStringString = {\n 'ar-ab': 'عربي',\n 'ar-xm': 'عربي',\n 'ar-ma': 'عربي',\n 'ar-sa': 'عربي',\n 'eu-es': 'Euskara',\n 'bg-bg': 'Български',\n 'ca-es': 'Català',\n 'zh-cn': '简体中文',\n 'zh-hk': '繁體中文',\n 'zh-tw': '繁體中文',\n 'hr-hr': 'Hrvatski',\n 'cs-cz': 'Čeština',\n 'da-dk': 'Dansk',\n 'nl-be': 'Nederlands',\n 'nl-nl': 'Nederlands',\n 'en-ab': 'English',\n 'en-aa': 'English',\n 'en-au': 'English',\n 'en-ca': 'English',\n 'en-eu': 'English',\n 'en-hk': 'English',\n 'en-in': 'English',\n 'en-id': 'English',\n 'en-ie': 'English',\n 'en-jm': 'English',\n 'en-my': 'English',\n 'en-nz': 'English',\n 'en-pk': 'English',\n 'en-ph': 'English',\n 'en-sg': 'English',\n 'en-za': 'English',\n 'en-tt': 'English',\n 'en-gb': 'English',\n 'en-us': 'English',\n 'et-ee': 'Eesti',\n 'fi-fi': 'Suomi',\n 'fr-ab': 'Français',\n 'fr-be': 'Français',\n 'fr-ca': 'Français',\n 'fr-fr': 'Français',\n 'fr-xf': 'Français',\n 'fr-ch': 'Français',\n 'gl-es': 'Galego',\n 'de-de': 'Deutsch',\n 'de-at': 'Deutsch',\n 'de-ch': 'Deutsch',\n 'el-gr': 'Ελληνικά',\n 'he-il': 'עברית',\n 'hi-in': 'हिंदी',\n 'hu-hu': 'Magyar',\n 'is-is': 'Íslenska',\n 'id-id': 'Bahasa Indonesia',\n 'it-it': 'Italiano',\n 'ja-jp': '日本語',\n 'kk-kz': 'Қазақ',\n 'ko-kr': '한국어',\n 'lv-lv': 'Latviešu',\n 'lt-lt': 'Lietuvių',\n 'ms-my': 'Bahasa Melayu (Asia Tenggara)‎',\n 'nb-no': 'Norsk (bokmål)',\n 'nn-no': 'Norsk (nynorsk)',\n 'fa-ir': 'فارسی',\n 'pl-pl': 'Polski',\n 'pt-br': 'Português (Brasil)‎',\n 'pt-pt': 'Português (Portugal)‎',\n 'ro-ro': 'Română',\n 'ru-ru': 'Русский',\n 'sr-latn-rs': 'Srpski',\n 'sk-sk': 'Slovenčina',\n 'sl-si': 'Slovenski',\n 'es-ar': 'Español',\n 'es-cl': 'Español',\n 'es-co': 'Español',\n 'es-cr': 'Español',\n 'es-do': 'Español',\n 'es-ec': 'Español',\n 'es-us': 'Español',\n 'es-gt': 'Español',\n 'es-hn': 'Español',\n 'es-xl': 'Español',\n 'es-mx': 'Español',\n 'es-ni': 'Español',\n 'es-pa': 'Español',\n 'es-py': 'Español',\n 'es-pe': 'Español',\n 'es-pr': 'Español',\n 'es-es': 'Español',\n 'es-uy': 'Español',\n 'es-ve': 'Español',\n 'sv-se': 'Svenska',\n 'tl-ph': 'Tagalog',\n 'th-th': 'ไทย',\n 'tr-tr': 'Türkçe',\n 'uk-ua': 'Українська',\n 'ur-pk': 'اردو',\n 'vi-vn': 'Tiếng Việt'\n};\n\n/**\n * @name - ccLanguageCodes\n * @description - The 2 character language codes for use with the lang attribute .\n * @constant\n * @type {IDictionaryStringString}\n */\nexport const ccLanguageCodes: IDictionaryStringString = {\n 'ar-ab': 'ar',\n 'ar-xm': 'ar',\n 'ar-ma': 'ar',\n 'ar-sa': 'ar',\n 'eu-es': 'eu',\n 'bg-bg': 'bg',\n 'ca-es': 'ca',\n 'zh-cn': 'zh',\n 'zh-hk': 'zh',\n 'zh-tw': 'zh',\n 'hr-hr': 'hr',\n 'cs-cz': 'cs',\n 'da-dk': 'da',\n 'nl-be': 'nl',\n 'nl-nl': 'nl',\n 'en-ab': 'en',\n 'en-aa': 'en',\n 'en-au': 'en',\n 'en-ca': 'en',\n 'en-eu': 'en',\n 'en-hk': 'en',\n 'en-in': 'en',\n 'en-id': 'en',\n 'en-ie': 'en',\n 'en-jm': 'en',\n 'en-my': 'en',\n 'en-nz': 'en',\n 'en-pk': 'en',\n 'en-ph': 'en',\n 'en-sg': 'en',\n 'en-za': 'en',\n 'en-tt': 'en',\n 'en-gb': 'en',\n 'en-us': 'en',\n 'et-ee': 'et',\n 'fi-fi': 'fi',\n 'fr-ab': 'fr',\n 'fr-be': 'fr',\n 'fr-ca': 'fr',\n 'fr-fr': 'fr',\n 'fr-xf': 'fr',\n 'fr-ch': 'fr',\n 'gl-es': 'gl',\n 'de-de': 'de',\n 'de-at': 'de',\n 'de-ch': 'de',\n 'el-gr': 'el',\n 'he-il': 'he',\n 'hi-in': 'hi',\n 'hu-hu': 'hu',\n 'is-is': 'is',\n 'id-id': 'id',\n 'it-it': 'it',\n 'ja-jp': 'ja',\n 'kk-kz': 'kk',\n 'ko-kr': 'ko',\n 'lv-lv': 'lv',\n 'lt-lt': 'lt',\n 'ms-my': 'ms‎',\n 'nb-no': 'nb',\n 'nn-no': 'nn',\n 'fa-ir': 'fa',\n 'pl-pl': 'pl',\n 'pt-br': 'pt‎',\n 'pt-pt': 'pt‎',\n 'ro-ro': 'ro',\n 'ru-ru': 'ru',\n 'sr-latn-rs': 'sr',\n 'sk-sk': 'sk',\n 'sl-si': 'sl',\n 'es-ar': 'es',\n 'es-cl': 'es',\n 'es-co': 'es',\n 'es-cr': 'es',\n 'es-do': 'es',\n 'es-ec': 'es',\n 'es-us': 'es',\n 'es-gt': 'es',\n 'es-hn': 'es',\n 'es-xl': 'es',\n 'es-mx': 'es',\n 'es-ni': 'es',\n 'es-pa': 'es',\n 'es-py': 'es',\n 'es-pe': 'es',\n 'es-pr': 'es',\n 'es-es': 'es',\n 'es-uy': 'es',\n 'es-ve': 'es',\n 'sv-se': 'sv',\n 'tl-ph': 'tl',\n 'th-th': 'th',\n 'tr-tr': 'tr',\n 'uk-ua': 'uk',\n 'ur-pk': 'ur',\n 'vi-vn': 'vi'\n};\n\n/**\n * @name - playerLocKeys\n * @description - Key names to get localized values.\n * @constant\n */\nexport const PlayerLocKeys = {\n audio_tracks: 'audio_tracks',\n closecaption_off: 'closecaption_off',\n audio_tracks_default: 'audio_tracks_default',\n geolocation_error: 'geolocation_error',\n media_err_aborted: 'media_err_aborted',\n media_err_decode: 'media_err_decode',\n media_err_network: 'media_err_network',\n media_err_src_not_supported: 'media_err_src_not_supported',\n media_err_unknown_error: 'media_err_unknown_error',\n media_err_amp_encrypt: 'media_err_amp_encrypt',\n media_err_amp_player_mismatch: 'media_err_amp_player_mismatch',\n browserunsupported: 'browserunsupported',\n browserunsupported_download: 'browserunsupported_download',\n expand: 'expand',\n mute: 'mute',\n nullvideoerror: 'nullvideoerror',\n pause: 'pause',\n play: 'play',\n play_video: 'play_video',\n playing: 'playing',\n paused: 'paused',\n play_pause_button_tooltip: 'play_pause_button_tooltip',\n live_caption: 'live_caption',\n live_label: 'live_label',\n playbackerror: 'playbackerror',\n standarderror: 'standarderror',\n time: 'time',\n more_caption: 'more_caption',\n data_error: 'data_error',\n seek: 'seek',\n unexpand: 'unexpand',\n unmute: 'unmute',\n volume: 'volume',\n quality: 'quality',\n quality_hd: 'quality_hd',\n quality_hq: 'quality_hq',\n quality_lo: 'quality_lo',\n quality_sd: 'quality_sd',\n quality_auto: 'quality_auto',\n cc_customize: 'cc_customize',\n cc_text_font: 'cc_text_font',\n cc_text_color: 'cc_text_color',\n cc_color_black: 'cc_color_black',\n cc_color_blue: 'cc_color_blue',\n cc_color_cyan: 'cc_color_cyan',\n cc_color_green: 'cc_color_green',\n cc_color_grey: 'cc_color_grey',\n cc_color_magenta: 'cc_color_magenta',\n cc_color_red: 'cc_color_red',\n cc_color_white: 'cc_color_white',\n cc_color_yellow: 'cc_color_yellow',\n cc_font_name_casual: 'cc_font_name_casual',\n cc_font_name_cursive: 'cc_font_name_cursive',\n cc_font_name_monospacedsansserif: 'cc_font_name_monospacedsansserif',\n cc_font_name_proportionalsansserif: 'cc_font_name_proportionalsansserif',\n cc_font_name_monospacedserif: 'cc_font_name_monospacedserif',\n cc_font_name_proportionalserif: 'cc_font_name_proportionalserif',\n cc_font_name_smallcapitals: 'cc_font_name_smallcapitals',\n cc_text_size: 'cc_text_size',\n cc_text_size_default: 'cc_text_size_default',\n cc_text_size_extralarge: 'cc_text_size_extralarge',\n cc_text_size_large: 'cc_text_size_large',\n cc_text_size_maximum: 'cc_text_size_maximum',\n cc_text_size_small: 'cc_text_size_small',\n cc_appearance: 'cc_appearance',\n cc_preset1: 'cc_preset1',\n cc_preset2: 'cc_preset2',\n cc_preset3: 'cc_preset3',\n cc_preset4: 'cc_preset4',\n cc_preset5: 'cc_preset5',\n cc_presettings: 'cc_presettings',\n cc_text_background_color: 'cc_text_background_color',\n cc_text_background_opacity: 'cc_text_background_opacity',\n cc_text_opacity: 'cc_text_opacity',\n cc_percent_0: 'cc_percent_0',\n cc_percent_100: 'cc_percent_100',\n cc_percent_25: 'cc_percent_25',\n cc_percent_50: 'cc_percent_50',\n cc_percent_75: 'cc_percent_75',\n cc_text_edge_color: 'cc_text_edge_color',\n cc_text_edge_style: 'cc_text_edge_style',\n cc_text_edge_style_depressed: 'cc_text_edge_style_depressed',\n cc_text_edge_style_dropshadow: 'cc_text_edge_style_dropshadow',\n cc_text_edge_style_none: 'cc_text_edge_style_none',\n cc_text_edge_style_raised: 'cc_text_edge_style_raised',\n cc_text_edge_style_uniform: 'cc_text_edge_style_uniform',\n cc_window_color: 'cc_window_color',\n cc_window_opacity: 'cc_window_opacity',\n cc_reset: 'cc_reset',\n closecaption: 'closecaption',\n close_text: 'close_text',\n playbackspeed: 'playbackspeed',\n playbackspeed_normal: 'playbackspeed_normal',\n sharing_label: 'sharing_label',\n sharing_facebook: 'sharing_facebook',\n sharing_twitter: 'sharing_twitter',\n sharing_linkedin: 'sharing_linkedin',\n sharing_skype: 'sharing_skype',\n sharing_mail: 'sharing_mail',\n sharing_copy: 'sharing_copy',\n loading_value_text: 'loading_value_text',\n loading_aria_label: 'loading_aria_label',\n descriptive_audio: 'descriptive_audio',\n unknown_language: 'unknown_language',\n download_label: 'download_label',\n download_transcript: 'download_transcript',\n download_audio: 'download_audio',\n download_video: 'download_video',\n download_videoWithCC: 'download_videoWithCC',\n agegate_day: 'agegate_day',\n agegate_month: 'agegate_month',\n agegate_year: 'agegate_year',\n agegate_enterdate: 'agegate_enterdate',\n agegate_enterdate_arialabel: 'agegate_enterdate_arialabel',\n agegate_fail: 'agegate_fail',\n agegate_verifyyourage: 'agegate_verifyyourage',\n agegate_submit: 'agegate_submit',\n agegate_dateorder: 'agegate_dateorder',\n previous_menu_aria_label: 'previous_menu_aria_label',\n reactive_menu_aria_label: 'reactive_menu_aria_label',\n reactive_menu_aria_label_closedcaption: 'reactive_menu_aria_label_closedcaption',\n interactivity_show: 'interactivity_show',\n interactivity_hide: 'interactivity_hide'\n};\n\n/**\n * Localization Constants.\n */\nexport const LocalizationConstants = {\n playVideoAriaLabel: 'play video',\n playAriaLabel: 'play',\n pauseAriaLabel: 'pause',\n closeAriaLabel: 'close',\n optionAriaLabel: 'More options',\n muteAriaLabel: 'mute',\n unMuteAriaLabel: 'unmute',\n fullScreenAriaLabel: 'full screen',\n exitFullScreenAriaLabel: 'exit full screen',\n playingAriaLabel: 'paying',\n pausedAriaLabel: 'paused',\n seekBarLabel: 'Seek bar',\n sliderThumbLabel: 'Slider thumb',\n volumeThumbLabel: 'Volume thumb',\n videoTimeDurationLabel: 'Video time duration',\n closedCaptionLabel: 'Closed caption',\n audio_tracks: 'Audio Tracks',\n descriptive_audio: 'Audio descriptions',\n closecaption_off: 'Off',\n audio_tracks_default: 'Default Track',\n cc_customize: 'Customize',\n cc_text_font: 'Font',\n cc_text_color: 'Text color',\n cc_color_black: 'Black',\n cc_color_blue: 'Blue',\n cc_color_cyan: 'Cyan',\n cc_color_green: 'Green',\n cc_color_grey: 'Grey',\n cc_color_magenta: 'Magenta',\n cc_color_red: 'Red',\n cc_color_white: 'White',\n cc_color_yellow: 'Yellow',\n cc_font_name_casual: 'Casual',\n cc_font_name_cursive: 'Cursive',\n cc_font_name_monospacedsansserif: 'Monospaced Sans Serif',\n cc_font_name_monospacedserif: 'Monospaced Serif',\n cc_font_name_proportionalserif: 'Proportional Serif',\n cc_font_name_proportionalsansserif: 'Proportional Sans Serif',\n cc_font_name_smallcapitals: 'Small Capitals',\n cc_text_size: 'Text size',\n cc_text_size_default: 'Default',\n cc_text_size_extralarge: 'Extra Large',\n cc_text_size_large: 'Large',\n cc_text_size_maximum: 'Maximum',\n cc_text_size_small: 'Small',\n cc_appearance: 'Appearance',\n cc_preset1: 'Preset 1 ',\n cc_preset2: 'Preset 2',\n cc_preset3: 'Preset 3',\n cc_preset4: 'Preset 4',\n cc_preset5: 'Preset 5',\n cc_presettings: 'Close captions appearance {0}: ({1}:{2}, {3}:{4})',\n cc_text_background_color: 'Background color',\n cc_text_background_opacity: 'Background opacity',\n cc_text_opacity: 'Text opacity',\n cc_percent_0: '0%',\n cc_percent_100: '100%',\n cc_percent_25: '25%',\n cc_percent_50: '50%',\n cc_percent_75: '75%',\n cc_text_edge_color: 'Text edge color',\n cc_text_edge_style: 'Text edge style',\n cc_text_edge_style_depressed: 'Depressed',\n cc_text_edge_style_dropshadow: 'Drop shadow',\n cc_text_edge_style_none: 'No edge',\n cc_text_edge_style_raised: 'Raised',\n cc_text_edge_style_uniform: 'Uniform',\n cc_window_color: 'Window color',\n cc_window_opacity: 'Window opacity',\n cc_reset: 'Reset'\n};\n\n/**\n *\n * Closed Caption helper class.\n *\n */\nexport default class LocalizationHelper {\n private readonly playerResources: IPlayerResources;\n\n public constructor(props: IPlayerResources) {\n this.playerResources = props;\n }\n\n /**\n * Gets the localized value for given key.\n * @param key - The key to look for.\n * @returns The localization string.\n */\n public getLocalizedValue(key: string): string {\n return this.playerResources[key] || LocalizationConstants[key] || '';\n }\n\n /**\n * Converts from a locale ID to a 2 character language code.\n * @public\n * @param locale - Locale ID string.\n * @returns The localization string.\n */\n public getLanguageCodeFromLocale(locale: string): string {\n return ccLanguageCodes[locale] || '';\n }\n\n /**\n * Converts from language ID or locale name to a localized language name.\n * @public\n * @param locale - Language ID string or locale name string.\n * @returns Language Name from locale.\n */\n public getLanguageNameFromLocale(locale: string): string {\n return ccCultureLocStrings[locale] || this.getLocalizedValue(PlayerLocKeys.unknown_language);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n closedCaptionsPresetMap,\n closedCaptionsSettingsMap,\n closedCaptionsSettingsOptions,\n videoClosedCaptionsConstant\n} from '../closed-captions';\nimport { ClosedCaptionTypes, ICurrentClosedCaptionsSettings, IPlayerMenu, IPlayerMenuItem, IVideoMetadata, MenuCategories } from '../data';\nimport { format } from '../utilities';\nimport LocalizationHelper, { ccCultureLocStrings, PlayerLocKeys } from './localization-helper';\nimport PlayerHelper from './player-helper';\n\n/**\n *\n * Closed Caption helper class.\n *\n */\nexport default class ClosedCaptionHelper {\n private readonly playerMetaData: IVideoMetadata;\n\n private readonly playerHelper: PlayerHelper;\n\n private readonly localizationHelper: LocalizationHelper;\n\n public constructor(props: IVideoMetadata, playerHelper: PlayerHelper, localizationHelper: LocalizationHelper) {\n this.playerMetaData = props;\n this.playerHelper = playerHelper;\n this.localizationHelper = localizationHelper;\n }\n\n public checkClosedCaptionsFiles(): boolean {\n if (this.playerMetaData.ccFiles && this.playerMetaData.ccFiles.length > 0) {\n return true;\n }\n return false;\n }\n\n public getClosedCaptionMenu(): IPlayerMenu | null {\n if (this.playerMetaData.ccFiles && this.playerMetaData.ccFiles.length > 0) {\n const ccFiles = this.playerMetaData.ccFiles;\n\n const ccMenuItems: IPlayerMenuItem[] = [];\n\n for (const ccFile of ccFiles) {\n // If ccType is not provided we default to TTML\n if (!ccFile.ccType || ccFile.ccType === ClosedCaptionTypes.TTML) {\n const lang = this.localizationHelper.getLanguageCodeFromLocale(ccFile.locale.toLowerCase());\n\n const ccMenuItem: IPlayerMenuItem = {\n id: this.playerHelper.addIdPrefix(ccFile.locale),\n label: ccCultureLocStrings[ccFile.locale],\n language: lang,\n data: ccFile.locale,\n selected: false,\n selectable: true,\n persistOnClick: true,\n ariaLabel: `${ccCultureLocStrings[ccFile.locale]} ${this.localizationHelper.getLocalizedValue(\n PlayerLocKeys.closecaption\n )}`\n };\n ccMenuItems.push(ccMenuItem);\n }\n }\n\n ccMenuItems.push({\n id: this.playerHelper.addIdPrefix('appearance'),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_appearance),\n selected: false,\n selectable: false,\n subMenu: this._getClosedCaptionsSettingsMenu()\n });\n\n // Add 'off' option to the top of the list\n ccMenuItems.unshift({\n id: this.playerHelper.addIdPrefix('off'),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.closecaption_off),\n selected: false,\n data: 'off',\n selectable: true,\n persistOnClick: true,\n ariaLabel: `${this.localizationHelper.getLocalizedValue(\n PlayerLocKeys.closecaption_off\n )} ${this.localizationHelper.getLocalizedValue(PlayerLocKeys.closecaption)}`\n });\n\n return {\n category: MenuCategories.ClosedCaption,\n id: this.playerHelper.addIdPrefix(MenuCategories.ClosedCaption),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.closecaption),\n items: ccMenuItems\n };\n }\n return null;\n }\n\n public getUpdatedClosedCaptionSetting(\n currentClosedCaptionsSetting: ICurrentClosedCaptionsSettings,\n settingKey: string,\n optionKey: string\n ): ICurrentClosedCaptionsSettings {\n if (settingKey === videoClosedCaptionsConstant.presetKey) {\n const presetValue = closedCaptionsPresetMap[optionKey];\n\n return {\n window_color: currentClosedCaptionsSetting.window_color,\n window_opacity: currentClosedCaptionsSetting.window_opacity,\n text_background_color: presetValue.text_background_color,\n text_background_opacity: presetValue.text_background_opacity,\n text_color: presetValue.text_color,\n text_edge_style: presetValue.text_edge_style,\n text_font: presetValue.text_font,\n text_opacity: presetValue.text_opacity,\n text_size: presetValue.text_size,\n preset: optionKey\n };\n }\n if (this._getOptionValue(settingKey, optionKey)) {\n currentClosedCaptionsSetting[videoClosedCaptionsConstant.presetKey] = 'none';\n currentClosedCaptionsSetting[settingKey] = optionKey;\n return currentClosedCaptionsSetting;\n }\n return currentClosedCaptionsSetting;\n }\n\n /**\n * Gets the value of closed captions URL from the locale.\n * @param locale - Locale.\n * @returns Returns the closed caption URL.\n */\n public getClosedCaptionURLFromLocale(locale: string): string {\n let url: string = '';\n const ccFiles = this.playerMetaData.ccFiles!;\n for (const ccFile of ccFiles) {\n if (ccFile.locale === locale) {\n url = ccFile.url;\n }\n }\n return url;\n }\n\n /**\n * Gets the value of closed captions settings option.\n * @private\n * @param settingKey - The closed ceptions settings key.\n * @param optionKey - The closed captions option key.\n * @returns - The option value.\n */\n private _getOptionValue(settingKey: string, optionKey: string): string {\n const setting = closedCaptionsSettingsMap[settingKey];\n if (setting) {\n const option = closedCaptionsSettingsOptions[setting.option];\n return option && option.map[optionKey];\n }\n return '';\n }\n\n /**\n * Gets the closed captions settings menu to be added to options menu.\n * @returns - The player menu.\n */\n private _getClosedCaptionsSettingsMenu(): IPlayerMenu {\n // Const currentSettings = currentClosedCaptionsSetting;\n\n // create customize settings menu\n const settingsMenuItems: IPlayerMenuItem[] = [];\n\n for (const settingKey of Object.keys(closedCaptionsSettingsMap)) {\n const setting = closedCaptionsSettingsMap[settingKey];\n\n const option = closedCaptionsSettingsOptions[setting.option];\n const optionMenuItem: IPlayerMenuItem[] = [];\n\n // eslint-disable-next-line guard-for-in\n for (const optionKey in option.map) {\n optionMenuItem.push({\n id: this._getCCMenuItemId(settingKey, optionKey),\n label: this.localizationHelper.getLocalizedValue(`${option.pre}${optionKey}`),\n selectable: true,\n selected: false,\n persistOnClick: true,\n data: `${settingKey}:${optionKey}`\n });\n }\n\n // Add back button\n optionMenuItem.unshift({\n id: '',\n label: this.localizationHelper.getLocalizedValue(`cc_${settingKey}`),\n ariaLabel: `${settingKey} - go back to previous menu`,\n selectable: false,\n selected: false,\n persistOnClick: false,\n isBackButton: true\n });\n\n settingsMenuItems.push({\n id: this.playerHelper.addIdPrefix(`${settingKey}_item`),\n label: this.localizationHelper.getLocalizedValue(`cc_${settingKey}`),\n selectable: false,\n subMenu: {\n id: this._getCCSettingsMenuId(settingKey),\n category: MenuCategories.ClosedCaptionSettings,\n items: optionMenuItem,\n label: this.localizationHelper.getLocalizedValue(`cc_${settingKey}`)\n }\n });\n }\n\n settingsMenuItems.unshift({\n id: '',\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_customize),\n ariaLabel: 'Customize - go back to previous menu',\n selectable: false,\n selected: false,\n persistOnClick: false,\n isBackButton: true\n });\n\n const settingsMenu: IPlayerMenu = {\n id: this.playerHelper.addIdPrefix(MenuCategories.ClosedCaptionSettings),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_customize),\n category: MenuCategories.ClosedCaptionSettings,\n items: settingsMenuItems\n };\n\n // Create preset items menu\n const presetItems: IPlayerMenuItem[] = [];\n\n for (const preset of Object.keys(closedCaptionsPresetMap)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const presetSetting: any = closedCaptionsPresetMap[preset];\n const font: string = presetSetting.text_font;\n const color: string = presetSetting.text_color;\n\n const ariaLabelValue = format(\n this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_presettings),\n '',\n this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_text_font),\n this.localizationHelper.getLocalizedValue(`cc_font_name_${font}`),\n this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_text_color),\n this.localizationHelper.getLocalizedValue(`cc_color_${color}`)\n );\n\n presetItems.push({\n id: this._getCCMenuItemId(videoClosedCaptionsConstant.presetKey, preset),\n label: this.localizationHelper.getLocalizedValue(`cc_${preset}`),\n data: `preset:${preset}`,\n selectable: true,\n selected: false,\n persistOnClick: true,\n ariaLabel: ariaLabelValue,\n hasMouseHoverEvents: true\n });\n }\n\n presetItems.push({\n id: this.playerHelper.addIdPrefix('cc-customize'),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_customize),\n subMenu: settingsMenu,\n hasMouseHoverEvents: true\n });\n\n presetItems.push({\n id: 'reset',\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_reset),\n data: 'reset',\n persistOnClick: true,\n hasMouseHoverEvents: true\n });\n\n presetItems.unshift({\n id: '',\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_appearance),\n ariaLabel: 'Appreance - go back to previous menu',\n selectable: false,\n selected: false,\n persistOnClick: false,\n isBackButton: true,\n hasMouseHoverEvents: true\n });\n\n return {\n id: this._getCCSettingsMenuId(videoClosedCaptionsConstant.presetKey),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.cc_appearance),\n category: MenuCategories.ClosedCaptionSettings,\n items: presetItems\n };\n }\n\n /**\n * Gets the close captions setting menu item id.\n * @param settingId - The setting key.\n * @param optionId - The option key.\n * @returns - Menu Id.\n */\n private _getCCMenuItemId(settingId: string, optionId: string): string {\n return this.playerHelper.addIdPrefix(`cc-${settingId}-${optionId}`);\n }\n\n /**\n * Gets the close captions setting menu id.\n * @param settingId - The setting key.\n * @returns Setting menu Id.\n */\n private _getCCSettingsMenuId(settingId: string): string {\n return this.playerHelper.addIdPrefix(`cc-${settingId}`);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n ClosedCaptionTypes,\n IAudioTrack,\n IBinaryReference,\n ICCFile,\n IPlayerMenu,\n IPlayerMenuItem,\n IPlayerProps,\n IVideoFile,\n IVideoMetadata,\n MediaQuality,\n MediaTypes,\n MenuCategories,\n PlayerConstants\n} from '../data';\nimport { startsWith } from '../utilities';\nimport LocalizationHelper, { PlayerLocKeys } from './localization-helper';\n\n/**\n *\n * Player helper class.\n *\n */\nexport default class PlayerHelper {\n private playerProps: IPlayerProps;\n\n private readonly localizationHelper: LocalizationHelper;\n\n private readonly _isMobileDevice?: boolean;\n\n public constructor(props: IPlayerProps, localizationHelper: LocalizationHelper, isMobileDevice?: boolean) {\n this.playerProps = props;\n this.localizationHelper = localizationHelper;\n this._isMobileDevice = isMobileDevice;\n }\n\n public getMetadata(): IVideoMetadata {\n this._mapVideoFiles();\n this._setCCFiles();\n this._setAudioTracks();\n return this.playerProps.playerData.metaData;\n }\n\n public updatePlayerProps(props: IPlayerProps): void {\n this.playerProps = props;\n this._clearVideoPlayerMetaData();\n }\n\n public getOptionMenu(): IPlayerMenu | null {\n const audioTracks = this._getAudioTracksMenu();\n if (audioTracks === null) {\n return null;\n }\n const optionMenuItems: IPlayerMenuItem[] = [];\n\n optionMenuItems.push({\n id: this.addIdPrefix('audioTracks'),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.audio_tracks),\n selected: false,\n selectable: false,\n subMenu: audioTracks\n });\n\n return {\n category: MenuCategories.Options,\n id: this.addIdPrefix(MenuCategories.Options),\n label: 'Options',\n items: optionMenuItems\n };\n }\n\n /**\n * Get Poster Frame URL.\n * @returns Returns the poster image URL.\n */\n public getPosterFrameUrl(): string {\n let posterFrameUrl = '';\n if (!this.playerProps.playerData.options.hidePosterFrame && this.playerProps.playerData.metaData.posterframeUrl) {\n posterFrameUrl = this._removeProtocolFromUrl(this.playerProps.playerData.metaData.posterframeUrl);\n if (this.playerProps.playerData.options.thumbnailFullWidth) {\n if (posterFrameUrl.indexOf('?') > 0) {\n posterFrameUrl = `${posterFrameUrl}${'&w='}${PlayerConstants.thumbnailFullWidth}${'&h='}${\n PlayerConstants.thumbnailFullHeight\n }`;\n } else {\n posterFrameUrl = `${posterFrameUrl}${'?w='}${PlayerConstants.thumbnailFullWidth}${'&h='}${\n PlayerConstants.thumbnailFullHeight\n }`;\n }\n }\n }\n return posterFrameUrl;\n }\n\n public getVideoFileToPlay(): IVideoFile {\n let videoFile: IVideoFile = {\n url: '',\n mediaType: MediaTypes.MP4,\n quality: MediaQuality.LO\n };\n const videoMetaData: IVideoMetadata = this.playerProps.playerData.metaData;\n\n const mpVideoFiles = this._getVideoFileByType(MediaTypes.MP4, videoMetaData.videoFiles!);\n\n if (this._isMobileDevice && this.playerProps.playerData.options.mobileVideoQuality) {\n const mobileVideoFile = this._getVideoFileByQuality(\n this.playerProps.playerData.options.mobileVideoQuality.toUpperCase() as MediaQuality,\n mpVideoFiles\n );\n if (mobileVideoFile) {\n return mobileVideoFile;\n }\n }\n\n const hdVideoFile = this._getVideoFileByQuality(MediaQuality.HDX, mpVideoFiles);\n if (hdVideoFile !== null) {\n videoFile = hdVideoFile;\n } else {\n const hqVideoFile = this._getVideoFileByQuality(MediaQuality.HQ, mpVideoFiles);\n if (hqVideoFile !== null) {\n videoFile = hqVideoFile;\n } else {\n const sdVideoFile = this._getVideoFileByQuality(MediaQuality.SD, mpVideoFiles);\n if (sdVideoFile !== null) {\n videoFile = sdVideoFile;\n } else {\n const loVideoFile = this._getVideoFileByQuality(MediaQuality.LO, mpVideoFiles);\n if (loVideoFile !== null) {\n videoFile = loVideoFile;\n }\n }\n }\n }\n return videoFile;\n }\n\n /**\n * Callback function when error happen.\n * @param errorType - Error Type.\n * @param message - Error message.\n */\n public onErrorCallback = (errorType: string, message: string): void => {\n console.log(`ErrorType : ${errorType}, Message : ${message}`);\n };\n\n public isEmptyOrUndefined(value?: string): boolean {\n if (value === undefined || value === '') {\n return true;\n }\n return false;\n }\n\n /**\n * Adds the id prefix to form a child id.\n * @param childId - The child id to prefix.\n * @returns - The prefixed id or the original id if no prefix is built.\n */\n public addIdPrefix(childId: string): string {\n const prefix = this.isEmptyOrUndefined(this.playerProps.playerId) ? null : `${this.playerProps.playerId}-`;\n\n return prefix && !startsWith(childId, prefix, false) ? prefix + childId : childId;\n }\n\n /**\n * Removes the id prefix from a child id.\n * @param childId - The child id to prefix.\n * @returns - The un-prefixed id or the original id if no prefix was found.\n */\n public removeIdPrefix(childId: string): string {\n const prefix = this.isEmptyOrUndefined(this.playerProps.playerId) ? null : `${this.playerProps.playerId}-`;\n\n return prefix && startsWith(childId, prefix, false) ? childId.substring(prefix.length) : childId;\n }\n\n private _getAudioTracksMenu(): IPlayerMenu | null {\n const audioTracksMenuItems: IPlayerMenuItem[] = [];\n const videoMetaData: IVideoMetadata = this.playerProps.playerData.metaData;\n if (videoMetaData.audioTracks !== undefined && videoMetaData.audioTracks.length > 0) {\n // Check if there are multiple \"Descriptive Audio\" tracks, in which case we will want to show language\n let descriptiveAudioTrackCount = 0;\n for (const track of videoMetaData.audioTracks) {\n if (track.isDescriptiveAudio) {\n descriptiveAudioTrackCount++;\n }\n }\n\n let trackIndex: number = 0;\n for (const audioTrack of videoMetaData.audioTracks) {\n let label: string;\n let languageCode: string = '';\n if (audioTrack.isDescriptiveAudio) {\n // Descriptive audio labels look like:\n // \"Descriptive audio\" -- when only one descriptive audio track exists\n // or\n // \"Descriptive audio - English\" -- if there is more than one descriptive audio track\n const descriptiveAudioLabel = this.localizationHelper.getLocalizedValue(PlayerLocKeys.descriptive_audio);\n if (descriptiveAudioTrackCount > 1) {\n const language = this.localizationHelper.getLanguageNameFromLocale(audioTrack.languageCode);\n label = `${descriptiveAudioLabel} - ${language}`;\n } else {\n label = descriptiveAudioLabel;\n }\n languageCode = `daudio-${audioTrack.languageCode.toLowerCase()}`;\n } else {\n // Regular tracks display language of the stream only.\n label = this.localizationHelper.getLanguageNameFromLocale(audioTrack.languageCode);\n languageCode = audioTrack.languageCode.toLowerCase();\n }\n\n const audioMenuItem: IPlayerMenuItem = {\n label,\n language: languageCode,\n data: audioTrack.url,\n id: this.addIdPrefix(`audio-${trackIndex}`),\n selected: false,\n selectable: true,\n persistOnClick: true\n };\n\n audioTracksMenuItems.push(audioMenuItem);\n trackIndex++;\n }\n\n audioTracksMenuItems.unshift({\n id: '',\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.audio_tracks_default),\n ariaLabel: this.localizationHelper.getLocalizedValue(PlayerLocKeys.audio_tracks_default),\n language: 'default',\n data: 'default',\n selectable: true,\n selected: false,\n persistOnClick: true\n });\n\n audioTracksMenuItems.unshift({\n id: '',\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.audio_tracks),\n ariaLabel: `${this.localizationHelper.getLocalizedValue(PlayerLocKeys.audio_tracks)} - go back to previous menu`,\n selectable: false,\n selected: false,\n persistOnClick: false,\n isBackButton: true\n });\n return {\n category: MenuCategories.AudioTracks,\n id: this.addIdPrefix(MenuCategories.AudioTracks),\n label: this.localizationHelper.getLocalizedValue(PlayerLocKeys.audio_tracks),\n items: audioTracksMenuItems\n };\n }\n return null;\n }\n\n private _clearVideoPlayerMetaData(): void {\n this.playerProps.playerData.metaData.videoFiles = [];\n this.playerProps.playerData.metaData.audioTracks = [];\n this.playerProps.playerData.metaData.ccFiles = [];\n }\n\n private _setCCFiles(): void {\n const videoMetaData: IVideoMetadata = this.playerProps.playerData.metaData;\n const ccFiles: ICCFile[] = [];\n if (!(videoMetaData.ccFiles && videoMetaData.ccFiles.length > 0)) {\n if (videoMetaData.videoBinaryReferences && videoMetaData.videoBinaryReferences.length > 0) {\n for (const binaryRef of videoMetaData.videoBinaryReferences) {\n // Skip all other format except ttml/closedcaption\n if (\n (binaryRef.extension && binaryRef.extension === 'ttml') ||\n binaryRef.$type === 'videoClosedCaptionBinaryReference'\n ) {\n const ccFile: ICCFile = {\n ccType: ClosedCaptionTypes.TTML,\n locale: binaryRef.locale!,\n url: binaryRef.sourceHref!\n };\n ccFiles.push(ccFile);\n }\n }\n this.playerProps.playerData.metaData.ccFiles = ccFiles;\n }\n }\n }\n\n private _setAudioTracks(): void {\n const videoMetaData: IVideoMetadata = this.playerProps.playerData.metaData;\n const audioTracks: IAudioTrack[] = [];\n if (videoMetaData.videoBinaryReferences && videoMetaData.videoBinaryReferences.length > 0) {\n for (const binaryRef of videoMetaData.videoBinaryReferences) {\n if (binaryRef.$type && binaryRef.$type === 'audioBinaryReference') {\n const audioTrack: IAudioTrack = {\n isDescriptiveAudio: binaryRef.audioType === 'descriptiveAudio',\n bitrate: binaryRef.bitrate!,\n languageCode: binaryRef.locale === undefined ? '' : binaryRef.locale,\n name: binaryRef.alias!,\n url: binaryRef.clientHref!\n };\n audioTracks.push(audioTrack);\n }\n }\n }\n this.playerProps.playerData.metaData.audioTracks = audioTracks;\n }\n\n private _mapVideoFiles(): void {\n const videoMetaData: IVideoMetadata = this.playerProps.playerData.metaData;\n if (!videoMetaData.videoFiles || videoMetaData.videoFiles.length === 0) {\n const videoFiles: IVideoFile[] = [];\n const videoBinaryFiles: IBinaryReference[] = videoMetaData.videoBinaryReferences!;\n if (videoBinaryFiles && videoBinaryFiles.length > 0) {\n for (const binaryRef of videoBinaryFiles) {\n if (binaryRef.format) {\n // Skip the unsupported 1001 format\n if (binaryRef.format === '1001') {\n continue;\n }\n\n // Handle all other video/audio format\n const mediaTypeAndQuality = this._getMediaTypeAndQuality(binaryRef.format);\n let urlRef;\n if (mediaTypeAndQuality.mediaType === MediaTypes.MP4) {\n urlRef = binaryRef.clientHref;\n } else {\n urlRef = binaryRef.sourceHref;\n }\n\n if (urlRef) {\n urlRef = this._removeProtocolFromUrl(urlRef);\n }\n\n if (urlRef) {\n videoFiles.push({\n url: urlRef,\n quality: mediaTypeAndQuality.quality,\n mediaType: mediaTypeAndQuality.mediaType,\n formatCode: binaryRef.format\n });\n }\n }\n }\n }\n this.playerProps.playerData.metaData.videoFiles = videoFiles;\n }\n }\n\n /**\n * Gets video quality and media type from stream name.\n * @param format - The stream name.\n * @returns The mediaType and MediaQuality.\n */\n private _getMediaTypeAndQuality(format: string): { mediaType: MediaTypes; quality: MediaQuality } {\n let mType: MediaTypes = MediaTypes.MP4;\n let mQuality: MediaQuality = MediaQuality.SD;\n\n switch (format) {\n case '101':\n mType = MediaTypes.MP4;\n mQuality = MediaQuality.LO;\n break;\n case '102':\n mType = MediaTypes.MP4;\n mQuality = MediaQuality.SD;\n break;\n case '103':\n mType = MediaTypes.MP4;\n mQuality = MediaQuality.HQ;\n break;\n case '104':\n mType = MediaTypes.MP4;\n mQuality = MediaQuality.HDX;\n break;\n case '105':\n mType = MediaTypes.MP4;\n mQuality = MediaQuality.HD;\n break;\n case '1004':\n mType = MediaTypes.SMOOTH;\n break;\n case '1006':\n mType = MediaTypes.HLS;\n break;\n case '1007':\n mType = MediaTypes.DASH;\n break;\n default:\n mType = MediaTypes.MP4;\n mQuality = MediaQuality.SD;\n }\n\n return {\n mediaType: mType,\n quality: mQuality\n };\n }\n\n /**\n * Removes protocol from url.\n * @param url - The url.\n * @returns The URL.\n */\n private _removeProtocolFromUrl(url: string): string {\n return url.replace(/(^\\w+:|^)\\/\\//, '//');\n }\n\n /**\n * Gets the video file of specified quality.\n * @param quality - The desired quality to look for.\n * @param videoFiles - The video files.\n * @returns Returns the video file.\n */\n private _getVideoFileByQuality(quality: MediaQuality, videoFiles: IVideoFile[]): IVideoFile | null {\n let videoFile = null;\n for (const file of videoFiles) {\n if (file.quality === quality) {\n videoFile = file;\n break;\n }\n }\n\n return videoFile;\n }\n\n /**\n * Gets the video file of specified type.\n * @param mediaType - The media type to look for.\n * @param videoFiles - The video files.\n * @returns Returns the video file.\n */\n private _getVideoFileByType(mediaType: MediaTypes, videoFiles: IVideoFile[]): IVideoFile[] {\n const videoFile: IVideoFile[] = [];\n for (const file of videoFiles) {\n if (file.mediaType === mediaType) {\n videoFile.push(file);\n }\n }\n return videoFile;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport React, { useEffect, useState } from 'react';\n\nexport interface IRatingComponentProps extends IComponentProps<{}> {\n readOnly: boolean;\n ariaLabel: string;\n avgRating: number;\n ratingCount?: string;\n initialRating?: number;\n hideCount?: boolean;\n shouldShowFullRatingDescription?: boolean;\n className?: string;\n ratingCountAriaLabel?: string;\n onChange?(value: number): void;\n}\nexport interface IRatingComponent extends IComponent {\n onSliderChanged(): (\n event: React.ChangeEvent,\n props: IRatingComponentProps,\n setRating: (rating: IRatingState) => void\n ) => void;\n onMouseOver(): (event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void) => void;\n onClick(): (event: React.MouseEvent, props: IRatingComponentProps, setRating: (rating: IRatingState) => void) => void;\n onMouseLeave(): (event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void) => void;\n}\n\ninterface IRatingState {\n rating: number;\n lastSelectedRating: number;\n}\n\nconst roundUpMin: number = 0.75;\nconst roundMidMin: number = 0.25;\nconst maxRating: number = 5;\n\nconst RatingComponentActions = {\n onSliderChanged(\n event: React.ChangeEvent,\n props: IRatingComponentProps,\n setRating: (rating: IRatingState) => void\n ): void {\n const value = Number.parseInt(event.target.value, 10);\n setRating({ rating: value, lastSelectedRating: value });\n\n if (props.onChange) {\n props.onChange(value);\n }\n },\n onMouseLeave(_event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void): void {\n setRating({ rating: rating.lastSelectedRating, lastSelectedRating: rating.lastSelectedRating });\n },\n onMouseOver(event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void): void {\n setRating({ rating: getIndex(event), lastSelectedRating: rating.lastSelectedRating });\n },\n onClick(event: React.MouseEvent, props: IRatingComponentProps, setRating: (rating: IRatingState) => void): void {\n if (!props.readOnly) {\n const index = getIndex(event);\n setRating({ rating: index, lastSelectedRating: index });\n\n if (props.onChange) {\n props.onChange(index);\n }\n }\n }\n};\n\nconst Rating: React.FC = (props: IRatingComponentProps) => {\n const initialRating = props.readOnly ? props.avgRating : props.initialRating || 0;\n const [rating, setRating] = useState({ rating: initialRating, lastSelectedRating: initialRating });\n useEffect(() => {\n const newRating = props.readOnly ? props.avgRating : props.initialRating || 0;\n setRating({ rating: newRating, lastSelectedRating: newRating });\n }, [props]);\n const onChange = (event: React.ChangeEvent) => {\n RatingComponentActions.onSliderChanged(event, props, setRating);\n };\n const onMouseLeave = (event: React.MouseEvent) => {\n RatingComponentActions.onMouseLeave(event, rating, setRating);\n };\n const onMouseOver = (event: React.MouseEvent) => {\n RatingComponentActions.onMouseOver(event, rating, setRating);\n };\n const onClick = (event: React.MouseEvent) => {\n RatingComponentActions.onClick(event, props, setRating);\n };\n\n const shouldShowFullRatingDescriptionConfiguration = props.shouldShowFullRatingDescription ?? false;\n const shouldShowDescription = shouldShowFullRatingDescriptionConfiguration || props.typeName === 'reviews-list';\n\n return (\n
0 ? 'msc-no-ratings' : ''} ${props.className ? props.className : ''}`}>\n {starControl(props.readOnly, rating.rating, props.ariaLabel, props.ratingCountAriaLabel, onChange)}\n
\n {renderStars(rating.rating, props, onMouseOver, onClick)}\n
\n {props.ratingCount && (\n \n {` `}\n {shouldShowDescription ? `${props.avgRating} / 5 (${props.ratingCount})` : props.ratingCount}\n {` `}\n \n )}\n
\n );\n};\n\n// Set default props\nRating.defaultProps = {\n avgRating: 0\n} as Partial;\n\n/**\n * Rating Review ariaLabel.\n * @param readOnly - Boolean.\n * @param currentRating - Current rating number.\n * @param ariaLabel - Rating AriaLabel.\n * @param reviewCountAriaLabel - Product review count.\n * @param onChange - On Change function.\n * @returns Jsx element.\n */\nconst starControl = (\n readOnly: boolean,\n currentRating: number,\n ariaLabel: string,\n reviewCountAriaLabel: string | undefined,\n onChange: (event: React.ChangeEvent) => void\n): JSX.Element => {\n if (readOnly) {\n return
{`${ariaLabel}${reviewCountAriaLabel ? ` ${reviewCountAriaLabel}` : ''}`}
;\n }\n\n return (\n \n );\n};\n\nconst renderStars = (\n rating: number,\n props: IRatingComponentProps,\n mouseOver: (event: React.MouseEvent) => void,\n onClick: (event: React.MouseEvent) => void\n): JSX.Element[] => {\n const floor = Math.floor(rating);\n const remainder = rating - floor;\n const filled = remainder < roundUpMin ? floor : floor + 1;\n const half = roundMidMin <= remainder && remainder < roundUpMin ? filled + 1 : 0;\n const stars = [];\n\n for (let i = 1; i <= maxRating; i++) {\n const glyphClass = filled >= i ? 'msc-rating__star' : half === i ? 'msc-rating__half-star' : 'msc-rating__empty-star'!;\n stars.push(\n \n );\n }\n\n return stars;\n};\n\nconst getIndex = (event: React.MouseEvent): number => {\n const target = event.target as HTMLElement;\n return Number.parseInt(target.getAttribute('data-index')!, 10);\n};\n\n// @ts-expect-error\nexport const RatingComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'Rating',\n { component: Rating, ...RatingComponentActions }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nexport interface IOrderTemplateProductsPreviewComponentProps {\n className: string;\n products: FullProduct[];\n context: ICoreContext;\n imageSettings?: IImageSettings;\n}\n\nexport const OrderTemplateProductsPreviewComponent = (props: IOrderTemplateProductsPreviewComponentProps) => {\n const { products, className, imageSettings } = props;\n\n return (\n
\n {renderOrderTemplateImages(props.context, `${className}__products`, products, imageSettings)}\n
\n );\n};\n\nconst renderOrderTemplateImage = (context: ICoreContext, className: string, product: FullProduct, imageSettings?: IImageSettings) => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n lg: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n xl: { q: 'w=140&h=140&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n return (\n
\n \n
\n );\n};\n\nconst renderOrderTemplateImages = (\n context: ICoreContext,\n className: string,\n products: FullProduct[],\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n return (\n
\n
\n
\n {products.length > 0 && renderOrderTemplateImage(context, className, products[0], imageSettings)}\n
\n
\n {products.length > 1 && renderOrderTemplateImage(context, className, products[1], imageSettings)}\n
\n
\n
\n
\n {products.length > 2 && renderOrderTemplateImage(context, className, products[2], imageSettings)}\n
\n
\n {products.length > 3 && renderOrderTemplateImage(context, className, products[3], imageSettings)}\n
\n
\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, IPayLoad, ISliderChangeNotification, onTelemetryClick, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n AgeGate,\n ClosedCaptionHelper,\n ClosedCaptions,\n closedCaptionsSettingDefaults,\n ClosedCaptionTypes,\n format,\n ICCFile,\n ICurrentClosedCaptionsSettings,\n IPlayerMenu,\n IPlayerMenuItemClickNotification,\n IPlayerProps,\n IPlayPosition,\n isNullOrWhiteSpace,\n isSafari,\n IVideoErrorData,\n IVideoErrorMessageData,\n IVideoMetadata,\n KeyCodes,\n LocalizationConstants,\n LocalizationHelper,\n MediaEvents,\n MenuCategories,\n PlayerConstants,\n PlayerHelper,\n PlayerStates,\n PlayPauseTrigger,\n videoClosedCaptionsConstant,\n VideoControls,\n VideoErrorCodes,\n VideoPlayerNames\n} from './components';\n\n/**\n * Player state interface.\n */\nexport interface IPlayerState {\n playing: boolean;\n mouseHovered: boolean;\n isControlPanelVisible: boolean;\n doControlsHaveFocus: boolean;\n playPosition: IPlayPosition;\n currentVolume: number;\n isTriggerEnabled: boolean;\n previousVolume: number;\n isMuted: boolean;\n isInFullScreen: boolean;\n showSpinner: boolean;\n showErrorMessage: boolean;\n videoErrorMessage: IVideoErrorMessageData;\n screenReaderText: string;\n showClosedCaptions: boolean;\n isAgegateEnabled: boolean;\n currentAudioTrack: string;\n currentAudioTrackURL: string;\n closedCaptionLanguage: string;\n closedCaptionsURL: string;\n currentClosedCaptionsSettings: ICurrentClosedCaptionsSettings;\n mounted: boolean;\n tempClosedCaptionsSettings?: {};\n}\n\n/**\n *\n * Player component.\n *\n */\nexport default class Player extends React.Component {\n public static defaultProps: Partial = {\n playerData: {\n options: {\n autoplay: true,\n ageGate: false,\n mute: true,\n loop: false,\n playPauseTrigger: false,\n controls: true,\n hidePosterFrame: false,\n lazyLoad: true\n },\n metaData: {\n playerName: 'videoPlayer',\n videoId: '',\n title: '',\n description: '',\n duration: 0,\n posterframeUrl: '',\n shareUrl: '',\n videoFiles: [],\n externalPlayerUrl: '',\n externalSourceId: '',\n videoBinaryReferences: []\n }\n },\n playerResources: {\n playAriaLabel: LocalizationConstants.playAriaLabel,\n pauseAriaLabel: LocalizationConstants.pauseAriaLabel,\n closeAriaLabel: LocalizationConstants.closeAriaLabel,\n muteAriaLabel: LocalizationConstants.muteAriaLabel,\n unMuteAriaLabel: LocalizationConstants.unMuteAriaLabel,\n fullScreenAriaLabel: LocalizationConstants.fullScreenAriaLabel,\n exitFullScreenAriaLabel: LocalizationConstants.exitFullScreenAriaLabel,\n pausedAriaLabel: LocalizationConstants.pausedAriaLabel,\n playingAriaLabel: LocalizationConstants.playingAriaLabel,\n seekBarLabel: LocalizationConstants.seekBarLabel,\n videoTimeDurationLabel: LocalizationConstants.videoTimeDurationLabel,\n closedCaptionLabel: LocalizationConstants.closedCaptionLabel,\n sliderThumbLabel: LocalizationConstants.sliderThumbLabel,\n volumeThumbLabel: LocalizationConstants.volumeThumbLabel\n }\n };\n\n private controlPanelTimer: number = 0;\n\n private readonly playerId: string;\n\n private readonly player: React.RefObject = React.createRef();\n\n private readonly audio: React.RefObject = React.createRef();\n\n private readonly playerContainer: React.RefObject = React.createRef();\n\n private readonly videoControl: React.RefObject = React.createRef();\n\n private readonly ClosedCaptions: React.RefObject = React.createRef();\n\n private readonly ageGateContainer: React.RefObject = React.createRef();\n\n private videoUrl: string = '';\n\n private posterFrameUrl: string = '';\n\n private seekFrom: number | null = null;\n\n private playerState: PlayerStates;\n\n private readonly playerHelper: PlayerHelper;\n\n private readonly localizationHelper: LocalizationHelper;\n\n private closedCaptionHelper: ClosedCaptionHelper | null = null;\n\n private closedCaptionMenu: IPlayerMenu | null = null;\n\n private optionsMenu: IPlayerMenu | null = null;\n\n private selectedClosedCaptionsLocale: string | null = '';\n\n private isPlayerManuallyPaused: boolean = false;\n\n private isPlayerLoaded: boolean = false;\n\n private playerMetaData: IVideoMetadata;\n\n private readonly isMobileDevice: boolean;\n\n private readonly payLoad: IPayLoad;\n\n private readonly _shouldAutoPlay: boolean;\n\n /**\n * Checks if fullscreen is supported by browser or not.\n * @returns - If native fullscreen enabled.\n */\n private static _isNativeFullscreenEnabled(): boolean {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const doc = document as any;\n return (\n doc.fullscreenEnabled ||\n doc.mozFullScreenEnabled ||\n doc.webkitFullscreenEnabled ||\n doc.webkitSupportsFullscreen ||\n doc.msFullscreenEnabled\n );\n }\n /**\n * Gets the current fullscreen element.\n * @returns - The element in full screen.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private static _getElementInFullScreen(): any {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const doc = document as any;\n return doc.fullscreenElement || doc.mozFullScreenElement || doc.webkitFullscreenElement || doc.msFullscreenElement;\n }\n\n public constructor(props: IPlayerProps) {\n super(props);\n\n const {\n playerData: {\n options: {\n shouldDisableAutoPlayOnMobile,\n autoplay: isAutoPlay,\n playPauseTrigger: isPlayPauseTrigger,\n ageGate: isAgeGateEnabled,\n controls: isControlsEnabled,\n mute: isMuted,\n lazyLoad: isLazyLoaded,\n isMobileDevice\n }\n }\n } = this.props;\n\n this.isMobileDevice = this._isMobile() || isMobileDevice!;\n\n this._shouldAutoPlay = this.isMobileDevice && shouldDisableAutoPlayOnMobile ? false : isAutoPlay!;\n\n const state = {\n playing: false,\n mouseHovered: isPlayPauseTrigger! || !this._shouldAutoPlay,\n isControlPanelVisible: !isPlayPauseTrigger,\n doControlsHaveFocus: false,\n isTriggerEnabled: isPlayPauseTrigger! && !this._shouldAutoPlay && isControlsEnabled!,\n currentVolume: isMuted && !this.isMobileDevice ? 0 : PlayerConstants.defaultVolume * 100,\n previousVolume: 0,\n isMuted: isMuted ?? false,\n isInFullScreen: false,\n showSpinner: false,\n isAgegateEnabled: isAgeGateEnabled! && !this._shouldAutoPlay,\n showErrorMessage: false,\n screenReaderText: '',\n closedCaptionLanguage: 'off',\n currentAudioTrack: 'default',\n currentAudioTrackURL: '',\n showClosedCaptions: false,\n mounted: false,\n currentClosedCaptionsSettings: {\n preset: closedCaptionsSettingDefaults.preset,\n text_font: closedCaptionsSettingDefaults.text_font,\n text_color: closedCaptionsSettingDefaults.text_color,\n text_opacity: closedCaptionsSettingDefaults.text_opacity,\n text_size: closedCaptionsSettingDefaults.text_size,\n text_edge_style: closedCaptionsSettingDefaults.text_edge_style,\n text_background_color: closedCaptionsSettingDefaults.text_background_color,\n text_background_opacity: closedCaptionsSettingDefaults.text_background_opacity,\n window_color: closedCaptionsSettingDefaults.window_color,\n window_opacity: closedCaptionsSettingDefaults.window_opacity\n },\n closedCaptionsURL: '',\n videoErrorMessage: {\n title: '',\n message: ''\n },\n playPosition: {\n currentTime: 0,\n startTime: 0,\n endTime: 0,\n bufferedDuration: 0\n },\n tempClosedCaptionsSettings: undefined\n };\n\n this.playerState = 'init';\n this._onTriggerClicked = this._onTriggerClicked.bind(this);\n this._onMouseEvent = this._onMouseEvent.bind(this);\n this._onPlay = this._onPlay.bind(this);\n this._onPause = this._onPause.bind(this);\n this._triggerEvents = this._triggerEvents.bind(this);\n this._triggerAudioEvents = this._triggerAudioEvents.bind(this);\n this._onProgressChange = this._onProgressChange.bind(this);\n this._setMuted = this._setMuted.bind(this);\n this._onVolumeChange = this._onVolumeChange.bind(this);\n this._onFullScreenChanged = this._onFullScreenChanged.bind(this);\n this._toggleFullScreen = this._toggleFullScreen.bind(this);\n this._showControlBar = this._showControlBar.bind(this);\n this._handleControlsKeyDownEvent = this._handleControlsKeyDownEvent.bind(this);\n this._onFullscreenError = this._onFullscreenError.bind(this);\n this._onPlayerKeyDown = this._onPlayerKeyDown.bind(this);\n this._onTriggerFocus = this._onTriggerFocus.bind(this);\n this._onTriggerBlur = this._onTriggerBlur.bind(this);\n this._onVideoControlsFocus = this._onVideoControlsFocus.bind(this);\n this._onVideoControlsBlur = this._onVideoControlsBlur.bind(this);\n this._onPlayerMenuItemClick = this._onPlayerMenuItemClick.bind(this);\n this._onPlayerMenuItemFocus = this._onPlayerMenuItemFocus.bind(this);\n this._onPlayerMenuItemBlur = this._onPlayerMenuItemBlur.bind(this);\n this._validateAgeSubmitHandler = this._validateAgeSubmitHandler.bind(this);\n this._onContextMenuClicked = this._onContextMenuClicked.bind(this);\n this.localizationHelper = new LocalizationHelper(this.props.playerResources!);\n this.playerHelper = new PlayerHelper(this.props, this.localizationHelper, this.isMobileDevice);\n this.playerId = this.playerHelper.isEmptyOrUndefined(this.props.playerId) ? 'vid-0' : this.props.playerId!;\n this.playerMetaData = this.playerHelper.getMetadata();\n this.state = state;\n this.posterFrameUrl = this.playerHelper.getPosterFrameUrl();\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n\n if (!isLazyLoaded) {\n this.videoUrl = this.playerHelper.getVideoFileToPlay().url;\n }\n }\n\n public shouldComponentUpdate(nextProps: IPlayerProps, nextState: IPlayerState): boolean {\n if (this.state === nextState && this.props.playerData.options === nextProps.playerData.options) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const {\n playerData: {\n options: { loop: isLoop }\n }\n } = this.props;\n\n const maskLevelStyle: React.CSSProperties = {};\n maskLevelStyle.backgroundColor = this._getMaskLevelStyle();\n\n if (this.props.isEditor) {\n this.playerHelper.updatePlayerProps(this.props);\n this.playerMetaData = this.playerHelper.getMetadata();\n if (this.posterFrameUrl !== this.playerHelper.getPosterFrameUrl()) {\n this.posterFrameUrl = this.playerHelper.getPosterFrameUrl();\n }\n if (this.isPlayerLoaded && this.videoUrl !== this.playerHelper.getVideoFileToPlay().url) {\n this._loadPlayer();\n }\n }\n\n const loadMetaData = this._shouldAutoPlay ? 'auto' : 'metadata';\n\n // Set play aria label\n let playAriaLabel: string = '';\n if (this.playerMetaData.title) {\n playAriaLabel = `${this.localizationHelper.getLocalizedValue('playAriaLabel')} ${this.playerMetaData.title}`;\n } else {\n playAriaLabel = LocalizationConstants.playVideoAriaLabel;\n }\n\n return (\n \n
\n {this.state.currentAudioTrack !== '' && this.state.currentAudioTrackURL !== '' && (\n \n )}\n
\n
\n {this.state.screenReaderText}\n
\n \n \n \n {this.props.playerData.options.ageGate && this._renderAgeGate()}\n {this._renderPlayPauseTrigger(playAriaLabel, maskLevelStyle)}\n {this.state.showClosedCaptions && this._renderClosedCaptions()}\n {this._renderVideoControls(playAriaLabel)}\n \n \n );\n }\n\n /**\n * Play the video.\n */\n public play(): void {\n this.player.current!.play().catch(() => {\n this._onVideoError();\n });\n if (this.audio.current) {\n this.audio.current.play().catch(() => {\n this._onAudioError();\n });\n }\n }\n\n /**\n * Pause the video.\n */\n public pause(): void {\n this.player.current!.pause();\n if (this.audio.current) {\n this.audio.current.pause();\n }\n }\n\n public componentDidMount(): void {\n const {\n playerData: {\n options: { playPauseTrigger: isPlayPauseTrigger, lazyLoad: isLazyLoaded }\n }\n } = this.props;\n if (!isLazyLoaded) {\n this._onVideoLoadedData();\n this._showControlBar(false);\n }\n\n if (this._shouldAutoPlay || (isLazyLoaded && !isPlayPauseTrigger) || !isLazyLoaded) {\n this._loadPlayer();\n }\n document.addEventListener('fullscreenchange', this._onFullScreenChanged);\n document.addEventListener('mozfullscreenchange', this._onFullScreenChanged);\n document.addEventListener('webkitfullscreenchange', this._onFullScreenChanged);\n document.addEventListener('MSFullscreenChange', this._onFullScreenChanged);\n\n document.addEventListener('fullscreenerror', this._onFullscreenError);\n document.addEventListener('mozfullscreenerror', this._onFullscreenError);\n document.addEventListener('webkitfullscreenerror', this._onFullscreenError);\n document.addEventListener('MSFullscreenError', this._onFullscreenError);\n }\n\n public componentWillUnmount(): void {\n if (this.player.current) {\n for (const mediaEvent of MediaEvents) {\n this.player.current.removeEventListener(mediaEvent, this._triggerEvents);\n }\n }\n document.removeEventListener('fullscreenchange', this._onFullScreenChanged);\n document.removeEventListener('mozfullscreenchange', this._onFullScreenChanged);\n document.removeEventListener('webkitfullscreenchange', this._onFullScreenChanged);\n document.removeEventListener('MSFullscreenChange', this._onFullScreenChanged);\n\n document.removeEventListener('fullscreenerror', this._onFullscreenError);\n document.removeEventListener('mozfullscreenerror', this._onFullscreenError);\n document.removeEventListener('webkitfullscreenerror', this._onFullscreenError);\n document.removeEventListener('MSFullscreenError', this._onFullscreenError);\n }\n\n /**\n * Renders closed captions.\n * @returns Returns closed captions.\n */\n private readonly _renderClosedCaptions = (): JSX.Element => {\n return (\n \n );\n };\n\n /**\n * Renders the play pause trigger.\n * @param playAriaLabel - Aria label for the play button.\n * @param maskLevelStyle - Mask level.\n * @returns Returns play pause trigger.\n */\n private readonly _renderPlayPauseTrigger = (playAriaLabel: string, maskLevelStyle: React.CSSProperties): JSX.Element | undefined => {\n const {\n playerData: {\n options: {\n autoplay: shouldAutoPlay,\n playPauseTrigger: isPlayPauseTrigger,\n controls: isControlsEnabled,\n shouldDisableAutoPlayOnMobile\n }\n }\n } = this.props;\n\n if (!MsDyn365.msdyn365Commerce.isBrowser && isPlayPauseTrigger && shouldAutoPlay && shouldDisableAutoPlayOnMobile) {\n // Rendering an empty div because on server side isMobile will be false at server side.\n return
;\n }\n\n if (isPlayPauseTrigger && (!isControlsEnabled || this.state.isTriggerEnabled) && !this.state.isAgegateEnabled) {\n return (\n \n );\n }\n\n return undefined;\n };\n\n /**\n * Renders the video controls.\n * @param playAriaLabel - Arial label for the play button.\n * @returns Returns the video control.\n */\n private readonly _renderVideoControls = (playAriaLabel: string): JSX.Element | undefined => {\n const {\n playerData: {\n options: { controls: isControlsEnabled }\n }\n } = this.props;\n\n if (isControlsEnabled && !this.state.isTriggerEnabled && !this.state.isAgegateEnabled) {\n return (\n \n );\n }\n return undefined;\n };\n\n /**\n * Renders the age gate module.\n * @returns Renders the age gate module.\n */\n private readonly _renderAgeGate = (): JSX.Element => {\n return (\n \n );\n };\n\n private _loadPlayer(): void {\n if (this.player.current) {\n this.player.current.volume = this.state.currentVolume / 100;\n\n // Register the media events\n for (const mediaEvent of MediaEvents) {\n this.player.current.addEventListener(mediaEvent, this._triggerEvents);\n }\n }\n\n if (this.props.playerData.options.lazyLoad || this.props.isEditor) {\n this.videoUrl = this.playerHelper.getVideoFileToPlay().url;\n if (this.player.current) {\n this.player.current.src = this.videoUrl;\n this.player.current.load();\n }\n }\n\n this.isPlayerLoaded = true;\n\n if (this.props.playerData.options.controls) {\n this.closedCaptionHelper = new ClosedCaptionHelper(this.playerMetaData, this.playerHelper, this.localizationHelper);\n this.closedCaptionMenu = this.closedCaptionHelper.getClosedCaptionMenu()!;\n this.optionsMenu = this.playerHelper.getOptionMenu();\n const ccFiles = this.playerMetaData.ccFiles!;\n if (ccFiles !== undefined && ccFiles.length > 0) {\n const autoCaptionsLang = this.props.playerData && this.props.playerData.options.autoCaptions;\n let autoCaptionsLocale: string | null = null;\n for (const ccFile of ccFiles) {\n if (!autoCaptionsLocale && autoCaptionsLang && ccFile.locale.includes(autoCaptionsLang)) {\n autoCaptionsLocale = ccFile.locale;\n }\n }\n this.selectedClosedCaptionsLocale = autoCaptionsLocale;\n if (!isNullOrWhiteSpace(this.selectedClosedCaptionsLocale!)) {\n this.setState({\n closedCaptionLanguage: this.selectedClosedCaptionsLocale!,\n closedCaptionsURL: this.closedCaptionHelper.getClosedCaptionURLFromLocale(this.selectedClosedCaptionsLocale!),\n showClosedCaptions: true\n });\n }\n }\n }\n }\n\n /**\n * Validates the age submitted by the user.\n */\n private _validateAgeSubmitHandler(): void {\n if (this.ageGateContainer.current!.getCalculatedAge()) {\n this.videoUrl = this.playerHelper.getVideoFileToPlay().url;\n this.setState({ isAgegateEnabled: false });\n } else {\n this.setState({ isAgegateEnabled: true });\n this._displayErrorMessage({ title: 'you are not allowed to watch video' });\n }\n }\n\n private _onVideoControlsFocus(): void {\n // No need to call showControlBar, this will make sure it shows\n this.setState({ doControlsHaveFocus: true });\n }\n\n private _onVideoControlsBlur(): void {\n // Call showControlBar to give it the 6 second timeout\n this._showControlBar(true);\n\n this.setState({ doControlsHaveFocus: false });\n }\n\n private _onPlayerMenuItemFocus(notification: IPlayerMenuItemClickNotification): void {\n if (notification.data && notification.data.indexOf(':') > 0) {\n const dataSplit = notification.data.split(':');\n const settingKey = dataSplit[0];\n if (settingKey === videoClosedCaptionsConstant.presetKey) {\n if (this.state.closedCaptionLanguage === 'off') {\n this.setState(\n {\n showClosedCaptions: true\n },\n () => {\n this.ClosedCaptions.current!.showSampleCaptions();\n this._setCCSettings(notification, false);\n }\n );\n } else {\n this._setCCSettings(notification, false);\n }\n }\n } else if (this.state.closedCaptionLanguage === 'off') {\n this.setState({\n showClosedCaptions: false\n });\n }\n }\n\n private _onPlayerMenuItemBlur(): void {\n this._setCCSettings({\n category: MenuCategories.ClosedCaptionSettings,\n id: '',\n data: 'current'\n });\n }\n\n private _onPlayerMenuItemClick(notification: IPlayerMenuItemClickNotification): void {\n switch (notification.category) {\n case MenuCategories.ClosedCaption: {\n this._setCC(notification.id);\n break;\n }\n\n case MenuCategories.ClosedCaptionSettings: {\n this._setCCSettings(notification);\n break;\n }\n\n case MenuCategories.AudioTracks: {\n this._setAudioTracks(notification);\n break;\n }\n default:\n }\n }\n\n /**\n * Sets the close captioning language/locale.\n * @param ccLanguageId - The desired new cc value.\n */\n private _setCC(ccLanguageId: string): void {\n ccLanguageId = this.playerHelper.removeIdPrefix(ccLanguageId);\n let selectedOption: ICCFile | null = null;\n\n if (ccLanguageId && this.playerMetaData.ccFiles) {\n for (const ccFile of this.playerMetaData.ccFiles) {\n if (ccFile.locale === ccLanguageId && (!ccFile.ccType || ccFile.ccType === ClosedCaptionTypes.TTML)) {\n selectedOption = ccFile;\n break;\n }\n }\n }\n\n if (ccLanguageId === 'off') {\n this.setState({\n closedCaptionLanguage: 'off',\n closedCaptionsURL: '',\n showClosedCaptions: false\n });\n } else {\n this.setState({\n closedCaptionLanguage: selectedOption!.locale,\n closedCaptionsURL: selectedOption!.url,\n showClosedCaptions: true\n });\n }\n }\n\n /**\n * Sets the close caption settings.\n * @param notification - The desired new cc value.\n * @param updatePreferences - Update Preferences.\n */\n private _setCCSettings(notification: IPlayerMenuItemClickNotification, updatePreferences?: boolean): void {\n if (notification.data === 'reset') {\n this.setState(\n {\n currentClosedCaptionsSettings: closedCaptionsSettingDefaults\n },\n () => {\n if (this.ClosedCaptions.current !== null) {\n this.ClosedCaptions.current.applySettings();\n this.ClosedCaptions.current.resetCaptions();\n this.ClosedCaptions.current.updateCaptions(this.state.playPosition.currentTime);\n }\n }\n );\n } else if (notification.data === 'current') {\n this.setState({\n tempClosedCaptionsSettings: undefined\n });\n\n if (this.state.closedCaptionLanguage === 'off') {\n this.setState({\n showClosedCaptions: false\n });\n }\n } else {\n const dataSplit = notification.data!.split(':');\n if (!dataSplit) {\n return;\n }\n const settingKey = dataSplit[0];\n const optionKey = dataSplit[1];\n const currentSetting = this.closedCaptionHelper!.getUpdatedClosedCaptionSetting(\n this.state.currentClosedCaptionsSettings,\n settingKey,\n optionKey\n );\n if (updatePreferences === undefined || updatePreferences) {\n this.setState(\n {\n tempClosedCaptionsSettings: undefined,\n currentClosedCaptionsSettings: currentSetting\n },\n () => {\n if (this.ClosedCaptions.current) {\n this.ClosedCaptions.current.applySettings();\n this.ClosedCaptions.current.resetCaptions();\n this.ClosedCaptions.current.updateCaptions(this.state.playPosition.currentTime);\n }\n }\n );\n } else {\n this.setState({\n tempClosedCaptionsSettings: currentSetting\n });\n }\n }\n }\n\n private _setAudioTracks(notification: IPlayerMenuItemClickNotification): void {\n const data = JSON.parse(notification.data!);\n if (data.lang === 'default') {\n this.setState(\n {\n currentAudioTrack: 'default',\n currentAudioTrackURL: ''\n },\n () => {\n this.player.current!.volume = this.state.currentVolume / 100;\n }\n );\n } else {\n this.setState(\n {\n currentAudioTrack: data.lang,\n currentAudioTrackURL: data.url\n },\n () => {\n this.audio.current!.currentTime = this.player.current!.currentTime;\n this.audio.current!.volume = this.state.currentVolume / 100;\n this.player.current!.volume = 0;\n if (!this.player.current!.paused) {\n this.audio.current!.load();\n for (const mediaEvent of MediaEvents) {\n this.audio.current!.addEventListener(mediaEvent, this._triggerAudioEvents);\n }\n }\n }\n );\n }\n }\n\n private _triggerAudioEvents(event: Event): void {\n switch (event.type.toLowerCase()) {\n case 'error':\n this._onAudioError();\n break;\n case 'waiting':\n if (this.playerState === 'playing') {\n this.isPlayerManuallyPaused = true;\n this.pause();\n }\n break;\n\n case 'loadeddata':\n if (this.isPlayerManuallyPaused) {\n this.isPlayerManuallyPaused = false;\n this.play();\n }\n if (!this.player.current!.paused) {\n this.play();\n }\n break;\n\n default:\n }\n }\n\n private _triggerEvents(event: Event): void {\n switch (event.type.toLowerCase()) {\n case 'canplay':\n case 'canplaythrough':\n break;\n\n case 'error':\n this._onVideoError();\n break;\n\n case 'play':\n break;\n\n case 'pause':\n this._updateState('paused');\n if (this.props.playerData.options.playPauseTrigger) {\n this.setState({\n mouseHovered: true\n });\n }\n break;\n\n case 'seeking':\n if (this.playerState !== 'ended' && this.player.current!.seeking) {\n this.seekFrom = this.player.current!.currentTime;\n this._updateState('seeking');\n }\n break;\n\n case 'seeked':\n const currentPlayer = this.player.current;\n const currentTime = currentPlayer!.currentTime;\n if (this.playerState !== 'ended' && this.player.current!.seeking && this.seekFrom !== currentTime) {\n this.seekFrom = null;\n }\n this._updateState(currentPlayer!.paused ? 'paused' : 'playing');\n break;\n\n case 'waiting':\n this._updateState('buffering');\n break;\n\n case 'loadedmetadata':\n break;\n\n case 'loadeddata':\n this._onVideoLoadedData();\n if (!this._shouldAutoPlay) {\n this._showControlBar(false);\n }\n break;\n\n case 'timeupdate':\n this._onTimeUpdate();\n break;\n\n case 'ended':\n this._updateState('ended');\n this._stop();\n break;\n\n case 'playing':\n this._updateState('playing');\n break;\n\n case 'volumechange':\n break;\n\n default:\n }\n }\n\n private _onAudioError(): void {\n this.pause();\n const errorMessage: IVideoErrorMessageData = { title: 'Error while playing audio Track. Switching back to default track' };\n this._displayErrorMessage(errorMessage);\n this._setAudioTracks({ category: 'audioTracks', data: '{ \"lang\": \"default\", \"url\": \"\"}', id: '' });\n setTimeout(() => {\n this.setState(\n {\n showErrorMessage: false\n },\n () => {\n this.play();\n }\n );\n }, 2000);\n }\n\n private _onVideoError(): void {\n this._updateState('error');\n const error: IVideoErrorData | null = this._getError();\n let errorMessage = '';\n if (error?.errorCode) {\n switch (error.errorCode) {\n case VideoErrorCodes.MediaErrorAborted:\n errorMessage = 'video playback was aborted';\n break;\n case VideoErrorCodes.MediaErrorNetwork:\n errorMessage = 'video failed to download';\n break;\n case VideoErrorCodes.MediaErrorDecode:\n errorMessage = 'video is not readable';\n break;\n case VideoErrorCodes.MediaErrorSourceNotSupported:\n errorMessage = 'video format is not supported';\n break;\n default:\n errorMessage = 'unknown error occurred';\n }\n\n this._stopMedia(errorMessage);\n } else {\n this._stopMedia();\n }\n }\n\n private _stopMedia(msgToDisplay?: string): void {\n if (msgToDisplay) {\n this._displayErrorMessage({ title: msgToDisplay });\n this._updateState('stopped');\n }\n }\n\n /**\n * Create an error message overlay.\n * @param errorMessage - Error message content.\n */\n private _displayErrorMessage(errorMessage: IVideoErrorMessageData): void {\n this.setState({ videoErrorMessage: { title: errorMessage.title, message: errorMessage.message } });\n this.setState({ showErrorMessage: true });\n }\n\n /**\n * Gets the video error code of the current error.\n * @returns : Returns the video error code.\n */\n private _getError(): IVideoErrorData | null {\n let contentErrorCode: VideoErrorCodes;\n if (this.player.current!.error) {\n // Video playback failed - show a message saying why\n switch (this.player.current!.error.code) {\n case this.player.current!.error.MEDIA_ERR_ABORTED:\n contentErrorCode = VideoErrorCodes.MediaErrorAborted;\n break;\n case this.player.current!.error.MEDIA_ERR_NETWORK:\n contentErrorCode = VideoErrorCodes.MediaErrorNetwork;\n break;\n case this.player.current!.error.MEDIA_ERR_DECODE:\n contentErrorCode = VideoErrorCodes.MediaErrorDecode;\n break;\n case this.player.current!.error.MEDIA_ERR_SRC_NOT_SUPPORTED:\n contentErrorCode = VideoErrorCodes.MediaErrorSourceNotSupported;\n break;\n default:\n contentErrorCode = VideoErrorCodes.MediaErrorUnknown;\n }\n return { errorCode: contentErrorCode };\n }\n return null;\n }\n\n private _handleControlsKeyDownEvent(e: React.KeyboardEvent): void {\n const keyBrdEvent = (e as unknown) as KeyboardEvent;\n const keycode = keyBrdEvent.keyCode;\n this._showControlBar(true);\n\n // Const castTarget = e.target as HTMLElement;\n\n switch (keycode) {\n case KeyCodes.Home:\n e.stopPropagation();\n e.preventDefault();\n this.player.current!.currentTime = 0;\n if (this.audio.current) {\n this.audio.current.currentTime = 0;\n }\n break;\n case KeyCodes.End:\n e.stopPropagation();\n e.preventDefault();\n this.player.current!.currentTime = this.state.playPosition.endTime;\n if (this.audio.current) {\n this.audio.current.currentTime = this.state.playPosition.endTime;\n }\n break;\n case KeyCodes.ArrowLeft:\n case KeyCodes.ArrowRight:\n e.stopPropagation();\n e.preventDefault();\n let jumpToTime =\n keycode === KeyCodes.ArrowLeft\n ? this.state.playPosition.currentTime - PlayerConstants.defaultVideoSliderSteps\n : this.state.playPosition.currentTime + PlayerConstants.defaultVideoSliderSteps;\n jumpToTime = Math.min(Math.max(this.state.playPosition.startTime, jumpToTime), this.state.playPosition.endTime);\n this.player.current!.currentTime = jumpToTime;\n if (this.audio.current) {\n this.audio.current.currentTime = jumpToTime;\n }\n break;\n case KeyCodes.ArrowUp:\n case KeyCodes.ArrowDown:\n e.stopPropagation();\n e.preventDefault();\n this.videoControl.current!.showVolumeControl(true).call(this);\n const volume =\n keycode === KeyCodes.ArrowDown\n ? Math.max((this.state.currentVolume - PlayerConstants.defaultVolumeSliderSteps) / 100, 0)\n : Math.min((this.state.currentVolume + PlayerConstants.defaultVolumeSliderSteps) / 100, 1);\n this.setState({ currentVolume: Math.round(volume * 100) });\n if (this.audio.current) {\n this.audio.current.volume = volume;\n } else {\n this.player.current!.volume = volume;\n }\n if (volume === 0) {\n this.setState({ isMuted: true });\n } else {\n this.setState({ isMuted: false });\n }\n break;\n default:\n }\n }\n\n private _onPlay(): void {\n this.setState({ playing: true });\n }\n\n private _onPause(): void {\n this.setState({ playing: false });\n }\n\n private _onVolumeChange(notification: ISliderChangeNotification): void {\n this.setState({ currentVolume: notification.firstThumbValue });\n if (this.audio.current) {\n this.audio.current.volume = notification.firstThumbValue / 100;\n } else {\n this.player.current!.volume = notification.firstThumbValue / 100;\n }\n\n if (notification.firstThumbValue === 0) {\n this.setState({ isMuted: true });\n } else if (this.state.isMuted && notification.firstThumbValue > 0) {\n this.setState({ isMuted: false });\n }\n }\n\n private _setMuted(): void {\n if (this.state.isMuted) {\n const newVolume = this.state.previousVolume === 0 ? PlayerConstants.defaultVolume * 100 : this.state.previousVolume;\n\n if (this.audio.current) {\n this.audio.current.volume = newVolume / 100;\n } else {\n this.player.current!.volume = newVolume / 100;\n }\n this.setState({ isMuted: false, currentVolume: newVolume });\n this._updateScreenReaderElement(this.localizationHelper.getLocalizedValue('unMuteAriaLabel'));\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.unMuteAriaLabel).call(this);\n } else {\n this.setState({ isMuted: true, previousVolume: this.player.current!.volume * 100, currentVolume: 0 });\n this._updateScreenReaderElement(this.localizationHelper.getLocalizedValue('muteAriaLabel'));\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.muteAriaLabel).call(this);\n }\n }\n\n private _onPlayerKeyDown(e: React.KeyboardEvent): void {\n const keyBrdEvent = (e as unknown) as KeyboardEvent;\n const keycode = keyBrdEvent.keyCode;\n\n if (keycode === KeyCodes.Tab) {\n this._showControlsBasedOnState();\n }\n }\n\n private _onMouseEvent(event: React.MouseEvent): void {\n if (this.props.playerData.options.controls) {\n this._showControlBar();\n }\n if (!this.state.isTriggerEnabled && this.state.playing) {\n this.setState({ mouseHovered: event.type === 'mouseenter' });\n }\n }\n\n private _showControlBar(autoHide: boolean = true): void {\n if (!this.state.isTriggerEnabled && !this.state.isAgegateEnabled) {\n if (!this.state.isControlPanelVisible) {\n this.setState({ isControlPanelVisible: true });\n }\n if (this.controlPanelTimer) {\n window && window.clearTimeout(this.controlPanelTimer);\n this.controlPanelTimer = 0;\n }\n if (autoHide) {\n this.controlPanelTimer =\n window &&\n window.setTimeout(() => {\n this._hideControlBar();\n }, PlayerConstants.defaultControlPanelTimeout);\n }\n }\n }\n\n private _hideControlBar(): void {\n window && window.clearTimeout(this.controlPanelTimer);\n this.controlPanelTimer = 0;\n this.setState({ isControlPanelVisible: false });\n }\n\n private _onFullScreenChanged(): void {\n this.state.isInFullScreen ? this._onFullscreenExit() : this._onFullscreenEnter();\n }\n\n /**\n * Event handler for fullscreen enter.\n */\n private _onFullscreenEnter(): void {\n this.setState({\n isInFullScreen: true\n });\n }\n\n /**\n * Event handler for fullscreen exit.\n */\n private _onFullscreenExit(): void {\n this.setState({\n isInFullScreen: false\n });\n }\n\n private _toggleFullScreen(): void {\n this.state.isInFullScreen ? this._exitFullScreen() : this._enterFullScreen();\n }\n\n private _onFullscreenError(): void {\n this.setState({\n isInFullScreen: false\n });\n }\n\n private _enterFullScreen(): void {\n if (!Player._isNativeFullscreenEnabled()) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const fullscreenElement = this.playerContainer.current! as any;\n const elementInFullScreen = Player._getElementInFullScreen();\n\n // We go to fullscreen only when there is no other element in fullscreen and browser supports fullscreen\n if (fullscreenElement && !elementInFullScreen) {\n const enterFullScreen =\n fullscreenElement.requestFullscreen ||\n fullscreenElement.msRequestFullscreen ||\n fullscreenElement.mozRequestFullScreen ||\n fullscreenElement.webkitRequestFullscreen ||\n fullscreenElement.webkitEnterFullScreen;\n\n enterFullScreen.call(fullscreenElement);\n this._updateScreenReaderElement(this.localizationHelper.getLocalizedValue('fullScreenLabel'));\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.fullScreenAriaLabel).call(this);\n }\n }\n\n private _exitFullScreen(): void {\n if (!Player._isNativeFullscreenEnabled()) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const fullscreenElement = this.playerContainer.current! as any;\n const elementInFullScreen = Player._getElementInFullScreen();\n\n // We only call cancel if we are in fullscreen. If another element went fullscreen that took the player with it then\n // we shouldn't call cancel fullscreen\n if (fullscreenElement && fullscreenElement === elementInFullScreen) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const doc = document as any;\n const cancelFullScreen = doc.cancelFullScreen || doc.msExitFullscreen || doc.mozCancelFullScreen || doc.webkitCancelFullScreen;\n\n cancelFullScreen.call(doc);\n this._updateScreenReaderElement(this.localizationHelper.getLocalizedValue('exitFullScreenLabel'));\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.exitFullScreenAriaLabel).call(this);\n }\n }\n\n private _onVideoLoadedData(): void {\n this._updateState('ready');\n if (this.props.playerData.options.controls) {\n const position = this._getPlayPosition();\n this.setState({ playPosition: position });\n }\n }\n\n private _onTimeUpdate(): void {\n if (this.props.playerData.options.controls) {\n const position = this._getPlayPosition();\n\n // EndTime changes after playing video for certain time. Keeping this constant.\n position.endTime = this.state.playPosition.endTime;\n this.setState({ playPosition: position });\n if (this.state.playing) {\n if (this.playerState === 'buffering') {\n this._updateState('playing');\n }\n }\n }\n }\n\n private _getBufferedDuration(): number {\n let buffered = 0;\n if (this.player.current!.buffered && this.player.current!.buffered.length) {\n buffered = this.player.current!.buffered.end(this.player.current!.buffered.length - 1);\n }\n return buffered;\n }\n\n private _getPlayPosition(): IPlayPosition {\n const bufferedDuration = this._getBufferedDuration();\n return {\n currentTime: this.player.current!.currentTime,\n startTime: 0,\n endTime: this.player.current!.duration,\n bufferedDuration\n };\n }\n\n private _onProgressChange(notification: ISliderChangeNotification): void {\n let time = notification.firstThumbValue;\n const position = this._getPlayPosition();\n time = Math.max(position.startTime, Math.min(time, position.endTime));\n\n if (Math.abs(time - position.currentTime) >= PlayerConstants.defaultPositionUpdateThreshold) {\n this.player.current!.currentTime = time;\n if (this.audio.current) {\n this.audio.current.currentTime = time;\n }\n }\n }\n\n private _onTriggerClicked(): void {\n const currentPlayer = this.player.current;\n if (!this.isPlayerLoaded) {\n this._loadPlayer();\n this.player.current!.autoplay = true;\n } else if (currentPlayer!.paused) {\n this.play();\n this._updateScreenReaderElement(this.localizationHelper.getLocalizedValue('playingAriaLabel'));\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.playAriaLabel).call(this);\n if (this.videoControl.current) {\n this.videoControl.current.setFocusOnPause();\n }\n } else {\n this.pause();\n this._updateScreenReaderElement(this.localizationHelper.getLocalizedValue('pausedAriaLabel'));\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.pauseAriaLabel).call(this);\n if (this.videoControl.current) {\n this.videoControl.current.setFocusOnPlay();\n }\n }\n\n if (this.state.isTriggerEnabled) {\n this.setState({ isTriggerEnabled: false }, () => {\n setTimeout(() => {\n if (this.videoControl.current) {\n this.videoControl.current.setFocusOnPause();\n }\n }, 500);\n });\n onTelemetryClick(this.props.telemetryContent!, this.payLoad, LocalizationConstants.pauseAriaLabel).call(this);\n if (this.props.playerData.options.playFullScreen) {\n this._enterFullScreen();\n }\n }\n }\n\n private _stop(): void {\n const videoStartingTime: number = 0.1;\n if (isSafari()) {\n // Safari browser has issues with showing the poster frame of the video when ended. So setting the same to 0.1 seconds.\n this._seek(videoStartingTime);\n } else {\n this._seek(0);\n }\n\n if (this.props.playerData.options.controls) {\n this.pause();\n const playPosition = this._getPlayPosition();\n playPosition.endTime = this.state.playPosition.endTime;\n this.setState({ playPosition });\n if (this.audio.current) {\n this.audio.current.pause();\n }\n }\n }\n\n private _seek(time: number): void {\n const position = this._getPlayPosition();\n time = Math.max(position.startTime, Math.min(time, position.endTime));\n\n if (Math.abs(time - position.currentTime) >= PlayerConstants.defaultPositionUpdateThreshold) {\n this.seekFrom = position.currentTime;\n this.player.current!.currentTime = time;\n if (this.audio.current) {\n this.audio.current.currentTime = time;\n }\n }\n }\n\n /**\n * Returns the mask level style.\n * @returns Returns the mask level style.\n */\n private _getMaskLevelStyle(): string {\n let result: string = '';\n if (this.state.isTriggerEnabled) {\n const maskLevel = this.props.playerData.options.maskLevel || PlayerConstants.defaultMaskLevel;\n result = format('rgba(0,0,0,{0})', Number(maskLevel) / 100);\n }\n return result;\n }\n\n /**\n * Updates the current player state.\n * @param newState - Player state.\n */\n private _updateState(newState: PlayerStates): void {\n if (!newState || newState === this.playerState) {\n return;\n }\n\n this.playerState = newState;\n\n this._showControlsBasedOnState();\n this._showSpinnerBasedOnState();\n }\n\n /**\n * Shows or hides the spinner based on player state.\n */\n private _showSpinnerBasedOnState(): void {\n switch (this.playerState) {\n case 'ready':\n case 'playing':\n case 'paused':\n case 'ended':\n case 'stopped':\n case 'error':\n this._hideSpinner();\n break;\n default:\n this._showSpinner();\n }\n }\n\n /**\n * Shows or hides the player controls based on player state.\n */\n private _showControlsBasedOnState(): void {\n switch (this.playerState) {\n case 'error':\n case 'loading':\n case 'init':\n this._hideControlBar();\n break;\n case 'ended':\n this._showControlBar(false);\n break;\n case 'ready':\n case 'paused':\n case 'stopped':\n this._showControlBar(false);\n break;\n default:\n this._showControlBar(true);\n }\n }\n\n private _hideSpinner(): void {\n this.setState({ showSpinner: false });\n }\n\n private _showSpinner(): void {\n this.setState({ showSpinner: true });\n }\n\n /**\n * Play Trigger focus event.\n */\n private _onTriggerFocus(): void {\n this.setState({ mouseHovered: true });\n }\n\n /**\n * Play Trigger Blur event.\n */\n private _onTriggerBlur(): void {\n if (!this.state.isTriggerEnabled && this.state.playing) {\n this.setState({ mouseHovered: false });\n }\n }\n\n /**\n * Updates the screen reader element.\n * @param text - Update the screen reader element with the pased text.\n */\n private _updateScreenReaderElement(text: string): void {\n this.setState({\n screenReaderText: text\n });\n }\n\n /**\n * Avoid opening context menu on righ click.\n * @param e - Mouse Event.\n */\n private _onContextMenuClicked(e: React.MouseEvent): void {\n e.preventDefault();\n }\n\n /**\n * Check for mobile devices.\n * @returns - Return true or false.\n */\n private _isMobile(): boolean {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n const userAgent = window.navigator.userAgent;\n const isIphone = !!userAgent.match(/iphone/i);\n const isSilk = !!userAgent.match(/silk/i);\n const isWindowsPhone = !!userAgent.match(/windows phone/i);\n const isAndroid = !isWindowsPhone && (isSilk || !!userAgent.match(/android/i));\n return isIphone || isWindowsPhone || isAndroid;\n }\n return false;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, {\n getCatalogId,\n IComponent,\n IComponentProps,\n IGridSettings,\n IImageSettings,\n msdyn365Commerce,\n TelemetryEvent\n} from '@msdyn365-commerce/core';\nimport { getCartState, ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport {\n CartLineValidationResults,\n CartsDataActions,\n format,\n ProductAvailableQuantity,\n ProductDimension,\n ProductPrice,\n ProductsDataActions,\n ProductSearchCriteria,\n ProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions, generateProductImageUrl, ObjectExtensions, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, IPopupProps, ITelemetryContent, Popup } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { PriceComponent } from '../price';\nimport { IItemsAddedToCartResources } from './items-added-to-cart';\nimport { ItemsAddedToCartDialogComponent } from './items-added-to-cart-dialog-component';\nimport { ItemSuccessfullyAddedToCartNotification } from './notifications/item-successfully-added-to-cart-notification';\nimport { MultiItemsSuccessfullyAddedToCartNotification } from './notifications/multi-items-successfully-added-to-cart-notification';\nimport { OrderDetailsProduct } from './product-model';\n\n/**\n * Interface for add to cart resources.\n */\nexport interface IAddToCartResources {\n goToCartText: string;\n continueShoppingText: string;\n closeNotificationLabel: string;\n headerItemOneText: string;\n headerItemFormatText: string;\n headerLinesFormatText?: string;\n headerMessageText: string;\n freePriceText: string;\n originalPriceText: string;\n currentPriceText: string;\n addedQuantityText: string;\n buyAgainNotificationTitle?: string;\n buyAgainNotificationCloseAriaLabel?: string;\n validationErrorMessage?: string;\n oneErrorText?: string;\n multiErrorsText?: string;\n}\n\n/**\n * Interface for add to cart components props.\n */\nexport interface IAddToCartComponentProps extends IComponentProps<{ product: SimpleProduct; price?: ProductPrice } | undefined> {\n className?: string;\n addToCartText: string;\n outOfStockText?: string;\n disabled?: boolean;\n quantity?: number;\n navigationUrl?: string;\n productAvailability?: ProductAvailableQuantity;\n getSelectedProduct?: Promise;\n isNavigationToCartPageDisabled?: boolean;\n shouldSkipSiteSettings?: boolean;\n addToCartArialLabel?: string;\n products?: {\n productId: number;\n quantity: number;\n catalogId?: number;\n }[];\n orderDetailsProducts?: OrderDetailsProduct[];\n hasAvailableProducts?: boolean;\n imageSettings?: IImageSettings;\n gridSettings?: IGridSettings;\n\n isLoading?: boolean;\n isUpdatingDimension?: boolean;\n isLoadingDeliveryOptions?: boolean;\n isUpdatingDeliveryOptions?: boolean;\n isAddServiceItemToCart?: boolean;\n isAddEmailDeliveryItemToCart?: boolean;\n isPriceKeyedIn?: boolean;\n customPriceAmount?: number;\n isOrderQuantityLimitsFeatureEnabled?: boolean;\n\n dialogStrings?: IAddToCartResources;\n\n telemetryContent?: ITelemetryContent;\n\n catalogId?: number;\n\n isCustomPriceSelected?: boolean;\n maximumKeyInPrice?: number;\n minimumKeyInPrice?: number;\n defaultMaximumKeyInPrice?: number;\n defaultMinimumKeyInPrice?: number;\n isProductQuantityLoading?: boolean;\n\n onAdd?(result: ICartActionResult): void;\n onError?(result: IAddToCartFailureResult): void;\n changeUpdatingDimension?(isUpdatingDimension: boolean): void;\n changeUpdatingDeliveryOptions?(isUpdatingDeliveryOptions: boolean): void;\n}\n\n/**\n * Cart action Failure reason type.\n */\nexport declare type ICartActionFailureReason =\n | 'EMPTYINPUT'\n | 'MISSINGDIMENSION'\n | 'OUTOFSTOCK'\n | 'CARTACTIONFAILED'\n | 'INVALIDCUSTOMAMOUNT';\n\n/**\n * Interface for add to cart failure result.\n */\nexport interface IAddToCartFailureResult {\n failureReason: ICartActionFailureReason;\n\n stockLeft?: number;\n cartActionResult?: ICartActionResult;\n missingDimensions?: ProductDimension[];\n}\n\n/**\n * This setting defines the experience when a product is added to cart. Corresponds to the configuration in Fabrikam.\n */\nexport enum AddToCartBehavior {\n /**\n * Navigate to cart page.\n */\n goToCart = 'goToCart',\n\n /**\n * Show item added to cart popup.\n */\n showModal = 'showModal',\n\n /**\n * Show mini cart popup.\n */\n showMiniCart = 'showMiniCart',\n\n /**\n * Show item added to cart notification.\n */\n showNotification = 'showNotification',\n\n /**\n * Do nothing and stay on the page.\n */\n nothing = 'nothing'\n}\n\nconst zero = 0;\nconst defaultQuantity = 1;\n\n/**\n * The propagate result.\n * @param props -- The add to cart component props.\n * @param result -- The cart action result.\n */\nconst propagateResult = (props: IAddToCartComponentProps, result: ICartActionResult): void => {\n if (props.onAdd) {\n props.onAdd(result);\n }\n};\n\n/**\n * The propagate error.\n * @param props -- The add to cart component props.\n * @param result -- The add to cart failure result.\n */\nconst propagateError = (props: IAddToCartComponentProps, result: IAddToCartFailureResult): void => {\n if (props.onError) {\n props.onError(result);\n }\n};\n\n/**\n * Retrieves add to cart input from the component props.\n * @param props - Add to cart component props.\n * @returns Add to cart input.\n */\nconst getAddToCartInputFromProps = async (props: IAddToCartComponentProps) => {\n const products = props.orderDetailsProducts?.filter(product => !ObjectExtensions.isNullOrUndefined(product.simpleProduct));\n const emailDeliveryModeCode = props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n const input = products?.map(product => {\n const deliveryOption = product.salesLine.DeliveryMode;\n return {\n product: product.simpleProduct!,\n count: ObjectExtensions.isNullOrUndefined(product.salesLine.Quantity) ? defaultQuantity : product.salesLine.Quantity,\n catalogId: product.salesLine.CatalogId,\n isAddEmailDeliveryItemToCart: deliveryOption && deliveryOption === emailDeliveryModeCode\n };\n });\n\n if (ArrayExtensions.hasElements(input)) {\n return input;\n }\n\n if (ArrayExtensions.hasElements(props.products)) {\n const actionContext = props.context.actionContext;\n const apiSettings = actionContext.requestContext.apiSettings;\n\n const catalogId = props.catalogId ?? getCatalogId(props.context.actionContext.requestContext);\n validateCatalogId(catalogId);\n\n const searchCriteriaInput: ProductSearchCriteria = {\n Context: {\n ChannelId: apiSettings.channelId,\n CatalogId: catalogId\n },\n IncludeAttributes: false,\n Ids: props.products.map(product => product.productId)\n };\n\n const searchResult = await ProductsDataActions.searchByCriteriaAsync({ callerContext: actionContext }, searchCriteriaInput);\n const productSearchResultsWithImages = searchResult.map(productSearchResult => {\n const newProductSearchResult = { ...productSearchResult };\n const newImageUrl = generateProductImageUrl(newProductSearchResult, apiSettings);\n\n if (newImageUrl) {\n newProductSearchResult.PrimaryImageUrl = newImageUrl;\n }\n\n return newProductSearchResult;\n });\n\n return props.products.map(item => {\n const productData = productSearchResultsWithImages.find(product => product.RecordId === item.productId);\n let simpleProduct: SimpleProduct;\n if (productData) {\n simpleProduct = {\n ...productData,\n ProductTypeValue: ProductType.Variant,\n AdjustedPrice: productData.Price,\n BasePrice: productData.BasePrice ?? productData.Price\n };\n } else {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Cast to simple product since only record id is available.\n simpleProduct = {\n RecordId: item.productId\n } as SimpleProduct;\n }\n\n return {\n product: simpleProduct,\n count: item.quantity,\n catalogId: item.catalogId\n };\n });\n }\n\n if (props.data?.product) {\n return [\n {\n product: props.data.product,\n count: props.quantity ?? defaultQuantity,\n catalogId: props.catalogId\n }\n ];\n }\n\n return [];\n};\n\n/**\n * Add one item to cart when it is not buy again.\n * @param props -- The props.\n * @param setDisabled -- The set disable call back.\n * @param openModal -- The open modal call back.\n */\nconst addOneItemToCart = async (\n props: IAddToCartComponentProps,\n setDisabled: (disabled: boolean) => void,\n openModal: (opened: boolean) => void\n): Promise => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- read config file.\n const addToCartBehavior = props.context.app.config.addToCartBehavior;\n const data = props.data;\n\n const addToCartInput = await getAddToCartInputFromProps(props);\n const product = addToCartInput[0].product;\n const quantity = addToCartInput[0].count;\n\n const cartState = await getCartState(props.context.actionContext);\n const addToCartResult = await cartState.addProductToCart({\n product,\n count: quantity,\n availableQuantity: props.productAvailability?.AvailableQuantity,\n additionalProperties: { validateQuantity: props.isOrderQuantityLimitsFeatureEnabled },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- read config file.\n enableStockCheck: props.context.app.config.enableStockCheck,\n isPriceKeyedIn: props.isPriceKeyedIn,\n customPrice: props.isPriceKeyedIn ? props.customPriceAmount : undefined,\n isAddEmailDeliveryItemToCart: props.isAddEmailDeliveryItemToCart,\n shouldSkipSiteSettings: props.shouldSkipSiteSettings,\n catalogId: addToCartInput[0].catalogId\n });\n\n if (addToCartResult.status === 'SUCCESS') {\n if (props.dialogStrings && addToCartBehavior === AddToCartBehavior.showModal) {\n setDisabled(false);\n openModal(true);\n } else if (props.dialogStrings && addToCartBehavior === AddToCartBehavior.showNotification) {\n setDisabled(false);\n const notification = new ItemSuccessfullyAddedToCartNotification(\n props.context,\n props.dialogStrings,\n props.imageSettings,\n props.gridSettings,\n product,\n data?.price,\n quantity,\n props.navigationUrl,\n props.telemetryContent!,\n props.id,\n props.typeName\n );\n NotificationsManager.instance().addNotification(notification);\n } else if (\n MsDyn365.isBrowser &&\n props.navigationUrl &&\n !props.isNavigationToCartPageDisabled &&\n (addToCartBehavior === undefined || addToCartBehavior === AddToCartBehavior.goToCart)\n ) {\n window.location.assign(props.navigationUrl);\n } else {\n setDisabled(false);\n }\n propagateResult(props, addToCartResult);\n } else {\n NotificationsManager.instance().addNotification(\n new ErrorNotification(\n addToCartResult.errorDetails?.LocalizedMessage ?? 'Add to cart failed',\n props.dialogStrings?.closeNotificationLabel ?? ''\n )\n );\n\n propagateError(props, { failureReason: 'CARTACTIONFAILED', cartActionResult: addToCartResult });\n setDisabled(false);\n }\n};\n\n/**\n * Callback to handle success of adding to cart.\n * @param props - Add to cart component props.\n * @param setDisabled - Callback to update disabled state of the component.\n * @param setItemsAddedToCartDialogOpen - Callback to update disabled state of the component.\n * @param setErrorMessage - Callback to update error message state of the component.\n * @param cartState - Current cart state.\n * @param addToCartInput - Input used for adding to cart.\n * @param addToCartResult - Result of adding to cart.\n */\nconst handleAddItemsToCartSuccess = async (\n props: IAddToCartComponentProps,\n setDisabled: (disabled: boolean) => void,\n setItemsAddedToCartDialogOpen: (opened: boolean) => void,\n setErrorMessage: (message: string) => void,\n cartState: ICartState,\n addToCartInput: {\n product: SimpleProduct;\n count: number;\n }[],\n addToCartResult: ICartActionResult\n) => {\n // Validate cart for line errors.\n const validationResult: CartLineValidationResults = await CartsDataActions.validateForCheckoutAsync(\n { callerContext: props.context.actionContext, bypassCache: 'none' },\n cartState.cart.Id,\n cartState.cart.Version\n );\n const errorCount = (validationResult.ValidationFailuresByCartLines ?? []).length;\n const singleErrorCount = 1;\n const errorText = errorCount === singleErrorCount ? props.dialogStrings?.oneErrorText : props.dialogStrings?.multiErrorsText;\n const errorMessage =\n errorCount > zero ? format(props.dialogStrings?.validationErrorMessage ?? '', errorCount.toString(), errorText) : '';\n\n setErrorMessage(errorMessage);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- read config file.\n const addToCartBehavior = props.context.app.config.addToCartBehavior;\n\n if (props.dialogStrings && addToCartBehavior === AddToCartBehavior.showModal) {\n setDisabled(false);\n setItemsAddedToCartDialogOpen(true);\n } else if (props.dialogStrings && addToCartBehavior === AddToCartBehavior.showNotification) {\n setDisabled(false);\n const itemsAddedResource: IItemsAddedToCartResources = {\n viewCartButtonText: props.dialogStrings.goToCartText,\n closeButtonLabel: props.dialogStrings.closeNotificationLabel,\n itemsAddedToCartHeaderText: props.dialogStrings.headerMessageText,\n itemsAddedToCartFormatText: props.dialogStrings.headerItemFormatText,\n linesAddedToCartFormatText: props.dialogStrings.headerLinesFormatText ?? '{0}',\n itemsAddedValidationErrorMessage: errorMessage\n };\n\n const notification = new MultiItemsSuccessfullyAddedToCartNotification(\n props.context,\n itemsAddedResource,\n props.imageSettings,\n props.gridSettings,\n addToCartInput,\n props.navigationUrl,\n props.telemetryContent!,\n props.id,\n props.typeName\n );\n NotificationsManager.instance().addNotification(notification);\n } else if (\n MsDyn365.isBrowser &&\n props.navigationUrl &&\n !props.isNavigationToCartPageDisabled &&\n (addToCartBehavior === undefined || addToCartBehavior === AddToCartBehavior.goToCart)\n ) {\n window.location.assign(props.navigationUrl);\n } else {\n setDisabled(false);\n }\n propagateResult(props, addToCartResult);\n};\n\n/**\n * Add one or multi item to cart from buy again.\n * @param props -- The props.\n * @param setDisabled -- The set disable call back.\n * @param setItemsAddedToCartDialogOpen -- The open modal call back.\n * @param setErrorMessage -- The set error message call back.\n */\nconst addItemsToCart = async (\n props: IAddToCartComponentProps,\n setDisabled: (disabled: boolean) => void,\n setItemsAddedToCartDialogOpen: (opened: boolean) => void,\n setErrorMessage: (message: string) => void\n): Promise => {\n const addToCartInput = await getAddToCartInputFromProps(props);\n\n if (!ArrayExtensions.hasElements(addToCartInput)) {\n return;\n }\n\n const cartState = await getCartState(props.context.actionContext);\n const addToCartResult = await cartState.addProductsToCart(addToCartInput);\n\n if (addToCartResult.status === 'SUCCESS') {\n await handleAddItemsToCartSuccess(\n props,\n setDisabled,\n setItemsAddedToCartDialogOpen,\n setErrorMessage,\n cartState,\n addToCartInput,\n addToCartResult\n );\n } else {\n if (props.dialogStrings?.buyAgainNotificationTitle) {\n // For buy again show simple error notification.\n NotificationsManager.instance().addNotification(\n new ErrorNotification(\n props.dialogStrings.buyAgainNotificationTitle,\n props.dialogStrings.buyAgainNotificationCloseAriaLabel ?? ''\n )\n );\n } else {\n NotificationsManager.instance().addNotification(\n new ErrorNotification(\n addToCartResult.errorDetails?.LocalizedMessage ?? 'Add to cart failed',\n props.dialogStrings?.closeNotificationLabel ?? ''\n )\n );\n }\n\n propagateError(props, { failureReason: 'CARTACTIONFAILED', cartActionResult: addToCartResult });\n setDisabled(false);\n }\n};\n\n/**\n * Interface for add to cart component.\n */\nexport interface IAddtoCartComponent extends IComponent {\n onClick(): (event: React.MouseEvent, props: IAddToCartComponentProps) => void;\n}\n\n/**\n * On click function.\n * @param _event - The mouse event.\n * @param props - The props.\n * @param setDisabled - Flag to define whether the element is disabled.\n * @param openModal - Flag to specify if it should open in a modal window.\n * @param setItemsAddedToCartDialogOpen - Sets items added to cart while dialog is open.\n * @param setErrorMessage - Error message.\n */\nconst onClick = async (\n _event: React.MouseEvent,\n props: IAddToCartComponentProps,\n setDisabled: (disabled: boolean) => void,\n openModal: (opened: boolean) => void,\n setItemsAddedToCartDialogOpen: (opened: boolean) => void,\n setErrorMessage: (message: string) => void\n): Promise => {\n if (!ArrayExtensions.hasElements(props.products)) {\n const cartError = addToCartError(props);\n\n if (cartError) {\n propagateError(props, cartError);\n return;\n }\n\n setDisabled(true);\n }\n\n const hasOrderDetailsProducts =\n ArrayExtensions.hasElements(props.orderDetailsProducts) && props.orderDetailsProducts.length > defaultQuantity;\n const hasProducts = ArrayExtensions.hasElements(props.products) && props.products.length > defaultQuantity;\n\n const hasMultipleProducts = hasOrderDetailsProducts || hasProducts;\n\n if (props.shouldSkipSiteSettings && hasMultipleProducts) {\n await addItemsToCart(props, setDisabled, setItemsAddedToCartDialogOpen, setErrorMessage);\n } else {\n await addOneItemToCart(props, setDisabled, openModal);\n }\n};\n\n/**\n * Add to cart component action constant.\n */\nconst AddToCartComponentActions = {\n onClick\n};\n\n/**\n * Add to cart component.\n * @param props - The props.\n * @returns - The add to cart component.\n */\nexport const AddToCartFunctionalComponent: React.FC = (props: IAddToCartComponentProps) => {\n const [disabled, setDisabled] = useState(false);\n const [modalOpen, setModalOpen] = useState(false);\n const [isItemsAddedToCartDialogOpen, setItemsAddedToCartDialogOpen] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n const [addToCartInput, setAddToCartInput] = useState<\n {\n product: SimpleProduct;\n count: number;\n }[]\n >([]);\n\n const onClickHandler = async (event: React.MouseEvent) => {\n await AddToCartComponentActions.onClick(event, props, setDisabled, setModalOpen, setItemsAddedToCartDialogOpen, setErrorMessage);\n };\n\n /**\n * Close dialog.\n */\n const closeItemsAddedToCartDialog = React.useCallback(() => {\n setItemsAddedToCartDialogOpen(false);\n }, []);\n\n const priceComponent = props.data?.price ? (\n \n ) : (\n ''\n );\n\n const popupProps: IPopupProps = {\n context: props.context,\n className: 'msc-add-to-cart',\n id: props.id,\n typeName: props.typeName,\n data: { product: addToCartInput[0]?.product, price: props.data?.price }, // addToCartInput[0]?.product?.Price },\n dialogStrings: props.dialogStrings,\n imageSettings: props.imageSettings,\n gridSettings: props.context.request.gridSettings,\n productQuantity: addToCartInput[0]?.count !== undefined ? addToCartInput[0]?.count : defaultQuantity,\n priceComponent,\n navigationUrl: props.navigationUrl,\n modalOpen,\n setModalOpen,\n telemetryContent: props.telemetryContent\n };\n\n const itemsAddedResource: IItemsAddedToCartResources = {\n viewCartButtonText: props.dialogStrings?.goToCartText ?? '',\n closeButtonLabel: props.dialogStrings?.closeNotificationLabel ?? 'Close',\n itemsAddedToCartHeaderText: props.dialogStrings?.headerMessageText ?? '',\n itemsAddedToCartFormatText: props.dialogStrings?.headerItemFormatText ?? '',\n linesAddedToCartFormatText: props.dialogStrings?.headerLinesFormatText ?? '{0}',\n itemsAddedValidationErrorMessage: errorMessage\n };\n\n const renderModalPopup = ;\n const label = getLinkText(props);\n const payload = getPayloadObject(TelemetryEvent.AddToCart, props.telemetryContent!, label, '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\n const buttonClassName = props.shouldSkipSiteSettings ? '' : 'msc-add-to-cart ';\n\n React.useEffect(() => {\n /**\n * Retrieves add to cart input and updates the state.\n */\n const retrieveAddToCartInput = async () => {\n const retrievedInput = await getAddToCartInputFromProps(props);\n setAddToCartInput(retrievedInput);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call async method as per the documentation of react useEffect.\n retrieveAddToCartInput();\n }, [props, setAddToCartInput]);\n\n return (\n <>\n {renderModalPopup}\n \n {label}\n \n \n \n );\n};\n\n// Set default props\nAddToCartFunctionalComponent.defaultProps = {\n quantity: defaultQuantity\n};\n\n/**\n * Resolves whether product is in stock.\n * @param props - The add to cart component props.\n * @returns Gets the link text.\n */\nconst getLinkText = (props: IAddToCartComponentProps): string => {\n return shouldShowOutOfStock(props, false) && props.outOfStockText ? props.outOfStockText : props.addToCartText;\n};\n\n/**\n * Resolves whether product is in stock.\n * @param props - The add to cart component props.\n * @returns The add to cart failure result.\n */\nconst addToCartError = (props: IAddToCartComponentProps): IAddToCartFailureResult | undefined => {\n const {\n data,\n productAvailability,\n isCustomPriceSelected,\n customPriceAmount,\n maximumKeyInPrice,\n minimumKeyInPrice,\n defaultMaximumKeyInPrice = 100,\n defaultMinimumKeyInPrice = 10\n } = props;\n\n if (!data || !data.product.RecordId) {\n // No product exists, won't be able to add to cart\n return { failureReason: 'EMPTYINPUT' };\n }\n\n if (data.product.Dimensions) {\n const missingDimensions = data.product.Dimensions.filter(\n dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value)\n );\n\n if (ArrayExtensions.hasElements(missingDimensions)) {\n // At least one dimension with no value exists on the product, won't be able to add to cart\n return { failureReason: 'MISSINGDIMENSION', missingDimensions };\n }\n }\n\n if (shouldShowOutOfStock(props, true)) {\n const defaultAvailableQuantity = 0; // Showing as out of stock if no available products found.\n const availableQuantity = productAvailability?.AvailableQuantity ?? defaultAvailableQuantity;\n const stockLeft = Math.max(availableQuantity, defaultAvailableQuantity);\n\n return { failureReason: 'OUTOFSTOCK', stockLeft };\n }\n\n // When Custom price is selected, if there is no keyed-in price or keyed-in price is out of limit, should return error.\n if (\n isCustomPriceSelected &&\n (!customPriceAmount ||\n customPriceAmount > (maximumKeyInPrice || defaultMaximumKeyInPrice) ||\n customPriceAmount < (minimumKeyInPrice || defaultMinimumKeyInPrice))\n ) {\n return { failureReason: 'INVALIDCUSTOMAMOUNT' };\n }\n\n // Only allow adding to cart if not showing out of stock\n return undefined;\n};\n\n/**\n * Resolves whether product is in stock.\n * @param props - The add to cart component props.\n * @param includeCurrentQuantity - Flag to specify whether current quantity should be included.\n * @returns The dialog element.\n */\nconst shouldShowOutOfStock = (props: IAddToCartComponentProps, includeCurrentQuantity: boolean): boolean => {\n if (props.context.app.config.enableStockCheck === undefined || props.context.app.config.enableStockCheck === false) {\n return false;\n }\n\n // When skip site settings do not need show out of stock on adding to cart\n if (props.shouldSkipSiteSettings) {\n return false;\n }\n\n if (\n props.isLoading ||\n props.isProductQuantityLoading ||\n props.isUpdatingDimension ||\n props.isLoadingDeliveryOptions ||\n props.isUpdatingDeliveryOptions ||\n props.isAddServiceItemToCart\n ) {\n // Out of stock turn off, don't bother showing out of stock\n return false;\n }\n\n if (!props.data || !props.data.product.RecordId) {\n // No product exists, don't bother showing out of stock\n return false;\n }\n\n const hasAvailableProducts = props.hasAvailableProducts ?? true;\n if (!hasAvailableProducts) {\n return true;\n }\n\n if (props.data.product.Dimensions) {\n if (props.data.product.Dimensions.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\n // At least one dimension with no value exists on the product, so also don't show out of stock\n return false;\n }\n }\n\n const includedQuantityNumber = includeCurrentQuantity && props.quantity ? props.quantity : defaultQuantity;\n\n return !(\n props.productAvailability &&\n props.productAvailability.AvailableQuantity !== undefined &&\n props.productAvailability.AvailableQuantity >= includedQuantityNumber\n );\n};\n\nconst isIntermediateState = (props: IAddToCartComponentProps): boolean => {\n if (props.data?.product.Dimensions) {\n if (props.data.product.Dimensions.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\n // At least one dimension with no value exists on the product, so also not in intermediate state\n return false;\n }\n }\n\n if (!props.isLoading && !props.isUpdatingDimension && !props.isLoadingDeliveryOptions && !props.isUpdatingDeliveryOptions) {\n return false;\n }\n\n return true;\n};\n\n// @ts-expect-error\nexport const AddToCartComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'AddToCart',\n { component: AddToCartFunctionalComponent, ...AddToCartComponentActions }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Interface for multi items added to cart resource.\n */\nexport interface IItemsAddedToCartResources {\n viewCartButtonText: string;\n closeButtonLabel: string;\n itemsAddedToCartHeaderText: string;\n itemsAddedToCartFormatText: string;\n linesAddedToCartFormatText: string;\n itemsAddedValidationErrorMessage?: string;\n}\n\n/**\n * Interface for add to cart input.\n */\nexport interface IAddToCartInput {\n product: SimpleProduct;\n count?: number;\n}\n\n/**\n * The total number of items.\n * @param addedInput -- The added to cart input.\n * @returns The total number of items.\n */\nexport const getTotalItems = (addedInput: IAddToCartInput[]): number => {\n const defaultQuantity: number = 1;\n let totalCount: number = 0;\n\n for (const item of addedInput) {\n totalCount += item.count ?? defaultQuantity;\n }\n\n return totalCount;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\n/**\n * Items added to cart error message.\n */\nexport interface IItemsAddedErrorProps {\n errorMessage?: string;\n}\n\n/**\n * Items added error.\n * @param errorProps - The error properties.\n * @param errorProps.errorMessage - The error message to show.\n * @returns The alert element showing items added errors.\n */\nexport const ItemsAddedErrorComponent: React.FC = ({ errorMessage }) => {\n if (StringExtensions.isNullOrEmpty(errorMessage)) {\n return null;\n }\n\n return (\n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { getUrlSync, IComponentProps, IImageSettings } from '@msdyn365-commerce/core';\nimport { format } from '@msdyn365-commerce/retail-proxy';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { OrderTemplateProductsPreviewComponent } from '../order-template/order-templates-list/order-template-products-preview';\nimport { getTotalItems, IAddToCartInput, IItemsAddedToCartResources } from './items-added-to-cart';\nimport { ItemsAddedErrorComponent } from './items-added-to-cart-error-component';\n\n/**\n * Interface for items added to cart data.\n */\nexport interface IItemsAddedToCartDialogData {\n products: IAddToCartInput[];\n}\n\n/**\n * Interface for items added to cart props.\n */\nexport interface IItemsAddedToCartDialogProps extends IComponentProps {\n className: string;\n dialogStrings: IItemsAddedToCartResources;\n\n imageSettings?: IImageSettings;\n isModalOpen?: boolean;\n\n onClose(): void;\n}\n\n/**\n * Items added to cart dialog.\n * @param dialogProps -- The dialog props.\n * @returns The dialog element.\n */\nexport const ItemsAddedToCartDialogComponent = (dialogProps: IItemsAddedToCartDialogProps): JSX.Element => {\n const {\n dialogStrings,\n className,\n context,\n isModalOpen,\n imageSettings,\n data: { products }\n } = dialogProps;\n\n /**\n * Get cart page URL.\n * @returns The URL of cart page.\n */\n const getCartPageUrl = (): string => {\n return getUrlSync('cart', context.actionContext) ?? '';\n };\n\n const itemsString =\n format(dialogStrings.itemsAddedToCartFormatText, getTotalItems(products).toString()) + dialogStrings.itemsAddedToCartHeaderText;\n const linesString = format(dialogStrings.linesAddedToCartFormatText, products.length.toString());\n\n const fullProducts: FullProduct[] = products.map(item => {\n return { ProductDetails: item.product };\n });\n\n return (\n \n \n {linesString}\n {dialogStrings.itemsAddedToCartHeaderText}\n \n \n
\n \n
\n
{itemsString}
\n
\n \n
\n
\n \n \n {dialogStrings.viewCartButtonText}\n \n \n {dialogStrings.closeButtonLabel}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Image } from '@msdyn365-commerce/core';\nimport {\n BaseNotificationComponent,\n ClosableNotificationWrapper,\n DismissibleNotificationWrapper,\n INotificationCloseButtonProps,\n INotificationProps,\n NotificationCloseButton,\n NotificationContent,\n NotificationFooter,\n NotificationHeader,\n NotificationInstance,\n NotificationTitle\n} from '@msdyn365-commerce-modules/notifications-core';\nimport { getFallbackImageUrl, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PriceComponent } from '../../price/price.components';\nimport { ItemSuccessfullyAddedToCartNotification } from './item-successfully-added-to-cart-notification';\n\nexport interface IItemSuccessfullyAddedToCartNotificationProps\n extends INotificationProps,\n INotificationCloseButtonProps {}\n\nexport class ItemSuccessfullyAddedToCartNotificationComponent extends BaseNotificationComponent<\n ItemSuccessfullyAddedToCartNotification,\n IItemSuccessfullyAddedToCartNotificationProps\n> {\n public static readonly className: string = 'msc-notification-item-successfully-added-to-cart';\n\n public constructor(props: IItemSuccessfullyAddedToCartNotificationProps) {\n super(props);\n }\n\n public render(): React.ReactNode {\n const payLoad = getPayloadObject('click', this.props.notification.telemetryContent, TelemetryConstant.ContinueShopping);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const shouldDisplayUnitOfMeasure =\n this.props.notification.context.app.config?.unitOfMeasureDisplayType &&\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n this.props.notification.context.app.config.unitOfMeasureDisplayType !== 'none';\n payLoad.contentAction.etext = TelemetryConstant.ViewBagAndCheckout;\n const viewBagAttribute = getTelemetryAttributes(this.props.notification.telemetryContent, payLoad);\n const fallbackImageUrl = getFallbackImageUrl(\n this.props.notification.product.ItemId,\n this.props.notification.context.actionContext.requestContext.apiSettings,\n this.props.notification.context.app?.config?.OmniChannelMedia\n );\n if (this.props.notification.imageSettings) {\n this.props.notification.imageSettings.cropFocalRegion = true;\n }\n\n const reducedDimensions: string = this.props.notification.product.Dimensions\n ? this.props.notification.product.Dimensions.reduce((str, productDimension) => {\n if (productDimension.DimensionValue && productDimension.DimensionValue.Value) {\n if (str) {\n return `${str}, ${productDimension.DimensionValue.Value}`;\n }\n\n return `${productDimension.DimensionValue.Value}`;\n }\n\n return str;\n }, '')\n : '';\n\n const contentClassName = NotificationContent.className;\n const footerClassName = NotificationFooter.className;\n\n return (\n
\n \n \n \n \n \n \n \n \n \n
\n
{this.props.notification.product.Name}
\n {this.props.notification.price ? (\n
\n \n
\n ) : (\n ''\n )}\n {this.props.notification.product.DefaultUnitOfMeasure && shouldDisplayUnitOfMeasure ? (\n
\n {this.props.notification.product.DefaultUnitOfMeasure}\n
\n ) : (\n ''\n )}\n {StringExtensions.isNullOrWhitespace(reducedDimensions) ? null : (\n
{reducedDimensions}
\n )}\n
\n {this.props.notification.resources.addedQuantityText.replace(\n '{0}',\n this.props.notification.productQuantity.toString()\n )}\n
\n
\n
\n \n {this.props.notification.navigationUrl && (\n \n {this.props.notification.resources.goToCartText}\n \n )}\n \n
\n
\n
\n
\n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICoreContext, IGeneric, IGridSettings, IImageSettings, RichText } from '@msdyn365-commerce/core';\nimport { format, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n DismissibleNotification,\n IClosableNotification,\n ITitledNotification,\n NotificationEvents,\n withNotificationComponent\n} from '@msdyn365-commerce-modules/notifications-core';\nimport { Event } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\n\nimport { IAddToCartResources } from '../add-to-cart.component';\nimport { ItemSuccessfullyAddedToCartNotificationComponent } from './item-successfully-added-to-cart-notification-component';\n\n/**\n * Notification which will be shown after the user adds an item to the cart.\n */\n@withNotificationComponent(ItemSuccessfullyAddedToCartNotificationComponent)\nexport class ItemSuccessfullyAddedToCartNotification extends DismissibleNotification implements ITitledNotification, IClosableNotification {\n public readonly context: ICoreContext>;\n\n public readonly resources: IAddToCartResources;\n\n public readonly imageSettings?: IImageSettings;\n\n public readonly gridSettings?: IGridSettings;\n\n public readonly product: SimpleProduct;\n\n public readonly price?: ProductPrice;\n\n public readonly productQuantity: number;\n\n public readonly navigationUrl?: string;\n\n public readonly telemetryContent: ITelemetryContent;\n\n public readonly closeAriaLabel: string;\n\n public readonly title: RichText;\n\n public readonly componentId: string;\n\n public readonly typeName: string;\n\n public isClosed: boolean;\n\n public constructor(\n context: ICoreContext>,\n resources: IAddToCartResources,\n imageSettings: IImageSettings | undefined,\n gridSettings: IGridSettings | undefined,\n product: SimpleProduct,\n price: ProductPrice | undefined,\n productQuantity: number,\n navigationUrl: string | undefined,\n telemetryContent: ITelemetryContent,\n componentId: string,\n typeName: string\n ) {\n super();\n\n const quantityOne = 1;\n const itemsString =\n productQuantity === quantityOne\n ? resources.headerItemOneText\n : format(resources.headerItemFormatText, productQuantity.toString());\n\n this.title = `${itemsString}${resources.headerMessageText}`;\n\n this.context = context;\n this.resources = resources;\n this.imageSettings = imageSettings;\n this.gridSettings = gridSettings;\n this.product = product;\n this.price = price;\n this.productQuantity = productQuantity;\n this.navigationUrl = navigationUrl;\n this.telemetryContent = telemetryContent;\n this.componentId = componentId;\n this.typeName = typeName;\n\n this.isClosed = false;\n this.closeAriaLabel = resources.closeNotificationLabel;\n\n this.events.setValue(NotificationEvents.Close, new Event());\n }\n\n public close(): void {\n this.isClosed = true;\n this.events.getValue(NotificationEvents.Close)?.trigger();\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport {\n BaseNotificationComponent,\n ClosableNotificationWrapper,\n DismissibleNotificationWrapper,\n INotificationCloseButtonProps,\n INotificationProps,\n NotificationCloseButton,\n NotificationContent,\n NotificationDescription,\n NotificationFooter,\n NotificationHeader,\n NotificationInstance,\n NotificationTitle\n} from '@msdyn365-commerce-modules/notifications-core';\nimport { Button, getPayloadObject, getTelemetryAttributes, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { OrderTemplateProductsPreviewComponent } from '../../order-template/order-templates-list/order-template-products-preview';\nimport { ItemsAddedErrorComponent } from '../items-added-to-cart-error-component';\nimport { MultiItemsSuccessfullyAddedToCartNotification } from './multi-items-successfully-added-to-cart-notification';\n\n/**\n * Interface of props for multiple items are successfully added to cart notification.\n */\nexport interface IMultiItemsSuccessfullyAddedToCartNotificationProps\n extends INotificationProps,\n INotificationCloseButtonProps {}\n\n/**\n * Multiple items are successfully added to cart notification.\n */\nexport class MultiItemsSuccessfullyAddedToCartNotificationComponent extends BaseNotificationComponent<\n MultiItemsSuccessfullyAddedToCartNotification,\n IMultiItemsSuccessfullyAddedToCartNotificationProps\n> {\n public static readonly className: string = 'msc-notification-items-added-to-cart';\n\n public constructor(props: IMultiItemsSuccessfullyAddedToCartNotificationProps) {\n super(props);\n }\n\n public render(): React.ReactNode {\n const payLoad = getPayloadObject('click', this.props.notification.telemetryContent, TelemetryConstant.ContinueShopping);\n payLoad.contentAction.etext = TelemetryConstant.ViewBagAndCheckout;\n const viewBagAttribute = getTelemetryAttributes(this.props.notification.telemetryContent, payLoad);\n if (this.props.notification.imageSettings) {\n this.props.notification.imageSettings.cropFocalRegion = true;\n }\n\n const fullProducts: FullProduct[] = this.props.notification.products.map(item => {\n return { ProductDetails: item.product };\n });\n\n const className = MultiItemsSuccessfullyAddedToCartNotificationComponent.className;\n const footerClassName = NotificationFooter.className;\n return (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.notification.navigationUrl && (\n \n {this.props.notification.resources.viewCartButtonText}\n \n )}\n \n \n \n \n
\n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICoreContext, IGeneric, IGridSettings, IImageSettings, RichText } from '@msdyn365-commerce/core';\nimport { format } from '@msdyn365-commerce/retail-proxy';\nimport {\n DismissibleNotification,\n IClosableNotification,\n ITitledNotification,\n NotificationEvents,\n withNotificationComponent\n} from '@msdyn365-commerce-modules/notifications-core';\nimport { Event } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\n\nimport { getTotalItems, IAddToCartInput, IItemsAddedToCartResources } from '../items-added-to-cart';\nimport { MultiItemsSuccessfullyAddedToCartNotificationComponent } from './multi-items-successfully-added-to-cart-notification-component';\n\n/**\n * Notification which will be shown after the user adds multi items to the cart.\n */\n@withNotificationComponent(MultiItemsSuccessfullyAddedToCartNotificationComponent)\nexport class MultiItemsSuccessfullyAddedToCartNotification extends DismissibleNotification\n implements ITitledNotification, IClosableNotification {\n public readonly context: ICoreContext>;\n\n public readonly resources: IItemsAddedToCartResources;\n\n public readonly imageSettings?: IImageSettings;\n\n public readonly gridSettings?: IGridSettings;\n\n public readonly products: IAddToCartInput[];\n\n public readonly navigationUrl?: string;\n\n public readonly telemetryContent: ITelemetryContent;\n\n public readonly closeAriaLabel: string;\n\n public readonly title: RichText;\n\n public readonly descriptionLines: RichText[];\n\n public readonly componentId: string;\n\n public readonly typeName: string;\n\n public isClosed: boolean;\n\n public constructor(\n context: ICoreContext>,\n resources: IItemsAddedToCartResources,\n imageSettings: IImageSettings | undefined,\n gridSettings: IGridSettings | undefined,\n products: IAddToCartInput[],\n navigationUrl: string | undefined,\n telemetryContent: ITelemetryContent,\n componentId: string,\n typeName: string\n ) {\n super();\n\n const itemsString = format(resources.itemsAddedToCartFormatText, getTotalItems(products).toString());\n const linesString = format(resources.linesAddedToCartFormatText, products.length.toString());\n\n this.title = `${linesString}${resources.itemsAddedToCartHeaderText}`;\n this.descriptionLines = [];\n this.descriptionLines.push(`${itemsString}${resources.itemsAddedToCartHeaderText}`);\n\n this.context = context;\n this.resources = resources;\n this.imageSettings = imageSettings;\n this.gridSettings = gridSettings;\n this.products = products;\n this.navigationUrl = navigationUrl;\n this.telemetryContent = telemetryContent;\n this.componentId = componentId;\n this.typeName = typeName;\n\n this.isClosed = false;\n this.closeAriaLabel = resources.closeButtonLabel;\n\n this.events.setValue(NotificationEvents.Close, new Event());\n }\n\n public close(): void {\n this.isClosed = true;\n this.events.getValue(NotificationEvents.Close)?.trigger();\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SalesLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { observable } from 'mobx';\n\n/**\n * Represents a product from order details.\n */\nexport class OrderDetailsProduct {\n @observable\n public isSelected: boolean;\n\n public readonly isProductAvailable: boolean;\n\n public readonly salesLine: SalesLine;\n\n /**\n * Simple product info.\n * May be undefined for the removed/unavailable product.\n */\n public readonly simpleProduct?: SimpleProduct;\n\n public readonly productUrl?: string;\n\n public constructor(salesLine: SalesLine, simpleProduct?: SimpleProduct, productUrl?: string) {\n this.salesLine = salesLine;\n this.simpleProduct = simpleProduct;\n this.isSelected = false;\n this.isProductAvailable = !ObjectExtensions.isNullOrUndefined(simpleProduct);\n this.productUrl = productUrl;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { IComponent, IComponentProps, getCatalogId, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport {\n addOrderTemplateToCartAction,\n AddOrderTemplateToCartInput,\n OrderTemplate,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n IPopupProductsProps,\n ITelemetryContent,\n PopupProducts,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport {\n ILinesAddedToCartDialogResources,\n LinesAddedToCartDialog\n} from '../lines-added-to-cart-dialog/lines-added-to-cart-dialog.component';\n\nexport interface IAddOrderTemplateToCartComponentData {\n orderTemplate: OrderTemplate;\n}\n\nexport interface IAddOrderTemplateToCartComponentProps extends IComponentProps {\n className?: string;\n parentElementRef?: React.RefObject\n \n \n );\n};\n\nexport const AddOrderTemplateToCartComponent: React.FunctionComponent =\n // @ts-expect-error -- As per design, custom component\n msdyn365Commerce.createComponent('AddOrderTemplate', {\n component: AddOrderTemplate,\n ...AddToCartComponentActions\n });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport {\n IOrderTemplateNameDialogResources,\n OrderTemplateNameDialog\n} from '../order-template-name-dialog/order-template-name-dialog.component';\n\nexport interface IRenameOrderTemplateComponentProps extends IComponentProps {\n className?: string;\n renameOrderTemplateDialogStrings: IOrderTemplateNameDialogResources;\n renameOrderTemplateButtonText: string;\n onRenameTemplate(orderTemplate: ProductList): Promise;\n\n // as required passing in components for later user\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n}\n\ninterface IRenameOrderTemplateData {\n orderTemplate: ProductList;\n}\n\nexport interface IRenameOrderTemplateComponent extends IComponent {}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- For backward compatibility\nconst RenameOrderTemplateComponentActions = {};\nlet buttonEventReference: HTMLButtonElement | undefined;\n\nconst RenameOrderTemplate: React.FC = (props: IRenameOrderTemplateComponentProps) => {\n const {\n data: { orderTemplate },\n renameOrderTemplateButtonText,\n renameOrderTemplateDialogStrings,\n context\n } = props;\n const [renameOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = React.useState(false);\n const onOrderTemplateNameCancel = () => {\n context.telemetry.debug('Rename of template was canceled.');\n buttonEventReference?.focus();\n };\n\n const onRenameButtonClick = (event: React.MouseEvent) => {\n buttonEventReference = event.target as HTMLButtonElement;\n setOrderTemplateNameDialogOpen(true);\n };\n return (\n <>\n \n \n \n );\n};\n\nexport const RenameOrderTemplateComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IRenameOrderTemplateComponent\n>('RenameOrderTemplate', { component: RenameOrderTemplate, ...RenameOrderTemplateComponentActions });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { getUrlSync, IComponentProps, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { OrderTemplateProductsPreviewComponent } from '../order-templates-list/order-template-products-preview';\n\nexport interface ILinesAddedToCartDialogResources {\n viewCartButtonText: string;\n orderTemplateCloseButtonText: string;\n linesAddedToCartHeaderItemsOneText: string;\n linesAddedToCartHeaderLinesOneText: string;\n linesAddedToCartHeaderLinesFormatText: string;\n linesAddedToCartHeaderMessageText: string;\n}\n\nexport interface ILinesAddedToCartDialogData {\n linesCount: number;\n orderTemplate: ProductList;\n products: FullProduct[];\n}\n\nexport interface ILinesAddedToCartDialogProps extends IComponentProps {\n className: string;\n imageSettings?: IImageSettings;\n\n dialogStrings: ILinesAddedToCartDialogResources;\n\n modalOpen: boolean | undefined;\n onClose(): void;\n\n // as required passing in components for later user\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n}\n\nexport const LinesAddedToCartDialog = (dialogProps: ILinesAddedToCartDialogProps) => {\n const {\n dialogStrings,\n className,\n context,\n modalOpen,\n imageSettings,\n data: { orderTemplate, products, linesCount }\n } = dialogProps;\n\n const getCartPageUrl = (): string => {\n return getUrlSync('cart', context.actionContext) || '';\n };\n\n const close: () => void = () => {\n dialogProps.onClose();\n };\n\n const lineItemsString =\n linesCount === 1\n ? dialogStrings.linesAddedToCartHeaderLinesOneText\n : dialogStrings.linesAddedToCartHeaderLinesFormatText.replace('{0}', linesCount.toString());\n\n return (\n \n \n {dialogStrings.linesAddedToCartHeaderItemsOneText}\n {dialogStrings.linesAddedToCartHeaderMessageText}\n \n \n
\n \n
\n
{orderTemplate.Name}
\n
{lineItemsString}
\n
\n
\n
\n \n \n {dialogStrings.viewCartButtonText}\n \n \n {dialogStrings.orderTemplateCloseButtonText}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport {\n createOrderTemplate,\n CreateOrderTemplateInput,\n StringExtensions,\n updateOrderTemplateHeader,\n UpdateOrderTemplateHeaderInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nexport interface IOrderTemplateNameDialogResources {\n orderTemplateHeaderLabel: string;\n orderTemplateTitleLabel: string;\n orderTemplateNameAriaLabel: string;\n orderTemplateDescription: string;\n defaultOrderTemplateName: string;\n orderTemplateButtonLabel: string;\n orderTemplateCancelButtonLabel: string;\n orderTemplateModalAriaLabel?: string;\n}\n\nexport interface IOrderTemplateNameDialogProps extends IComponentProps {\n isUpdateDialog: boolean | undefined;\n existingOrderTemplate?: ProductList;\n className: string;\n orderTemplateName?: string;\n dialogStrings: IOrderTemplateNameDialogResources;\n modalOpen: boolean | undefined;\n parentElementRef?: React.RefObject;\n setModalOpen(newValue: boolean): void;\n onCancel(): void;\n onSuccess(orderTemplate: ProductList): Promise;\n}\n\nexport const OrderTemplateNameDialog = (dialogProps: IOrderTemplateNameDialogProps) => {\n const {\n isUpdateDialog,\n existingOrderTemplate,\n dialogStrings,\n className,\n modalOpen,\n setModalOpen,\n onCancel,\n onSuccess,\n context,\n parentElementRef\n } = dialogProps;\n\n if (!dialogStrings) {\n return null;\n }\n\n const [orderTemplateName, setOrderTemplateName] = useState(dialogProps.orderTemplateName);\n\n const cancel: () => void = () => {\n setModalOpen(false);\n onCancel();\n setOrderTemplateName('');\n if (parentElementRef) {\n parentElementRef.current?.focus();\n }\n };\n\n const submit: () => Promise = async () => {\n dialogProps.orderTemplateName = orderTemplateName || dialogStrings.defaultOrderTemplateName;\n if (StringExtensions.isNullOrWhitespace(dialogProps.orderTemplateName)) {\n return;\n }\n if (isUpdateDialog) {\n if (existingOrderTemplate) {\n existingOrderTemplate.Name = dialogProps.orderTemplateName;\n const input: UpdateOrderTemplateHeaderInput = new UpdateOrderTemplateHeaderInput(existingOrderTemplate);\n const orderTemplate: ProductList = await updateOrderTemplateHeader(input, context.actionContext);\n setModalOpen(false);\n await onSuccess(orderTemplate);\n } else {\n context.telemetry.error('You need to pass ProductList instance for update.');\n throw new Error('Unexpected error: existing order template was not set.');\n }\n } else {\n const input: CreateOrderTemplateInput = new CreateOrderTemplateInput(dialogProps.orderTemplateName);\n const orderTemplate: ProductList = await createOrderTemplate(input, context.actionContext);\n setModalOpen(false);\n await onSuccess(orderTemplate);\n }\n };\n\n const updateOrderTemplateName = (event: React.ChangeEvent) => {\n setOrderTemplateName(event.target.value);\n };\n\n return (\n \n \n {dialogStrings.orderTemplateHeaderLabel}\n \n \n
\n \n {dialogStrings.orderTemplateTitleLabel}\n \n \n
{dialogStrings.orderTemplateDescription}
\n
\n
\n \n \n {dialogStrings.orderTemplateButtonLabel}\n \n \n {dialogStrings.orderTemplateCancelButtonLabel}\n \n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { OrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { OrderTemplateProductsPreviewComponent } from './order-template-products-preview';\n\nexport interface IOrderTemplateComponentProps {\n className: string;\n orderTemplate: OrderTemplate;\n context: ICoreContext;\n imageSettings?: IImageSettings;\n actionButtonText: string;\n lineItemsText: string;\n orderTemplateAction(orderTemplate: ProductList): Promise;\n}\n\nexport const OrderTemplateComponent = (props: IOrderTemplateComponentProps) => {\n const { orderTemplate, className, imageSettings } = props;\n\n const onActionButtonClick = () => {\n return props.orderTemplateAction(props.orderTemplate.productList);\n };\n\n const products = orderTemplate.orderTemplateLines.map(line => line.fullProduct).filter(fullProduct => fullProduct);\n\n return (\n
\n
\n
{orderTemplate.productList.Name}
\n
{format(props.lineItemsText, orderTemplate.totalLines)}
\n
\n \n
\n \n
\n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getAsset, IComponentProps, Image } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { OrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport {\n IOrderTemplateNameDialogResources,\n OrderTemplateNameDialog\n} from '../order-template-name-dialog/order-template-name-dialog.component';\nimport { OrderTemplateComponent } from '../order-templates-list/order-template-list';\n\nexport interface IAddToOrderTemplateDialogData {\n orderTemplates: OrderTemplate[];\n}\n\nexport interface IAddToOrderTemplateDialogResources {\n addToOrderTemplateHeader: string;\n\n noOrderTemplatesMessage: string;\n noOrderTemplatesDescription: string;\n\n createAnOrderTemplateButtonText: string;\n createNewOrderTemplateButtonText: string;\n cancelOrderTemplateCreationButtonText: string;\n\n selectTemplatesText: string;\n addToTemplateButtonText: string;\n lineItemsText: string;\n}\n\nexport interface IAddToOrderTemplateDialogProps extends IComponentProps {\n className: string;\n\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n\n modalOpen: boolean | undefined;\n setModalOpen(newValue: boolean): void;\n onOrderTemplateSelected(orderTemplate: ProductList): Promise;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n}\n\nconst renderAddToOrderTemplatesWhenEmptyOrderTemplatesDialog = (\n dialogProps: IAddToOrderTemplateDialogProps,\n className: string,\n closeDialog: () => void,\n showOrderTemplateNameDialog: () => void\n) => {\n const { addToOrderTemplateDialogResources, modalOpen } = dialogProps;\n\n const createOrderTemplateImageUrl = `${getAsset('images/order-templates/create-order-template.svg', dialogProps.context.request)}`;\n\n return (\n <>\n \n \n {addToOrderTemplateDialogResources.addToOrderTemplateHeader}\n \n \n
\n
\n \n
\n
\n {addToOrderTemplateDialogResources.noOrderTemplatesMessage}\n
\n
\n {addToOrderTemplateDialogResources.noOrderTemplatesDescription}\n
\n
\n
\n \n \n {addToOrderTemplateDialogResources.createAnOrderTemplateButtonText}\n \n \n {addToOrderTemplateDialogResources.cancelOrderTemplateCreationButtonText}\n \n \n
\n \n );\n};\n\nconst formatBold = (text: string, boldText: string) => {\n const patternToFind = '{0}';\n return (\n <>\n {text.slice(0, text.indexOf(patternToFind))}\n {boldText}\n {text.slice(text.indexOf(patternToFind) + patternToFind.length)}\n \n );\n};\n\nconst renderAddToOrderTemplatesForExistingOrderTemplatesDialog = (\n dialogProps: IAddToOrderTemplateDialogProps,\n className: string,\n closeDialog: () => void,\n showOrderTemplateNameDialog: () => void,\n onAddToOrderTemplateButtonClick: (orderTemplate: ProductList) => Promise\n) => {\n const {\n addToOrderTemplateDialogResources,\n modalOpen,\n data: { orderTemplates }\n } = dialogProps;\n\n const createOrderTemplateImageUrl = `${getAsset('images/order-templates/create-order-template.svg', dialogProps.context.request)}`;\n\n return (\n <>\n \n \n {addToOrderTemplateDialogResources.addToOrderTemplateHeader}\n \n \n
\n
\n {formatBold(addToOrderTemplateDialogResources.selectTemplatesText, orderTemplates.length.toString())}\n
\n
\n \n \n \n {addToOrderTemplateDialogResources.createNewOrderTemplateButtonText}\n \n
\n {orderTemplates.map((orderTemplate, index) => {\n return (\n \n );\n })}\n
\n
\n \n \n \n );\n};\n\nexport const AddToOrderTemplateDialog = (dialogProps: IAddToOrderTemplateDialogProps) => {\n const {\n setModalOpen,\n data: { orderTemplates },\n className\n } = dialogProps;\n\n const closeDialog = () => {\n setModalOpen(false);\n };\n\n const [isCreateOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = useState(false);\n const showOrderTemplateNameDialog = () => {\n setModalOpen(false);\n setTimeout(() => {\n setOrderTemplateNameDialogOpen(true);\n }, 500);\n };\n const onCreateOrderTemplateCancel = () => {\n setTimeout(() => {\n setModalOpen(true);\n }, 500);\n };\n\n let addToOrderTemplateDialog: JSX.Element;\n if (orderTemplates.length !== 0) {\n addToOrderTemplateDialog = renderAddToOrderTemplatesForExistingOrderTemplatesDialog(\n dialogProps,\n `${className}__existing`,\n closeDialog,\n showOrderTemplateNameDialog,\n dialogProps.onOrderTemplateSelected\n );\n } else {\n addToOrderTemplateDialog = renderAddToOrderTemplatesWhenEmptyOrderTemplatesDialog(\n dialogProps,\n `${className}__empty`,\n closeDialog,\n showOrderTemplateNameDialog\n );\n }\n\n return (\n <>\n {addToOrderTemplateDialog}\n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { getUrlSync, IComponentProps, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { ProductDimensionType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { OrderTemplateProductsPreviewComponent } from '../order-templates-list/order-template-products-preview';\n\nexport interface ILinesAddedToOrderTemplateDialogResources {\n viewOrderTemplateButtonText: string;\n continueShoppingButtonText: string;\n linesAddedToOrderTemplateHeaderItemsOneText: string;\n linesAddedToOrderTemplateHeaderItemsFormatText: string;\n linesAddedToOrderTemplateHeaderLinesOneText: string;\n linesAddedToOrderTemplateHeaderLinesFormatText: string;\n linesAddedToOrderTemplateHeaderMessageText: string;\n linesAddedToOrderTemplateCustomPriceAlertMessageText?: string;\n}\n\nexport interface ILinesAddedToOrderTemplateDialogData {\n itemsCount: number;\n linesCount: number;\n orderTemplate: ProductList;\n products: FullProduct[];\n}\n\nexport interface ILinesAddedToOrderTemplateDialogProps extends IComponentProps {\n className: string;\n imageSettings?: IImageSettings;\n\n dialogStrings: ILinesAddedToOrderTemplateDialogResources;\n\n modalOpen: boolean | undefined;\n\n // as required passing in components for later user\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n}\n\nexport const LinesAddedToOrderTemplateDialog = (dialogProps: ILinesAddedToOrderTemplateDialogProps) => {\n const {\n dialogStrings,\n className,\n context,\n modalOpen,\n imageSettings,\n data: { orderTemplate, products, itemsCount, linesCount }\n } = dialogProps;\n\n const getOrderTemplatePageUrl = (): string => {\n const url = getUrlSync('ordertemplate', context.actionContext) || '';\n const separator = url.includes('?') ? '&' : '?';\n return `${url}${separator}id=${orderTemplate.Id}`;\n };\n\n const close = React.useCallback(() => {\n window.location.reload(true);\n }, []);\n\n const itemsString =\n itemsCount === 1\n ? dialogStrings.linesAddedToOrderTemplateHeaderItemsOneText\n : dialogStrings.linesAddedToOrderTemplateHeaderItemsFormatText.replace('{0}', itemsCount.toString());\n const lineItemsString =\n linesCount === 1\n ? dialogStrings.linesAddedToOrderTemplateHeaderLinesOneText\n : dialogStrings.linesAddedToOrderTemplateHeaderLinesFormatText.replace('{0}', linesCount.toString());\n\n const addedProducts = products.filter(\n product =>\n !product.ProductDetails.Dimensions?.find(\n dimension => dimension.DimensionTypeValue === ProductDimensionType.Style && dimension.DimensionValue?.Value === 'Custom'\n )\n );\n const filteredProducts = products.filter(product =>\n product.ProductDetails.Dimensions?.find(\n dimension => dimension.DimensionTypeValue === ProductDimensionType.Style && dimension.DimensionValue?.Value === 'Custom'\n )\n );\n\n return (\n \n \n {lineItemsString}\n {dialogStrings.linesAddedToOrderTemplateHeaderMessageText}\n \n \n
\n \n
\n
{orderTemplate.Name}
\n
{itemsString}
\n
\n {ArrayExtensions.hasElements(filteredProducts) ? (\n <>\n \n
\n \n {dialogStrings.linesAddedToOrderTemplateCustomPriceAlertMessageText}\n
\n
\n \n \n ) : null}\n
\n
\n \n \n {dialogStrings.viewOrderTemplateButtonText}\n \n \n {dialogStrings.continueShoppingButtonText}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { ICoreContext, getCatalogId, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { Customer, ProductList, ProductListLine, ProductListsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n FullProductInput,\n getFullProducts,\n getProductDetailsCriteriaFromActionInput,\n OrderTemplate,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport {\n AddToOrderTemplateDialog,\n IAddToOrderTemplateDialogResources\n} from '../add-to-order-template-dialog/add-to-order-template-dialog.component';\nimport {\n ILinesAddedToOrderTemplateDialogResources,\n LinesAddedToOrderTemplateDialog\n} from '../lines-added-to-order-template-dialog/lines-added-to-order-template-dialog.component';\nimport { IOrderTemplateNameDialogResources } from '../order-template-name-dialog/order-template-name-dialog.component';\n\n/**\n * Data for the add products to order template component.\n */\nexport interface IAddProductsToOrderTemplateData {\n orderTemplates: OrderTemplate[];\n products: ProductListLine[];\n\n customerInformation?: Customer;\n}\n\n/**\n * Resources for the add products to order template component.\n */\nexport interface IAddProductsToOrderTemplateResources\n extends IAddToOrderTemplateDialogResources,\n IOrderTemplateNameDialogResources,\n ILinesAddedToOrderTemplateDialogResources {\n addProductsToOrderTemplateButton: string;\n addProductsToOrderTemplateButtonTooltip: string;\n}\n\n/**\n * Props for the add products to order template component.\n */\nexport interface IAddProductsToOrderTemplateProps {\n className: string;\n\n context: ICoreContext;\n\n data: IAddProductsToOrderTemplateData;\n\n resources: IAddProductsToOrderTemplateResources;\n\n isDisabled?: boolean;\n\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n}\n\nconst modalTimeoutTime = 500;\n\n/**\n * Add products to order template component.\n * @param props - Component props.\n * @returns React node.\n */\nexport const AddProductsToOrderTemplateComponent: React.FC = (\n props: IAddProductsToOrderTemplateProps\n) => {\n const [chosenOrderTemplate, setChosenOrderTemplate] = useState(undefined);\n const [addedProducts, setAddedProducts] = useState(undefined);\n const [isAddToOrderTemplateModalOpen, setIsAddToOrderTemplateModalOpen] = useState(false);\n const [isLinesAddedToOrderTemplateDialogOpen, setIsLinesAddedToOrderTemplateDialogOpen] = useState(false);\n const [addedLinesCount, setAddedLinesCount] = useState(0);\n const [addedItemsCount, setAddedItemsCount] = useState(0);\n\n /**\n * Adds product to the selected order template.\n * @param orderTemplate - Order template to use for adding products.\n */\n const onOrderTemplateSelected = React.useCallback(\n async (orderTemplate: ProductList) => {\n setChosenOrderTemplate(orderTemplate);\n // assuming selected catalogId will be passed to component and if not passed then get from context\n const catalogId = props.catalogId ?? getCatalogId(props.context.actionContext.requestContext);\n validateCatalogId(catalogId);\n const isMultipleCatalogFeatureEnabledInHq = props.isMultipleCatalogFeatureEnabledInHq || false;\n const linesToAdd: ProductListLine[] = props.data.products.map(line => {\n return {\n ...line,\n ...(isMultipleCatalogFeatureEnabledInHq && { catalogId: line.CatalogId || catalogId }),\n ProductListId: orderTemplate.Id\n };\n });\n\n const allProductInputs: FullProductInput[] = [];\n for (const listLine of linesToAdd) {\n if (listLine.ProductId) {\n allProductInputs.push(\n new FullProductInput(\n listLine.ProductId,\n props.context.actionContext.requestContext.apiSettings,\n getProductDetailsCriteriaFromActionInput(props.context.actionContext),\n props.context.actionContext.requestContext\n )\n );\n }\n }\n\n const allProducts = await getFullProducts(allProductInputs, props.context.actionContext);\n\n const addedLines = await ProductListsDataActions.addProductListLinesAsync(\n { callerContext: props.context.actionContext },\n orderTemplate.Id,\n linesToAdd\n );\n\n const quantities = addedLines.map(line => line.Quantity ?? 0);\n setAddedLinesCount(addedLines.length);\n setAddedItemsCount(ArrayExtensions.hasElements(quantities) ? ArrayExtensions.calculateSum(quantities) : 0);\n setAddedProducts(allProducts);\n\n setIsAddToOrderTemplateModalOpen(false);\n setTimeout(() => {\n setIsLinesAddedToOrderTemplateDialogOpen(true);\n }, modalTimeoutTime);\n },\n [props.context.actionContext, props.data.products]\n );\n\n const onAddProductsToOrderTemplateClick = React.useCallback(() => {\n setIsAddToOrderTemplateModalOpen(true);\n }, []);\n\n if (!isChannelTypeB2B(props.context.actionContext.requestContext)) {\n return null;\n }\n\n const addToOrderTemplateReference: React.RefObject = React.createRef();\n const isMultipleCatalogFeatureEnabledInHq = props.isMultipleCatalogFeatureEnabledInHq || false;\n return (\n
\n \n {chosenOrderTemplate && addedProducts && (\n \n )}\n \n {props.resources.addProductsToOrderTemplateButton}\n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n duplicatedProductsHeader: string;\n\n duplicatedProductsDescription: string;\n\n updateQuantityButtonText: string;\n cancelDuplicateItemsButtonText: string;\n}\n\nexport interface IDuplicateItemsWhenAddingToOrderTemplateDialogProps extends IComponentProps {\n className: string;\n\n dialogStrings?: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\n\n modalOpen: boolean | undefined;\n\n executeOverrideQuantity(): Promise;\n onCancel(): void;\n // as required passing in components for later user\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n}\n\nexport const DuplicateItemsWhenAddingToOrderTemplateDialog = (dialogProps: IDuplicateItemsWhenAddingToOrderTemplateDialogProps) => {\n const { dialogStrings, className, modalOpen, executeOverrideQuantity } = dialogProps;\n\n return (\n \n \n {dialogStrings?.duplicatedProductsHeader}\n \n \n
\n
{dialogStrings?.duplicatedProductsDescription}
\n
\n
\n \n \n {dialogStrings?.updateQuantityButtonText}\n \n \n {dialogStrings?.cancelDuplicateItemsButtonText}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, IComponentProps, ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PriceComponent } from '../../price/price.components';\n\nexport interface IItemAddedToOrderTemplateDialogResources {\n viewOrderTemplateButtonText: string;\n continueShoppingButtonText: string;\n itemAddedToOrderTemplateHeaderItemOneText: string;\n itemAddedToOrderTemplateHeaderItemFormatText: string;\n itemAddedToOrderTemplateHeaderMessageText: string;\n\n freePriceText: string;\n originalPriceText: string;\n currentPriceText: string;\n}\n\nexport interface IItemAddedToOrderTemplateDialogData {\n product: SimpleProduct;\n productPrice: ProductPrice;\n quantity: number;\n orderTemplateId: string;\n}\n\nexport interface IItemAddedToOrderTemplateDialogProps extends IComponentProps {\n className: string;\n\n dialogStrings: IItemAddedToOrderTemplateDialogResources;\n\n modalOpen: boolean | undefined;\n\n // as required passing in components for later user\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n imageSettings?: IImageSettings;\n}\n\nconst renderOrderTemplateImage = (context: ICoreContext, className: string, product: SimpleProduct, imageSettings?: IImageSettings) => {\n const fallbackImageUrl = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n lg: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n xl: { q: 'w=140&h=140&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n return (\n \n );\n};\n\nexport const ItemAddedToOrderTemplateDialog = (dialogProps: IItemAddedToOrderTemplateDialogProps) => {\n const {\n dialogStrings,\n className,\n context,\n modalOpen,\n imageSettings,\n data: { orderTemplateId, product, productPrice, quantity }\n } = dialogProps;\n\n const getOrderTemplatePageUrl = (): string => {\n const url = getUrlSync('ordertemplate', context.actionContext) || '';\n const separator = url.includes('?') ? '&' : '?';\n return `${url}${separator}id=${orderTemplateId}`;\n };\n\n const close: () => void = () => {\n window.location.reload(true);\n };\n\n const itemsString =\n quantity === 1\n ? dialogStrings.itemAddedToOrderTemplateHeaderItemOneText\n : dialogStrings.itemAddedToOrderTemplateHeaderItemFormatText.replace('{0}', quantity.toString());\n\n return (\n \n \n {itemsString}\n {dialogStrings.itemAddedToOrderTemplateHeaderMessageText}\n \n \n
\n {renderOrderTemplateImage(context, `${className}__dialog`, product, imageSettings)}\n
\n
{product.Name}
\n
\n {productPrice && (\n \n )}\n
\n {product.Dimensions && (\n
\n {product.Dimensions.map(dimension => dimension.DimensionValue?.Value)\n .filter(value => value)\n .join(', ')}\n
\n )}\n
\n
\n
\n \n \n {dialogStrings.viewOrderTemplateButtonText}\n \n \n {dialogStrings.continueShoppingButtonText}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce, isChannelTypeB2B, IImageSettings } from '@msdyn365-commerce/core';\nimport { AsyncResult, Customer, ProductDimension, ProductList, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n addItemToOrderTemplate,\n AddItemToOrderTemplateInput,\n getPriceForSelectedVariant,\n OrderTemplate,\n PriceForSelectedVariantInput,\n updateOrderTemplateAction,\n UpdateOrderTemplateInput,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, UncontrolledTooltip } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as Popper from 'popper.js';\nimport React, { useState } from 'react';\n\nimport {\n AddToOrderTemplateDialog,\n IAddToOrderTemplateDialogData,\n IAddToOrderTemplateDialogResources\n} from '../add-to-order-template-dialog/add-to-order-template-dialog.component';\nimport {\n DuplicateItemsWhenAddingToOrderTemplateDialog,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources\n} from '../duplicate-items-when-adding-to-order-template-dialog/duplicate-items-when-adding-to-order-template-dialog.component';\nimport {\n IItemAddedToOrderTemplateDialogResources,\n ItemAddedToOrderTemplateDialog\n} from '../item-added-to-order-template-dialog/item-added-to-order-template-dialog.component';\nimport { IOrderTemplateNameDialogResources } from '../order-template-name-dialog/order-template-name-dialog.component';\n\nexport interface IAddToOrderTemplateComponentProps extends IComponentProps {\n className?: string;\n\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n itemAddedToOrderTemplateDialogResources: IItemAddedToOrderTemplateDialogResources;\n duplicateItemsWhenAddingToOrderTemplateDialogResources: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\n\n addToOrderTemplateButtonText: string;\n addToOrderTemplateButtonTooltip: string;\n\n addToOrderTemplateMessage?: string;\n addItemToOrderTemplateError?: string;\n\n showButtonText?: boolean;\n showButtonTooltip?: boolean;\n shouldShowButtonFailedTooltip?: boolean;\n disableButton?: boolean;\n tooltipPosition?: Popper.Placement;\n showStatusMessage?: boolean;\n disabled?: boolean;\n canAddMasterProduct?: boolean;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n\n imageSettings?: IImageSettings;\n\n onSuccess?(): void;\n onError?(result: IOrderTemplateActionErrorResult): void;\n}\n\nexport interface IOrderTemplateActionErrorResult {\n status: 'FAILED' | 'MISSING_DIMENSION';\n\n missingDimensions?: ProductDimension[];\n}\n\ninterface IAddToOrderTemplateStateManager {\n waiting: boolean;\n content: IAddToOrderTemplateContentState;\n\n setWaiting(newWaiting: boolean): void;\n setContent(newContent: IAddToOrderTemplateContentState): void;\n}\n\ninterface IAddToOrderTemplateContentState {\n showAlert?: boolean;\n orderTemplateTextMessage?: string;\n color?: string;\n}\n\ninterface IAddToOrderTemplateData {\n orderTemplates: OrderTemplate[];\n\n product: SimpleProduct;\n quantity: number;\n\n customerInformation?: Customer;\n isChannelTypeB2B?: boolean;\n}\n\nexport interface IAddToOrderTemplateComponent extends IComponent {\n onClick(): (\n event: React.MouseEvent,\n props: IAddToOrderTemplateComponentProps,\n state: IAddToOrderTemplateStateManager\n ) => void;\n}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IAddToOrderTemplateComponentProps,\n state: IAddToOrderTemplateStateManager,\n openModal: (opened: boolean) => void\n): Promise => {\n const { user } = props.context.request;\n\n if (state.waiting) {\n return;\n }\n\n if (!user.isAuthenticated && user.signInUrl && window) {\n window.location.assign(user.signInUrl);\n return;\n }\n\n addToOrderTemplate(props, openModal);\n state.setWaiting(false);\n};\n\nconst onDismiss = (state: IAddToOrderTemplateStateManager): void => {\n state.setContent({ color: 'success', showAlert: false });\n};\n\nconst AddToOrderTemplateComponentActions = {\n onClick,\n onDismiss\n};\n\nconst hasProductInOrderTemplates = (productToFind: SimpleProduct) => {\n /*\n TODO: Currently API does not support filtering by products.\n await getProductListLinesAsync(context, '',)\n return orderTemplates.filter(orderTemplate =>\n orderTemplate.orderTemplateLines.filter(\n product => product.productListLine.ProductId === productToFind.RecordId).length !== 0).length !== 0;\n */\n return false;\n};\n\nconst AddToOrderTemplate: React.FC = (props: IAddToOrderTemplateComponentProps) => {\n if (!isChannelTypeB2B(props.context.actionContext.requestContext)) {\n return null;\n }\n\n const [waiting, setWaiting] = useState(false);\n const [content, setContent] = useState({});\n const state: IAddToOrderTemplateStateManager = {\n waiting,\n content,\n\n setWaiting,\n setContent\n };\n\n const [addToOrderTemplateModalOpen, setAddToOrderTemplateModalOpen] = useState(false);\n\n const [chosenOrderTemplateId, setChosenOrderTemplateId] = useState(undefined);\n const [productPrice, setProductPrice] = useState(null);\n const [itemAddedToOrderTemplateDialogOpen, setItemAddedToOrderTemplateDialogOpen] = useState(false);\n const [duplicateItemsWhenAddingToOrderTemplateDialogOpen, setDuplicateItemsWhenAddingToOrderTemplateDialogOpen] = useState(false);\n const catalogId = props.catalogId;\n validateCatalogId(catalogId);\n const isMultipleCatalogFeatureEnabledInHq = props.isMultipleCatalogFeatureEnabledInHq || false;\n const executeAddItemToOrderTemplate = async (orderTemplate: ProductList) => {\n setChosenOrderTemplateId(orderTemplate.Id);\n const input = isMultipleCatalogFeatureEnabledInHq\n ? new AddItemToOrderTemplateInput(\n orderTemplate.Id,\n props.data.product.RecordId,\n props.data.quantity,\n props.data.product.DefaultUnitOfMeasure || 'ea',\n isMultipleCatalogFeatureEnabledInHq,\n catalogId\n )\n : new AddItemToOrderTemplateInput(\n orderTemplate.Id,\n props.data.product.RecordId,\n props.data.quantity,\n props.data.product.DefaultUnitOfMeasure || 'ea'\n );\n await addItemToOrderTemplate(input, props.context.actionContext)\n .then(async result => {\n const retrievedProductPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(\n props.data.product.RecordId,\n props.context.actionContext.requestContext.apiSettings.channelId,\n props.data.product\n ),\n props.context.actionContext\n );\n setProductPrice(retrievedProductPrice);\n setAddToOrderTemplateModalOpen(false);\n setTimeout(() => {\n setItemAddedToOrderTemplateDialogOpen(true);\n }, 500);\n })\n .catch(error => {\n if (error.error?.name !== 'Microsoft_Dynamics_Commerce_Runtime_DuplicateObject') {\n return AsyncResult.reject(error);\n }\n setAddToOrderTemplateModalOpen(false);\n setTimeout(() => {\n setDuplicateItemsWhenAddingToOrderTemplateDialogOpen(true);\n }, 500);\n return AsyncResult.resolve();\n });\n };\n\n const onDuplicateDialogCancel = () => {\n setDuplicateItemsWhenAddingToOrderTemplateDialogOpen(false);\n setTimeout(() => {\n setAddToOrderTemplateModalOpen(true);\n }, 500);\n };\n\n const overrideQuantity = async () => {\n const input = isMultipleCatalogFeatureEnabledInHq\n ? new UpdateOrderTemplateInput(\n chosenOrderTemplateId!,\n props.data.product.RecordId,\n props.data.quantity,\n props.data.product.DefaultUnitOfMeasure || 'ea',\n isMultipleCatalogFeatureEnabledInHq,\n catalogId\n )\n : new UpdateOrderTemplateInput(\n chosenOrderTemplateId!,\n props.data.product.RecordId,\n props.data.quantity,\n props.data.product.DefaultUnitOfMeasure || 'ea'\n );\n await updateOrderTemplateAction(input, props.context.actionContext);\n\n const retrievedProductPrice = await getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(\n props.data.product.RecordId,\n props.context.actionContext.requestContext.apiSettings.channelId,\n props.data.product\n ),\n props.context.actionContext\n );\n setProductPrice(retrievedProductPrice);\n setDuplicateItemsWhenAddingToOrderTemplateDialogOpen(false);\n setTimeout(() => {\n setItemAddedToOrderTemplateDialogOpen(true);\n }, 500);\n };\n\n const {\n addToOrderTemplateButtonText,\n showStatusMessage,\n showButtonText,\n className,\n disabled,\n showButtonTooltip,\n shouldShowButtonFailedTooltip,\n disableButton,\n tooltipPosition,\n addToOrderTemplateButtonTooltip,\n addToOrderTemplateDialogResources,\n createOrderTemplateDialogResources\n } = props;\n\n const onDismissHandler = () => {\n AddToOrderTemplateComponentActions.onDismiss(state);\n };\n const ariaLabel = addToOrderTemplateButtonText;\n const addToOrderTemplateRef: React.RefObject = React.createRef();\n const showMessage = showStatusMessage !== undefined ? showStatusMessage : true;\n const showTooltip = showButtonTooltip !== undefined ? showButtonTooltip : true;\n const tooltipPos = showButtonTooltip !== undefined ? tooltipPosition : 'top-end';\n\n const dialogData: IAddToOrderTemplateDialogData = {\n orderTemplates: props.data.orderTemplates\n };\n\n const onClickHandler = (event: React.MouseEvent) => {\n return AddToOrderTemplateComponentActions.onClick(event, props, state, setAddToOrderTemplateModalOpen);\n };\n\n return (\n <>\n <>\n \n {showButtonText ? ariaLabel : ''}\n \n {showTooltip && (\n \n {shouldShowButtonFailedTooltip ? addToOrderTemplateButtonTooltip : ariaLabel}\n \n )}\n \n {state.content.showAlert && showMessage ? (\n
\n \n {state.content.orderTemplateTextMessage}\n \n
\n ) : (\n ''\n )}\n \n {chosenOrderTemplateId && productPrice && (\n \n )}\n \n \n );\n};\n\nconst addToOrderTemplate = (props: IAddToOrderTemplateComponentProps, openModal: (opened: boolean) => void): void => {\n const { canAddMasterProduct } = props;\n\n if (props.data.product.Dimensions && !canAddMasterProduct) {\n const missingDimensions = props.data.product.Dimensions.filter(\n dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value)\n );\n\n if (missingDimensions.length > 0) {\n // At least one dimension with no value exists on the product, won't be able to proceed.\n propagateError(props, { status: 'MISSING_DIMENSION', missingDimensions });\n return;\n }\n }\n\n openModal(true);\n};\n\nconst propagateError = (props: IAddToOrderTemplateComponentProps, result: IOrderTemplateActionErrorResult): void => {\n const { onError } = props;\n\n if (onError) {\n onError(result);\n }\n};\n\nexport const AddToOrderTemplateComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IAddToOrderTemplateComponent\n>('AddToOrderTemplate', { component: AddToOrderTemplate, ...AddToOrderTemplateComponentActions });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, IComponentProps, ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { PriceComponent } from '../../price/price.components';\n\nexport interface IItemAddedToCartDialogResources {\n viewCartButtonText: string;\n orderTemplateCloseButtonText: string;\n itemAddedToCartHeaderItemOneText: string;\n itemAddedToCartHeaderItemFormatText: string;\n itemAddedToCartHeaderMessageText: string;\n\n freePriceText: string;\n originalPriceText: string;\n currentPriceText: string;\n}\n\nexport interface IItemAddedToCartDialogData {\n product: SimpleProduct;\n productPrice: ProductPrice;\n quantity: number;\n}\n\nexport interface IItemAddedToCartDialogProps extends IComponentProps {\n className: string;\n\n dialogStrings: IItemAddedToCartDialogResources;\n\n modalOpen: boolean | undefined;\n\n // as required passing in components for later user\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n onClose(): void;\n}\n\nconst renderImage = (context: ICoreContext, className: string, product: SimpleProduct, imageSettings?: IImageSettings) => {\n const fallbackImageUrl = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n lg: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n xl: { q: 'w=140&h=140&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n return (\n \n );\n};\n\nexport const ItemAddedToCartDialog = (dialogProps: IItemAddedToCartDialogProps) => {\n const {\n dialogStrings,\n className,\n context,\n modalOpen,\n data: { product, productPrice, quantity }\n } = dialogProps;\n\n const getCartPageUrl = (): string => {\n return getUrlSync('cart', context.actionContext) || '';\n };\n\n const close: () => void = () => {\n dialogProps.onClose();\n };\n\n const itemsString =\n quantity === 1\n ? dialogStrings.itemAddedToCartHeaderItemOneText\n : dialogStrings.itemAddedToCartHeaderItemFormatText.replace('{0}', quantity.toString());\n\n return (\n \n \n {itemsString}\n {dialogStrings.itemAddedToCartHeaderMessageText}\n \n \n
\n {renderImage(context, `${className}__dialog`, product)}\n
\n
{product.Name}
\n
\n {productPrice && (\n \n )}\n
\n {product.Dimensions && (\n
\n {product.Dimensions.map(dimension => dimension.DimensionValue?.Value)\n .filter(value => value)\n .join(', ')}\n
\n )}\n
\n
\n
\n \n \n {dialogStrings.viewCartButtonText}\n \n \n {dialogStrings.orderTemplateCloseButtonText}\n \n \n
\n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport { IComponent, IComponentProps, msdyn365Commerce, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { AsyncResult, CartLine, Customer, ProductList, ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport {\n addProductListLinesAsync,\n updateProductListLinesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductListsDataActions.g';\nimport {\n FullProductInput,\n getFullProducts,\n getProductDetailsCriteriaFromActionInput,\n getProductListLines,\n GetProductListLinesInput,\n OrderTemplate\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, UncontrolledTooltip } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport {\n AddToOrderTemplateDialog,\n IAddToOrderTemplateDialogResources\n} from '../add-to-order-template-dialog/add-to-order-template-dialog.component';\nimport {\n ILinesAddedToOrderTemplateDialogResources,\n LinesAddedToOrderTemplateDialog\n} from '../lines-added-to-order-template-dialog/lines-added-to-order-template-dialog.component';\nimport { IOrderTemplateNameDialogResources } from '../order-template-name-dialog/order-template-name-dialog.component';\nimport {\n DuplicateItemsWhenAddingToOrderTemplateDialog,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources\n} from '../duplicate-items-when-adding-to-order-template-dialog/duplicate-items-when-adding-to-order-template-dialog.component';\nexport interface ISaveCartToOrderTemplateComponentProps extends IComponentProps {\n className?: string;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogId?: number;\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n linesAddedToOrderTemplateDialogResources: ILinesAddedToOrderTemplateDialogResources;\n\n createOrderTemplateFromCartButton: string;\n createOrderTemplateFromCartButtonTooltip: string;\n\n duplicateItemsWhenAddingToOrderTemplateDialogResources?: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\n}\n\ninterface ISaveCartToOrderTemplateData {\n orderTemplates: OrderTemplate[];\n cartLines: CartLine[];\n customerInformation?: Customer;\n isChannelTypeB2B?: boolean;\n}\n\ninterface ISaveCartToOrderTemplateContentState {\n showAlert?: boolean;\n orderTemplateTextMessage?: string;\n color?: string;\n}\n\ninterface ISaveCartToOrderTemplateStateManager {\n waiting: boolean;\n content: ISaveCartToOrderTemplateContentState;\n\n setWaiting(newWaiting: boolean): void;\n setContent(newContent: ISaveCartToOrderTemplateContentState): void;\n}\n\nexport interface ISaveCartToOrderTemplateComponent extends IComponent {\n onClick(): (\n event: React.MouseEvent,\n props: ISaveCartToOrderTemplateComponentProps,\n state: ISaveCartToOrderTemplateStateManager\n ) => void;\n}\n\nconst onDismiss = (state: ISaveCartToOrderTemplateStateManager): void => {\n state.setContent({ color: 'success', showAlert: false });\n};\n\nconst SaveCartToOrderTemplateActions = {\n onDismiss\n};\n\nconst SaveCartToOrderTemplate: React.FC = (props: ISaveCartToOrderTemplateComponentProps) => {\n if (!isChannelTypeB2B(props.context.actionContext.requestContext)) {\n return null;\n }\n\n const [chosenOrderTemplate, setChosenOrderTemplate] = useState(undefined);\n const [addedProducts, setAddedProducts] = useState(undefined);\n const [addToOrderTemplateModalOpen, setAddToOrderTemplateModalOpen] = useState(false);\n const [linesAddedToOrderTemplateDialogOpen, setLinesAddedToOrderTemplateDialogOpen] = useState(false);\n const [duplicateItemsWhenAddingToOrderTemplateDialogOpen, setDuplicateItemsWhenAddingToOrderTemplateDialogOpen] = useState(false);\n const [addedLinesCount, setAddedLinesCount] = useState(0);\n const [addedItemsCount, setAddedItemsCount] = useState(0);\n\n const {\n addToOrderTemplateDialogResources,\n createOrderTemplateDialogResources,\n createOrderTemplateFromCartButton,\n createOrderTemplateFromCartButtonTooltip\n } = props;\n\n const onDuplicateDialogCancel = () => {\n setDuplicateItemsWhenAddingToOrderTemplateDialogOpen(false);\n setTimeout(() => {\n setAddToOrderTemplateModalOpen(true);\n }, 500);\n };\n const isMultipleCatalogFeatureEnabledInHq = props.isMultipleCatalogFeatureEnabledInHq || false;\n const overrideQuantity = async () => {\n const newLinesToupdate: ProductListLine[] = [];\n\n for (const cartLine of props.data.cartLines) {\n const getLinesInput = new GetProductListLinesInput(chosenOrderTemplate?.Id!, cartLine.ProductId!.toString());\n const linesState = await getProductListLines(getLinesInput, props.context.actionContext);\n const length = 1;\n const linesToUpdate = linesState.lines.filter(line => line.productListLine.ProductId === cartLine.ProductId);\n if (linesToUpdate.length !== length) {\n // skip new line if not exist already top update\n continue;\n }\n const lineToUpdate = linesToUpdate[0].productListLine;\n lineToUpdate.UnitOfMeasure = cartLine.UnitOfMeasureSymbol || 'ea';\n lineToUpdate.Quantity = cartLine.Quantity!;\n if (isMultipleCatalogFeatureEnabledInHq) {\n lineToUpdate.CatalogId = cartLine.CatalogId;\n }\n newLinesToupdate.push(lineToUpdate);\n }\n\n await updateProductListLinesAsync(\n {\n callerContext: props.context.actionContext\n },\n chosenOrderTemplate!.Id,\n newLinesToupdate\n ).then(async updatedLines => {\n updateLinesCounts(updatedLines);\n const allProductInputs: FullProductInput[] = getFullProductsDetails(updatedLines);\n const allProducts = await getFullProducts(allProductInputs, props.context.actionContext);\n setAddedProducts(allProducts);\n setDuplicateItemsWhenAddingToOrderTemplateDialogOpen(false);\n setTimeout(() => {\n setLinesAddedToOrderTemplateDialogOpen(true);\n }, 500);\n });\n };\n const getFullProductsDetails = (productLines: ProductListLine[]) => {\n const allProdInputs: FullProductInput[] = [];\n productLines.forEach(lines => {\n if (lines.ProductId) {\n allProdInputs.push(\n new FullProductInput(\n lines.ProductId,\n props.context.actionContext.requestContext.apiSettings,\n getProductDetailsCriteriaFromActionInput(props.context.actionContext),\n props.context.actionContext.requestContext\n )\n );\n }\n });\n return allProdInputs;\n };\n\n const onOrderTemplateSelected = async (orderTemplate: ProductList) => {\n setChosenOrderTemplate(orderTemplate);\n const allProductListLines = props.data.cartLines?.map(cartLine => {\n const productListLineToAdd: ProductListLine = {\n ProductListId: orderTemplate.Id,\n ProductId: cartLine.ProductId,\n Quantity: cartLine.Quantity,\n UnitOfMeasure: cartLine.UnitOfMeasureSymbol\n };\n return productListLineToAdd;\n });\n\n const allProductInputs: FullProductInput[] = getFullProductsDetails(allProductListLines);\n const allProducts = await getFullProducts(allProductInputs, props.context.actionContext);\n\n // Filter out products with keyed in price\n const filteredProductListLines = props.data.cartLines\n .filter(cartline => !cartline.IsPriceKeyedIn)\n .map(cartLine => {\n const productListLineToAdd: ProductListLine = {\n ProductListId: orderTemplate.Id,\n ProductId: cartLine.ProductId,\n Quantity: cartLine.Quantity,\n UnitOfMeasure: cartLine.UnitOfMeasureSymbol,\n ...(isMultipleCatalogFeatureEnabledInHq && { catalogId: cartLine.CatalogId })\n };\n\n return productListLineToAdd;\n });\n\n await addProductListLinesAsync({ callerContext: props.context.actionContext }, orderTemplate.Id, filteredProductListLines)\n .then(filteredAddedLines => {\n updateLinesCounts(filteredAddedLines);\n setAddedProducts(allProducts);\n setAddToOrderTemplateModalOpen(false);\n setTimeout(() => {\n setLinesAddedToOrderTemplateDialogOpen(true);\n }, 500);\n })\n .catch(error => {\n if (error.name !== 'Microsoft_Dynamics_Commerce_Runtime_DuplicateObject') {\n return AsyncResult.reject(error);\n }\n setAddToOrderTemplateModalOpen(false);\n setTimeout(() => {\n setDuplicateItemsWhenAddingToOrderTemplateDialogOpen(true);\n }, 500);\n return AsyncResult.resolve();\n });\n };\n const updateLinesCounts = (lines: ProductListLine[]) => {\n setAddedLinesCount(lines.length);\n setAddedItemsCount(lines.map(line => line.Quantity || 1).reduce((firstQuantity, secondQuantity) => firstQuantity + secondQuantity));\n };\n const onSaveCartToOrderTemplateClick = () => {\n setAddToOrderTemplateModalOpen(true);\n };\n\n const areAllCartlinesPriceKeyedIn = props.data.cartLines.filter(cartline => !cartline.IsPriceKeyedIn).length === 0;\n\n const addToOrderTemplateRef: React.RefObject = React.createRef();\n\n return (\n <>\n \n {chosenOrderTemplate && addedProducts && (\n \n )}\n \n \n {createOrderTemplateFromCartButton}\n \n {areAllCartlinesPriceKeyedIn && (\n \n {createOrderTemplateFromCartButtonTooltip}\n \n )}\n \n );\n};\n\nexport const SaveCartToOrderTemplateComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n ISaveCartToOrderTemplateComponent\n>('SaveCartToOrderTemplate', { component: SaveCartToOrderTemplate, ...SaveCartToOrderTemplateActions });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\nimport { ISwatchItem, SwatchComponent } from '../../product-dimension';\n\n/**\n * Props for product component swatch.\n */\nexport interface IProductComponentV2SwatchProps {\n context: ICoreContext;\n swatches: ISwatchItem[];\n dimensionType?: string;\n onSelectDimension(coreContext: ICoreContext, swatchItem: ISwatchItem, dimensionType?: string): void;\n}\n\n/**\n * Swatch for the product component.\n * @param props - Swatch props.\n * @returns React element.\n */\nexport const ProductComponentV2SwatchComponent: React.FC = (props: IProductComponentV2SwatchProps) => {\n const { context, dimensionType, swatches, onSelectDimension } = props;\n\n const onSelectItem = React.useCallback(\n (item: ISwatchItem) => {\n onSelectDimension(context, item, dimensionType);\n },\n [onSelectDimension, context, dimensionType]\n );\n\n if (ArrayExtensions.hasElements(swatches)) {\n return ;\n }\n\n return
;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { extend, IClientDimension, IDictionaryStringString, IGrid } from '../utilities';\n\n/**\n * Timed Text Markup Language (TTML).\n * See http://www.w3.org/TR/ttml1/ for more details.\n */\nexport const xmlNS = 'http://www.w3.org/XML/1998/namespace';\n\n/**\n * @interface ITtmlSettings\n * @classdesc - The ITtmlSettings interface contract.\n */\nexport interface ITtmlSettings {\n ttmlNamespace?: string;\n ttmlStyleNamespace?: string;\n ttmlParameterNamespace?: string;\n ttmlMetaNamespace?: string;\n idPrefix?: string;\n mediaFrameRate?: number;\n mediaFrameRateMultiplier?: number;\n mediaSubFrameRate?: number;\n mediaTickRate?: number;\n supportedTimeBase?: string;\n rootContainerRegionDimensions?: IClientDimension | null;\n relatedMediaObjectRegion?: IClientDimension | null;\n cellResolution?: IGrid;\n defaultRegionStyle?: IDictionaryStringString;\n fontMap?: IDictionaryStringString;\n log?: Function;\n}\n\n/**\n *\n * The TtmlSettings class.\n * The TtmlSettings class is used to pass settings between the ttml parser, the ttml context, and the outside world.\n * It supplies default values which can be overridden via overrides passed to the constructor.\n */\nexport class TtmlSettings implements ITtmlSettings {\n /**\n * @name - ttmlNamespace\n * @description - The ttml namespace to use.\n * @public\n * @type {string}\n */\n public ttmlNamespace: string = 'http://www.w3.org/ns/ttml';\n\n /**\n * @name - ttmlStyleNamespace\n * @description - The ttml style namespace to use.\n * @public\n * @type {string}\n */\n public ttmlStyleNamespace: string = 'http://www.w3.org/ns/ttml#styling';\n\n /**\n * @name - ttmlParameterNamespace\n * @description - The ttml parameter namespace to use.\n * @public\n * @type {string}\n */\n public ttmlParameterNamespace: string = 'http://www.w3.org/ns/ttml#parameter';\n\n /**\n * @name - ttmlMetaNamespace\n * @description - The ttml metadata namespace to use.\n * @public\n * @type {string}\n */\n public ttmlMetaNamespace: string = 'http://www.w3.org/ns/ttml#metadata';\n\n /**\n * @name - idPrefix\n * @description - The id prefix to use so ids copied from the ttml doc are unique.\n * @public\n * @type {string}\n */\n public idPrefix: string = '';\n\n /**\n * @name - mediaFrameRate\n * @description - The media frame rate to use.\n * @public\n * @type {number}\n */\n public mediaFrameRate: number = 30;\n\n /**\n * @name - mediaFrameRateMultiplier\n * @description - The media frame rate multiplier to use.\n * @public\n * @type {number}\n */\n public mediaFrameRateMultiplier: number = 1;\n\n /**\n * @name - mediaSubFrameRate\n * @description - The media sub frame rate to use.\n * @public\n * @type {number}\n */\n public mediaSubFrameRate: number = 1;\n\n /**\n * @name - mediaTickRate\n * @description - The media tick rate to use.\n * @public\n * @type {number}\n */\n public mediaTickRate: number = 1000;\n\n /**\n * @name - supportedTimeBase\n * @description - The support timebase value.\n * @public\n * @type {string}\n */\n public supportedTimeBase: string = 'media';\n\n /**\n * @name - rootContainerRegionDimensions\n * @description - The root container's dimensions.\n * @public\n * @type {IClientDimension}\n */\n public rootContainerRegionDimensions: IClientDimension | null = null;\n\n /**\n * @name - relatedMediaObjectRegion\n * @description - The media object's dimensions.\n * @public\n * @type {IClientDimension}\n */\n public relatedMediaObjectRegion: IClientDimension | null = null;\n\n /**\n * @name - cellResolution\n * @description - The default cell grid.\n * @public\n * @type {IGrid}\n */\n public cellResolution: IGrid = { rows: 15, columns: 32 };\n\n /**\n * @name - defaultRegionStyle\n * @description - The default region style.\n * @public\n * @type {IDictionaryStringString}\n */\n public defaultRegionStyle: IDictionaryStringString = {\n backgroundColor: 'transparent',\n color: '#E8E9EA',\n direction: 'ltr',\n display: 'auto',\n displayAlign: 'before',\n extent: 'auto',\n fontFamily: 'default',\n fontSize: '1c',\n fontStyle: 'normal',\n fontWeight: 'normal',\n lineHeight: 'normal',\n opacity: '1',\n origin: 'auto',\n overflow: 'hidden',\n padding: '0',\n showBackground: 'always',\n textAlign: 'start',\n textDecoration: 'none',\n textOutline: 'none',\n unicodeBidi: 'normal',\n visibility: 'visible',\n wrapOption: 'normal',\n writingMode: 'lrtb'\n };\n\n /**\n * @name - fontMap\n * @description - The default font map.\n * @public\n * @type {IDictionaryStringString}\n */\n public fontMap: IDictionaryStringString = {};\n\n /**\n * @name - log\n * @description - The logging function to use in debug mode.\n * @public\n * @type {Function}\n */\n public log: Function | undefined;\n\n /*\n * Constructor for the TtmlSettings class.\n */\n public constructor(settingsOverrides?: ITtmlSettings) {\n // These are from the Simple Delivery Profile\n // Per spec recommendation that default be monospace sans serif.\n this.fontMap.default = 'Lucida sans typewriter, Lucida console, Consolas';\n this.fontMap.monospaceSerif = 'Courier';\n this.fontMap.proportionalSerif = 'Times New Roman, Serif';\n this.fontMap.monospaceSansSerif = 'Lucida sans typewriter, Lucida console, Consolas';\n this.fontMap.proportionalSansSerif = 'Arial, Sans-serif';\n this.fontMap.casual = 'Verdana';\n this.fontMap.cursive = 'Zapf-Chancery, Segoe script, Cursive';\n this.fontMap.smallCaps = 'Arial, Helvetica';\n\n // These are others from the broader ttml (v1.0)\n this.fontMap.monospace = 'Lucida sans typewriter, Lucida console, Consolas';\n this.fontMap.sansSerif = 'Arial, Sans-serif';\n this.fontMap.serif = 'Times New Roman, Serif';\n\n if (settingsOverrides) {\n extend(this, settingsOverrides);\n }\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n addClass,\n css,\n extend,\n format,\n getDimensions,\n getText,\n IClientDimension,\n IDictionaryStringString,\n isNullOrWhiteSpace,\n nodeListToArray,\n trim\n} from '../utilities';\nimport { ITtmlEvent, TtmlParser } from './ttml-parser';\nimport { TtmlSettings, xmlNS } from './ttml-settings';\n\n// Timed Text Markup Language (TTML).\n// See http://www.w3.org/TR/ttml1/ for more details.\n\n/**\n * @interface ITtmlContext\n * @classdesc - The TtmlContext interface contract.\n */\nexport interface ITtmlContext {\n setOwnerDocument(ownerDocument: Document): void;\n updateRelatedMediaObjectRegion(dimensions: IClientDimension): boolean;\n resetCurrentEvents(): void;\n hasEvents(): boolean;\n updateCurrentEvents(time: number): boolean;\n getCues(time: number): HTMLElement[];\n}\n\n/**\n * @interface ITtmlTranslationResult\n * @classdesc - The ITtmlTranslationResult interface contract.\n */\ninterface ITtmlTranslationResult {\n outerNode: HTMLElement | null;\n innerNode: HTMLElement | null;\n inheritableStyleSet?: IDictionaryStringString | null;\n}\n\n/**\n * @interface ITtmlPruneResult\n * @classdesc - The ITtmlPruneResult interface contract.\n */\ninterface ITtmlPruneResult {\n prunedElement: Element;\n hasPreservedContent: boolean;\n}\n\n/**\n * The TtmlContext. An instance of this class is returned from the TttmlParser.parse() method after it parses a ttml file.\n * This context is then used by the VideoClosedCaptions object to get the captions for any play position of the video.\n */\nexport class TtmlContext implements ITtmlContext {\n /**\n * @name - lengthRegEx\n * The regular expression pattern used in ttml->css text outline conersion.\n * @static\n * @private\n * @type {RegExp}\n */\n private static readonly lengthRegEx: RegExp = /\\s*(\\d+\\.*\\d*)(.*)\\s*/;\n\n /**\n * @name - rgbaRegEx\n * The regular expression pattern used in ttml->css color conersion.\n * @static\n * @private\n * @type {RegExp}\n */\n private static readonly rgbaRegEx: RegExp = /\\s*rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)\\s*/;\n\n /**\n * @name - TtmlNamedColorMap\n * The table used to map named ttml color values to css color values.\n * @static\n * @private\n * @type {IDictionaryStringString}\n */\n private static readonly TtmlNamedColorMap: IDictionaryStringString = {\n transparent: 'rgba(0,0,0,0)',\n black: 'rgba(0,0,0,1)',\n silver: 'rgba(192,192,192,1)',\n gray: 'rgba(128,128,128,1)',\n white: 'rgba(255,255,255,1)',\n maroon: 'rgba(128,0,0,1)',\n red: 'rgba(255,0,0,1)',\n purple: 'rgba(128,0,128,1)',\n fuchsia: 'rgba(255,0,255,1)',\n magenta: 'rgba(255,0,255,1)',\n green: 'rgba(0,128,0,1)',\n lime: 'rgba(0,255,0,1)',\n olive: 'rgba(128,128,0,1)',\n yellow: 'rgba(255,255,0,1)',\n navy: 'rgba(0,0,128,1)',\n blue: 'rgba(0,0,255,1)',\n teal: 'rgba(0,128,128,1)',\n aqua: 'rgba(0,255,255,1)',\n cyan: 'rgba(0,255,255,1)'\n };\n\n /**\n * @name - events\n * The set of all ttml events.\n * @public\n * @type {ITtmlEvent[]}\n */\n public events!: ITtmlEvent[];\n\n /**\n * @name - settings\n * The ttml settings.\n * @public\n * @type {TtmlSettings}\n */\n public settings!: TtmlSettings;\n\n /**\n * @name - styleSetCache\n * The ttml styleSet cache.\n * @public\n * @type {IDictionaryStringString[]}\n */\n public styleSetCache!: IDictionaryStringString[];\n\n /**\n * @name - rootContainerRegion\n * The root container region.\n * @public\n * @type {Element}\n */\n public rootContainerRegion!: Element;\n\n /**\n * @name - root\n * The root element.\n * @public\n * @type {Element}\n */\n public root!: Element;\n\n /**\n * @name - body\n * The body element.\n * @public\n * @type {Element}\n */\n public body!: Element;\n\n /**\n * @name - layout\n * The layout element.\n * @public\n * @type {Element}\n */\n public layout!: Element;\n\n /**\n * @name - ownerDocument\n * The owner document for this context. Used to create html elements.\n * @private\n * @type {Document}\n */\n private ownerDocument!: Document;\n\n /**\n * @name - currentEvents\n * The current set of temporally active events.\n * @private\n * @type {ITtmlEvent[]}\n */\n private currentEvents!: ITtmlEvent[];\n\n /**\n * @name - currentEventsTime\n * The time the currentEvents was populated.\n * @private\n * @type {number}\n */\n private currentEventsTime!: number;\n\n /**\n * Converts a ttml text decoration style value to a css one.\n * @param ttmlTextDecoration - The ttml value.\n * @returns - The css value.\n */\n private static _ttmlToCssTextDecoration(ttmlTextDecoration: string): string {\n let textDecoration = '';\n const parts = ttmlTextDecoration.split(/\\s+/);\n\n // Since we have no CSS for the 'no' values just replace them all with a none at the front of the list.\n for (const value of parts) {\n // eslint-disable-next-line default-case\n switch (value) {\n case 'none':\n case 'noUnderline':\n case 'noLineThrough':\n case 'noOverline':\n textDecoration = 'none';\n }\n }\n\n // Then append all the others.\n for (const value of parts) {\n switch (value) {\n case 'none':\n case 'noUnderline':\n case 'noLineThrough':\n case 'noOverline':\n break;\n case 'lineThrough':\n textDecoration += ' line-through';\n break;\n default:\n textDecoration += ` ${value}`;\n }\n }\n\n return trim(textDecoration);\n }\n\n /**\n * Converts a ttml text color style value to a css one.\n * #RRGGBB and rgb(rrr,ggg,bbb) do not need conversion and are not modified.\n * #RRGGBBAA is modified because css doesn't support it (at least as implemented in todays browsers).\n * rgba(rrr,ggg,bbb,aaa) is converted to rgba(rrr,ggg,bbb,0-1).\n * ttml namedColors are converted to rgb(rrr,ggg,bbb) in the unlikely event that their alpha (only) is overridden.\n * @param color - The ttml value.\n * @returns - The css value.\n */\n private static _ttmlToCssColor(color: string): string {\n let mappedColor = color;\n\n color = color.toLowerCase();\n\n if (color.startsWith('rgba')) {\n const parts = TtmlContext.rgbaRegEx.exec(color);\n\n if (parts && parts.length === 5) {\n const red = parts[1];\n const green = parts[2];\n const blue = parts[3];\n const alpha = Number.parseInt(parts[4], 10);\n\n mappedColor = format('rgba({0},{1},{2},{3})', red, green, blue, Math.round((alpha * 100) / 255) / 100);\n }\n } else if (color.startsWith('#') && color.length === 9) {\n const red = Number.parseInt(color.substr(1, 2), 16);\n const green = Number.parseInt(color.substr(3, 2), 16);\n const blue = Number.parseInt(color.substr(5, 2), 16);\n const alpha = Number.parseInt(color.substr(7, 2), 16);\n\n mappedColor = format('rgba({0},{1},{2},{3})', red, green, blue, Math.round((alpha * 100) / 255) / 100);\n } else if (TtmlContext.TtmlNamedColorMap[color]) {\n mappedColor = TtmlContext.TtmlNamedColorMap[color];\n }\n\n return mappedColor;\n }\n\n /**\n * Applies default styles to the element to match the ttml defaults.\n * @param element - The element to set the default styles on.\n * @returns - The specified element (for chaining).\n */\n private static _defaultStyle(element: HTMLElement): HTMLElement {\n // Set some element styles to our ttml defaults for them.\n css(element, 'background-color', TtmlContext.TtmlNamedColorMap.transparent);\n css(element, 'offset', '0');\n css(element, 'margin', '0');\n css(element, 'padding', '0');\n css(element, 'border', '0');\n return element;\n }\n\n /**\n * Set the context's owner document. It will use this to create elements during translation.\n * @param ownerDocument - The owner document for this context.\n */\n public setOwnerDocument(ownerDocument: Document): void {\n this.ownerDocument = ownerDocument;\n }\n\n /**\n * Updates the context's media object region.\n * @public\n * @param dimensions - The desired dimensions for the region.\n * @returns - True if the dimensions where changed, otherwise false.\n */\n public updateRelatedMediaObjectRegion(dimensions: IClientDimension): boolean {\n if (\n dimensions !== null &&\n (!this.settings.relatedMediaObjectRegion ||\n dimensions.width !== this.settings.relatedMediaObjectRegion.width ||\n dimensions.height !== this.settings.relatedMediaObjectRegion.height)\n ) {\n this.settings.relatedMediaObjectRegion = {\n width: dimensions.width,\n height: dimensions.height\n };\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates whether or not the context has events.\n * @returns - True if the context has events, otherwise false.\n */\n public hasEvents(): boolean {\n return this.events && !!this.events.length;\n }\n\n /**\n * Resets the context's currentEvents.\n */\n public resetCurrentEvents(): void {\n this.currentEvents = [];\n }\n\n /**\n * Updates the context's currentEvents if there are new events for the specified time.\n * @param time - The time to get events for.\n * @returns - True if the events for the specified time are different than the currentEvents, otherwise false.\n */\n public updateCurrentEvents(time: number): boolean {\n const timeEvents = this._getTemporallyActiveEvents(time);\n\n // As a shortcut compare lengths first.\n const currentEventsLength = this.currentEvents ? this.currentEvents.length : 0;\n const timeEventsLength = timeEvents ? timeEvents.length : 0;\n\n if (currentEventsLength !== timeEventsLength) {\n this.currentEventsTime = time;\n this.currentEvents = timeEvents;\n return true;\n }\n\n if (this.currentEvents) {\n for (let index = 0; index < currentEventsLength; index++) {\n if (this.currentEvents[index].time !== timeEvents[index].time) {\n this.currentEventsTime = time;\n this.currentEvents = timeEvents;\n return true;\n }\n }\n }\n\n return false;\n }\n\n /**\n * The set of cues that apply to the specified time.\n * @param time - The time to get cues for.\n * @returns - The set of cues for the specified time, otherwise an empty [].\n */\n public getCues(time: number): HTMLElement[] {\n let cues: HTMLElement[] = [];\n\n if (this.currentEventsTime !== time) {\n this.updateCurrentEvents(time);\n }\n\n // Find all the region elements in the TTML namespace.\n const preserveSpace = TtmlParser.getAttributeNS(this.root, 'space', xmlNS) === 'preserve';\n const regions = (this.layout ? this.layout.getElementsByTagNameNS(this.settings.ttmlNamespace, 'region') : []);\n\n for (const region of regions) {\n const regionId = TtmlParser.getAttributeNS(region, 'id', xmlNS);\n const anonymousId = region.getAttribute('data-isanonymous');\n\n if (anonymousId || regionId) {\n const translation = this._translate(region, this.settings.defaultRegionStyle, preserveSpace, time, this.translateToHtml);\n\n if (translation.outerNode && translation.innerNode) {\n const innerNode = translation.innerNode;\n const outerNode = translation.outerNode;\n\n // Create a new subtree for the body element, prune elements\n // not associated with the region, and if its not empty then\n // select it into this region by adding it to div container.\n for (const event of this.events) {\n if (event.element) {\n if (this._isInRegion(event.element, anonymousId ? '' : regionId)) {\n const pruneResult = this._prune(\n event.element,\n translation.inheritableStyleSet!,\n preserveSpace,\n time,\n this.translateToHtml\n );\n let cueBody: Element | null = pruneResult.prunedElement;\n\n if (!pruneResult.hasPreservedContent && cueBody && !trim(getText(cueBody)).length) {\n cueBody = null;\n }\n\n if (cueBody) {\n innerNode.appendChild(cueBody);\n }\n }\n }\n }\n\n const showAlways = outerNode.getAttribute('data-showBackground') === 'always';\n\n if (showAlways || innerNode.children.length) {\n if (showAlways) {\n // Just needed internally for the previous check, don't pass through on the cue.\n outerNode.removeAttribute('data-showBackground');\n }\n\n cues.push(outerNode);\n }\n }\n }\n }\n\n // If we ended up with any displayable cues add them all to the rootContainerRegion cue.\n if (cues.length) {\n const rcr = this._translate(this.rootContainerRegion, { overflow: 'hidden', padding: '0' }, false, time, this.translateToHtml);\n\n for (const cue of cues) {\n rcr.innerNode!.appendChild(cue);\n }\n\n cues = [];\n cues.push(rcr.outerNode!);\n }\n\n return cues;\n }\n\n /**\n * Get the list of temporally active events for the specified time.\n * @private\n * @param time - The time to get the active events for.\n * @returns - The set of active events for the specified time, otherwise an empty [].\n */\n private _getTemporallyActiveEvents(time: number): ITtmlEvent[] {\n return this.events.filter(event => {\n return event.element ? this._isTemporallyActive(event.element, time) : true;\n });\n }\n\n /**\n * Determines whether or not the specified element is temporally active at the specified time.\n * @param element - The element to check.\n * @param time - The time to check against.\n * @returns - True if the element is active at the specified time, otherwise false.\n */\n private _isTemporallyActive(element: Element, time: number): boolean {\n return (\n (Number.parseInt(element.getAttribute('data-time-start')!, 10) || 0) <= time &&\n time < (Number.parseInt(element.getAttribute('data-time-end')!, 10) || 0)\n );\n }\n\n /**\n * Convert a ttml element into the equivalent in another format via the supplied translator function.\n * @param element - The ttml element to translate.\n * @param inheritedStyleSet - The element's inherited style set.\n * @param preserveSpace - Indicates whether or not space should be preserved.\n * @param time - The time to translate against. Elements and styles are temporally transient.\n * @param translator - The translator function to use. Originally supported both xml/html but is always using html in MWF.\n * @returns - A ITtmlTranslationResult instance containing the translation results.\n */\n private _translate(\n element: Element,\n inheritedStyleSet: IDictionaryStringString,\n preserveSpace: boolean,\n time: number,\n translator: Function\n ): ITtmlTranslationResult {\n let translation: ITtmlTranslationResult;\n let computedStyleSet: IDictionaryStringString;\n\n if (this._isTemporallyActive(element, time)) {\n const tag = this._getTagNameEquivalent(element);\n\n computedStyleSet = this._getComputedStyleSet(element, inheritedStyleSet, tag, time);\n\n if (computedStyleSet.display !== 'none') {\n const applicableStyleSet = this._getApplicableStyleSet(computedStyleSet, tag);\n\n translation = translator(element, applicableStyleSet, preserveSpace);\n\n return {\n outerNode: translation.outerNode,\n innerNode: translation.innerNode,\n inheritableStyleSet: this._getInheritableStyleSet(computedStyleSet)\n };\n }\n }\n\n return { outerNode: null, innerNode: null, inheritableStyleSet: null };\n }\n\n /**\n * Convert a ttml element into the its equivalent html element.\n * @param element - The ttml element to translate.\n * @param applicableStyleSet - The style set applicable to this element.\n * @param preserveSpace - Indicates whether or not space should be preserved.\n * @returns - A ITtmlTranslationResult instance containing the translation results.\n */\n private readonly translateToHtml = (\n element: Element,\n applicableStyleSet: IDictionaryStringString,\n preserveSpace: boolean\n ): ITtmlTranslationResult => {\n let translation: HTMLElement;\n let innerNode: HTMLElement;\n const name = this._getTagNameEquivalent(element);\n let htmlName = '';\n let htmlClass = '';\n switch (name) {\n case 'ttml:region':\n htmlClass = 'cue ';\n\n /* Falls through */\n // break;\n case 'ttml:rootcontainerregion':\n case 'ttml:body':\n case 'ttml:div':\n htmlName = 'div';\n break;\n case 'ttml:p':\n htmlName = 'p';\n break;\n case 'ttml:span':\n htmlName = 'span';\n break;\n case 'ttml:br':\n htmlName = 'br';\n break;\n default:\n }\n\n const role = TtmlParser.getAttributeNS(element, 'role', this.settings.ttmlMetaNamespace);\n\n if (role) {\n htmlClass += ` ${role}`;\n }\n\n const agent = TtmlParser.getAttributeNS(element, 'agent', this.settings.ttmlMetaNamespace);\n\n if (agent) {\n htmlClass += ` ${agent}`;\n }\n\n // Hack until display:ruby on other elements works.\n if (role === 'x-ruby') {\n htmlName = 'ruby';\n } else if (role === 'x-rubybase') {\n htmlName = 'rb';\n } else if (role === 'x-rubytext') {\n htmlName = 'rt';\n }\n\n if (!isNullOrWhiteSpace(htmlName)) {\n translation = TtmlContext._defaultStyle(this.ownerDocument.createElement(htmlName));\n addClass(translation, trim(htmlClass));\n\n const title = TtmlParser.getAttributeNS(element, 'title', this.settings.ttmlMetaNamespace);\n\n if (title) {\n translation.setAttribute('title', title);\n }\n\n const id = TtmlParser.getAttributeNS(element, 'id', xmlNS);\n\n if (id && this.settings.idPrefix) {\n // Migrate the ttml doc id's over to the html markup.\n // Use idPrefix to ensure there are no name clases on id's already in target doc.\n translation.setAttribute('id', this.settings.idPrefix + id);\n }\n\n if (name === 'ttml:region') {\n // To get a to display properly we are actually going to need to create two nested
s\n // This is because for displayAlign to work we need a table-cell
inside a table
.\n innerNode = translation.appendChild(TtmlContext._defaultStyle(this.ownerDocument.createElement('div')));\n innerNode.setAttribute('style', 'display:table; border-spacing:0; cell-spacing:0; cell-padding:0; width:100%; height:100%');\n innerNode = innerNode.appendChild(TtmlContext._defaultStyle(this.ownerDocument.createElement('div')));\n css(innerNode, 'display', 'table-cell');\n\n // Apply the displayAlign style to inner table-cell
\n if (applicableStyleSet.displayAlign) {\n this._translateStyle(name, innerNode, { displayAlign: applicableStyleSet.displayAlign });\n\n // Then remove displayAlign from the applicableStyleSet so as not to also later apply it to the outer table
\n applicableStyleSet.displayAlign = '';\n }\n }\n\n // If we're preserving space add an inner with 'white-space: pre'.\n // This is how we implement preserving space in css and we need an inner\n // span because the 'real' span will already be setting it's css white-space\n // value to either normal or nowrap and we can't collide with that.\n if (preserveSpace && name === 'ttml:span') {\n innerNode = translation.appendChild(TtmlContext._defaultStyle(this.ownerDocument.createElement('span')));\n css(innerNode, 'white-space', 'pre');\n }\n\n // Default some css properties that we don't want to inadvertantly end up\n // inheriting values for that might cause adverse layout impacts for us.\n css(translation, 'position', 'static');\n css(translation, 'width', '100%');\n\n // Copy style from element over to html, translating into CSS as we go.\n this._translateStyle(name, translation, applicableStyleSet);\n }\n\n return { outerNode: translation!, innerNode: innerNode! ? innerNode! : translation! };\n };\n\n /**\n * Translate the ttml styles in a styleSet to their equivalent css styles and apply them to the specified html element.\n * @param tagName - The ttml element tagName. All styles do not apply to all tagNames.\n * @param element - The ttml element to translate.\n * @param applicableStyleSet - The style set applicable to this element.\n */\n private _translateStyle(tagName: string, element: HTMLElement, applicableStyleSet: IDictionaryStringString): void {\n for (const style in applicableStyleSet) {\n if (applicableStyleSet[style]) {\n this._applyStyle(element, tagName, style, applicableStyleSet[style]);\n }\n }\n }\n\n /**\n * Convert the element if it is in the region, then recurse into its contents.\n * If it ends up with no children then we dont add it to the region, we prune it.\n * @param element - The ttml element to translate.\n * @param inheritedStyleSet - The style set inherited by this element.\n * @param preserveSpace - Indicates whether or not space should be preserved.\n * @param time - The time to translate against. Elements and styles are temporally transient.\n * @param translator - The translator function to use. Originally supported both xml/html but is always using html in MWF.\n * @param [ignoreAncestors] - Specifies whether or not to ignore the element's ancestors.\n * @returns - A ITtmlPruneResult instance containing the prune results.\n */\n private _prune(\n element: Element,\n inheritedStyleSet: IDictionaryStringString,\n preserveSpace: boolean,\n time: number,\n translator: Function,\n ignoreAncestors: boolean = false\n ): ITtmlPruneResult {\n let outerNode: Element;\n let hasPreservedContent = false;\n\n let translation = this._translate(element, inheritedStyleSet, preserveSpace, time, translator);\n\n if (translation.outerNode !== null) {\n const tag = this._getTagNameEquivalent(element);\n\n outerNode = translation.outerNode;\n let innerNode = translation.innerNode;\n\n for (const child of nodeListToArray(element.childNodes)) {\n if (child.nodeType === Node.COMMENT_NODE) {\n // Do nothing.\n } else if (child.nodeType === Node.TEXT_NODE) {\n innerNode!.appendChild(document.createTextNode((child).data));\n\n if (preserveSpace && tag === 'ttml:span') {\n hasPreservedContent = true;\n }\n } else {\n let childPreserveSpace = preserveSpace;\n const spaceAttr = TtmlParser.getAttributeNS(child, 'space', xmlNS);\n\n if (spaceAttr) {\n childPreserveSpace = spaceAttr === 'preserve';\n }\n\n const pruneRecord = this._prune(\n child,\n translation.inheritableStyleSet!,\n childPreserveSpace,\n time,\n translator,\n true\n );\n\n hasPreservedContent = hasPreservedContent || pruneRecord.hasPreservedContent;\n\n if (pruneRecord.prunedElement) {\n innerNode!.appendChild(pruneRecord.prunedElement);\n }\n }\n }\n\n // Now traverse back till the body and build the corresponding structures.\n if (!ignoreAncestors) {\n let ancestor = element.parentNode;\n\n while (ancestor !== null && ancestor.nodeType === Node.ELEMENT_NODE && ancestor !== this.body) {\n translation = this._translate(ancestor, inheritedStyleSet, preserveSpace, time, translator);\n if (translation.outerNode) {\n innerNode = translation.innerNode;\n innerNode!.appendChild(outerNode);\n outerNode = translation.outerNode;\n } else {\n break;\n }\n\n ancestor = ancestor.parentNode;\n }\n }\n }\n\n return { prunedElement: outerNode!, hasPreservedContent };\n }\n\n /**\n * Build this element's ttml computed styleset.\n * This is used as the base styleSet to filter the inherited styleSet from for an element's children.\n * @param element - The ttml element to translate.\n * @param inheritedStyleSet - The styleSet inherited by this element.\n * @param tagName - The ttml element tagName. All styles do not apply to all tagNames.\n * @param time - The time to translate against. Elements and styles are temporally transient.\n * @returns - The resulting computed styleSet.\n */\n private _getComputedStyleSet(\n element: Element,\n inheritedStyleSet: IDictionaryStringString,\n tagName: string,\n time: number\n ): IDictionaryStringString {\n // Start off with a clone of the inherited styleset.\n const computedStyleSet = extend({}, inheritedStyleSet);\n\n // Iterate over this nodes ttml styles and pave them onto it's computed styleset.\n extend(computedStyleSet, this.styleSetCache[Number.parseInt(element.getAttribute('data-styleSet')!, 10)]);\n\n // Apply any temporally active style animations.\n const sets = element.getElementsByTagNameNS(this.settings.ttmlNamespace, 'set');\n\n for (const set of nodeListToArray(sets)) {\n if (this._isTemporallyActive(set, time)) {\n TtmlParser.applyInlineStyles(this.settings, computedStyleSet, set);\n }\n }\n\n if (tagName === 'ttml:p' && computedStyleSet.lineHeight === 'normal') {\n // Special case for

's with tts:lineHeight='normal'\n // This means use the largest tts:fontSize value of any\n // of it's descendant 's. Since we don't know what\n // values those might be until translateStyle we'll just\n // save them all and figure it out then.\n const fontSizes = this._appendSpanFontSizes(element, this._getInheritableStyleSet(computedStyleSet), time, '');\n\n if (fontSizes) {\n computedStyleSet['computed-lineHeight'] = fontSizes;\n }\n }\n\n return computedStyleSet;\n }\n\n /**\n * Build this tags ttml applicable styleset from the specified computed styleSet to apply only to it.\n * @param computedStyleSet - The style set inherited by this element.\n * @param tagName - The ttml element tagName. All styles do not apply to all tagNames.\n * @returns - The resulting applicable styleSet.\n */\n private _getApplicableStyleSet(computedStyleSet: IDictionaryStringString, tagName: string): IDictionaryStringString {\n const applicableStyleSet: IDictionaryStringString = {};\n\n // Special case extent to the front of the list as later processing of\n // padding will depend on it having already been set first.\n if (computedStyleSet.extent && this._isStyleApplicable(tagName, 'extent')) {\n applicableStyleSet.extent = computedStyleSet.extent;\n }\n\n // Special case color to the front of the list as later processing of\n // textOutline will depend on it having already been set first.\n if (computedStyleSet.color && this._isStyleApplicable(tagName, 'color')) {\n applicableStyleSet.color = computedStyleSet.color;\n }\n\n for (const style in computedStyleSet) {\n if (this._isStyleApplicable(tagName, style)) {\n applicableStyleSet[style] = computedStyleSet[style];\n }\n }\n\n return applicableStyleSet;\n }\n\n /**\n * Determines if the specified style applies to the specified ttml tagName.\n * NOTE: The ttml spec doesn't mention ttml:br in the styles 'applies to' sections but\n * as noted in the span section everything that applies to ttml:span also applies to ttml:br.\n * @private\n * @param tagName - The ttml element tagName. All styles do not apply to all tagNames.\n * @param style - The style to check against the tagName.\n * @returns - True if the ttml:style applies to the ttml:tag, otherwise false.\n */\n private _isStyleApplicable(tagName: string, style: string): boolean {\n switch (style) {\n case 'backgroundColor':\n case 'display':\n case 'visibility':\n return 'ttml:body ttml:div ttml:p ttml:region ttml:rootcontainerregion ttml:span ttml:br'.includes(tagName);\n\n // Technically these font styles do not apply to

s but for some reason the resulting html/css\n // for span/br doesnt compute line-height correctly if the entire containing

(div) isn't all the same...\n case 'fontFamily':\n case 'fontSize':\n case 'fontStyle':\n case 'fontWeight':\n return 'ttml:p ttml:span ttml:br'.includes(tagName);\n\n case 'color':\n case 'textDecoration':\n case 'textOutline':\n case 'wrapOption':\n return 'ttml:span ttml:br'.includes(tagName);\n\n case 'direction':\n case 'unicodeBidi':\n return 'ttml:p ttml:span ttml:br'.includes(tagName);\n\n case 'displayAlign':\n case 'opacity':\n case 'origin':\n case 'overflow':\n case 'padding':\n case 'showBackground':\n case 'writingMode':\n case 'zIndex':\n return 'ttml:region ttml:rootcontainerregion'.includes(tagName);\n\n case 'extent':\n return 'ttml:tt ttml:region ttml:rootcontainerregion'.includes(tagName);\n\n case 'computed-lineHeight':\n case 'lineHeight':\n case 'textAlign':\n return 'ttml:p'.includes(tagName);\n\n default:\n return false;\n }\n }\n\n /**\n * Filters a computed styleSet into an inheritable styleSet subset to pass on to children.\n * Not all styles are inheritable.\n * @private\n * @param computedStyleSet - The computed styleSet to filter.\n * @returns - The resulting inheritable styleSet.\n */\n private _getInheritableStyleSet(computedStyleSet: IDictionaryStringString): IDictionaryStringString {\n const inheritedStyleSet: IDictionaryStringString = {};\n\n for (const style in computedStyleSet) {\n if (computedStyleSet.hasOwnProperty(style)) {\n switch (style) {\n case 'backgroundColor':\n case 'computed-lineHeight':\n case 'display':\n case 'displayAlign':\n case 'extent':\n case 'opacity':\n case 'origin':\n case 'overflow':\n case 'padding':\n case 'showBackground':\n case 'unicodeBidi':\n case 'writingMode':\n case 'zIndex':\n break;\n default:\n inheritedStyleSet[style] = computedStyleSet[style];\n }\n }\n }\n\n return inheritedStyleSet;\n // eslint-disable-next-line max-lines\n }\n\n /**\n * Recurses through an element and it's descendants finding the font sizess of all it's 's.\n * @param element - The ttml element to translate.\n * @param inheritedStyleSet - The element's inherited styleSet.\n * @param time - The time to translate against. Elements and styles are temporally transient.\n * @param value - The list of font sizes to append to.\n * @returns - The value with any additional font sizes appended to it.\n */\n private _appendSpanFontSizes(element: Element, inheritedStyleSet: IDictionaryStringString, time: number, value: string): string {\n for (const child of nodeListToArray(element.childNodes)) {\n if (child.nodeType === Node.ELEMENT_NODE) {\n const tag = this._getTagNameEquivalent(child);\n\n if (tag === 'ttml:span') {\n const computedStyleSet = this._getComputedStyleSet(child, inheritedStyleSet, 'ttml:span', time);\n const fontSize = computedStyleSet.fontSize;\n\n if (fontSize) {\n value += (value ? ',' : '') + fontSize;\n }\n\n value = this._appendSpanFontSizes(child, this._getInheritableStyleSet(computedStyleSet), time, value);\n }\n }\n }\n\n return value;\n }\n\n /**\n * Determines whether or not the specified element is associated with the specified region.\n * Ttml defines 5 ordered rules, where the first rule satisfied is used and remaining rules are skipped.\n * @param element - The ttml element to check.\n * @param regionId - The id of the region to see if the element is associated with.\n * @returns - True if the specified element is within the specified region, otherwise false.\n */\n private _isInRegion(element: Element, regionId: string): boolean {\n // Quick test: Out of normal order, but makes following rules simpler.\n // This is a shortcut to check step #4 first\n if (!regionId) {\n return true;\n }\n\n const elemRegion = TtmlParser.getAttributeNS(element, 'region', this.settings.ttmlNamespace);\n\n // 1. If the element specifies a region attribute, then the element is\n // associated with the region referenced by that attribute;\n if (elemRegion === regionId) {\n return true;\n }\n\n if (!elemRegion) {\n // 2. If some ancestor of that element specifies a region attribute, then the element is\n // associated with the region referenced by the most immediate ancestor that specifies\n // this attribute;\n let ancestor = element.parentNode;\n\n while (ancestor !== null && ancestor.nodeType === Node.ELEMENT_NODE) {\n const id = this._getRegionId(ancestor);\n if (id) {\n return id === regionId;\n }\n ancestor = ancestor.parentNode;\n }\n\n // 3. If the element contains a descendant element that specifies a region attribute,\n // then the element is associated with the region referenced by that attribute;\n for (const node of nodeListToArray(element.getElementsByTagName('*'))) {\n if (this._getRegionId(node) === regionId) {\n return true;\n }\n }\n }\n\n // 5. The element is not associated with any region.\n return false;\n }\n\n /**\n * Gets the region id for the specified element.\n * @param element - The ttml element to check.\n * @returns - The id of the region the element is associated with.\n */\n private _getRegionId(element: Element): string {\n let regionId: string;\n\n if (element.nodeType === Node.ELEMENT_NODE && element.namespaceURI === this.settings.ttmlNamespace) {\n if (TtmlParser.getLocalTagName(element) === 'region') {\n regionId = TtmlParser.getAttributeNS(element, 'id', xmlNS);\n } else {\n regionId = TtmlParser.getAttributeNS(element, 'region', this.settings.ttmlNamespace);\n }\n }\n\n return regionId!;\n }\n\n /**\n * Gets the tagName of the element with the current ttml namespace prepended if non-standard.\n * @param element - The ttml element to get the tagName of.\n * @returns - The tagName or '' if the namespace isn't one of the ttml ones.\n */\n private _getTagNameEquivalent(element: Element): string {\n const tagName = TtmlParser.getLocalTagName(element);\n const nameSpace = element.namespaceURI;\n\n if (nameSpace === this.settings.ttmlNamespace) {\n return `ttml:${tagName}`;\n }\n\n if (nameSpace === 'http://www.w3.org/1999/xhtml') {\n return tagName;\n }\n\n return '';\n }\n\n /**\n * Translates the ttml style/value into one or more css styles/values and applies them to the element.\n * @param element - The ttml element to apply the css style(s) too.\n * @param tagName - The ttml tagName associated with the element.\n * @param style - The ttml style name.\n * @param value - The ttml style value.\n */\n // eslint-disable-next-line complexity\n private _applyStyle(element: HTMLElement, tagName: string, style: string, value: string): void {\n let mappedValue = value;\n\n switch (style) {\n case 'color':\n case 'backgroundColor': {\n mappedValue = TtmlContext._ttmlToCssColor(value);\n css(element, style, mappedValue);\n return;\n }\n\n case 'direction':\n case 'display': {\n // No change.\n css(element, style, mappedValue);\n return;\n }\n\n case 'displayAlign': {\n // eslint-disable-next-line default-case\n switch (value) {\n case 'before':\n mappedValue = 'top';\n break;\n case 'center':\n mappedValue = 'middle';\n break;\n case 'after':\n mappedValue = 'bottom';\n }\n\n css(element, 'vertical-align', mappedValue);\n return;\n }\n\n case 'extent': {\n let width: string;\n let height: string;\n\n if (value !== 'auto') {\n // Get the individual components.\n const coords = value.split(/\\s+/);\n\n if (coords.length === 2) {\n width = this._ttmlToCssUnits(coords[0], true);\n height = this._ttmlToCssUnits(coords[1], false);\n }\n }\n\n if (!width!) {\n width = `${(this.settings.rootContainerRegionDimensions\n ? this.settings.rootContainerRegionDimensions.width\n : this.settings.relatedMediaObjectRegion!.width\n ).toString()}px`;\n height = `${(this.settings.rootContainerRegionDimensions\n ? this.settings.rootContainerRegionDimensions.height\n : this.settings.relatedMediaObjectRegion!.height\n ).toString()}px`;\n }\n\n css(element, 'position', 'absolute');\n css(element, 'width', width!);\n css(element, 'min-width', width!);\n css(element, 'max-width', width!);\n css(element, 'height', height!);\n css(element, 'min-height', height!);\n css(element, 'max-height', height!);\n return;\n }\n\n case 'fontFamily': {\n if (this.settings.fontMap && this.settings.fontMap[value]) {\n mappedValue = this.settings.fontMap[value];\n }\n\n if (value === 'smallCaps') {\n // Need to additionally add font-variant: small-caps.\n css(element, 'fontVariant', 'small-caps');\n }\n\n css(element, style, mappedValue);\n return;\n }\n\n case 'fontSize': {\n const parts = value.split(/\\s+/);\n\n // For two part fontSize values we use the vertical size which is in the second part.\n const size = parts.length > 1 ? parts[1] : parts[0];\n\n // Set the fontsize scaleFactor to 75% (of cell size) to account for ascenders/descenders etc.\n mappedValue = this._ttmlToCssFontSize(size, false, 0.75, tagName === 'ttml:region');\n\n css(element, style, mappedValue);\n return;\n }\n\n case 'fontStyle':\n case 'fontWeight': {\n // No change.\n css(element, style, mappedValue);\n return;\n }\n\n case 'lineHeight': {\n // Spec doesn't qualify what % lengths mean so I'm going to assume it's % of a\n // cell and therefore use fontSize conversion method.\n mappedValue = value === 'normal' ? value : this._ttmlToCssFontSize(value, false);\n\n css(element, 'line-height', mappedValue);\n return;\n }\n\n case 'computed-lineHeight': {\n const values = value.split(',');\n let max = -1;\n\n for (const fontSize of values) {\n // Computed-lineHeight is based off of fontSize so use fontSize conversion method.\n mappedValue = this._ttmlToCssFontSize(fontSize, false);\n\n if (mappedValue && mappedValue.indexOf('px') === mappedValue.length - 2) {\n const height = Number.parseFloat(mappedValue.substr(0, mappedValue.length - 2));\n\n if (!isNaN(height) && height > max) {\n max = height;\n }\n }\n }\n\n if (max >= 0) {\n css(element, 'line-height', `${max}px`);\n }\n\n return;\n }\n\n case 'origin': {\n if (value !== 'auto') {\n // Get the individual components.\n const coords = value.split(/\\s+/);\n\n if (coords.length === 2) {\n css(element, 'position', 'absolute');\n css(element, 'left', this._ttmlToCssUnits(coords[0], true));\n css(element, 'top', this._ttmlToCssUnits(coords[1], false));\n }\n }\n\n return;\n }\n\n case 'opacity': {\n // No change.\n css(element, style, mappedValue);\n return;\n }\n\n case 'padding': {\n const contextRect = getDimensions(element);\n\n // Get the individual components.\n const parts = value.split(/\\s+/);\n let first: string;\n let second: string;\n let third: string;\n let forth: string;\n\n // eslint-disable-next-line default-case\n switch (parts.length) {\n case 1:\n // Value is used for all 4 sides.\n first = this._ttmlToCssUnits(parts[0], false, contextRect!);\n second = this._ttmlToCssUnits(parts[0], true, contextRect!);\n mappedValue = format('{0} {1} {0} {1}', first, second);\n break;\n case 2:\n // First is top/bottom, second is left/right.\n first = this._ttmlToCssUnits(parts[0], false, contextRect!);\n second = this._ttmlToCssUnits(parts[1], true, contextRect!);\n mappedValue = format('{0} {1} {0} {1}', first, second);\n break;\n case 3:\n // First is top, second is left/right, third is bottom.\n first = this._ttmlToCssUnits(parts[0], false, contextRect!);\n second = this._ttmlToCssUnits(parts[1], true, contextRect!);\n third = this._ttmlToCssUnits(parts[2], false, contextRect!);\n mappedValue = format('{0} {1} {2} {1}', first, second, third);\n break;\n case 4:\n // Top, right, bottom, left.\n first = this._ttmlToCssUnits(parts[0], false, contextRect!);\n second = this._ttmlToCssUnits(parts[1], true, contextRect!);\n third = this._ttmlToCssUnits(parts[2], false, contextRect!);\n forth = this._ttmlToCssUnits(parts[3], true, contextRect!);\n mappedValue = format('{0} {1} {2} {3}', first, second, third, forth);\n }\n\n // Using border width to implement tts:padding as neither padding nor margin fix the size (height) of the content area.\n css(element, 'box-sizing', 'border-box');\n\n // TODO: See if we work in FF without the following commented out -moz-box-sizing line now and if so remove it.\n /// /// css(element, '-moz-box-sizing', 'border-box');\n css(element, 'border-style', 'solid');\n css(element, 'border-color', 'transparent');\n\n // It can be helpful when debugging to change the border-color from transparent to something like rgba(255,255,200,0.5)\n // css(element, 'border-color', 'rgba(255,255,200,0.5)');\n css(element, 'border-width', mappedValue);\n return;\n }\n\n // If you know what this was for please document it here and uncomment it.\n // As of now the caller appeared to be doing nothing with it so commenting it out.\n /// /// case 'showBackground': {\n /// /// return this.getAttribute('data-showBackground', value);\n /// /// }\n\n case 'textAlign': {\n // eslint-disable-next-line default-case\n switch (value) {\n case 'start':\n mappedValue = 'left'; // TODO: handle rtl correctly.\n break;\n case 'end':\n mappedValue = 'right'; // TODO: handle rtl correctly.\n }\n\n css(element, 'text-align', mappedValue);\n return;\n }\n\n case 'textDecoration': {\n mappedValue = TtmlContext._ttmlToCssTextDecoration(value);\n css(element, 'text-decoration', mappedValue);\n return;\n }\n\n case 'textOutline': {\n const defaultColor = css(element, 'color');\n css(element, 'text-shadow', this._ttmlToCssTextOutline(mappedValue, defaultColor));\n return;\n }\n\n case 'unicodeBidi': {\n // TODO: Handle multiple options correctly.\n // eslint-disable-next-line default-case\n switch (value) {\n case 'bidiOverride':\n mappedValue = 'bidi-override';\n }\n css(element, 'unicode-bidi', mappedValue);\n return;\n }\n\n case 'visibility': {\n // No change.\n css(element, style, mappedValue);\n return;\n }\n\n case 'writingMode': {\n // eslint-disable-next-line default-case\n switch (value) {\n case 'lr':\n case 'lrtb': {\n css(element, 'writing-mode', 'horizontal-tb'); // CCS3 standard: Doesn't work yet\n css(element, '-webkit-writing-mode', 'horizontal-tb'); // Webkit for Chrome\n css(element, 'writing-mode', 'lr-tb'); // IE specific\n return;\n }\n case 'rl':\n case 'rltb': {\n css(element, 'writing-mode', 'horizontal-tb'); // CCS3 standard: Doesn't work yet\n css(element, '-webkit-writing-mode', 'horizontal-tb'); // Webkit for Chrome\n css(element, 'writing-mode', 'rl-tb'); // IE specific\n return;\n }\n case 'tblr': {\n css(element, 'text-orientation', 'upright'); // CCS3 standard: Doesn't work yet\n css(element, 'writing-mode', 'vertical-lr'); // CCS3 standard: Doesn't work yet\n css(element, '-webkit-text-orientation', 'upright'); // Webkit for Chrome\n css(element, '-webkit-writing-mode', 'vertical-lr'); // Webkit for Chrome\n css(element, 'writing-mode', 'tb-lr'); // IE specific\n return;\n }\n case 'tb':\n case 'tbrl': {\n css(element, 'text-orientation', 'upright'); // CCS3 standard: Doesn't work yet\n css(element, 'writing-mode', 'vertical-rl'); // CCS3 standard: Doesn't work yet\n css(element, '-webkit-text-orientation', 'upright'); // Webkit for Chrome\n css(element, '-webkit-writing-mode', 'vertical-rl'); // Webkit for Chrome\n css(element, 'writing-mode', 'tb-rl'); // IE specific\n return;\n }\n }\n return;\n }\n\n case 'wrapOption': {\n css(element, 'white-space', value === 'noWrap' ? 'nowrap' : value === 'pre' ? 'pre' : 'normal');\n return;\n }\n\n case 'zIndex': {\n css(element, style, mappedValue); // Requires global information...\n return;\n }\n\n default: {\n css(element, style, mappedValue);\n }\n }\n }\n\n /**\n * Converts a ttml unit string to a css one.\n * @param ttmlUnits - The ttml value.\n * @param width - Indicates whether to perform a width based or a height based conversion.\n * @param [contextRect] - The context rectangle to use for conversion.\n * @returns - The css value.\n */\n private _ttmlToCssUnits(ttmlUnits: string, width: boolean, contextRect?: IClientDimension): string {\n let cssUnits = ttmlUnits;\n\n if (ttmlUnits) {\n const unit = ttmlUnits.charAt(ttmlUnits.length - 1);\n\n // Need to special case handle ttml cell metrics.\n if (unit === 'c' || unit === '%') {\n const container = this.settings.rootContainerRegionDimensions\n ? this.settings.rootContainerRegionDimensions\n : this.settings.relatedMediaObjectRegion;\n const length = Number.parseFloat(ttmlUnits.substr(0, ttmlUnits.length - 1));\n let containerSize = width ? container!.width : container!.height;\n let value: number;\n\n if (unit === 'c') {\n const gridSize = width ? this.settings.cellResolution.columns : this.settings.cellResolution.rows;\n\n value = (length * containerSize) / gridSize;\n } else if (unit === '%') {\n // If % units calls also specify a contextRect use that instead of the container.\n if (contextRect) {\n containerSize = width ? contextRect.width : contextRect.height;\n }\n\n // Have to convert % to px because padding and vertical-align (displayAlign) are not\n // working together if the extent width/height are % instead of px.\n value = (containerSize * length) / 100;\n }\n\n // Round to 1 decimal place\n value = Math.round(value! * 10) / 10;\n cssUnits = `${value}px`;\n }\n }\n\n return cssUnits;\n }\n\n /**\n * Converts a ttml font size to a css one.\n * @param ttmlUnits - The ttml value.\n * @param width - Indicates whether to perform a width based or a height based conversion.\n * @param [scaleFactor] - The scale factor to use for conversion.\n * @param [isRegion] - Indicates whether or not the conversion is being done for a .\n * @returns - The css value.\n */\n private _ttmlToCssFontSize(ttmlUnits: string, width: boolean, scaleFactor: number = 1, isRegion: boolean = false): string {\n let cssUnits = ttmlUnits;\n\n if (ttmlUnits) {\n const unit = ttmlUnits.charAt(ttmlUnits.length - 1);\n\n // Need to special case handle ttml cell metrics and % units.\n if (unit === 'c' || (isRegion && unit === '%')) {\n const container = this.settings.rootContainerRegionDimensions\n ? this.settings.rootContainerRegionDimensions\n : this.settings.relatedMediaObjectRegion;\n const length = Number.parseFloat(ttmlUnits.substr(0, ttmlUnits.length - 1));\n const containerSize = width ? container!.width : container!.height;\n const gridSize = width ? this.settings.cellResolution.columns : this.settings.cellResolution.rows;\n let value = (length * containerSize) / gridSize;\n\n if (unit === '%') {\n // Length is % so divide by 100.\n value /= 100;\n }\n\n // Apply the scale factor and limit to one decimal place precision.\n value = Math.floor(value * scaleFactor * 10) / 10;\n\n cssUnits = `${value}px`;\n }\n }\n\n return cssUnits;\n }\n\n /**\n * Converts a ttml text outline style value to a css one.\n * @param textOutline - The ttml value.\n * @param defaultColor - Default value of the outline color.\n * @returns - The css value.\n */\n private _ttmlToCssTextOutline(textOutline: string, defaultColor: string): string {\n let textShadow = 'none';\n\n if (!isNullOrWhiteSpace(textOutline) && textOutline !== 'none') {\n let parts: string[] = textOutline.split(/\\s+/);\n let color: string = '';\n let thickness: string = '';\n let blur: string = '';\n\n if (parts.length === 1) {\n color = defaultColor;\n thickness = parts[0];\n blur = '';\n } else if (parts.length === 3) {\n color = parts[0];\n thickness = parts[1];\n blur = parts[2];\n } else if (parts.length === 2) {\n const firstChar = parts[0].charAt(0);\n\n if (firstChar >= '0' && firstChar <= '9') {\n color = defaultColor;\n thickness = parts[0];\n blur = parts[1];\n } else {\n color = parts[0];\n thickness = parts[1];\n blur = '';\n }\n }\n\n // Spec doesn't qualify what % lengths mean so I'm going to assume it's % of a cell\n // and therefore use fontSize conversion method with the same scaleFactor applied\n // to fontSize since it's the font that we're outlining here.\n blur = this._ttmlToCssFontSize(blur, false, 0.75);\n thickness = this._ttmlToCssFontSize(thickness, false, 0.75);\n\n parts = TtmlContext.lengthRegEx.exec(thickness);\n\n if (parts && parts.length === 3) {\n const width = Math.round(Number.parseFloat(parts[1]));\n const units = parts[2];\n\n textShadow = '';\n\n for (let x = -width; x <= width; x++) {\n for (let y = -width; y <= width; y++) {\n if (x !== 0 || y !== 0) {\n textShadow += format('{0}{4} {1}{4} {2} {3}, ', x, y, blur, TtmlContext._ttmlToCssColor(color), units);\n }\n }\n }\n\n if (textShadow) {\n textShadow = textShadow.substr(0, textShadow.length - 2);\n }\n }\n }\n\n return textShadow;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * TtmlTimeParser class.\n * @classdesc - The TtmlTimeParser class is used to parse ttml time expressions which can be absolute or relative.\n */\nexport class TtmlTimeParser {\n /**\n * @name - absoluteTimeRegex\n * Regex to parse absolute ttml times. (clock-time).\n * Hours \":\" minutes \":\" seconds ( fraction | \":\" frames ( \".\" sub-frames )? )?.\n * NOTE: (johnlemi) Our clocktime regex matches 1 or 2 digits for hours instead of 2 because even.\n * though the spec says 2 we have some existing ttml from the Office team with end attrs with 1 hour digit.\n * @static\n * @private\n * @type {string}\n */\n private static readonly absoluteTimeRegex: RegExp = /^(\\d+):(\\d{2}):(\\d{2})((\\.\\d+)|:(\\d{2,}(\\.\\d+)?))?$/;\n\n /**\n * @name - relativeTimeRegex\n * Regex to parse relative ttml times. (offset-time).\n * time-count fraction? metric.\n * @static\n * @private\n * @type {string}\n */\n private static readonly relativeTimeRegex: RegExp = /^(\\d+(\\.\\d+)?)(ms|[fhmst])$/;\n\n /**\n * @name - mediaFrameRate.\n * @description - mediaFrameRate.\n * @private\n * @type {string}\n */\n private readonly mediaFrameRate: number;\n\n /**\n * @name - mediaTickRate.\n * @description - mediaTickRate.\n * @private\n * @type {string}\n */\n private readonly mediaTickRate: number;\n\n /**\n * Constructor for the TtmlTimeParser class.\n * @param _mediaFrameRate - The ttml media frame rate.\n * @param _mediaTickRate - The ttml media tick rate.\n */\n public constructor(_mediaFrameRate: number, _mediaTickRate: number) {\n this.mediaFrameRate = _mediaFrameRate;\n this.mediaTickRate = _mediaTickRate;\n }\n\n /**\n * Parses a ttml time expression string into a number.\n * @param ttmlTime - The time expression to parse.\n * @returns - The number the time expression represents, or 0 if the exression doesn't match.\n */\n public parse(ttmlTime: string): number {\n if (!ttmlTime) {\n return 0;\n }\n\n const absoluteTime = TtmlTimeParser.absoluteTimeRegex.exec(ttmlTime);\n\n if (absoluteTime && absoluteTime.length > 3) {\n const hours = Number.parseInt(absoluteTime[1], 10) * 60 * 60;\n const minutes = Number.parseInt(absoluteTime[2], 10) * 60;\n const seconds = Number.parseInt(absoluteTime[3], 10);\n let subseconds = 0;\n\n if (absoluteTime[5]) {\n subseconds = Number.parseFloat(absoluteTime[4]) * 1000;\n }\n\n if (absoluteTime[6]) {\n subseconds = Math.round(Number.parseFloat(absoluteTime[6]) * this._getTimeUnitMultiplier('f'));\n }\n\n return (hours + minutes + seconds) * 1000 + subseconds;\n }\n\n const relativeTime = TtmlTimeParser.relativeTimeRegex.exec(ttmlTime);\n\n if (relativeTime && relativeTime.length > 3) {\n return Math.round(Number.parseFloat(relativeTime[1]) * this._getTimeUnitMultiplier(relativeTime[3]));\n }\n\n return 0;\n }\n\n /**\n * Converts a ttml time unit expression string into a multiplier number.\n * @param timeUnit - The time unit expression.\n * @returns - The multiplier value, or 0 if the unit exression doesn't match.\n */\n private _getTimeUnitMultiplier(timeUnit: string): number {\n switch (timeUnit) {\n case 'h':\n return 1000 * 60 * 60;\n case 'ms':\n return 1;\n case 'm':\n return 1000 * 60;\n case 's':\n return 1000;\n case 'f':\n return 1000 / this.mediaFrameRate;\n case 't':\n return 1000 / this.mediaTickRate;\n default:\n return 0;\n }\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { format, IDictionaryStringString, IGrid, nodeListToArray, trim } from '../utilities';\nimport { ITtmlContext, TtmlContext } from './ttml-context';\nimport { ITtmlSettings, TtmlSettings, xmlNS } from './ttml-settings';\nimport { TtmlTimeParser } from './ttml-time-parser';\n\n// Timed Text Markup Language (TTML).\n// See http://www.w3.org/TR/ttml1/ for more details.\n\n/**\n * @interface ITtmlEvent\n * @classdesc - The ITtmlEvent interface contract.\n * @export\n */\nexport interface ITtmlEvent {\n time: number;\n element?: Element;\n}\n\n/**\n * @interface ITtmlTimingBounds\n * @classdesc - The ITtmlTimingBounds interface contract.\n * @export\n */\ninterface ITtmlTimingBounds {\n start: number;\n end: number;\n}\n\n/**\n *\n * The TtmlParser class.\n *\n */\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport class TtmlParser {\n /**\n * @name - mediaStart\n * Used as the start time for applyTiming when applying to the entire document.\n * @static\n * @private\n * @type {number}\n */\n private static readonly mediaStart: number = -1;\n\n /**\n * @name - mediaEnd\n * Used as the end time for applyTiming when applying to the entire document.\n * Picking a number that should always be greater than any real media end time.\n * @static\n * @private\n * @type {number}\n */\n private static readonly mediaEnd: number = 99_999_999;\n\n /**\n * Gets the local tagName of a Node.\n * @param node - The node to get the tagName of.\n * @returns - The tagName.\n */\n public static getLocalTagName(node: Node): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (node).localName || (node).baseName;\n }\n\n /**\n * Gets the value of a namespaced attribute. First tries element.getAttributeNS() but falls back\n * to scanning each attribute if that fails.\n * If you know which cases go into the fallback code please document it here.\n * @param element - The element to get the attribute of.\n * @param name - The attribute name.\n * @param namespace - The attribute namespace.\n * @returns - The attribute value. Or an empty string if a matching attribute is not found.\n */\n public static getAttributeNS(element: Element, name: string, namespace: string): string {\n let result = element.getAttributeNS(namespace, name);\n\n if (!result) {\n // Go through all the attributes looking for a match.\n for (const attribute of nodeListToArray(element.attributes)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((attribute).localName === name && attribute.lookupNamespaceURI((attribute).prefix) === namespace) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result = (attribute).value;\n break;\n }\n }\n }\n\n return result!;\n }\n\n /**\n * Parses a ttml document and builds a ttmlContext instance from it.\n * @param ttmlDocument - The ttml document to parse.\n * @param settingsOverrides - The ttml settings overrides to use.\n * @returns - The resulting ttmlContext instance that can be used to get cues by time.\n */\n public static parse(ttmlDocument: XMLDocument, settingsOverrides: ITtmlSettings): ITtmlContext {\n ttmlDocument = typeof ttmlDocument === 'string' ? TtmlParser._parseXml(ttmlDocument) : ttmlDocument;\n\n const ttmlContext = new TtmlContext();\n\n // Start initializing the context.\n ttmlContext.settings = new TtmlSettings(settingsOverrides);\n ttmlContext.root = TtmlParser._verifyRoot(ttmlDocument, ttmlContext);\n ttmlContext.body = TtmlParser._getFirstElementByTagNameNS(ttmlContext.root, 'body', ttmlContext.settings.ttmlNamespace);\n ttmlContext.events = [];\n ttmlContext.styleSetCache = [];\n\n if (ttmlContext.body) {\n // Parse the root attributes.\n TtmlParser._parseTtAttrs(ttmlContext);\n\n // Set up our regions.\n const head = TtmlParser._ensureRegions(ttmlContext);\n\n const timeBase =\n TtmlParser.getAttributeNS(ttmlContext.root, 'timeBase', ttmlContext.settings.ttmlParameterNamespace) || 'media';\n\n if (ttmlContext.settings.supportedTimeBase.includes(timeBase)) {\n // Process textnodes into anonymous spans.\n TtmlParser._processAnonymousSpans(ttmlContext, ttmlContext.body);\n\n const timeParser = new TtmlTimeParser(ttmlContext.settings.mediaFrameRate, ttmlContext.settings.mediaTickRate);\n\n // Apply the intervals over the tree.\n TtmlParser._applyTiming(\n ttmlContext,\n ttmlContext.root,\n { start: TtmlParser.mediaStart, end: TtmlParser.mediaEnd },\n true,\n timeParser\n );\n\n // Apply the style inheritance over the tree.\n TtmlParser._applyStyling(ttmlContext, head);\n }\n\n // Add an dummy end event for the captions to appear until end of video.\n // Not sure why we need to do this, please add to this comment if you know.\n ttmlContext.events.push({ time: TtmlParser.mediaEnd, element: undefined });\n\n // Sort events into temporal order.\n ttmlContext.events.sort((event1: ITtmlEvent, event2: ITtmlEvent) => {\n return event1.time - event2.time;\n });\n }\n\n return ttmlContext;\n }\n\n /**\n * Applies the elements inline styles into the styleSet.\n * @param settings - The TtmlSettings for this document.\n * @param styleSet - The styleSet to build upon.\n * @param element - The element to apply the styles of.\n */\n public static applyInlineStyles(settings: TtmlSettings, styleSet: IDictionaryStringString, element: Element): void {\n for (const attribute of nodeListToArray(element.attributes)) {\n if (attribute.namespaceURI === settings.ttmlStyleNamespace) {\n // Trim() because we see lots of ttml attribute values with trailing space...\n styleSet[TtmlParser.getLocalTagName(attribute)] = trim(attribute.nodeValue!);\n }\n }\n }\n\n /**\n * Parses an xml document in string format to an XMLDocument.\n * @param xmlString - The xml string to parse.\n * @returns - The resulting XMLDocument, or null if the xml string failed to parse.\n */\n private static _parseXml(xmlString: string): XMLDocument {\n let xml: XMLDocument;\n\n if (window.DOMParser) {\n const domParser = new window.DOMParser();\n xml = domParser.parseFromString(xmlString, 'application/xml');\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const domParser = new (window).ActiveXObject('Microsoft.XMLDOM');\n domParser.async = false;\n domParser.loadXML(xmlString);\n xml = domParser;\n }\n return xml;\n }\n\n /**\n * Verifies that root of the specified document is the expected ttml tagName and\n * updates the settings namespaces from it if they are non standard.\n * @param ttmlDocument - The ttml document to verify.\n * @param ttmlContext - The ttmlContext for this document.\n * @returns - The valid root Element, or or null if the root Element was not valid.\n */\n private static _verifyRoot(ttmlDocument: XMLDocument, ttmlContext: TtmlContext): Element {\n let root: Element;\n const candidate = ttmlDocument.documentElement;\n\n if (TtmlParser.getLocalTagName(candidate) === 'tt') {\n if (candidate.namespaceURI !== 'http://www.w3.org/ns/ttml') {\n ttmlContext.settings.ttmlNamespace = candidate.namespaceURI!;\n ttmlContext.settings.ttmlStyleNamespace = `${ttmlContext.settings.ttmlNamespace}#styling`;\n ttmlContext.settings.ttmlParameterNamespace = `${ttmlContext.settings.ttmlNamespace}#parameter`;\n ttmlContext.settings.ttmlMetaNamespace = `${ttmlContext.settings.ttmlNamespace}#metadata`;\n }\n\n root = candidate;\n }\n\n return root!;\n }\n\n /**\n * Parses the tag attributes and initializes ttmlContext properties from them.\n * @param ttmlContext - The ttmlContext for this document.\n */\n private static _parseTtAttrs(ttmlContext: TtmlContext): void {\n const cellRes = TtmlParser.getAttributeNS(ttmlContext.root, 'cellResolution', ttmlContext.settings.ttmlParameterNamespace);\n const extent = TtmlParser.getAttributeNS(ttmlContext.root, 'extent', ttmlContext.settings.ttmlStyleNamespace);\n let cellGrid: IGrid | null = null;\n\n if (cellRes) {\n const parts = trim(cellRes).split(/\\s+/);\n\n if (parts.length === 2) {\n const columns = Math.round(Number.parseFloat(parts[0]));\n const rows = Math.round(Number.parseFloat(parts[1]));\n\n if (rows > 0 && columns > 0) {\n cellGrid = { rows, columns };\n }\n }\n }\n\n if (cellGrid) {\n ttmlContext.settings.cellResolution = cellGrid;\n }\n\n if (extent) {\n if (extent !== 'auto') {\n // Get the individual components.\n const coords = extent.split(/\\s+/);\n\n if (\n coords.length === 2 &&\n coords[0].substr(coords[0].length - 2) === 'px' &&\n coords[1].substr(coords[1].length - 2) === 'px'\n ) {\n const width = Number.parseFloat(coords[0].substr(0, coords[0].length - 2));\n const height = Number.parseFloat(coords[1].substr(0, coords[1].length - 2));\n\n // Round to integer.\n ttmlContext.settings.rootContainerRegionDimensions = { width: Math.round(width), height: Math.round(height) };\n }\n }\n }\n }\n\n /**\n * Ensures we have the elements/regions we require by either finding them or creating them if they are not present.\n * @param ttmlContext - The ttmlContext for this document.\n * @returns - The element.\n */\n private static _ensureRegions(ttmlContext: TtmlContext): Element {\n // Create our rootContainerRegion\n ttmlContext.rootContainerRegion = ttmlContext.root.ownerDocument.createElementNS(\n ttmlContext.settings.ttmlNamespace,\n 'rootcontainerregion'\n );\n\n ttmlContext.root.appendChild(ttmlContext.rootContainerRegion);\n\n const extents = ttmlContext.settings.rootContainerRegionDimensions\n ? format(\n '{0}px {1}px',\n ttmlContext.settings.rootContainerRegionDimensions.width,\n ttmlContext.settings.rootContainerRegionDimensions.height\n )\n : 'auto';\n\n ttmlContext.rootContainerRegion.setAttributeNS(ttmlContext.settings.ttmlStyleNamespace, 'extent', extents);\n\n let head = TtmlParser._getFirstElementByTagNameNS(ttmlContext.root, 'head', ttmlContext.settings.ttmlNamespace);\n\n // Ensure we have a \n if (!head) {\n // No so we need to create that now.\n head = ttmlContext.root.ownerDocument.createElementNS(ttmlContext.settings.ttmlNamespace, 'head');\n ttmlContext.root.appendChild(head);\n }\n\n // Ensure we have a \n ttmlContext.layout = TtmlParser._getFirstElementByTagNameNS(head, 'layout', ttmlContext.settings.ttmlNamespace);\n\n if (!ttmlContext.layout) {\n // No so we need to create that now.\n ttmlContext.layout = ttmlContext.root.ownerDocument.createElementNS(ttmlContext.settings.ttmlNamespace, 'layout');\n ttmlContext.root.appendChild(ttmlContext.layout);\n }\n\n // Create an anonymous region if we have no regions.\n const regions = ttmlContext.layout.getElementsByTagNameNS(ttmlContext.settings.ttmlNamespace, 'region');\n\n if (!regions.length) {\n const anonymousRegion = ttmlContext.root.ownerDocument.createElementNS(ttmlContext.settings.ttmlNamespace, 'region');\n\n anonymousRegion.setAttributeNS(xmlNS, 'id', 'anonymous');\n anonymousRegion.setAttribute('data-isanonymous', '1');\n ttmlContext.layout.appendChild(anonymousRegion);\n\n ttmlContext.body.setAttributeNS(ttmlContext.settings.ttmlNamespace, 'region', 'anonymous');\n }\n\n return head;\n }\n\n /**\n * Recurses through all the

elements in the document and groups all the contiguous TEXT_NODES together into 's.\n * @param ttmlContext - The ttmlContext for this document.\n * @param element - The element to process the TEXT_NODES of.\n */\n private static _processAnonymousSpans(ttmlContext: TtmlContext, element: Element): void {\n // If this element is

then group all contiguous textnodes together in \n if (TtmlParser._isTagNS(element, 'p', ttmlContext.settings.ttmlNamespace)) {\n const textNodeGroups: Node[][] = [];\n let prevNodeType: number = 0;\n\n for (const child of nodeListToArray(element.childNodes)) {\n if (child.nodeType === Node.TEXT_NODE) {\n if (prevNodeType !== Node.TEXT_NODE) {\n textNodeGroups.push([]);\n }\n\n textNodeGroups[textNodeGroups.length - 1].push(child);\n }\n\n prevNodeType = child.nodeType;\n }\n\n for (const group of textNodeGroups) {\n const anonSpan = ttmlContext.root.ownerDocument.createElementNS(ttmlContext.settings.ttmlNamespace, 'span');\n\n anonSpan.appendChild(group[0].parentNode!.replaceChild(anonSpan, group[0]));\n\n for (let index = 1; index < group.length; index++) {\n anonSpan.appendChild(group[index]);\n }\n }\n }\n\n // Then recurse through the contents doing the same thing for those.\n for (const child of nodeListToArray(element.childNodes)) {\n this._processAnonymousSpans(ttmlContext, child);\n }\n }\n\n /**\n * Recurses through the document element tree to determine the absolute start and end times of all the elements\n * using the TTML subset of the SMIL timing model. The reference times passed in 'bound' are absolute times.\n * The result of calling this is to set the local start time and end time to absolute times between these two\n * reference times, based on the begin, end and dur attributes and to recursively set all of the children.\n * @param ttmlContext - The ttmlContext for this document.\n * @param element - The element to apply the timing to.\n * @param bound - The bounds for the timing.\n * @param isParallelContext - Indicates whether or not this element is in a parallel timing context.\n * @param timeParser - The TtmlTimeParser to use to parse this elements time attributes.\n */\n private static _applyTiming(\n ttmlContext: TtmlContext,\n element: Element,\n bound: ITtmlTimingBounds,\n isParallelContext: boolean,\n timeParser: TtmlTimeParser\n ): void {\n const beginAttribute = TtmlParser.getAttributeNS(element, 'begin', ttmlContext.settings.ttmlNamespace);\n let startTime = beginAttribute ? timeParser.parse(beginAttribute) : bound.start;\n let endTime = 0;\n\n // Compute the simple duration of the interval.\n let duration = 0;\n let end = 0;\n const durationAttribute = TtmlParser.getAttributeNS(element, 'dur', ttmlContext.settings.ttmlNamespace);\n const endAttribute = TtmlParser.getAttributeNS(element, 'end', ttmlContext.settings.ttmlNamespace);\n\n if (!durationAttribute && !endAttribute) {\n // No direct timing attested, so use default based on context.\n // Parallel children have indefinite default duration, truncated by bounds.\n if (isParallelContext) {\n // Sequential children have zero default duration.\n if (startTime <= bound.end) {\n endTime = bound.end;\n } else {\n endTime = 0;\n }\n }\n } else if (durationAttribute && endAttribute) {\n // Both duration and end attested, the minimum interval applies.\n duration = timeParser.parse(durationAttribute);\n end = timeParser.parse(endAttribute);\n const minEnd = Math.min(startTime + duration, bound.start + end);\n endTime = Math.min(minEnd, bound.end);\n } else if (endAttribute) {\n // Only end attested.\n end = timeParser.parse(endAttribute);\n endTime = Math.min(bound.start + end, bound.end);\n } else {\n // Only dur attested.\n duration = timeParser.parse(durationAttribute);\n endTime = Math.min(startTime + duration, bound.end);\n }\n\n if (endTime < startTime) {\n endTime = startTime;\n }\n\n startTime = Math.floor(startTime);\n endTime = Math.floor(endTime);\n\n element.setAttribute('data-time-start', startTime.toString());\n element.setAttribute('data-time-end', endTime.toString());\n\n if (\n startTime >= 0 &&\n ttmlContext.events.filter(event => {\n return event.time === startTime;\n }).length <= 0\n ) {\n ttmlContext.events.push({ time: startTime, element });\n }\n\n let start = startTime;\n\n for (const child of nodeListToArray(element.childNodes)) {\n if (child.nodeType === Node.ELEMENT_NODE) {\n // Parallel is the default so null is OK here.\n if (TtmlParser.getAttributeNS(element, 'timeContainer', ttmlContext.settings.ttmlNamespace) !== 'seq') {\n this._applyTiming(ttmlContext, child, { start: startTime, end: endTime }, true, timeParser);\n } else {\n this._applyTiming(ttmlContext, child, { start, end: endTime }, false, timeParser);\n start = Number.parseInt(child.getAttribute('data-time-end')!, 10);\n }\n }\n }\n }\n\n /**\n * Recurses through all the elements in applying the ttml sytling to them based on the