${this.hasImage ? block1.call(this, context, tags, suffix) : block2.call(this, context, tags, suffix)}
`; }\nfunction block1(context, tags, suffix) { return html `${this.hasDeleteButtonSlot ? block5.call(this, context, tags, suffix) : block6.call(this, context, tags, suffix)}
`; }\nfunction block5(context, tags, suffix) { return html `<${scopeTag(\"ui5-button\", tags, suffix)} part=\"detail-button\" design=\"Transparent\" icon=\"edit\" @click=\"${this.onDetailClick}\">${scopeTag(\"ui5-button\", tags, suffix)}>
` : html `${this.hasDeleteButtonSlot ? block24.call(this, context, tags, suffix) : block25.call(this, context, tags, suffix)}
`; }\nfunction block24(context, tags, suffix) { return html `${this.shouldDisplayDefaultValueStateMessage ? block4.call(this, context, tags, suffix) : block5.call(this, context, tags, suffix)}
`; }\nfunction block4(context, tags, suffix) { return html `${ifDefined(this.valueStateText)}`; }\nfunction block5(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block6.call(this, context, tags, suffix, item, index))}`; }\nfunction block6(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nfunction block7(context, tags, suffix) { return html `${this.hasValueStateText ? block8.call(this, context, tags, suffix) : undefined}`; }\nfunction block8(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageInputIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${this.shouldDisplayDefaultValueStateMessage ? block9.call(this, context, tags, suffix) : block10.call(this, context, tags, suffix)}
` : html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageInputIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${this.shouldDisplayDefaultValueStateMessage ? block14.call(this, context, tags, suffix) : block15.call(this, context, tags, suffix)}
${scopeTag(\"ui5-popover\", tags, suffix)}>` : html `} resolved when scrolled successfully\n */\n async scrollTo(left, top, retryCount = 0, retryInterval = 0) {\n let containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;\n /* eslint-disable no-loop-func, no-await-in-loop */\n while (!containerPainted && retryCount > 0) {\n await new Promise(resolve => {\n setTimeout(() => {\n containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;\n retryCount--;\n resolve();\n }, retryInterval);\n });\n }\n /* eslint-disable no-loop-func, no-await-in-loop */\n this._container.scrollLeft = left;\n this._container.scrollTop = top;\n }\n move(dx, dy, disableAnimation) {\n if (disableAnimation) {\n this._container.scrollLeft += dx;\n this._container.scrollTop += dy;\n return;\n }\n if (this._container) {\n return scroll(this._container, dx, dy);\n }\n }\n getScrollLeft() {\n return this._container.scrollLeft;\n }\n getScrollTop() {\n return this._container.scrollTop;\n }\n _isTouchInside(event) {\n let touch = null;\n if (this.supportsTouch && event instanceof TouchEvent) {\n touch = event.touches[0];\n }\n const rect = this._container.getBoundingClientRect();\n const x = this.supportsTouch ? touch.clientX : event.x;\n const y = this.supportsTouch ? touch.clientY : event.y;\n return x >= rect.left && x <= rect.right\n && y >= rect.top && y <= rect.bottom;\n }\n ontouchstart(event) {\n let touch = null;\n if (this.supportsTouch && event instanceof TouchEvent) {\n touch = event.touches[0];\n }\n if (!this.supportsTouch) {\n document.addEventListener(\"mouseup\", this.mouseUp, { passive: true });\n document.addEventListener(\"mousemove\", this.mouseMove, { passive: true });\n }\n else {\n // Needed only on mobile\n this.startX = touch.pageX;\n this.startY = touch.pageY;\n }\n if (this.supportsTouch && event instanceof TouchEvent) {\n this._prevDragX = touch.pageX;\n this._prevDragY = touch.pageY;\n }\n if (event instanceof MouseEvent) {\n this._prevDragX = event.x;\n this._prevDragY = event.y;\n }\n this._canScroll = this._isTouchInside(event);\n }\n ontouchmove(event) {\n if (!this._canScroll) {\n return;\n }\n const container = this._container;\n const touch = this.supportsTouch ? event.touches[0] : null;\n const dragX = this.supportsTouch ? touch.pageX : event.x;\n const dragY = this.supportsTouch ? touch.pageY : event.y;\n container.scrollLeft += this._prevDragX - dragX;\n container.scrollTop += this._prevDragY - dragY;\n this.fireEvent(scrollEventName, {\n isLeft: dragX > this._prevDragX,\n isRight: dragX < this._prevDragX,\n });\n this.cachedValue.dragX = this._prevDragX;\n this.cachedValue.dragY = this._prevDragY;\n this._prevDragX = dragX;\n this._prevDragY = dragY;\n }\n ontouchend(event) {\n if (this.supportsTouch) {\n const deltaX = Math.abs(event.changedTouches[0].pageX - this.startX);\n const deltaY = Math.abs(event.changedTouches[0].pageY - this.startY);\n if (deltaX < 10 && deltaY < 10) {\n return;\n }\n }\n if (!this._canScroll) {\n return;\n }\n const container = this._container;\n const dragX = this.supportsTouch ? event.changedTouches[0].pageX : event.x;\n const dragY = this.supportsTouch ? event.changedTouches[0].pageY : event.y;\n container.scrollLeft += this._prevDragX - dragX;\n container.scrollTop += this._prevDragY - dragY;\n const useCachedValues = dragX === this._prevDragX;\n const _dragX = useCachedValues ? this.cachedValue.dragX : dragX;\n // const _dragY = useCachedValues ? this.cachedValue.dragY : dragY; add if needed\n this.fireEvent(touchEndEventName, {\n isLeft: _dragX < this._prevDragX,\n isRight: _dragX > this._prevDragX,\n });\n this._prevDragX = dragX;\n this._prevDragY = dragY;\n if (!this.supportsTouch) {\n document.removeEventListener(\"mousemove\", this.mouseMove);\n document.removeEventListener(\"mouseup\", this.mouseUp);\n }\n }\n}\nexport default ScrollEnablement;\n//# sourceMappingURL=ScrollEnablement.js.map","/* eslint no-unused-vars: 0 */\nimport { html, repeat, classMap, ifDefined } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html `${ifDefined(this.tokenizerLabel)}${repeat(this.tokens, (item, index) => item._id || index, (item, index) => block1.call(this, context, tags, suffix, item, index))}
${this.showNMore ? block2.call(this, context, tags, suffix) : undefined}
`; }\nfunction block1(context, tags, suffix, item, index) { return html ``; }\nfunction block2(context, tags, suffix) { return html `${ifDefined(this._nMoreText)}`; }\nexport default block0;\n//# sourceMappingURL=TokenizerTemplate.lit.js.map","/* eslint no-unused-vars: 0 */\nimport { html, repeat, classMap, styleMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-responsive-popover\", tags, suffix)} tokenizer-popover=\"true\" style=${styleMap(this.styles.popover)} ?content-only-on-desktop=\"${this.hasValueState}\" hide-arrow placement-type=\"Bottom\" horizontal-align=\"Left\" @before-close=${this.handleBeforeClose} @before-open=\"${this.handleBeforeOpen}\"><${scopeTag(\"ui5-list\", tags, suffix)} class=\"ui5-tokenizer-list\" mode=\"Delete\" @ui5-item-delete=${ifDefined(this.itemDelete)}>${repeat(this._tokens, (item, index) => item._id || index, (item, index) => block4.call(this, context, tags, suffix, item, index))}${scopeTag(\"ui5-list\", tags, suffix)}>${this._isPhone ? block5.call(this, context, tags, suffix) : undefined}${scopeTag(\"ui5-responsive-popover\", tags, suffix)}>` : html `${repeat(this._tokens, (item, index) => item._id || index, (item, index) => block4.call(this, context, tags, suffix, item, index))}${this._isPhone ? block5.call(this, context, tags, suffix) : undefined}`; }\nfunction block1(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-title\", tags, suffix)} level=\"H5\" class=\"ui5-responsive-popover-header-text\">${ifDefined(this.morePopoverTitle)}${scopeTag(\"ui5-title\", tags, suffix)}><${scopeTag(\"ui5-button\", tags, suffix)} class=\"ui5-responsive-popover-close-btn\" icon=\"decline\" design=\"Transparent\" @click=\"${this.closeMorePopover}\">${scopeTag(\"ui5-button\", tags, suffix)}>
` : html `
`; }\nfunction block2(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block3.call(this, context, tags, suffix, item, index))}
` : html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block3.call(this, context, tags, suffix, item, index))}
`; }\nfunction block3(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nfunction block4(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li\", tags, suffix)} .tokenRef=${ifDefined(item)} wrapping-type=\"Normal\">${ifDefined(item.text)}${scopeTag(\"ui5-li\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block5(context, tags, suffix) { return suffix ? html `` : html ``; }\nexport default block0;\n//# sourceMappingURL=TokenizerPopoverTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/Tokenizer.css\", content: \".ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}:host{border:1px solid #000;box-sizing:border-box;display:inline-block;height:2.25rem}.ui5-tokenizer-root{align-items:center;box-sizing:border-box;display:flex;font-family:\\\"72override\\\",var(--sapFontFamily);height:100%;overflow-x:scroll}.ui5-tokenizer-no-padding{padding:0}.ui5-tokenizer-root.ui5-tokenizer-nmore--wrapper{overflow:hidden}.ui5-tokenizer--token--wrapper{align-items:center;box-sizing:border-box;display:inline-flex;height:100%}:host([expanded]) .ui5-tokenizer--content{display:inline-flex;overflow:hidden;white-space:nowrap}.ui5-tokenizer--content{align-items:center;box-sizing:border-box;display:flex;flex-wrap:nowrap;height:100%;overflow:hidden;padding-inline-start:var(--_ui5-v1-20-0_tokenizer_padding)}:host([_tokens-count=\\\"1\\\"]) .ui5-tokenizer--content{box-sizing:border-box;flex:1;max-width:100%;padding-inline-end:4px}.ui5-tokenizer-more-text{color:var(--_ui5-v1-20-0_tokenizer_n_more_text_color);cursor:pointer;display:inline-block;font-size:var(--sapFontSize);font-weight:400;margin-inline-start:.25rem;white-space:nowrap}\" };\nexport default styleData;\n//# sourceMappingURL=Tokenizer.css.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/TokenizerPopover.css\", content: \"[ui5-responsive-popover]::part(content),[ui5-responsive-popover]::part(header){padding:0}#ui5-tokenizer-dialog-confirm-btn{height:100%;min-width:4rem}[ui5-responsive-popover]{margin-top:var(--_ui5-v1-20-0_tokenizer-popover_offset);margin-inline-start:calc(var(--_ui5-v1-20-0_tokenizer_padding)*-1)}\" };\nexport default styleData;\n//# sourceMappingURL=TokenizerPopover.css.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/Suggestions.css\", content: \".ui5-suggestions-popover{box-shadow:var(--sapContent_Shadow1)}.ui5-suggestions-popover::part(content),.ui5-suggestions-popover::part(header){padding:0}.ui5-suggestions-popover::part(footer){padding:0 1rem}.ui5-suggestions-popover [ui5-li-suggestion-item]::part(icon),.ui5-suggestions-popover [ui5-li]::part(icon){color:var(--sapList_TextColor)}.input-root-phone.native-input-wrapper{display:contents}.input-root-phone.native-input-wrapper:before{display:none}.native-input-wrapper .ui5-input-inner-phone{margin:0}\" };\nexport default styleData;\n//# sourceMappingURL=Suggestions.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar Tokenizer_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport ScrollEnablement from \"@ui5/webcomponents-base/dist/delegate/ScrollEnablement.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isSpace, isSpaceCtrl, isSpaceShift, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isUpShift, isDownShift, isLeftShift, isRightShift, isLeftShiftCtrl, isRightShiftCtrl, isEnd, isHome, isHomeShift, isEndShift, isHomeCtrl, isEndCtrl, isRight, isLeft, isUp, isDown, } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport List from \"./List.js\";\nimport Title from \"./Title.js\";\nimport Button from \"./Button.js\";\nimport StandardListItem from \"./StandardListItem.js\";\nimport TokenizerTemplate from \"./generated/templates/TokenizerTemplate.lit.js\";\nimport TokenizerPopoverTemplate from \"./generated/templates/TokenizerPopoverTemplate.lit.js\";\nimport { MULTIINPUT_SHOW_MORE_TOKENS, TOKENIZER_ARIA_LABEL, TOKENIZER_POPOVER_REMOVE, TOKENIZER_ARIA_CONTAIN_TOKEN, TOKENIZER_ARIA_CONTAIN_ONE_TOKEN, TOKENIZER_ARIA_CONTAIN_SEVERAL_TOKENS, TOKENIZER_SHOW_ALL_ITEMS, } from \"./generated/i18n/i18n-defaults.js\";\n// Styles\nimport TokenizerCss from \"./generated/themes/Tokenizer.css.js\";\nimport TokenizerPopoverCss from \"./generated/themes/TokenizerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\n// reuse suggestions focus styling for NMore popup\nimport SuggestionsCss from \"./generated/themes/Suggestions.css.js\";\nvar ClipboardDataOperation;\n(function (ClipboardDataOperation) {\n ClipboardDataOperation[\"cut\"] = \"cut\";\n ClipboardDataOperation[\"copy\"] = \"copy\";\n})(ClipboardDataOperation || (ClipboardDataOperation = {}));\n/**\n * @class\n *\n * \n *\n * A container for tokens.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Tokenizer\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-tokenizer\n * @usestextcontent\n * @private\n */\nlet Tokenizer = Tokenizer_1 = class Tokenizer extends UI5Element {\n _handleResize() {\n this._nMoreCount = this.overflownTokens.length;\n }\n constructor() {\n super();\n this._resizeHandler = this._handleResize.bind(this);\n this._itemNav = new ItemNavigation(this, {\n currentIndex: -1,\n getItemsCallback: this._getVisibleTokens.bind(this),\n });\n this._scrollEnablement = new ScrollEnablement(this);\n }\n onBeforeRendering() {\n this._nMoreCount = this.overflownTokens.length;\n this._tokensCount = this._getTokens().length;\n this._tokens.forEach(token => {\n token.singleToken = this._tokens.length === 1;\n });\n if (!this._tokens.length) {\n this.closeMorePopover();\n }\n }\n onEnterDOM() {\n ResizeHandler.register(this.contentDom, this._resizeHandler);\n }\n onExitDOM() {\n ResizeHandler.deregister(this.contentDom, this._resizeHandler);\n }\n async _openMorePopoverAndFireEvent() {\n if (!this.preventPopoverOpen) {\n await this.openMorePopover();\n }\n this.fireEvent(\"show-more-items-press\");\n }\n async openMorePopover() {\n (await this.getPopover()).showAt(this.morePopoverOpener || this);\n }\n _getTokens() {\n return this.getSlottedNodes(\"tokens\");\n }\n get _tokens() {\n return this.getSlottedNodes(\"tokens\");\n }\n _onmousedown(e) {\n if (e.target.hasAttribute(\"ui5-token\")) {\n const target = e.target;\n if (!target.toBeDeleted) {\n this._itemNav.setCurrentItem(target);\n }\n }\n }\n onTokenSelect() {\n const tokens = this._getTokens();\n if (tokens.length === 1 && tokens[0].isTruncatable) {\n if (tokens[0].selected) {\n this.openMorePopover();\n }\n else {\n this.closeMorePopover();\n }\n }\n }\n _getVisibleTokens() {\n if (this.disabled) {\n return [];\n }\n return this._tokens.filter((token, index) => {\n return index < (this._tokens.length - this._nMoreCount);\n });\n }\n async onAfterRendering() {\n if (!this._getTokens().length) {\n const popover = await this.getPopover();\n popover.close();\n }\n this._scrollEnablement.scrollContainer = (this.expanded || !this.narrowContentDom) ? this.expandedContentDom : this.narrowContentDom;\n if (this.expanded) {\n this._expandedScrollWidth = this.expandedContentDom.scrollWidth;\n this.scrollToEnd();\n }\n if (!this.expanded) {\n this.scrollToStart();\n }\n }\n _delete(e) {\n const target = e.target;\n if (!e.detail) { // if there are no details, the event is triggered by a click\n this._tokenClickDelete(e, target);\n if (this._getTokens().length) {\n this.closeMorePopover();\n }\n return;\n }\n if (this._selectedTokens.length) {\n this._selectedTokens.forEach(token => this.deleteToken(token, e.detail.backSpace));\n }\n else {\n this.deleteToken(target, e.detail.backSpace);\n }\n }\n _tokenClickDelete(e, token) {\n const tokens = this._getVisibleTokens();\n const target = e.target;\n const deletedTokenIndex = token ? tokens.indexOf(token) : tokens.indexOf(target); // The index of the token that just got deleted\n const nextTokenIndex = deletedTokenIndex === tokens.length - 1 ? deletedTokenIndex - 1 : deletedTokenIndex + 1; // The index of the next token that needs to be focused next due to the deletion\n const nextToken = tokens[nextTokenIndex]; // if the last item was deleted this will be undefined\n this._handleCurrentItemAfterDeletion(nextToken);\n this.fireEvent(\"token-delete\", { ref: token || target });\n }\n _handleCurrentItemAfterDeletion(nextToken) {\n if (nextToken && !isPhone()) {\n this._itemNav.setCurrentItem(nextToken); // update the item navigation with the new token or undefined, if the last was deleted\n setTimeout(() => {\n nextToken.focus();\n }, 0);\n }\n }\n /**\n * Removes a token from the Tokenizer.\n * This method should only be used by ui5-multi-combobox and ui5-multi-input\n *\n * @protected\n * @param token Token to be focused.\n * @param forwardFocusToPrevious Indicates whether the focus will be forwarded to previous or next token after deletion.\n */\n deleteToken(token, forwardFocusToPrevious) {\n const tokens = this._getVisibleTokens();\n const deletedTokenIndex = tokens.indexOf(token);\n let nextTokenIndex = (deletedTokenIndex === tokens.length - 1) ? deletedTokenIndex - 1 : deletedTokenIndex + 1;\n const notSelectedTokens = tokens.filter(t => !t.selected);\n if (forwardFocusToPrevious) { // on backspace key select the previous item (unless deleting the first)\n nextTokenIndex = deletedTokenIndex === 0 ? deletedTokenIndex + 1 : deletedTokenIndex - 1;\n }\n else { // on delete key or mouse click on the \"x\" select the next item (unless deleting the last)\n nextTokenIndex = deletedTokenIndex === tokens.length - 1 ? deletedTokenIndex - 1 : deletedTokenIndex + 1;\n }\n let nextToken = tokens[nextTokenIndex];\n if (notSelectedTokens.length > 1) {\n while (nextToken && nextToken.selected) {\n nextToken = forwardFocusToPrevious ? tokens[--nextTokenIndex] : tokens[++nextTokenIndex];\n }\n }\n else {\n nextToken = notSelectedTokens[0];\n }\n this._handleCurrentItemAfterDeletion(nextToken);\n this.fireEvent(\"token-delete\", { ref: token });\n }\n async itemDelete(e) {\n const token = e.detail.item.tokenRef;\n // delay the token deletion in order to close the popover before removing token of the DOM\n if (this._getTokens().length === 1 && this._getTokens()[0].isTruncatable) {\n const morePopover = await this.getPopover();\n morePopover.addEventListener(\"ui5-after-close\", () => {\n this.fireEvent(\"token-delete\", { ref: token });\n }, {\n once: true,\n });\n morePopover.close();\n }\n else {\n this.fireEvent(\"token-delete\", { ref: token });\n }\n }\n handleBeforeClose() {\n if (isPhone()) {\n this._getTokens().forEach(token => {\n token.selected = false;\n });\n }\n }\n handleBeforeOpen() {\n this.fireEvent(\"before-more-popover-open\");\n }\n _onkeydown(e) {\n if (isSpaceShift(e)) {\n e.preventDefault();\n }\n if (isSpace(e) || isSpaceCtrl(e)) {\n e.preventDefault();\n return this._handleTokenSelection(e, false);\n }\n if (isHomeShift(e)) {\n this._handleHomeShift(e);\n }\n if (isEndShift(e)) {\n this._handleEndShift(e);\n }\n this._handleItemNavigation(e, this._tokens);\n }\n _handleItemNavigation(e, tokens) {\n const isCtrl = !!(e.metaKey || e.ctrlKey);\n const target = e.target;\n if (isLeftCtrl(e) || isRightCtrl(e) || isDownCtrl(e) || isUpCtrl(e)) {\n return this._handleArrowCtrl(e, target, tokens, isRightCtrl(e) || isDownCtrl(e));\n }\n if (isLeftShift(e) || isRightShift(e) || isUpShift(e) || isDownShift(e) || isLeftShiftCtrl(e) || isRightShiftCtrl(e)) {\n e.preventDefault();\n return this._handleArrowShift(target, tokens, (isRightShift(e) || isRightShiftCtrl(e) || isDownShift(e)));\n }\n if (isHome(e) || isEnd(e) || isHomeCtrl(e) || isEndCtrl(e)) {\n e.preventDefault();\n return this._handleHome(tokens, isEnd(e) || isEndCtrl(e));\n }\n if (isCtrl && e.key.toLowerCase() === \"a\") {\n e.preventDefault();\n return this._toggleTokenSelection(tokens);\n }\n if (isLeft(e) || isRight(e) || isUp(e) || isDown(e)) {\n const nextTokenIdx = this._calcNextTokenIndex(this._tokens.find(token => token.focused), tokens, (isRight(e) || isDown(e)));\n this._scrollToToken(tokens[nextTokenIdx]);\n }\n }\n _handleHome(tokens, endKeyPressed) {\n if (!tokens || !tokens.length) {\n return -1;\n }\n const index = endKeyPressed ? tokens.length - 1 : 0;\n tokens[index].focus();\n this._itemNav.setCurrentItem(tokens[index]);\n }\n _handleHomeShift(e) {\n const tokens = this.tokens;\n const target = e.target;\n const currentTokenIdx = tokens.indexOf(target);\n tokens.filter((token, index) => index <= currentTokenIdx).forEach(token => {\n token.selected = true;\n });\n tokens[0].focus();\n this._itemNav.setCurrentItem(tokens[0]);\n }\n _handleEndShift(e) {\n const tokens = this.tokens;\n const target = e.target;\n const currentTokenIdx = tokens.indexOf(target);\n tokens.filter((token, index) => index >= currentTokenIdx).forEach(token => {\n token.selected = true;\n });\n tokens[tokens.length - 1].focus();\n this._itemNav.setCurrentItem(tokens[tokens.length - 1]);\n }\n _calcNextTokenIndex(focusedToken, tokens, backwards) {\n if (!tokens.length) {\n return -1;\n }\n const focusedTokenIndex = tokens.indexOf(focusedToken);\n let nextIndex = backwards ? (focusedTokenIndex + 1) : (focusedTokenIndex - 1);\n if (nextIndex >= tokens.length) {\n nextIndex = tokens.length - 1;\n }\n if (nextIndex < 0) {\n nextIndex = 0;\n }\n return nextIndex;\n }\n _handleArrowCtrl(e, focusedToken, tokens, backwards) {\n const nextIndex = this._calcNextTokenIndex(focusedToken, tokens, backwards);\n e.preventDefault();\n if (nextIndex === -1) {\n return;\n }\n setTimeout(() => {\n tokens[nextIndex].focus();\n }, 0);\n this._scrollToToken(tokens[nextIndex]);\n this._itemNav.setCurrentItem(tokens[nextIndex]);\n }\n _handleArrowShift(focusedToken, tokens, backwards) {\n const focusedTokenIndex = tokens.indexOf(focusedToken);\n const nextIndex = backwards ? (focusedTokenIndex + 1) : (focusedTokenIndex - 1);\n if (nextIndex === -1 || nextIndex === tokens.length) {\n return;\n }\n focusedToken.selected = true;\n tokens[nextIndex].selected = true;\n setTimeout(() => {\n tokens[nextIndex].focus();\n }, 0);\n this._scrollToToken(tokens[nextIndex]);\n this._itemNav.setCurrentItem(tokens[nextIndex]);\n }\n _click(e) {\n this._handleTokenSelection(e);\n }\n _toggleTokenSelection(tokens) {\n if (!tokens || !tokens.length) {\n return;\n }\n const tokensAreSelected = tokens.every(token => token.selected);\n tokens.forEach(token => { token.selected = !tokensAreSelected; });\n }\n _handleTokenSelection(e, deselectAll = true) {\n const target = e.target;\n if (target.hasAttribute(\"ui5-token\")) {\n const deselectTokens = deselectAll ? this._tokens : [];\n deselectTokens.forEach(token => {\n if (token !== target) {\n token.selected = false;\n }\n });\n }\n }\n _fillClipboard(shortcutName, tokens) {\n const tokensTexts = tokens.filter(token => token.selected).map(token => token.text).join(\"\\r\\n\");\n /* fill clipboard with tokens' texts so parent can handle creation */\n const cutToClipboard = (e) => {\n if (e.clipboardData) {\n e.clipboardData.setData(\"text/plain\", tokensTexts);\n }\n e.preventDefault();\n };\n document.addEventListener(shortcutName, cutToClipboard);\n document.execCommand(shortcutName);\n document.removeEventListener(shortcutName, cutToClipboard);\n }\n /**\n * Scrolls the container of the tokens to its beginning.\n * This method is used by MultiInput and MultiComboBox.\n * @private\n */\n scrollToStart() {\n if (this._scrollEnablement.scrollContainer) {\n this._scrollEnablement.scrollTo(0, 0);\n }\n }\n /**\n * Scrolls the container of the tokens to its end when expanded.\n * This method is used by MultiInput and MultiComboBox.\n * @private\n */\n scrollToEnd() {\n const expandedTokenizerScrollWidth = this.expandedContentDom && (this.effectiveDir !== \"rtl\" ? this.expandedContentDom.scrollWidth : -this.expandedContentDom.scrollWidth);\n if (this._scrollEnablement.scrollContainer) {\n this._scrollEnablement.scrollTo(expandedTokenizerScrollWidth, 0, 5, 10);\n }\n }\n /**\n * Scrolls token to the visible area of the container.\n * Adds 4 pixels to the scroll position to ensure padding and border visibility on both ends\n * @private\n */\n _scrollToToken(token) {\n if (!this.expandedContentDom) {\n return;\n }\n const tokenRect = token.getBoundingClientRect();\n const tokenContainerRect = this.expandedContentDom.getBoundingClientRect();\n if (tokenRect.left < tokenContainerRect.left) {\n this._scrollEnablement.scrollTo(this.expandedContentDom.scrollLeft - (tokenContainerRect.left - tokenRect.left + 5), 0);\n }\n else if (tokenRect.right > tokenContainerRect.right) {\n this._scrollEnablement.scrollTo(this.expandedContentDom.scrollLeft + (tokenRect.right - tokenContainerRect.right + 5), 0);\n }\n }\n async closeMorePopover() {\n (await this.getPopover()).close(false, false, true);\n }\n get _nMoreText() {\n if (this._getVisibleTokens().length) {\n return Tokenizer_1.i18nBundle.getText(MULTIINPUT_SHOW_MORE_TOKENS, this._nMoreCount);\n }\n return Tokenizer_1.i18nBundle.getText(TOKENIZER_SHOW_ALL_ITEMS, this._nMoreCount);\n }\n get showNMore() {\n return !this.expanded && this.showMore && !!this.overflownTokens.length;\n }\n get contentDom() {\n return this.shadowRoot.querySelector(\".ui5-tokenizer--content\");\n }\n get expandedContentDom() {\n return this.shadowRoot.querySelector(\".ui5-tokenizer-expanded--content\");\n }\n get narrowContentDom() {\n return this.shadowRoot.querySelector(\".ui5-tokenizer-nmore--content\");\n }\n get tokenizerLabel() {\n return Tokenizer_1.i18nBundle.getText(TOKENIZER_ARIA_LABEL);\n }\n get morePopoverTitle() {\n return Tokenizer_1.i18nBundle.getText(TOKENIZER_POPOVER_REMOVE);\n }\n get overflownTokens() {\n if (!this.contentDom) {\n return [];\n }\n // Reset the overflow prop of the tokens first in order\n // to use their dimensions for calculation because already\n // hidden tokens are set to 'display: none'\n this._getTokens().forEach(token => {\n token.overflows = false;\n });\n return this._getTokens().filter(token => {\n const parentRect = this.contentDom.getBoundingClientRect();\n const tokenRect = token.getBoundingClientRect();\n const tokenEnd = Number(tokenRect.right.toFixed(2));\n const parentEnd = Number(parentRect.right.toFixed(2));\n const tokenStart = Number(tokenRect.left.toFixed(2));\n const parentStart = Number(parentRect.left.toFixed(2));\n token.overflows = !this.expanded && ((tokenStart < parentStart) || (tokenEnd > parentEnd));\n return token.overflows;\n });\n }\n get hasValueState() {\n return this.valueState === ValueState.None || this.valueState === ValueState.Success;\n }\n get valueStateMessageText() {\n return this.getSlottedNodes(\"valueStateMessage\").map(el => el.cloneNode(true));\n }\n /**\n * This method is relevant for sap_horizon theme only\n */\n get _valueStateMessageIcon() {\n const iconPerValueState = {\n Error: \"error\",\n Warning: \"alert\",\n Success: \"sys-enter-2\",\n Information: \"information\",\n };\n return this.valueState !== ValueState.None ? iconPerValueState[this.valueState] : \"\";\n }\n get _isPhone() {\n return isPhone();\n }\n get _selectedTokens() {\n return this._getTokens().filter(token => token.selected);\n }\n get classes() {\n return {\n wrapper: {\n \"ui5-tokenizer-root\": true,\n \"ui5-tokenizer-nmore--wrapper\": this.showMore,\n \"ui5-tokenizer-no-padding\": !this._getTokens().length,\n },\n content: {\n \"ui5-tokenizer--content\": true,\n \"ui5-tokenizer-expanded--content\": !this.showNMore,\n \"ui5-tokenizer-nmore--content\": this.showNMore,\n },\n popoverValueState: {\n \"ui5-valuestatemessage-root\": true,\n \"ui5-responsive-popover-header\": true,\n \"ui5-valuestatemessage--success\": this.valueState === ValueState.Success,\n \"ui5-valuestatemessage--error\": this.valueState === ValueState.Error,\n \"ui5-valuestatemessage--warning\": this.valueState === ValueState.Warning,\n \"ui5-valuestatemessage--information\": this.valueState === ValueState.Information,\n },\n };\n }\n get styles() {\n return {\n popover: {\n \"min-width\": this.popoverMinWidth ? `${this.popoverMinWidth}px` : \"\",\n },\n popoverValueStateMessage: {\n \"width\": this.popoverMinWidth && !isPhone() ? `${this.popoverMinWidth}px` : \"100%\",\n \"min-height\": \"2rem\",\n },\n popoverHeader: {\n \"min-height\": \"2rem\",\n },\n popoverHeaderTitle: {\n \"justify-content\": \"left\",\n },\n };\n }\n _tokensCountText() {\n const iTokenCount = this._getTokens().length;\n if (iTokenCount === 0) {\n return Tokenizer_1.i18nBundle.getText(TOKENIZER_ARIA_CONTAIN_TOKEN);\n }\n if (iTokenCount === 1) {\n return Tokenizer_1.i18nBundle.getText(TOKENIZER_ARIA_CONTAIN_ONE_TOKEN);\n }\n return Tokenizer_1.i18nBundle.getText(TOKENIZER_ARIA_CONTAIN_SEVERAL_TOKENS, iTokenCount);\n }\n /**\n * @protected\n */\n _focusLastToken() {\n if (this.tokens.length === 0) {\n return;\n }\n const lastToken = this.tokens[this.tokens.length - 1];\n lastToken.focus();\n this._itemNav.setCurrentItem(lastToken);\n }\n static async onDefine() {\n Tokenizer_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n async getPopover() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n return staticAreaItem.querySelector(\"[ui5-responsive-popover]\");\n }\n};\n__decorate([\n property({ type: Boolean })\n], Tokenizer.prototype, \"showMore\", void 0);\n__decorate([\n property({ type: Boolean })\n], Tokenizer.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], Tokenizer.prototype, \"preventPopoverOpen\", void 0);\n__decorate([\n property({ type: Boolean })\n], Tokenizer.prototype, \"expanded\", void 0);\n__decorate([\n property({ type: Object })\n], Tokenizer.prototype, \"morePopoverOpener\", void 0);\n__decorate([\n property({ validator: Integer })\n], Tokenizer.prototype, \"popoverMinWidth\", void 0);\n__decorate([\n property({ type: ValueState, defaultValue: ValueState.None })\n], Tokenizer.prototype, \"valueState\", void 0);\n__decorate([\n property({ validator: Integer })\n], Tokenizer.prototype, \"_nMoreCount\", void 0);\n__decorate([\n property({ validator: Integer })\n], Tokenizer.prototype, \"_tokensCount\", void 0);\n__decorate([\n slot({ type: HTMLElement, \"default\": true, individualSlots: true })\n], Tokenizer.prototype, \"tokens\", void 0);\n__decorate([\n slot()\n], Tokenizer.prototype, \"valueStateMessage\", void 0);\nTokenizer = Tokenizer_1 = __decorate([\n customElement({\n tag: \"ui5-tokenizer\",\n languageAware: true,\n renderer: litRender,\n template: TokenizerTemplate,\n styles: TokenizerCss,\n staticAreaStyles: [\n ResponsivePopoverCommonCss,\n ValueStateMessageCss,\n SuggestionsCss,\n TokenizerPopoverCss,\n ],\n staticAreaTemplate: TokenizerPopoverTemplate,\n dependencies: [\n ResponsivePopover,\n List,\n StandardListItem,\n Title,\n Button,\n ],\n }),\n event(\"token-delete\", {\n detail: {\n ref: { type: HTMLElement },\n },\n }),\n event(\"show-more-items-press\", {\n detail: {\n ref: { type: HTMLElement },\n },\n }),\n event(\"before-more-popover-open\", {\n detail: {},\n })\n], Tokenizer);\nTokenizer.define();\nexport default Tokenizer;\nexport { ClipboardDataOperation };\n//# sourceMappingURL=Tokenizer.js.map","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"sys-cancel\";\nconst pathData = \"M512 256q0 54-20 100.5t-54.5 81T356 492t-100 20q-54 0-100.5-20t-81-55T20 355.5 0 256t20.5-100 55-81.5T157 20t99-20q53 0 100 20t81.5 54.5T492 156t20 100zm-32 0q0-47-17.5-87.5t-48-71-71.5-48T256 32t-87 18-71.5 48.5-48 71T32 256q0 47 17.5 88t48 71 71.5 47.5 87 17.5q47 0 88-17.5t71-47.5 47.5-71 17.5-88zm-186-7q-5 3-1 9l89 89q9 8 0 17l-16 17q-8 4-9 4t-9-4l-89-89q-1-2-4-2-4 0-5 2l-88 89q-6 4-9 4-1 0-9-4l-16-17q-8-9 0-17l88-89q5-5 0-9l-88-89q-8-9 0-17l16-17q4-4 9-4t9 4l88 89q2 2 5 2 2 0 4-2l89-89q4-4 9-4t9 4l16 17q9 8 0 17z\";\nconst ltr = false;\nconst accData = null;\nconst collection = \"SAP-icons-v4\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v4/sys-cancel\";\nexport { pathData, ltr, accData };","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"sys-cancel\";\nconst pathData = \"M256 0q53 0 99.5 20T437 75t55 81.5 20 99.5-20 99.5-55 81.5-81.5 55-99.5 20-99.5-20T75 437t-55-81.5T0 256t20-99.5T75 75t81.5-55T256 0zm0 461q42 0 79.5-16t65.5-44 44-65.5 16-79.5-16-79.5-44-65.5-65.5-44T256 51t-79.5 16-65.5 44-44 65.5T51 256t16 79.5 44 65.5 65.5 44 79.5 16zm70-301q11 0 18.5 7.5T352 186t-7 18l-53 52 53 52q7 7 7 18t-7.5 18.5T326 352q-10 0-18-8l-52-52-52 52q-8 8-18 8-11 0-18.5-7.5T160 326q0-10 8-18l52-52-52-52q-8-8-8-18 0-11 7.5-18.5T186 160t18 7l52 53 52-53q7-7 18-7z\";\nconst ltr = false;\nconst accData = null;\nconst collection = \"SAP-icons-v5\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v5/sys-cancel\";\nexport { pathData, ltr, accData };","import { isLegacyThemeFamily } from \"@ui5/webcomponents-base/dist/config/Theme.js\";\nimport { pathData as pathDatav4, ltr, accData } from \"./v4/sys-cancel.js\";\nimport { pathData as pathDatav5 } from \"./v5/sys-cancel.js\";\n\nconst pathData = isLegacyThemeFamily() ? pathDatav4 : pathDatav5;\n\nexport default \"sys-cancel\";\nexport { pathData, ltr, accData };","/* eslint no-unused-vars: 0 */\nimport { html, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html `${ifDefined(this.text)}${!this.readonly ? block1.call(this, context, tags, suffix) : undefined}
`; }\nfunction block1(context, tags, suffix) { return html `${this.closeIcon.length ? block2.call(this, context, tags, suffix) : block3.call(this, context, tags, suffix)}
`; }\nfunction block2(context, tags, suffix) { return html ``; }\nfunction block3(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} name=\"${ifDefined(this.iconURI)}\" accessible-name=\"${ifDefined(this.tokenDeletableText)}\" show-tooltip @click=\"${this._delete}\">${scopeTag(\"ui5-icon\", tags, suffix)}>` : html ``; }\nexport default block0;\n//# sourceMappingURL=TokenTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/Token.css\", content: \":host{background:var(--_ui5-v1-20-0_token_background);border:var(--sapButton_BorderWidth) solid var(--sapButton_TokenBorderColor);border-radius:var(--_ui5-v1-20-0_token_border_radius);box-sizing:border-box;color:var(--_ui5-v1-20-0_token_text_color);display:inline-block;height:var(--_ui5-v1-20-0_token_height)}:host(:not([single-token])){margin-inline-end:var(--_ui5-v1-20-0_token_right_margin)}:host([overflows]){display:none}:host(:not([readonly]):hover){background:var(--sapButton_Hover_Background);border-color:var(--_ui5-v1-20-0_token_hover_border_color)}:host([selected]:not([readonly])){color:var(--sapButton_Selected_TextColor)}:host([selected]:not([readonly])){background:var(--sapButton_Selected_Background);border:var(--sapButton_BorderWidth) solid var(--sapButton_Selected_BorderColor)}:host([selected]:not([readonly])) .ui5-token--wrapper{border-bottom:var(--_ui5-v1-20-0_token_selected_internal_border_bottom);border-bottom-left-radius:var(--_ui5-v1-20-0_token_selected_internal_border_bottom_radius);border-bottom-right-radius:var(--_ui5-v1-20-0_token_selected_internal_border_bottom_radius)}:host([selected]:not([readonly]):hover){background:var(--sapButton_Selected_Hover_Background);border-color:var(--_ui5-v1-20-0_token_selected_hover_border_color)}:host([readonly]){background:var(--_ui5-v1-20-0_token_readonly_background);border-color:var(--sapField_ReadOnly_BorderColor);color:var(--_ui5-v1-20-0_token_readonly_color)}:host([readonly]) .ui5-token--wrapper{padding:var(--_ui5-v1-20-0_token_readonly_padding)}:host([selected]) .ui5-token--wrapper:focus{outline:var(--_ui5-v1-20-0_token_selected_focus_outline)}:host([selected]:not([readonly])) .ui5-token--icon,:host([selected]:not([readonly])) .ui5-token--text{position:relative;top:var(--_ui5-v1-20-0_token_text_icon_top)}:host([focused][selected]:not([readonly]):not(:hover)){background:var(--sapButton_Selected_Background);border:var(--_ui5-v1-20-0_token_focused_selected_border);color:var(--sapButton_Selected_TextColor)}.ui5-token--wrapper{align-items:center;box-sizing:border-box;cursor:default;display:flex;font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--sapFontSize);height:100%;padding-inline-start:var(--_ui5-v1-20-0_token_left_padding);user-select:none;width:100%}.ui5-token--wrapper{position:relative}:host([selected]) .ui5-token--wrapper{font-family:var(--_ui5-v1-20-0_token_selected_text_font_family)}.ui5-token--wrapper:focus{outline:var(--_ui5-v1-20-0_token_focus_outline);outline-offset:var(--_ui5-v1-20-0_token_outline_offset)}.ui5-token--wrapper:focus:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--_ui5-v1-20-0_token_focus_outline_border_radius);bottom:var(--_ui5-v1-20-0_token_focus_offset);content:var(--ui5-v1-20-0_token_focus_pseudo_element_content);left:var(--_ui5-v1-20-0_token_focus_offset);pointer-events:none;position:absolute;right:var(--_ui5-v1-20-0_token_focus_offset);top:var(--_ui5-v1-20-0_token_focus_offset);z-index:2}:host([focused][selected]:not([readonly])) .ui5-token--wrapper:focus:after{bottom:var(--_ui5-v1-20-0_token_selected_focused_offset_bottom)}.ui5-token--text{white-space:nowrap}.ui5-token--icon{display:flex}:host([selected]) .ui5-token--icon>[ui5-icon],:host([selected]) ::slotted([ui5-icon]){color:var(--sapButton_Selected_TextColor)}.ui5-token--icon>[ui5-icon],::slotted([ui5-icon]){color:inherit;color:var(--sapContent_IconColor);cursor:pointer;height:var(--_ui5-v1-20-0_token_icon_size);padding:var(--_ui5-v1-20-0_token_icon_padding);width:var(--_ui5-v1-20-0_token_icon_size)}:host([single-token]){max-width:100%}:host([single-token]) .ui5-token--wrapper{max-width:100%}:host([single-token]) .ui5-token--text{max-width:100%;overflow:hidden;text-overflow:ellipsis}\" };\nexport default styleData;\n//# sourceMappingURL=Token.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar Token_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getTheme } from \"@ui5/webcomponents-base/dist/config/Theme.js\";\nimport { isBackSpace, isSpace, isDelete, isSpaceCtrl, } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-cancel.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { TOKEN_ARIA_DELETABLE } from \"./generated/i18n/i18n-defaults.js\";\nimport Icon from \"./Icon.js\";\nimport TokenTemplate from \"./generated/templates/TokenTemplate.lit.js\";\n// Styles\nimport tokenStyles from \"./generated/themes/Token.css.js\";\n/**\n * @class\n *\n * \n *\n * Tokens are small items of information (similar to tags) that mainly serve to visualize previously selected items.\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/Token.js\";
\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Token\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-token\n * @since 1.0.0-rc.9\n * @implements sap.ui.webc.main.IToken\n * @public\n */\nlet Token = Token_1 = class Token extends UI5Element {\n _handleSelect() {\n if (!this.toBeDeleted) {\n this.selected = !this.selected;\n this.fireEvent(\"select\");\n }\n }\n _focusin() {\n this.focused = true;\n }\n _focusout() {\n this.focused = !this.focused;\n }\n _delete() {\n this.toBeDeleted = true;\n this.fireEvent(\"delete\");\n }\n _keydown(e) {\n const isBackSpacePressed = isBackSpace(e);\n const isDeletePressed = isDelete(e);\n if (!this.readonly && (isBackSpacePressed || isDeletePressed)) {\n e.preventDefault();\n this.fireEvent(\"delete\", {\n backSpace: isBackSpacePressed,\n \"delete\": isDeletePressed,\n });\n }\n if (isSpace(e) || isSpaceCtrl(e)) {\n e.preventDefault();\n this._handleSelect();\n }\n }\n onBeforeRendering() {\n this.toBeDeleted = false;\n }\n get tokenDeletableText() {\n return Token_1.i18nBundle.getText(TOKEN_ARIA_DELETABLE);\n }\n get iconURI() {\n if (getTheme().includes(\"sap_belize\")) {\n return \"sys-cancel\";\n }\n return \"decline\";\n }\n get textDom() {\n return this.getDomRef()?.querySelector(\".ui5-token--text\");\n }\n get isTruncatable() {\n if (!this.textDom) {\n return false;\n }\n return Math.ceil(this.textDom.getBoundingClientRect().width) < Math.ceil(this.textDom.scrollWidth);\n }\n static async onDefine() {\n Token_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n};\n__decorate([\n property()\n], Token.prototype, \"text\", void 0);\n__decorate([\n property({ type: Boolean })\n], Token.prototype, \"readonly\", void 0);\n__decorate([\n property({ type: Boolean })\n], Token.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], Token.prototype, \"overflows\", void 0);\n__decorate([\n property({ type: Boolean })\n], Token.prototype, \"singleToken\", void 0);\n__decorate([\n property({ type: Boolean })\n], Token.prototype, \"focused\", void 0);\n__decorate([\n property({ type: Boolean })\n], Token.prototype, \"toBeDeleted\", void 0);\n__decorate([\n property({ defaultValue: \"-1\", noAttribute: true })\n], Token.prototype, \"_tabIndex\", void 0);\n__decorate([\n slot()\n], Token.prototype, \"closeIcon\", void 0);\nToken = Token_1 = __decorate([\n customElement({\n tag: \"ui5-token\",\n languageAware: true,\n renderer: litRender,\n template: TokenTemplate,\n styles: tokenStyles,\n dependencies: [Icon],\n })\n /**\n * Fired when the the component is selected by user interaction with mouse or by clicking space.\n *\n * @event sap.ui.webc.main.Token#select\n * @public\n */\n ,\n event(\"select\")\n /**\n * Fired when the backspace, delete or close icon of the token is pressed\n *\n * @event\n * @param {Boolean} backSpace Indicates whether token is deleted by backspace key.\n * @param {Boolean} delete Indicates whether token is deleted by delete key.\n * @private\n */\n ,\n event(\"delete\", {\n detail: {\n \"backSpace\": { type: Boolean },\n \"delete\": { type: Boolean },\n },\n })\n], Token);\nToken.define();\nexport default Token;\n//# sourceMappingURL=Token.js.map","/* eslint no-unused-vars: 0 */\nimport { html, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html ` `; }\nfunction block1(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-button-icon\" name=\"${ifDefined(this.icon)}\" accessible-role=\"${ifDefined(this.iconRole)}\" part=\"icon\" ?show-tooltip=${this.showIconTooltip}>${scopeTag(\"ui5-icon\", tags, suffix)}>` : html ``; }\nfunction block2(context, tags, suffix) { return html `${ifDefined(this.buttonTypeText)}`; }\nexport default block0;\n//# sourceMappingURL=ToggleButtonTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/ToggleButton.css\", content: \":host(:not([hidden])){display:inline-block}:host([design=Emphasized]:not([pressed])){text-shadow:var(--_ui5-v1-20-0_toggle_button_emphasized_text_shadow)}:host([design=Default][pressed]),:host([design=Emphasized][pressed]),:host([design=Transparent][pressed]),:host([pressed]){background:var(--sapButton_Selected_Background);border-color:var(--sapButton_Selected_BorderColor);color:var(--sapButton_Selected_TextColor);text-shadow:none}:host([design=Default][pressed]:hover),:host([design=Default][pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover),:host([design=Emphasized][pressed]:hover),:host([design=Emphasized][pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover),:host([design=Transparent][pressed]:hover),:host([design=Transparent][pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover),:host([pressed]:hover),:host([pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover){background:var(--sapButton_Selected_Hover_Background);border-color:var(--sapButton_Selected_Hover_BorderColor);color:var(--sapButton_Selected_TextColor)}:host([active][focused]),:host([design=Default][active][focused]),:host([design=Emphasized][active][focused]),:host([design=Transparent][active][focused]){background:var(--sapButton_Active_Background);border-color:var(--sapButton_Active_BorderColor);color:var(--sapButton_Selected_TextColor)}:host([design=Default][pressed]:not([active]):not([non-interactive]):not([_is-touch])),:host([design=Emphasized][pressed]:not([active]):not([non-interactive]):not([_is-touch])),:host([design=Transparent][pressed]:not([active]):not([non-interactive]):not([_is-touch])),:host([pressed]:not([active]):not([non-interactive]):not([_is-touch])){background:var(--sapButton_Selected_Background);border-color:var(--sapButton_Selected_BorderColor);color:var(--sapButton_Selected_TextColor)}:host([design=Negative][pressed]){background:var(--sapButton_Reject_Selected_Background);border-color:var(--sapButton_Reject_Selected_BorderColor);color:var(--sapButton_Reject_Selected_TextColor)}:host([design=Negative][active][focused]){background:var(--sapButton_Reject_Active_Background);border-color:var(--sapButton_Reject_Active_BorderColor);color:var(--sapButton_Reject_Active_TextColor)}:host([design=Negative][pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover),:host([design=Negative][pressed][active]:hover){background:var(--sapButton_Reject_Selected_Hover_Background);border-color:var(--sapButton_Reject_Selected_Hover_BorderColor);color:var(--sapButton_Reject_Selected_TextColor)}:host([design=Negative][pressed]:not([active]):not([non-interactive]):not([_is-touch])){background:var(--sapButton_Reject_Selected_Background);border-color:var(--sapButton_Reject_Selected_BorderColor);color:var(--sapButton_Reject_Selected_TextColor)}:host([design=Positive][pressed]){background:var(--sapButton_Accept_Selected_Background);border-color:var(--sapButton_Accept_Selected_BorderColor);color:var(--sapButton_Accept_Selected_TextColor)}:host([design=Positive][active][focused]){background:var(--sapButton_Accept_Active_Background);border-color:var(--sapButton_Accept_Active_BorderColor);color:var(--sapButton_Accept_Selected_TextColor)}:host([design=Positive][pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover),:host([design=Positive][pressed][active]:hover){background:var(--sapButton_Accept_Selected_Hover_Background);border-color:var(--sapButton_Accept_Selected_Hover_BorderColor);color:var(--sapButton_Accept_Selected_TextColor)}:host([design=Positive][pressed]:not([active]):not([non-interactive]):not([_is-touch])){background:var(--sapButton_Accept_Selected_Background);border-color:var(--sapButton_Accept_Selected_BorderColor);color:var(--sapButton_Accept_Selected_TextColor)}:host([design=Attention][pressed]){background:var(--sapButton_Attention_Selected_Background);border-color:var(--sapButton_Attention_Selected_BorderColor);color:var(--sapButton_Attention_Selected_TextColor)}:host([design=Attention][active][focused]){background:var(--sapButton_Attention_Active_Background);border-color:var(--sapButton_Attention_Active_BorderColor);color:var(--sapButton_Attention_Active_TextColor)}:host([design=Attention][pressed]:not([active]):not([non-interactive]):not([_is-touch]):hover),:host([design=Attention][pressed][active]:hover){background:var(--sapButton_Attention_Selected_Hover_Background);border-color:var(--sapButton_Attention_Selected_Hover_BorderColor);color:var(--sapButton_Attention_Selected_TextColor)}:host([design=Attention][pressed]:not([active]):not([non-interactive]):not([_is-touch])){background:var(--sapButton_Attention_Selected_Background);border-color:var(--sapButton_Attention_Selected_BorderColor);color:var(--sapButton_Attention_Selected_TextColor)}\" };\nexport default styleData;\n//# sourceMappingURL=ToggleButton.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport { isSpaceShift } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isSafari } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport Button from \"./Button.js\";\nimport ToggleButtonTemplate from \"./generated/templates/ToggleButtonTemplate.lit.js\";\n// Styles\nimport toggleBtnCss from \"./generated/themes/ToggleButton.css.js\";\n/**\n * @class\n *\n * \n *\n * The ui5-toggle-button
component is an enhanced ui5-button
\n * that can be toggled between pressed and normal states.\n * Users can use the ui5-toggle-button
as a switch to turn a setting on or off.\n * It can also be used to represent an independent choice similar to a check box.\n *
\n * Clicking or tapping on a ui5-toggle-button
changes its state to pressed
. The button returns to\n * its initial state when the user clicks or taps on it again.\n * By applying additional custom CSS-styling classes, apps can give a different style to any ui5-toggle-button
.\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/ToggleButton\";
\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.ToggleButton\n * @extends sap.ui.webc.main.Button\n * @tagname ui5-toggle-button\n * @public\n */\nlet ToggleButton = class ToggleButton extends Button {\n _onclick() {\n this.pressed = !this.pressed;\n if (isSafari()) {\n this.getDomRef().focus();\n }\n }\n _onkeyup(e) {\n if (isSpaceShift(e)) {\n e.preventDefault();\n return;\n }\n super._onkeyup(e);\n }\n};\n__decorate([\n property({ type: Boolean })\n], ToggleButton.prototype, \"pressed\", void 0);\nToggleButton = __decorate([\n customElement({\n tag: \"ui5-toggle-button\",\n template: ToggleButtonTemplate,\n styles: [Button.styles, toggleBtnCss],\n })\n], ToggleButton);\nToggleButton.define();\nexport default ToggleButton;\n//# sourceMappingURL=ToggleButton.js.map","const escapeReg = /[[\\]{}()*+?.\\\\^$|]/g;\nconst escapeRegExp = (str) => {\n return str.replace(escapeReg, \"\\\\$&\");\n};\nconst StartsWithPerTerm = (value, items, propName) => {\n const reg = new RegExp(`(^|\\\\s)${escapeRegExp(value.toLowerCase())}.*`, \"g\");\n return items.filter(item => {\n const text = item[propName];\n reg.lastIndex = 0;\n return reg.test(text.toLowerCase());\n });\n};\nconst StartsWith = (value, items, propName) => items.filter(item => item[propName].toLowerCase().startsWith(value.toLowerCase()));\nconst Contains = (value, items, propName) => items.filter(item => item[propName].toLowerCase().includes(value.toLowerCase()));\nconst None = (_, items) => items;\nexport { StartsWithPerTerm, StartsWith, Contains, None, };\n//# sourceMappingURL=Filters.js.map","/* eslint no-unused-vars: 0 */\nimport { html, repeat, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return suffix ? html `${ifDefined(this._tokensCountText)}${this.hasValueState ? block1.call(this, context, tags, suffix) : undefined}<${scopeTag(\"ui5-tokenizer\", tags, suffix)} slot=\"_beginContent\" show-more prevent-popover-open class=\"ui5-multi-combobox-tokenizer\" ?disabled=\"${this.disabled}\" @ui5-show-more-items-press=\"${ifDefined(this._showFilteredItems)}\" .morePopoverOpener=${ifDefined(this.morePopoverOpener)} .popoverMinWidth=${ifDefined(this._inputWidth)} @ui5-token-delete=\"${ifDefined(this._tokenDelete)}\" @ui5-before-more-popover-open=\"${ifDefined(this.handleBeforeTokenizerPopoverOpen)}\" @focusout=\"${this._tokenizerFocusOut}\" @focusin=\"${this._tokenizerFocusIn}\" @click=${this._click} @paste=${this._handlePaste} @keydown=\"${this._onTokenizerKeydown}\" ?expanded=\"${this._tokenizerExpanded}\">${repeat(this.items, (item, index) => item._id || index, (item, index) => block2.call(this, context, tags, suffix, item, index))}${scopeTag(\"ui5-tokenizer\", tags, suffix)}>${this.icon ? block4.call(this, context, tags, suffix) : undefined}${!this.readonly ? block5.call(this, context, tags, suffix) : undefined}
` : html `${ifDefined(this._tokensCountText)}${this.hasValueState ? block1.call(this, context, tags, suffix) : undefined}${repeat(this.items, (item, index) => item._id || index, (item, index) => block2.call(this, context, tags, suffix, item, index))}${this.icon ? block4.call(this, context, tags, suffix) : undefined}${!this.readonly ? block5.call(this, context, tags, suffix) : undefined}
`; }\nfunction block1(context, tags, suffix) { return html `${ifDefined(this.ariaValueStateHiddenText)}`; }\nfunction block2(context, tags, suffix, item, index) { return html `${item.selected ? block3.call(this, context, tags, suffix, item, index) : undefined}`; }\nfunction block3(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-token\", tags, suffix)} ?readonly=\"${this.readonly}\" class=\"ui5-multi-combobox-token\" data-ui5-id=\"${ifDefined(item._id)}\" part=\"token-${index}\" text=\"${ifDefined(item.text)}\">${scopeTag(\"ui5-token\", tags, suffix)}>` : html ``; }\nfunction block4(context, tags, suffix) { return html ``; }\nfunction block5(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} name=\"slim-arrow-down\" input-icon slot=\"icon\" tabindex=\"-1\" @click=\"${this.togglePopoverByDropdownIcon}\" @mousedown=\"${this._onIconMousedown}\" @focusin=\"${this._forwardFocusToInner}\" ?pressed=\"${this.open}\" accessible-name=\"${ifDefined(this._iconAccessibleNameText)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>` : html ``; }\nexport default block0;\n//# sourceMappingURL=MultiComboBoxTemplate.lit.js.map","/* eslint no-unused-vars: 0 */\nimport { html, repeat, classMap, styleMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-responsive-popover\", tags, suffix)} placement-type=\"Bottom\" horizontal-align=\"Left\" class=\"${classMap(this.classes.popover)}\" hide-arrow _disable-initial-focus style=\"${styleMap(this.styles.suggestionsPopover)}\" @ui5-selection-change=${ifDefined(this._listSelectionChange)} @ui5-after-close=${ifDefined(this._afterClosePicker)} @ui5-before-open=${ifDefined(this._beforeOpen)} @ui5-after-open=${ifDefined(this._afterOpenPicker)}>${this._isPhone ? block1.call(this, context, tags, suffix) : undefined}${!this._isPhone ? block6.call(this, context, tags, suffix) : undefined}${this.filterSelected ? block11.call(this, context, tags, suffix) : block15.call(this, context, tags, suffix)}${this._isPhone ? block19.call(this, context, tags, suffix) : undefined}${scopeTag(\"ui5-responsive-popover\", tags, suffix)}>${this.hasValueStateMessage ? block20.call(this, context, tags, suffix) : undefined} ` : html `${this._isPhone ? block1.call(this, context, tags, suffix) : undefined}${!this._isPhone ? block6.call(this, context, tags, suffix) : undefined}${this.filterSelected ? block11.call(this, context, tags, suffix) : block15.call(this, context, tags, suffix)}${this._isPhone ? block19.call(this, context, tags, suffix) : undefined}${this.hasValueStateMessage ? block20.call(this, context, tags, suffix) : undefined} `; }\nfunction block1(context, tags, suffix) { return suffix ? html `` : html ``; }\nfunction block2(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${this.shouldDisplayDefaultValueStateMessage ? block3.call(this, context, tags, suffix) : block4.call(this, context, tags, suffix)}
` : html `${this.shouldDisplayDefaultValueStateMessage ? block3.call(this, context, tags, suffix) : block4.call(this, context, tags, suffix)}
`; }\nfunction block3(context, tags, suffix) { return html `${ifDefined(this.valueStateDefaultText)}`; }\nfunction block4(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block5.call(this, context, tags, suffix, item, index))}`; }\nfunction block5(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nfunction block6(context, tags, suffix) { return html `${this.hasValueStateMessage ? block7.call(this, context, tags, suffix) : undefined}`; }\nfunction block7(context, tags, suffix) { return suffix ? html `` : html ``; }\nfunction block8(context, tags, suffix) { return html `${ifDefined(this.valueStateDefaultText)}`; }\nfunction block9(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block10.call(this, context, tags, suffix, item, index))}`; }\nfunction block10(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nfunction block11(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-list\", tags, suffix)} separators=\"None\" mode=\"MultiSelect\" class=\"ui5-multi-combobox-all-items-list\">${repeat(this.selectedItems, (item, index) => item._id || index, (item, index) => block12.call(this, context, tags, suffix, item, index))}${scopeTag(\"ui5-list\", tags, suffix)}>` : html `${repeat(this.selectedItems, (item, index) => item._id || index, (item, index) => block12.call(this, context, tags, suffix, item, index))}`; }\nfunction block12(context, tags, suffix, item, index) { return html `${item.isGroupItem ? block13.call(this, context, tags, suffix, item, index) : block14.call(this, context, tags, suffix, item, index)}`; }\nfunction block13(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li-groupheader\", tags, suffix)} data-ui5-stable=\"${ifDefined(item.stableDomRef)}\" @keydown=\"${this._onItemKeydown}\">${ifDefined(item.text)}${scopeTag(\"ui5-li-groupheader\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block14(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li\", tags, suffix)} wrapping-type=\"Normal\" type=\"${ifDefined(this._listItemsType)}\" additional-text=${ifDefined(item.additionalText)} ?selected=${item.selected} data-ui5-token-id=\"${ifDefined(item._id)}\" data-ui5-stable=\"${ifDefined(item.stableDomRef)}\" @keydown=\"${this._onItemKeydown}\">${ifDefined(item.text)}${scopeTag(\"ui5-li\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block15(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-list\", tags, suffix)} separators=\"None\" mode=\"MultiSelect\" class=\"ui5-multi-combobox-all-items-list\">${repeat(this._filteredItems, (item, index) => item._id || index, (item, index) => block16.call(this, context, tags, suffix, item, index))}${scopeTag(\"ui5-list\", tags, suffix)}>` : html `${repeat(this._filteredItems, (item, index) => item._id || index, (item, index) => block16.call(this, context, tags, suffix, item, index))}`; }\nfunction block16(context, tags, suffix, item, index) { return html `${item.isGroupItem ? block17.call(this, context, tags, suffix, item, index) : block18.call(this, context, tags, suffix, item, index)}`; }\nfunction block17(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li-groupheader\", tags, suffix)} data-ui5-stable=\"${ifDefined(item.stableDomRef)}\" @keydown=\"${this._onItemKeydown}\">${ifDefined(item.text)}${scopeTag(\"ui5-li-groupheader\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block18(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li\", tags, suffix)} wrapping-type=\"Normal\" type=\"${ifDefined(this._listItemsType)}\" additional-text=${ifDefined(item.additionalText)} ?selected=${item.selected} data-ui5-token-id=\"${ifDefined(item._id)}\" data-ui5-stable=\"${ifDefined(item.stableDomRef)}\" @keydown=\"${this._onItemKeydown}\">${ifDefined(item.text)}${scopeTag(\"ui5-li\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block19(context, tags, suffix) { return suffix ? html `` : html ``; }\nfunction block20(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-popover\", tags, suffix)} skip-registry-update _disable-initial-focus prevent-focus-restore hide-arrow class=\"ui5-valuestatemessage-popover\" placement-type=\"Bottom\" horizontal-align=\"${ifDefined(this._valueStatePopoverHorizontalAlign)}\"><${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${this.shouldDisplayDefaultValueStateMessage ? block21.call(this, context, tags, suffix) : block22.call(this, context, tags, suffix)}
${scopeTag(\"ui5-popover\", tags, suffix)}>` : html `${this.shouldDisplayDefaultValueStateMessage ? block21.call(this, context, tags, suffix) : block22.call(this, context, tags, suffix)}
`; }\nfunction block21(context, tags, suffix) { return html `${ifDefined(this.valueStateDefaultText)}`; }\nfunction block22(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block23.call(this, context, tags, suffix, item, index))}`; }\nfunction block23(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nexport default block0;\n//# sourceMappingURL=MultiComboBoxPopoverTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/MultiComboBox.css\", content: \":host{vertical-align:middle}.ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}[input-icon]{border-inline-start:var(--_ui5-v1-20-0_input_icon_border);border-radius:var(--_ui5-v1-20-0_input_icon_border_radius);color:var(--_ui5-v1-20-0_input_icon_color);cursor:pointer;min-height:1rem;min-width:1rem;outline:none;padding:var(--_ui5-v1-20-0_input_icon_padding)}[input-icon][pressed]{background:var(--_ui5-v1-20-0_input_icon_pressed_bg);border-inline-start:var(--_ui5-v1-20-0_select_hover_icon_left_border);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_pressed_color)}[input-icon]:active{background-color:var(--sapButton_Active_Background);border-inline-start:var(--_ui5-v1-20-0_select_hover_icon_left_border);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_pressed_color)}[input-icon]:not([pressed]):not(:active):hover{background:var(--_ui5-v1-20-0_input_icon_hover_bg);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow)}[input-icon]:hover{border-inline-start:var(--_ui5-v1-20-0_select_hover_icon_left_border);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow)}:host{background:var(--sapField_BackgroundStyle);background-color:var(--_ui5-v1-20-0_input_background_color);border:var(--_ui5-v1-20-0-input-border);border-radius:var(--_ui5-v1-20-0_input_border_radius);box-sizing:border-box;color:var(--sapField_TextColor);font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--sapFontSize);font-style:normal;height:var(--_ui5-v1-20-0_input_height);margin:var(--_ui5-v1-20-0_input_margin_top_bottom) 0;text-align:start;transition:var(--_ui5-v1-20-0_input_transition);width:var(--_ui5-v1-20-0_input_width)}:host(:not([readonly])),:host([readonly][disabled]){box-shadow:var(--sapField_Shadow)}:host([focused]:not([opened])){background-color:var(--sapField_Focus_Background);border-color:var(--_ui5-v1-20-0_input_focused_border_color)}.ui5-input-focusable-element{position:relative}:host([focused]:not([opened])) .ui5-input-focusable-element:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--_ui5-v1-20-0_input_focus_outline_color);border-radius:var(--_ui5-v1-20-0_input_focus_border_radius);bottom:var(--_ui5-v1-20-0_input_focus_offset);content:var(--ui5-v1-20-0_input_focus_pseudo_element_content);left:var(--_ui5-v1-20-0_input_focus_offset);pointer-events:none;position:absolute;right:var(--_ui5-v1-20-0_input_focus_offset);top:var(--_ui5-v1-20-0_input_focus_offset);z-index:2}.ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_bottom_border_color);border-bottom-left-radius:8px;border-bottom-right-radius:8px;bottom:-2px;content:\\\"\\\";height:var(--_ui5-v1-20-0_input_bottom_border_height);left:1px;position:absolute;transition:var(--_ui5-v1-20-0_input_transition);width:calc(100% - 2px)}.ui5-input-root{background:transparent;border-radius:var(--_ui5-v1-20-0_input_border_radius);box-sizing:border-box;color:inherit;display:inline-block;height:100%;outline:none;overflow:hidden;position:relative;transition:border-color .2s ease-in-out;width:100%}:host([disabled]){background-color:var(--_ui5-v1-20-0-input_disabled_background);border-color:var(--_ui5-v1-20-0_input_disabled_border_color);cursor:default;opacity:var(--_ui5-v1-20-0_input_disabled_opacity);pointer-events:none}:host([disabled]) .ui5-input-root:before,:host([readonly]) .ui5-input-root:before{content:none}[inner-input]{-webkit-appearance:none;-moz-appearance:textfield;background:transparent;border:none;box-sizing:border-box;color:inherit;flex:1;font-family:inherit;font-size:inherit;font-style:inherit;letter-spacing:inherit;line-height:inherit;min-width:var(--_ui5-v1-20-0_input_min_width);outline:none;padding:var(--_ui5-v1-20-0_input_inner_padding);text-align:inherit;text-overflow:ellipsis;width:100%;word-spacing:inherit}.ui5-input-value-state-icon{align-items:center;display:var(--_ui5-v1-20-0-input-value-state-icon-display);height:100%}.ui5-input-value-state-icon>svg{margin-right:8px}[inner-input]::selection{background:var(--sapSelectedColor);color:var(--sapContent_ContrastTextColor)}:host([disabled]) [inner-input]::-webkit-input-placeholder{visibility:hidden}:host([readonly]) [inner-input]::-webkit-input-placeholder{visibility:hidden}:host([disabled]) [inner-input]::-moz-placeholder{visibility:hidden}:host([readonly]) [inner-input]::-moz-placeholder{visibility:hidden}[inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color);font-style:var(--_ui5-v1-20-0_input_placeholder_style);font-weight:400;padding-right:.125rem}[inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color);font-style:var(--_ui5-v1-20-0_input_placeholder_style);font-weight:400;padding-right:.125rem}:host([value-state=Error]) [inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0-input_error_placeholder_color);font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Error]) [inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0-input_error_placeholder_color);font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Warning]) [inner-input]::-webkit-input-placeholder{font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Warning]) [inner-input]::-moz-placeholder{font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Success]) [inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}:host([value-state=Success]) [inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}:host([value-state=Information]) [inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}:host([value-state=Information]) [inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}.ui5-input-content{background:transparent;border-radius:var(--_ui5-v1-20-0_input_border_radius);box-sizing:border-box;color:inherit;display:flex;flex-direction:row;height:100%;justify-content:flex-end;outline:none;overflow:hidden}:host([readonly]:not([disabled])){background:var(--sapField_ReadOnly_BackgroundStyle);background-color:var(--_ui5-v1-20-0_input_readonly_background);border-color:var(--_ui5-v1-20-0_input_readonly_border_color)}:host(:not([value-state]):not([readonly]):hover),:host([value-state=None]:not([readonly]):hover){background:var(--sapField_Hover_BackgroundStyle);background-color:var(--sapField_Hover_Background);border:var(--_ui5-v1-20-0_input_hover_border);border-color:var(--_ui5-v1-20-0_input_focused_border_color);box-shadow:var(--sapField_Hover_Shadow)}:host(:not([value-state]):not([readonly])[focused]:not([opened]):hover),:host([value-state=None]:not([readonly])[focused]:not([opened]):hover){box-shadow:none}:host([focused]):not([opened]) .ui5-input-root:before{content:none}:host(:not([readonly]):not([disabled])[value-state]:not([value-state=None])){border-width:var(--_ui5-v1-20-0_input_state_border_width)}:host([value-state=Error]) [inner-input],:host([value-state=Warning]) [inner-input]{font-style:var(--_ui5-v1-20-0_input_error_warning_font_style);text-indent:var(--_ui5-v1-20-0_input_error_warning_text_indent)}:host([value-state=Error]) [inner-input]{font-weight:var(--_ui5-v1-20-0_input_error_font_weight)}:host([value-state=Warning]) [inner-input]{font-weight:var(--_ui5-v1-20-0_input_warning_font_weight)}:host([value-state=Error]:not([readonly]):not([disabled])){background:var(--sapField_InvalidBackgroundStyle);background-color:var(--sapField_InvalidBackground);border-color:var(--_ui5-v1-20-0_input_value_state_error_border_color);box-shadow:var(--sapField_InvalidShadow)}:host([value-state=Error][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_error_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_error_border_color)}:host([value-state=Error][focused]:not([opened]):not([readonly])) .ui5-input-focusable-element:after{border-color:var(--_ui5-v1-20-0_input_focused_value_state_error_focus_outline_color)}:host([value-state=Error]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0-input-value-state-error-border-botom-color)}:host([value-state=Error]:not([readonly]):not([focused]):hover),:host([value-state=Error]:not([readonly])[focused][opened]:hover){background-color:var(--_ui5-v1-20-0_input_value_state_error_hover_background);box-shadow:var(--sapField_Hover_InvalidShadow)}:host([value-state=Error]:not([readonly]):not([disabled])),:host([value-state=Information]:not([readonly]):not([disabled])),:host([value-state=Warning]:not([readonly]):not([disabled])){border-style:var(--_ui5-v1-20-0_input_error_warning_border_style)}:host([value-state=Warning]:not([readonly]):not([disabled])){background:var(--sapField_WarningBackgroundStyle);background-color:var(--sapField_WarningBackground);border-color:var(--_ui5-v1-20-0_input_value_state_warning_border_color);box-shadow:var(--sapField_WarningShadow)}:host([value-state=Warning][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_warning_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_warning_border_color)}:host([value-state=Warning][focused]:not([opened]):not([readonly])) .ui5-input-focusable-element:after{border-color:var(--_ui5-v1-20-0_input_focused_value_state_warning_focus_outline_color)}:host([value-state=Warning]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_value_state_warning_border_botom_color)}:host([value-state=Warning]:not([readonly]):not([focused]):hover),:host([value-state=Warning]:not([readonly])[focused][opened]:hover){background-color:var(--sapField_Hover_Background);box-shadow:var(--sapField_Hover_WarningShadow)}:host([value-state=Success]:not([readonly]):not([disabled])){background:var(--sapField_SuccessBackgroundStyle);background-color:var(--sapField_SuccessBackground);border-color:var(--_ui5-v1-20-0_input_value_state_success_border_color);border-width:var(--_ui5-v1-20-0_input_value_state_success_border_width);box-shadow:var(--sapField_SuccessShadow)}:host([value-state=Success][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_success_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_success_border_color)}:host([value-state=Success][focused]:not([opened]):not([readonly])) .ui5-input-focusable-element:after{border-color:var(--_ui5-v1-20-0_input_focused_value_state_success_focus_outline_color)}:host([value-state=Success]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_value_state_success_border_botom_color)}:host([value-state=Success]:not([readonly]):not([focused]):hover),:host([value-state=Success]:not([readonly])[focused][opened]:hover){background-color:var(--sapField_Hover_Background);box-shadow:var(--sapField_Hover_SuccessShadow)}:host([value-state=Information]:not([readonly]):not([disabled])){background:var(--sapField_InformationBackgroundStyle);background-color:var(--sapField_InformationBackground);border-color:var(--_ui5-v1-20-0_input_value_state_information_border_color);border-width:var(--_ui5-v1-20-0_input_information_border_width);box-shadow:var(--sapField_InformationShadow)}:host([value-state=Information][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_information_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_information_border_color)}:host([value-state=Information]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_value_success_information_border_botom_color)}:host([value-state=Information]:not([readonly]):not([focused]):hover),:host([value-state=Information]:not([readonly])[focused][opened]:hover){background-color:var(--sapField_Hover_Background);box-shadow:var(--sapField_Hover_InformationShadow)}.ui5-input-icon-root{align-items:center;display:flex;height:100%;justify-content:center;min-width:var(--_ui5-v1-20-0_input_icon_min_width)}::slotted([ui5-icon][slot=icon]){align-self:start;box-sizing:content-box!important;padding:var(--_ui5-v1-20-0_input_custom_icon_padding)}:host([value-state=Error]) [input-icon],:host([value-state=Warning]) [input-icon]{padding:var(--_ui5-v1-20-0_input_error_warning_icon_padding)}:host([value-state=Error][focused]) [input-icon],:host([value-state=Warning][focused]) [input-icon]{padding:var(--_ui5-v1-20-0_input_error_warning_focused_icon_padding)}:host([value-state=Information]) [input-icon]{padding:var(--_ui5-v1-20-0_input_information_icon_padding)}:host([value-state=Information][focused]) [input-icon]{padding:var(--_ui5-v1-20-0_input_information_focused_icon_padding)}:host([value-state=Error]) ::slotted([input-icon][ui5-icon]),:host([value-state=Error]) ::slotted([ui5-icon][slot=icon]),:host([value-state=Warning]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_error_warning_custom_icon_padding)}:host([value-state=Error][focused]) ::slotted([input-icon][ui5-icon]),:host([value-state=Error][focused]) ::slotted([ui5-icon][slot=icon]),:host([value-state=Warning][focused]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_error_warning_custom_focused_icon_padding)}:host([value-state=Information]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_information_custom_icon_padding)}:host([value-state=Information][focused]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_information_custom_focused_icon_padding)}:host([value-state=Error]) [input-icon]:active,:host([value-state=Error]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_error_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_error_pressed_color)}:host([value-state=Error]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_error_icon_box_shadow)}:host([value-state=Warning]) [input-icon]:active,:host([value-state=Warning]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_warning_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_warning_pressed_color)}:host([value-state=Warning]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_warning_icon_box_shadow)}:host([value-state=Information]) [input-icon]:active,:host([value-state=Information]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_information_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_information_pressed_color)}:host([value-state=Information]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_information_icon_box_shadow)}:host([value-state=Success]) [input-icon]:active,:host([value-state=Success]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_success_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_success_pressed_color)}:host([value-state=Success]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_success_icon_box_shadow)}.ui5-input-clear-icon-wrapper{align-items:center;box-sizing:border-box;display:flex;height:var(--_ui5-v1-20-0_input_icon_wrapper_height);justify-content:center;min-width:var(--_ui5-v1-20-0_input_icon_width);padding:0;width:var(--_ui5-v1-20-0_input_icon_width)}:host([value-state]:not([value-state=None]):not([value-state=Success])) .ui5-input-clear-icon-wrapper{height:var(--_ui5-v1-20-0_input_icon_wrapper_state_height);vertical-align:top}:host([value-state=Success]) .ui5-input-clear-icon-wrapper{height:var(--_ui5-v1-20-0_input_icon_wrapper_success_state_height)}[ui5-icon].ui5-input-clear-icon{color:inherit;padding:0}[inner-input]::-webkit-inner-spin-button,[inner-input]::-webkit-outer-spin-button{-webkit-appearance:inherit;margin:inherit}:host{min-width:calc(var(--_ui5-v1-20-0_input_min_width) + var(--_ui5-v1-20-0-input-icons-count)*var(--_ui5-v1-20-0_input_icon_width))}:host([tokenizer-available]){min-width:calc(var(--_ui5-v1-20-0_input_min_width) + var(--_ui5-v1-20-0-input-icons-count)*var(--_ui5-v1-20-0_input_icon_width) + var(--_ui5-v1-20-0_input_tokenizer_min_width))}:host(:not([hidden])){display:inline-block}.ui5-multi-combobox-root{border-radius:var(--_ui5-v1-20-0_input_border_radius);display:flex;height:100%;overflow:hidden;width:100%}.ui5-multi-combobox-tokenizer{border:none;height:100%;max-width:calc(100% - 3rem - var(--_ui5-v1-20-0-input-icons-count)*var(--_ui5-v1-20-0_input_icon_min_width));min-width:var(--_ui5-v1-20-0_input_tokenizer_min_width);width:auto}:host([readonly]) .ui5-multi-combobox-tokenizer::part(n-more-text){color:var(--sapLinkColor)}.ui5-multi-combobox-tokenizer::part(n-more-text){padding-inline-end:var(--_ui5-v1-20-0_input_inner_space_to_n_more_text)}[inner-input][inner-input-with-icon]{padding:var(--_ui5-v1-20-0_input_inner_padding_with_icon)}:host([tokenizer-available]) [inner-input]{padding-inline-start:var(--_ui5-v1-20-0_input_inner_space_to_tokenizer)}:host(:not([tokenizer-available])) .ui5-multi-combobox-tokenizer{--_ui5-v1-20-0_input_tokenizer_min_width:0px;width:var(--_ui5-v1-20-0_input_tokenizer_min_width)}\" };\nexport default styleData;\n//# sourceMappingURL=MultiComboBox.css.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/MultiComboBoxPopover.css\", content: \".ui5-suggestions-popover .ui5-multi-combobox-all-items-list{--_ui5-v1-20-0_checkbox_width_height:var(--_ui5-v1-20-0_list_item_dropdown_base_height)}\" };\nexport default styleData;\n//# sourceMappingURL=MultiComboBoxPopover.css.js.map","/**\n * Different filtering types of the ComboBox.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ComboBoxFilter\n */\nvar ComboBoxFilter;\n(function (ComboBoxFilter) {\n /**\n * Defines filtering by first symbol of each word of item's text.\n * @public\n * @type {StartsWithPerTerm}\n */\n ComboBoxFilter[\"StartsWithPerTerm\"] = \"StartsWithPerTerm\";\n /**\n * Defines filtering by starting symbol of item's text.\n * @public\n * @type {StartsWith}\n */\n ComboBoxFilter[\"StartsWith\"] = \"StartsWith\";\n /**\n * Defines contains filtering.\n * @public\n * @type {Contains}\n */\n ComboBoxFilter[\"Contains\"] = \"Contains\";\n /**\n * Removes any filtering applied while typing\n * @public\n * @type {None}\n */\n ComboBoxFilter[\"None\"] = \"None\";\n})(ComboBoxFilter || (ComboBoxFilter = {}));\nexport default ComboBoxFilter;\n//# sourceMappingURL=ComboBoxFilter.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar MultiComboBox_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { isShow, isDown, isUp, isSpace, isSpaceCtrl, isSpaceShift, isRight, isHome, isEnd, isTabNext, isTabPrevious, isUpShift, isDownShift, isLeftCtrl, isRightCtrl, isUpCtrl, isDownCtrl, isHomeCtrl, isEndCtrl, isCtrlA, isDeleteShift, isInsertShift, isInsertCtrl, isBackSpace, isDelete, isEscape, isEnter, } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-down.js\";\nimport { isPhone, isAndroid, isFirefox, } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/multiselect-all.js\";\nimport \"@ui5/webcomponents-icons/dist/not-editable.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport MultiComboBoxItem from \"./MultiComboBoxItem.js\";\nimport MultiComboBoxGroupItem from \"./MultiComboBoxGroupItem.js\";\nimport GroupHeaderListItem from \"./GroupHeaderListItem.js\";\nimport Tokenizer, { ClipboardDataOperation } from \"./Tokenizer.js\";\nimport Token from \"./Token.js\";\nimport Icon from \"./Icon.js\";\nimport Popover from \"./Popover.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport List from \"./List.js\";\nimport StandardListItem from \"./StandardListItem.js\";\nimport ToggleButton from \"./ToggleButton.js\";\nimport * as Filters from \"./Filters.js\";\nimport Button from \"./Button.js\";\nimport { VALUE_STATE_SUCCESS, VALUE_STATE_ERROR, VALUE_STATE_WARNING, VALUE_STATE_INFORMATION, VALUE_STATE_TYPE_SUCCESS, VALUE_STATE_TYPE_INFORMATION, VALUE_STATE_TYPE_ERROR, VALUE_STATE_TYPE_WARNING, INPUT_SUGGESTIONS_TITLE, SELECT_OPTIONS, MULTICOMBOBOX_DIALOG_OK_BUTTON, VALUE_STATE_ERROR_ALREADY_SELECTED, } from \"./generated/i18n/i18n-defaults.js\";\n// Templates\nimport MultiComboBoxTemplate from \"./generated/templates/MultiComboBoxTemplate.lit.js\";\nimport MultiComboBoxPopoverTemplate from \"./generated/templates/MultiComboBoxPopoverTemplate.lit.js\";\n// Styles\nimport multiCbxStyles from \"./generated/themes/MultiComboBox.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\nimport SuggestionsCss from \"./generated/themes/Suggestions.css.js\";\nimport MultiComboBoxPopover from \"./generated/themes/MultiComboBoxPopover.css.js\";\nimport ComboBoxFilter from \"./types/ComboBoxFilter.js\";\n/**\n * @class\n *\n * \n *\n * The ui5-multi-combobox
component consists of a list box with items and a text field allowing the user to either type a value directly into the text field, or choose from the list of existing items.\n *\n * The drop-down list is used for selecting and filtering values, it enables users to select one or more options from a predefined list. The control provides an editable input field to filter the list, and a dropdown arrow to expand/collapse the list of available options.\n * The options in the list have checkboxes that permit multi-selection. Entered values are displayed as tokens.\n * Structure
\n * The ui5-multi-combobox
consists of the following elements:\n * \n * - Tokenizer - a list of tokens with selected options.
\n * - Input field - displays the selected option/s as token/s. Users can type to filter the list.
\n * - Drop-down arrow - expands\\collapses the option list.
\n * - Option list - the list of available options.
\n *
\n * Keyboard Handling
\n *\n * The ui5-multi-combobox
provides advanced keyboard handling.\n *\n * Picker
\n * If the ui5-multi-combobox
is focused,\n * you can open or close the drop-down by pressing F4
, ALT+UP
or ALT+DOWN
keys.\n * Once the drop-down is opened, you can use the UP
and DOWN
arrow keys\n * to navigate through the available options and select one by pressing the Space
or Enter
keys.\n *
\n *\n * Tokens
\n * \n * - Left/Right arrow keys - moves the focus selection form the currently focused token to the previous/next one (if available).
\n * - Delete - deletes the token and focuses the previous token.
\n * - Backspace - deletes the token and focus the next token.
\n *
\n *\n * CSS Shadow Parts
\n *\n * CSS Shadow Parts allow developers to style elements inside the Shadow DOM.\n *
\n * The ui5-multi-combobox
exposes the following CSS Shadow Parts:\n * \n * - token-{index} - Used to style each token(where
token-0
corresponds to the first item) \n *
\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/MultiComboBox\";
\n *\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.MultiComboBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-multi-combobox\n * @public\n * @appenddocs sap.ui.webc.main.MultiComboBoxItem sap.ui.webc.main.MultiComboBoxGroupItem\n * @since 0.11.0\n */\nlet MultiComboBox = MultiComboBox_1 = class MultiComboBox extends UI5Element {\n constructor() {\n super();\n this._filteredItems = [];\n this._previouslySelectedItems = [];\n this.selectedValues = [];\n this._itemsBeforeOpen = [];\n this._inputLastValue = \"\";\n this._valueBeforeOpen = \"\";\n this._deleting = false;\n this._validationTimeout = null;\n this._handleResizeBound = this._handleResize.bind(this);\n this.valueBeforeAutoComplete = \"\";\n this._lastValue = \"\";\n this.currentItemIdx = -1;\n this.FormSupport = undefined;\n }\n onEnterDOM() {\n ResizeHandler.register(this, this._handleResizeBound);\n }\n onExitDOM() {\n ResizeHandler.deregister(this, this._handleResizeBound);\n }\n _handleResize() {\n this._inputWidth = this.offsetWidth;\n }\n _inputChange() {\n this.fireEvent(\"change\");\n }\n togglePopover() {\n this._tokenizer.closeMorePopover();\n this.allItemsPopover?.toggle(this);\n }\n togglePopoverByDropdownIcon() {\n this._shouldFilterItems = false;\n this.allItemsPopover?.toggle(this);\n this._tokenizer.closeMorePopover();\n }\n _showFilteredItems() {\n this.filterSelected = true;\n this._showMorePressed = true;\n this.togglePopover();\n }\n filterSelectedItems(e) {\n this.filterSelected = e.target.pressed;\n const selectedItems = this._filteredItems.filter(item => item.selected);\n this.selectedItems = this.items.filter((item, idx, allItems) => MultiComboBox_1._groupItemFilter(item, ++idx, allItems, selectedItems) || selectedItems.indexOf(item) !== -1);\n }\n /**\n * Indicates whether the dropdown is open. True if the dropdown is open, false otherwise.\n *\n * @type {boolean}\n * @name sap.ui.webc.main.MultiComboBox.prototype.open\n * @defaultvalue false\n * @readonly\n * @public\n */\n get open() {\n return this._open;\n }\n get _showAllItemsButtonPressed() {\n return this.filterSelected;\n }\n get _inputDom() {\n return this.shadowRoot.querySelector(\"#ui5-multi-combobox-input\");\n }\n _inputLiveChange(e) {\n const input = e.target;\n const value = input.value;\n const filteredItems = this._filterItems(value);\n const oldValueState = this.valueState;\n this._shouldFilterItems = true;\n if (this.filterSelected) {\n this.filterSelected = false;\n }\n if (this._validationTimeout) {\n input.value = this._inputLastValue;\n return;\n }\n if (!filteredItems.length && value && !this.allowCustomValues) {\n input.value = this.valueBeforeAutoComplete || this._inputLastValue;\n this.valueState = ValueState.Error;\n this._shouldAutocomplete = false;\n this._resetValueState(oldValueState);\n return;\n }\n this._inputLastValue = input.value;\n this.value = input.value;\n this._filteredItems = filteredItems;\n if (!isPhone()) {\n if (filteredItems.length === 0) {\n this.allItemsPopover?.close();\n }\n else {\n this.allItemsPopover?.showAt(this);\n }\n }\n this.fireEvent(\"input\");\n }\n _tokenDelete(e) {\n this._previouslySelectedItems = this._getSelectedItems();\n const token = e.detail.ref;\n const deletingItem = this.items.find(item => item._id === token.getAttribute(\"data-ui5-id\"));\n deletingItem.selected = false;\n this._deleting = true;\n this._preventTokenizerToggle = true;\n this.focus();\n const changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n this._revertSelection();\n }\n }\n get _getPlaceholder() {\n if (this._getSelectedItems().length) {\n return \"\";\n }\n return this.placeholder;\n }\n _handleArrowLeft() {\n const inputDomRef = this._inputDom;\n const cursorPosition = inputDomRef.selectionStart || 0;\n const isTextSelected = ((inputDomRef.selectionEnd || 0) - cursorPosition) > 0;\n if (cursorPosition === 0 && !isTextSelected) {\n this._tokenizer._focusLastToken();\n }\n }\n _tokenizerFocusOut(e) {\n this._tokenizerFocused = false;\n const tokensCount = this._tokenizer.tokens.length;\n const selectedTokens = this._selectedTokensCount;\n const lastTokenBeingDeleted = tokensCount - 1 === 0 && this._deleting;\n const allTokensAreBeingDeleted = selectedTokens === tokensCount && this._deleting;\n const relatedTarget = e.relatedTarget;\n const isFocusingPopover = this.staticAreaItem === relatedTarget;\n const isFocusingInput = this._inputDom === relatedTarget;\n const isFocusingMorePopover = e.relatedTarget === this._tokenizer.staticAreaItem;\n if (!relatedTarget?.hasAttribute(\"ui5-token\") && !isFocusingPopover && !isFocusingInput && !isFocusingMorePopover) {\n this._tokenizer.tokens.forEach(token => {\n token.selected = false;\n });\n this._tokenizer.expanded = this._preventTokenizerToggle ? this._tokenizer.expanded : false;\n }\n if (allTokensAreBeingDeleted || lastTokenBeingDeleted) {\n setTimeout(() => {\n if (!isPhone()) {\n this._inputDom.focus();\n }\n this._deleting = false;\n }, 0);\n }\n }\n _tokenizerFocusIn() {\n this._tokenizerFocused = true;\n this.focused = false;\n }\n _onkeydown(e) {\n const isArrowDownCtrl = isDownCtrl(e);\n const isCtrl = e.metaKey || e.ctrlKey;\n if (isShow(e) && !this.disabled) {\n this._handleShow(e);\n return;\n }\n if (isDownShift(e) || isUpShift(e)) {\n e.preventDefault();\n return;\n }\n if (isUp(e) || isDown(e) || isUpCtrl(e) || isArrowDownCtrl) {\n this._handleArrowNavigation(e, isArrowDownCtrl);\n return;\n }\n // CTRL + Arrow Down navigation is performed by the ItemNavigation module of the List,\n // here we only implement the text selection of the selected item\n if (isArrowDownCtrl && !this.allItemsPopover?.opened) {\n setTimeout(() => this._inputDom.setSelectionRange(0, this._inputDom.value.length), 0);\n }\n if (isLeftCtrl(e) || isRightCtrl(e)) {\n this._handleArrowCtrl(e);\n return;\n }\n if (isInsertShift(e)) {\n this._handleInsertPaste();\n return;\n }\n if (isCtrl && e.key.toLowerCase() === \"i\" && this._tokenizer.tokens.length > 0) {\n e.preventDefault();\n this.togglePopover();\n }\n if (isSpaceShift(e)) {\n e.preventDefault();\n }\n if (e.key === \"ArrowLeft\"\n || e.key === \"Show\"\n || e.key === \"PageUp\"\n || e.key === \"PageDown\"\n || e.key === \"Backspace\"\n || e.key === \"Escape\"\n || e.key === \"Home\"\n || e.key === \"End\"\n || e.key === \"Tab\"\n || e.key === \"ArrowDown\"\n || e.key === \"Enter\") {\n this[`_handle${e.key}`](e);\n }\n this._shouldAutocomplete = !this.noTypeahead && !(isBackSpace(e) || isDelete(e) || isEscape(e) || isEnter(e));\n }\n _handlePaste(e) {\n e.preventDefault();\n if (this.readonly || !e.clipboardData) {\n return;\n }\n const pastedText = (e.clipboardData).getData(\"text/plain\");\n if (!pastedText) {\n return;\n }\n this._createTokenFromText(pastedText);\n }\n async _handleInsertPaste() {\n if (this.readonly || isFirefox()) {\n return;\n }\n const pastedText = await navigator.clipboard.readText();\n if (!pastedText) {\n return;\n }\n this._createTokenFromText(pastedText);\n }\n _createTokenFromText(pastedText) {\n const separatedText = pastedText.split(/\\r\\n|\\r|\\n|\\t/g).filter(t => !!t);\n const matchingItems = this.items.filter(item => separatedText.indexOf(item.text) > -1 && !item.selected);\n if (separatedText.length > 1) {\n this._previouslySelectedItems = this._getSelectedItems();\n matchingItems.forEach(item => {\n item.selected = true;\n this.value = \"\";\n const changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n this._revertSelection();\n }\n });\n }\n else {\n this.value = pastedText;\n this.fireEvent(\"input\");\n }\n }\n _handleShow(e) {\n const items = this.items;\n const selectedItem = this._getSelectedItems()[0];\n const focusedToken = this._tokenizer.tokens.find(token => token.focused);\n const value = this.value;\n const matchingItem = this.items.find(item => item.text.localeCompare(value, undefined, { sensitivity: \"base\" }) === 0);\n e.preventDefault();\n if (this.readonly) {\n return;\n }\n this._isOpenedByKeyboard = true;\n this._shouldFilterItems = false;\n this._filteredItems = this.items;\n this.togglePopover();\n if (!focusedToken && matchingItem) {\n this._itemToFocus = matchingItem;\n return;\n }\n if (selectedItem && !focusedToken) {\n this._itemToFocus = selectedItem;\n }\n else if (focusedToken && e.target === focusedToken) {\n this._itemToFocus = items.find(item => item.text === focusedToken.text);\n }\n else {\n this._itemToFocus = items[0];\n }\n }\n _handlePageUp(e) {\n e.preventDefault();\n }\n _handlePageDown(e) {\n e.preventDefault();\n }\n _handleBackspace(e) {\n if (e.target.value === \"\") {\n e.preventDefault();\n this._tokenizer._focusLastToken();\n }\n }\n _handleEscape() {\n const innerInput = this._innerInput;\n const isAutoCompleted = ((innerInput.selectionEnd || 0) - (innerInput.selectionStart || 0)) > 0;\n if (isAutoCompleted) {\n this.value = this.valueBeforeAutoComplete;\n }\n if (!this.allowCustomValues || (!this.open && this.allowCustomValues)) {\n this.value = this._lastValue;\n }\n }\n _handleHome(e) {\n const shouldFocusToken = this._isFocusInside && e.target.selectionStart === 0 && this._tokenizer.tokens.length > 0;\n if (shouldFocusToken) {\n e.preventDefault();\n this._tokenizer.tokens[0].focus();\n }\n }\n _handleEnd(e) {\n const tokens = this._tokenizer.tokens;\n const lastTokenIdx = tokens.length - 1;\n const shouldFocusInput = e.target === tokens[lastTokenIdx] && tokens[lastTokenIdx] === this.shadowRoot.activeElement;\n if (shouldFocusInput) {\n e.preventDefault();\n this._inputDom.focus();\n }\n }\n _handleTab() {\n this.allItemsPopover?.close();\n }\n _handleSelectAll() {\n const filteredItems = this._filteredItems;\n const allItemsSelected = filteredItems.every(item => item.selected);\n this._previouslySelectedItems = filteredItems.filter(item => item.selected).map(item => item);\n filteredItems.forEach(item => {\n item.selected = !allItemsSelected;\n });\n const changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n this._revertSelection();\n }\n }\n _onValueStateKeydown(e) {\n const isArrowDown = isDown(e);\n const isArrowUp = isUp(e);\n if (isTabNext(e) || isTabPrevious(e)) {\n this._onItemTab();\n return;\n }\n e.preventDefault();\n if (isArrowDown || isDownCtrl(e)) {\n this._handleArrowDown();\n }\n if (isArrowUp || isUpCtrl(e)) {\n this._shouldAutocomplete = true;\n this._inputDom.focus();\n }\n }\n async _onItemKeydown(e) {\n const isFirstItem = this.list?.items[0] === e.target;\n const isArrowUp = isUp(e) || isUpCtrl(e);\n if (this.hasValueStateMessage && !this.valueStateHeader) {\n await this._setValueStateHeader();\n }\n if (isTabNext(e) || isTabPrevious(e)) {\n this._onItemTab();\n return;\n }\n if (isHomeCtrl(e)) {\n this.list?._itemNavigation._handleHome();\n this.list?.items[this.list?._itemNavigation._currentIndex].focus();\n }\n if (isEndCtrl(e)) {\n this.list?._itemNavigation._handleEnd();\n this.list?.items[this.list?._itemNavigation._currentIndex].focus();\n }\n e.preventDefault();\n if (isDownShift(e) || isUpShift(e)) {\n this._handleItemRangeSelection(e);\n return;\n }\n if ((isUpCtrl(e)) && !isFirstItem) {\n this.list?._itemNavigation._handleUp();\n this.list?.items[this.list?._itemNavigation._currentIndex].focus();\n }\n if (isDownCtrl(e)) {\n this.list?._itemNavigation._handleDown();\n this.list?.items[this.list?._itemNavigation._currentIndex].focus();\n }\n if (isShow(e)) {\n this.togglePopover();\n }\n if (isCtrlA(e)) {\n this._handleSelectAll();\n return;\n }\n if (((isArrowUp && isFirstItem) || isHome(e)) && this.valueStateHeader) {\n this.valueStateHeader.focus();\n }\n if (!this.valueStateHeader && isFirstItem && isArrowUp) {\n this._inputDom.focus();\n this._shouldAutocomplete = true;\n }\n }\n _handleArrowCtrl(e) {\n const input = this._inputDom;\n const isArrowLeft = isLeftCtrl(e);\n if (isArrowLeft && input.selectionStart === 0 && input.selectionEnd === 0) {\n e.preventDefault();\n }\n if (isArrowLeft && ((input.selectionEnd || 0) - (input.selectionStart || 0) > 0)) {\n input.setSelectionRange(0, 0);\n }\n }\n _onItemTab() {\n this._inputDom.focus();\n this.allItemsPopover?.close();\n }\n async _handleArrowNavigation(e, isDownControl) {\n const isArrowDown = isDownControl || isDown(e);\n const hasSuggestions = this.items.length;\n const isOpen = this.allItemsPopover?.opened;\n e.preventDefault();\n if (this.hasValueStateMessage && !this.valueStateHeader) {\n await this._setValueStateHeader();\n }\n if (isArrowDown && isOpen && this.valueStateHeader) {\n this.value = this.valueBeforeAutoComplete || this.value;\n this.valueStateHeader.focus();\n return;\n }\n if (isArrowDown && hasSuggestions) {\n this._handleArrowDown();\n }\n if (!isArrowDown && !isOpen && !this.readonly) {\n this._navigateToPrevItem();\n }\n }\n _handleArrowDown() {\n const isOpen = this.allItemsPopover?.opened;\n const firstListItem = this.list?.items[0];\n if (isOpen) {\n firstListItem && this.list?._itemNavigation.setCurrentItem(firstListItem);\n this.value = this.valueBeforeAutoComplete || this.value;\n firstListItem?.focus();\n }\n else if (!this.readonly) {\n this._navigateToNextItem();\n }\n }\n _handleItemRangeSelection(e) {\n const items = this.items;\n const listItems = this.list?.items;\n const currentItemIdx = Number(listItems?.indexOf(e.target));\n const nextItemIdx = currentItemIdx + 1;\n const prevItemIdx = currentItemIdx - 1;\n this._previouslySelectedItems = this._getSelectedItems();\n if (isDownShift(e) && items[nextItemIdx]) {\n items[nextItemIdx].selected = items[currentItemIdx].selected;\n items[nextItemIdx].focus();\n }\n if (isUpShift(e) && items[prevItemIdx]) {\n items[prevItemIdx].selected = items[currentItemIdx].selected;\n items[prevItemIdx].focus();\n }\n const changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n this._revertSelection();\n }\n }\n _navigateToNextItem() {\n const items = this.items;\n const itemsCount = items.length;\n const previousItemIdx = this.currentItemIdx;\n if (previousItemIdx > -1 && items[previousItemIdx].text !== this.value) {\n this.currentItemIdx = -1;\n }\n if (previousItemIdx >= itemsCount - 1) {\n return;\n }\n let currentItem = this.items[++this.currentItemIdx];\n while ((this.currentItemIdx < itemsCount - 1 && currentItem.selected) || currentItem.isGroupItem) {\n currentItem = this.items[++this.currentItemIdx];\n }\n if (currentItem.selected === true || currentItem.isGroupItem) {\n this.currentItemIdx = previousItemIdx;\n return;\n }\n this.value = currentItem.text;\n this._innerInput.value = currentItem.text;\n this._innerInput.setSelectionRange(0, currentItem.text.length);\n }\n _navigateToPrevItem() {\n const items = this.items;\n let previousItemIdx = this.currentItemIdx;\n if ((!this.value && previousItemIdx !== -1) || (previousItemIdx !== -1 && this.value && this.value !== items[previousItemIdx].text)) {\n previousItemIdx = -1;\n }\n if (previousItemIdx === -1) {\n this.currentItemIdx = items.length;\n }\n if (previousItemIdx === 0) {\n this.currentItemIdx = 0;\n return;\n }\n let currentItem = this.items[--this.currentItemIdx];\n while ((currentItem && this.currentItemIdx > 0) && (currentItem.selected || currentItem.isGroupItem)) {\n currentItem = this.items[--this.currentItemIdx];\n }\n if (!currentItem) {\n return;\n }\n if (currentItem.selected || currentItem.isGroupItem) {\n this.currentItemIdx = previousItemIdx;\n return;\n }\n this.value = currentItem.text;\n this._innerInput.value = currentItem.text;\n this._innerInput.setSelectionRange(0, currentItem.text.length);\n }\n _handleEnter() {\n const lowerCaseValue = this.value.toLowerCase();\n const matchingItem = this.items.find(item => (item.text.toLowerCase() === lowerCaseValue && !item.isGroupItem));\n const oldValueState = this.valueState;\n const innerInput = this._innerInput;\n if (this.FormSupport) {\n this.FormSupport.triggerFormSubmit(this);\n }\n if (matchingItem) {\n if (matchingItem.selected) {\n if (this._validationTimeout) {\n return;\n }\n this.valueState = ValueState.Error;\n this._performingSelectionTwice = true;\n this._resetValueState(oldValueState, () => {\n this._performingSelectionTwice = false;\n });\n }\n else {\n this._previouslySelectedItems = this._getSelectedItems();\n matchingItem.selected = true;\n this.value = \"\";\n const changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n this._revertSelection();\n }\n }\n innerInput.setSelectionRange(matchingItem.text.length, matchingItem.text.length);\n this.allItemsPopover?.close();\n }\n }\n _resetValueState(valueState, callback) {\n this._validationTimeout = setTimeout(() => {\n this.valueState = valueState;\n this._validationTimeout = null;\n callback && callback();\n }, 2000);\n }\n _onTokenizerKeydown(e) {\n const isCtrl = !!(e.metaKey || e.ctrlKey);\n if (isRight(e)) {\n const lastTokenIndex = this._tokenizer.tokens.length - this._tokenizer.overflownTokens.length - 1;\n if (e.target === this._tokenizer.tokens[lastTokenIndex]) {\n setTimeout(() => {\n this._inputDom.focus();\n }, 0);\n }\n }\n if ((isCtrl && [\"c\", \"x\"].includes(e.key.toLowerCase())) || isDeleteShift(e) || isInsertCtrl(e)) {\n e.preventDefault();\n const isCut = e.key.toLowerCase() === \"x\" || isDeleteShift(e);\n const selectedTokens = this._tokenizer.tokens.filter(token => token.selected);\n if (isCut) {\n const cutResult = this._tokenizer._fillClipboard(ClipboardDataOperation.cut, selectedTokens);\n selectedTokens.forEach(token => {\n this._tokenizer.deleteToken(token);\n });\n this.focus();\n return cutResult;\n }\n return this._tokenizer._fillClipboard(ClipboardDataOperation.copy, selectedTokens);\n }\n if (isInsertShift(e)) {\n this._handleInsertPaste();\n }\n if (isHome(e)) {\n this._handleHome(e);\n }\n if (isEnd(e)) {\n this._handleEnd(e);\n }\n if (isShow(e) && !this.readonly && !this.disabled) {\n this._preventTokenizerToggle = true;\n this._handleShow(e);\n }\n if (isCtrl && e.key.toLowerCase() === \"i\" && this._tokenizer.tokens.length > 0) {\n e.preventDefault();\n this.togglePopover();\n }\n }\n _filterItems(str) {\n const itemsToFilter = this.items.filter(item => !item.isGroupItem);\n const filteredItems = (Filters[this.filter] || Filters.StartsWithPerTerm)(str, itemsToFilter, \"text\");\n // Return the filtered items and their group items\n return this.items.filter((item, idx, allItems) => MultiComboBox_1._groupItemFilter(item, ++idx, allItems, filteredItems) || filteredItems.indexOf(item) !== -1);\n }\n /**\n * Returns true if the group header should be shown (if there is a filtered suggestion item for this group item)\n *\n * @private\n */\n static _groupItemFilter(item, idx, allItems, filteredItems) {\n if (item.isGroupItem) {\n let groupHasFilteredItems;\n while (allItems[idx] && !allItems[idx].isGroupItem && !groupHasFilteredItems) {\n groupHasFilteredItems = filteredItems.indexOf(allItems[idx]) !== -1;\n idx++;\n }\n return groupHasFilteredItems;\n }\n }\n _afterOpenPicker() {\n this._toggle();\n if (!isPhone() && !this._isOpenedByKeyboard) {\n this._innerInput.focus();\n }\n else if (this._isOpenedByKeyboard) {\n this._itemToFocus?.focus();\n }\n else {\n this.allItemsPopover?.focus();\n }\n this._previouslySelectedItems = this._getSelectedItems();\n this._isOpenedByKeyboard = false;\n }\n _toggle() {\n this._open = !this._open;\n this.fireEvent(\"open-change\");\n }\n _getSelectedItems() {\n // Angular 2 way data binding\n this.selectedValues = this.items.filter(item => item.selected);\n return this.selectedValues;\n }\n _listSelectionChange(e) {\n let changePrevented;\n if (!isPhone()) {\n this._previouslySelectedItems = this._getSelectedItems();\n }\n // sync list items and cb items\n this.syncItems(e.target.items);\n // don't call selection change right after selection as user can cancel it on phone\n if (!isPhone()) {\n changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n e.preventDefault();\n this._revertSelection();\n }\n }\n // casted to KeyboardEvent since isSpace and isSpaceCtrl accepts KeyboardEvent only\n const castedEvent = { key: e.detail.key };\n if (!e.detail.selectionComponentPressed && !isSpace(castedEvent) && !isSpaceCtrl(castedEvent)) {\n this.allItemsPopover?.close();\n this.value = \"\";\n // if the item (not checkbox) is clicked, call the selection change\n if (isPhone()) {\n changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n e.preventDefault();\n this._revertSelection();\n }\n }\n this.fireEvent(\"input\");\n }\n this.value = this.valueBeforeAutoComplete || \"\";\n }\n syncItems(listItems) {\n listItems.forEach(item => {\n this.items.forEach(mcbItem => {\n if (mcbItem._id === item.getAttribute(\"data-ui5-token-id\")) {\n mcbItem.selected = item.selected;\n }\n });\n });\n }\n fireSelectionChange() {\n const changePrevented = !this.fireEvent(\"selection-change\", {\n items: this._getSelectedItems(),\n }, true);\n // Angular 2 way data binding\n this.fireEvent(\"value-changed\");\n return changePrevented;\n }\n async _getRespPopover() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n this.allItemsPopover = staticAreaItem.querySelector(`.ui5-multi-combobox-all-items-responsive-popover`);\n }\n async _getList() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n this.list = staticAreaItem.querySelector(\".ui5-multi-combobox-all-items-list\");\n return this.list;\n }\n _click() {\n if (isPhone() && !this.readonly && !this._showMorePressed && !this._deleting) {\n this.allItemsPopover?.showAt(this);\n }\n this._showMorePressed = false;\n }\n async handleBeforeTokenizerPopoverOpen() {\n const tokens = this._tokenizer.tokens;\n const hasTruncatedToken = tokens.length === 1 && tokens[0].isTruncatable;\n const popover = (await this._getResponsivePopover());\n if (hasTruncatedToken) {\n popover?.close(false, false, true);\n }\n }\n _afterClosePicker() {\n // close device's keyboard and prevent further typing\n if (isPhone()) {\n this.blur();\n }\n this._toggle();\n this._iconPressed = false;\n this._preventTokenizerToggle = false;\n this.filterSelected = false;\n }\n _beforeOpen() {\n this._itemsBeforeOpen = this.items.map(item => {\n return {\n ref: item,\n selected: item.selected,\n };\n });\n this._valueBeforeOpen = this.value;\n if (this.filterSelected) {\n const selectedItems = this._filteredItems.filter(item => item.selected);\n this.selectedItems = this.items.filter((item, idx, allItems) => MultiComboBox_1._groupItemFilter(item, ++idx, allItems, selectedItems) || selectedItems.indexOf(item) !== -1);\n }\n }\n _handleTypeAhead(item, filterValue) {\n if (!item) {\n return;\n }\n const value = item.text;\n const innerInput = this._innerInput;\n filterValue = filterValue || \"\";\n this.value = value;\n innerInput.value = value;\n innerInput.setSelectionRange(filterValue.length, value.length);\n this._shouldAutocomplete = false;\n }\n _getFirstMatchingItem(current) {\n if (!this.items.length) {\n return;\n }\n const matchingItems = this._startsWithMatchingItems(current).filter(item => !item.isGroupItem && !item.selected);\n if (matchingItems.length) {\n return matchingItems[0];\n }\n }\n _startsWithMatchingItems(str) {\n return Filters.StartsWith(str, this.items, \"text\");\n }\n _revertSelection() {\n this._filteredItems.forEach(item => {\n item.selected = this._previouslySelectedItems.includes(item);\n });\n }\n onBeforeRendering() {\n const input = this._innerInput;\n const autoCompletedChars = input && (input.selectionEnd || 0) - (input.selectionStart || 0);\n const value = input && input.value;\n this.FormSupport = getFeature(\"FormSupport\");\n this._inputLastValue = value;\n if (input && !input.value) {\n this.valueBeforeAutoComplete = \"\";\n this._filteredItems = this.items;\n }\n this.items.forEach(item => {\n item._getRealDomRef = () => this.allItemsPopover.querySelector(`*[data-ui5-stable=${item.stableDomRef}]`);\n });\n this.tokenizerAvailable = this._getSelectedItems().length > 0;\n this.style.setProperty(getScopedVarName(\"--_ui5-input-icons-count\"), `${this.iconsCount}`);\n if (!input || !value) {\n return;\n }\n // Typehead causes issues on Android devices, so we disable it for now\n // If there is already a selection the autocomplete has already been performed\n if (this._shouldAutocomplete && !isAndroid() && !autoCompletedChars) {\n const item = this._getFirstMatchingItem(value);\n // Keep the original typed in text intact\n this.valueBeforeAutoComplete = value;\n item && this._handleTypeAhead(item, value);\n }\n if (this._shouldFilterItems) {\n this._filteredItems = this._filterItems(this._shouldAutocomplete || !!autoCompletedChars ? this.valueBeforeAutoComplete : value);\n }\n else {\n this._filteredItems = this.items;\n }\n }\n async onAfterRendering() {\n await this._getRespPopover();\n await this._getList();\n this.toggle(this.shouldDisplayOnlyValueStateMessage);\n this.storeResponsivePopoverWidth();\n this._deleting = false;\n // force resize of the tokenizer on invalidation\n this._tokenizer._handleResize();\n }\n get _isPhone() {\n return isPhone();\n }\n _onIconMousedown() {\n this._iconPressed = true;\n }\n storeResponsivePopoverWidth() {\n if (this.open && !this._listWidth) {\n this._listWidth = this.list.offsetWidth;\n }\n }\n toggle(isToggled) {\n if (isToggled && !this.open) {\n this.openPopover();\n }\n else {\n this.closePopover();\n }\n }\n handleCancel() {\n this._itemsBeforeOpen.forEach(item => {\n if (item.ref instanceof MultiComboBoxItem) {\n item.ref.selected = item.selected;\n }\n });\n this.togglePopover();\n this.value = this._valueBeforeOpen;\n }\n handleOK() {\n if (isPhone()) {\n const changePrevented = this.fireSelectionChange();\n if (changePrevented) {\n this._revertSelection();\n }\n }\n if (!this.allowCustomValues) {\n this.value = \"\";\n }\n this.togglePopover();\n }\n async openPopover() {\n (await this._getPopover())?.showAt(this);\n }\n _forwardFocusToInner() {\n this._innerInput.focus();\n }\n get morePopoverOpener() {\n const tokens = this._tokenizer?.tokens;\n if (tokens?.length === 1 && tokens[0].isTruncatable) {\n return tokens[0];\n }\n return this;\n }\n async closePopover() {\n (await this._getPopover())?.close();\n }\n async _getPopover() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n return (staticAreaItem.querySelector(\"[ui5-popover]\"));\n }\n async _getResponsivePopover() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n return staticAreaItem.querySelector(\"[ui5-responsive-popover]\");\n }\n async _setValueStateHeader() {\n const responsivePopover = await this._getResponsivePopover();\n this.valueStateHeader = responsivePopover.querySelector(\"div.ui5-responsive-popover-header.ui5-valuestatemessage-root\");\n }\n get _tokenizer() {\n return this.shadowRoot.querySelector(\"[ui5-tokenizer]\");\n }\n inputFocusIn(e) {\n if (!isPhone() || this.readonly) {\n this.focused = true;\n this._tokenizer.expanded = true;\n }\n else {\n this._innerInput.blur();\n }\n if (!isPhone() && ((e.relatedTarget?.tagName !== \"UI5-STATIC-AREA-ITEM\") || !e.relatedTarget)) {\n this._innerInput.setSelectionRange(0, this.value.length);\n }\n this._tokenizer.tokens.forEach(token => {\n token.selected = false;\n });\n this._lastValue = this.value;\n this.valueBeforeAutoComplete = \"\";\n }\n inputFocusOut(e) {\n if (!this.shadowRoot.contains(e.relatedTarget) && !this._deleting) {\n this.focused = false;\n this._tokenizer.expanded = this.open;\n // remove the value if user focus out the input and focus is not going in the popover\n if (!isPhone() && !this.allowCustomValues && (this.staticAreaItem !== e.relatedTarget)) {\n this.value = \"\";\n }\n }\n }\n get editable() {\n return !this.readonly;\n }\n get _isFocusInside() {\n return !isPhone() && (this.focused || this._tokenizerFocused);\n }\n get selectedItemsListMode() {\n return this.readonly ? \"None\" : \"MultiSelect\";\n }\n get _listItemsType() {\n return this.readonly ? \"Inactive\" : \"Active\";\n }\n get hasValueState() {\n return this.valueState !== ValueState.None;\n }\n get hasValueStateMessage() {\n return this.hasValueState && this.valueState !== ValueState.Success;\n }\n get ariaValueStateHiddenText() {\n if (!this.hasValueState) {\n return;\n }\n let text = \"\";\n if (this.valueState !== ValueState.None) {\n text = this.valueStateTypeMappings[this.valueState];\n }\n if (this.shouldDisplayDefaultValueStateMessage) {\n return `${text} ${this.valueStateDefaultText || \"\"}`;\n }\n return `${text}`.concat(\" \", this.valueStateMessageText.map(el => el.textContent).join(\" \"));\n }\n get valueStateDefaultText() {\n if (this.valueState === ValueState.None) {\n return \"\";\n }\n if (this._performingSelectionTwice) {\n return MultiComboBox_1.i18nBundle.getText(VALUE_STATE_ERROR_ALREADY_SELECTED);\n }\n return this.valueStateTextMappings[this.valueState];\n }\n get valueStateTextId() {\n return this.hasValueState ? `ui5-multi-combobox-valueStateDesc` : undefined;\n }\n get valueStateMessageText() {\n return this.getSlottedNodes(\"valueStateMessage\").map(el => el.cloneNode(true));\n }\n get ariaLabelText() {\n return getEffectiveAriaLabelText(this);\n }\n /**\n * This method is relevant for sap_horizon theme only\n */\n get _valueStateMessageIcon() {\n if (this.valueState === ValueState.None) {\n return \"\";\n }\n return {\n [ValueState.Error]: \"error\",\n [ValueState.Warning]: \"alert\",\n [ValueState.Success]: \"sys-enter-2\",\n [ValueState.Information]: \"information\",\n }[this.valueState];\n }\n get _tokensCountText() {\n if (!this._tokenizer) {\n return;\n }\n return this._tokenizer._tokensCountText();\n }\n get _tokensCountTextId() {\n return \"ui5-multi-combobox-hiddenText-nMore\";\n }\n get _selectedTokensCount() {\n return this._tokenizer.tokens.filter(token => token.selected).length;\n }\n get ariaDescribedByText() {\n return this.valueStateTextId ? `${this._tokensCountTextId} ${this.valueStateTextId}` : `${this._tokensCountTextId}`;\n }\n get shouldDisplayDefaultValueStateMessage() {\n return !this.valueStateMessage.length && this.hasValueStateMessage;\n }\n get shouldDisplayOnlyValueStateMessage() {\n return this.focused && !this.readonly && this.hasValueStateMessage && !this._iconPressed;\n }\n get valueStateTypeMappings() {\n return {\n [ValueState.Success]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),\n [ValueState.Information]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),\n [ValueState.Error]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),\n [ValueState.Warning]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),\n };\n }\n get valueStateTextMappings() {\n return {\n [ValueState.Success]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_SUCCESS),\n [ValueState.Error]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_ERROR),\n [ValueState.Warning]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_WARNING),\n [ValueState.Information]: MultiComboBox_1.i18nBundle.getText(VALUE_STATE_INFORMATION),\n };\n }\n get _innerInput() {\n if (isPhone()) {\n if (this.allItemsPopover?.opened) {\n return this.allItemsPopover.querySelector(\"input\");\n }\n }\n return this._inputDom;\n }\n get _headerTitleText() {\n return MultiComboBox_1.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);\n }\n get _iconAccessibleNameText() {\n return MultiComboBox_1.i18nBundle.getText(SELECT_OPTIONS);\n }\n get _dialogOkButton() {\n return MultiComboBox_1.i18nBundle.getText(MULTICOMBOBOX_DIALOG_OK_BUTTON);\n }\n get _tokenizerExpanded() {\n if (isPhone() || this.readonly) {\n return false;\n }\n if (this._preventTokenizerToggle) {\n return this._tokenizer.expanded;\n }\n const isCurrentlyExpanded = this._tokenizer?.expanded;\n const shouldBeExpanded = this.focused || this.open || isCurrentlyExpanded;\n return shouldBeExpanded;\n }\n get _valueStatePopoverHorizontalAlign() {\n return this.effectiveDir !== \"rtl\" ? \"Left\" : \"Right\";\n }\n get iconsCount() {\n const slottedIconsCount = this.icon?.length || 0;\n const arrowDownIconsCount = this.readonly ? 0 : 1;\n return slottedIconsCount + arrowDownIconsCount;\n }\n get classes() {\n return {\n popover: {\n \"ui5-multi-combobox-all-items-responsive-popover\": true,\n \"ui5-suggestions-popover\": true,\n \"ui5-suggestions-popover-with-value-state-header\": this.hasValueStateMessage,\n },\n popoverValueState: {\n \"ui5-valuestatemessage-root\": true,\n \"ui5-valuestatemessage-header\": true,\n \"ui5-valuestatemessage--success\": this.valueState === ValueState.Success,\n \"ui5-valuestatemessage--error\": this.valueState === ValueState.Error,\n \"ui5-valuestatemessage--warning\": this.valueState === ValueState.Warning,\n \"ui5-valuestatemessage--information\": this.valueState === ValueState.Information,\n },\n };\n }\n get styles() {\n const remSizeIxPx = parseInt(getComputedStyle(document.documentElement).fontSize);\n return {\n popoverValueStateMessage: {\n \"width\": `${this._listWidth || 0}px`,\n \"display\": this._listWidth === 0 ? \"none\" : \"inline-block\",\n },\n popoverHeader: {\n \"max-width\": isPhone() ? \"100%\" : `${this._inputWidth}px`,\n },\n suggestionsPopover: {\n \"min-width\": `${this._inputWidth}px`,\n \"max-width\": (this._inputWidth / remSizeIxPx) > 40 ? `${this._inputWidth}px` : \"40rem\",\n },\n };\n }\n static async onDefine() {\n MultiComboBox_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n};\n__decorate([\n property()\n], MultiComboBox.prototype, \"value\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"noTypeahead\", void 0);\n__decorate([\n property()\n], MultiComboBox.prototype, \"placeholder\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"allowCustomValues\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: ValueState, defaultValue: ValueState.None })\n], MultiComboBox.prototype, \"valueState\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"readonly\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"required\", void 0);\n__decorate([\n property({ type: ComboBoxFilter, defaultValue: ComboBoxFilter.StartsWithPerTerm })\n], MultiComboBox.prototype, \"filter\", void 0);\n__decorate([\n property()\n], MultiComboBox.prototype, \"accessibleName\", void 0);\n__decorate([\n property()\n], MultiComboBox.prototype, \"accessibleNameRef\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"_open\", void 0);\n__decorate([\n property({ type: Object, noAttribute: true, multiple: true })\n], MultiComboBox.prototype, \"_filteredItems\", void 0);\n__decorate([\n property({ type: Object, noAttribute: true, multiple: true })\n], MultiComboBox.prototype, \"_previouslySelectedItems\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"filterSelected\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"focused\", void 0);\n__decorate([\n property({ type: Boolean, noAttribute: true })\n], MultiComboBox.prototype, \"_tokenizerFocused\", void 0);\n__decorate([\n property({ type: Boolean, noAttribute: true })\n], MultiComboBox.prototype, \"_iconPressed\", void 0);\n__decorate([\n property({ validator: Integer, noAttribute: true })\n], MultiComboBox.prototype, \"_inputWidth\", void 0);\n__decorate([\n property({ validator: Integer, noAttribute: true, defaultValue: 0 })\n], MultiComboBox.prototype, \"_listWidth\", void 0);\n__decorate([\n property({ type: Boolean, noAttribute: true })\n], MultiComboBox.prototype, \"_performingSelectionTwice\", void 0);\n__decorate([\n property({ type: Boolean })\n], MultiComboBox.prototype, \"tokenizerAvailable\", void 0);\n__decorate([\n slot({ type: HTMLElement, \"default\": true, invalidateOnChildChange: true })\n], MultiComboBox.prototype, \"items\", void 0);\n__decorate([\n slot()\n], MultiComboBox.prototype, \"icon\", void 0);\n__decorate([\n slot()\n], MultiComboBox.prototype, \"valueStateMessage\", void 0);\nMultiComboBox = MultiComboBox_1 = __decorate([\n customElement({\n tag: \"ui5-multi-combobox\",\n languageAware: true,\n renderer: litRender,\n template: MultiComboBoxTemplate,\n staticAreaTemplate: MultiComboBoxPopoverTemplate,\n styles: multiCbxStyles,\n staticAreaStyles: [ResponsivePopoverCommonCss, ValueStateMessageCss, SuggestionsCss, MultiComboBoxPopover],\n dependencies: [\n MultiComboBoxItem,\n MultiComboBoxGroupItem,\n Tokenizer,\n Token,\n Icon,\n ResponsivePopover,\n Popover,\n List,\n StandardListItem,\n GroupHeaderListItem,\n ToggleButton,\n Button,\n ],\n })\n /**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n *\n * @event sap.ui.webc.main.MultiComboBox#change\n * @public\n */\n ,\n event(\"change\")\n /**\n * Fired when the value of the component changes at each keystroke.\n *\n * @event sap.ui.webc.main.MultiComboBox#input\n * @public\n */\n ,\n event(\"input\")\n /**\n * Fired when the dropdown is opened or closed.\n *\n * @event sap.ui.webc.main.MultiComboBox#open-change\n * @since 1.0.0-rc.5\n * @public\n */\n ,\n event(\"open-change\")\n /**\n * Fired when selection is changed by user interaction\n * in SingleSelect
and MultiSelect
modes.\n *\n * @event sap.ui.webc.main.MultiComboBox#selection-change\n * @param {Array} items an array of the selected items.\n * @public\n */\n ,\n event(\"selection-change\", {\n detail: {\n items: { type: Array },\n },\n })\n], MultiComboBox);\nMultiComboBox.define();\nexport default MultiComboBox;\n//# sourceMappingURL=MultiComboBox.js.map","/* eslint no-unused-vars: 0 */\nimport { html, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html `${this.hasValueState ? block1.call(this, context, tags, suffix) : undefined}${this.icon ? block2.call(this, context, tags, suffix) : undefined}${!this.readonly ? block3.call(this, context, tags, suffix) : undefined}
`; }\nfunction block1(context, tags, suffix) { return html `${ifDefined(this.ariaValueStateHiddenText)}`; }\nfunction block2(context, tags, suffix) { return html ``; }\nfunction block3(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} name=\"slim-arrow-down\" slot=\"icon\" tabindex=\"-1\" input-icon ?pressed=\"${this._iconPressed}\" @click=\"${this._arrowClick}\" accessible-name=\"${ifDefined(this._iconAccessibleNameText)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>` : html ``; }\nexport default block0;\n//# sourceMappingURL=ComboBoxTemplate.lit.js.map","/* eslint no-unused-vars: 0 */\nimport { html, repeat, classMap, styleMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-responsive-popover\", tags, suffix)} class=\"${classMap(this.classes.popover)}\" hide-arrow _disable-initial-focus placement-type=\"Bottom\" horizontal-align=\"Left\" style=\"${styleMap(this.styles.suggestionsPopover)}\" @ui5-after-open=${ifDefined(this._afterOpenPopover)} @ui5-after-close=${ifDefined(this._afterClosePopover)}><${scopeTag(\"ui5-busy-indicator\", tags, suffix)} ?active=${this.loading} size=\"Medium\" class=\"ui5-combobox-busy\">${scopeTag(\"ui5-busy-indicator\", tags, suffix)}>${this._isPhone ? block1.call(this, context, tags, suffix) : undefined}${!this._isPhone ? block6.call(this, context, tags, suffix) : undefined}<${scopeTag(\"ui5-list\", tags, suffix)} separators=\"None\" @ui5-item-click=${ifDefined(this._selectItem)} @ui5-item-focused=${ifDefined(this._onItemFocus)} @mousedown=${this._itemMousedown} mode=\"SingleSelect\">${repeat(this._filteredItems, (item, index) => item._id || index, (item, index) => block11.call(this, context, tags, suffix, item, index))}${scopeTag(\"ui5-list\", tags, suffix)}>${this._isPhone ? block14.call(this, context, tags, suffix) : undefined}${scopeTag(\"ui5-responsive-popover\", tags, suffix)}>${this.shouldOpenValueStateMessagePopover ? block15.call(this, context, tags, suffix) : undefined} ` : html `${this._isPhone ? block1.call(this, context, tags, suffix) : undefined}${!this._isPhone ? block6.call(this, context, tags, suffix) : undefined}${repeat(this._filteredItems, (item, index) => item._id || index, (item, index) => block11.call(this, context, tags, suffix, item, index))}${this._isPhone ? block14.call(this, context, tags, suffix) : undefined}${this.shouldOpenValueStateMessagePopover ? block15.call(this, context, tags, suffix) : undefined} `; }\nfunction block1(context, tags, suffix) { return suffix ? html `` : html ``; }\nfunction block2(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${this.shouldDisplayDefaultValueStateMessage ? block3.call(this, context, tags, suffix) : block4.call(this, context, tags, suffix)}
` : html `${this.shouldDisplayDefaultValueStateMessage ? block3.call(this, context, tags, suffix) : block4.call(this, context, tags, suffix)}
`; }\nfunction block3(context, tags, suffix) { return html `${ifDefined(this.valueStateDefaultText)}`; }\nfunction block4(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block5.call(this, context, tags, suffix, item, index))}`; }\nfunction block5(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nfunction block6(context, tags, suffix) { return html `${this.hasValueStateText ? block7.call(this, context, tags, suffix) : undefined}`; }\nfunction block7(context, tags, suffix) { return suffix ? html `` : html ``; }\nfunction block8(context, tags, suffix) { return html `${ifDefined(this.valueStateDefaultText)}`; }\nfunction block9(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block10.call(this, context, tags, suffix, item, index))}`; }\nfunction block10(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nfunction block11(context, tags, suffix, item, index) { return html `${item.isGroupItem ? block12.call(this, context, tags, suffix, item, index) : block13.call(this, context, tags, suffix, item, index)}`; }\nfunction block12(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li-groupheader\", tags, suffix)} ?focused=${item.focused}>${ifDefined(item.text)}${scopeTag(\"ui5-li-groupheader\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block13(context, tags, suffix, item, index) { return suffix ? html `<${scopeTag(\"ui5-li\", tags, suffix)} type=\"Active\" wrapping-type=\"Normal\" additional-text=${ifDefined(item.additionalText)} group-name=${ifDefined(item.groupName)} ._tabIndex=${ifDefined(item.itemTabIndex)} .mappedItem=${ifDefined(item)} ?selected=${item.selected} ?focused=${item.focused}>${ifDefined(item.text)}${scopeTag(\"ui5-li\", tags, suffix)}>` : html `${ifDefined(item.text)}`; }\nfunction block14(context, tags, suffix) { return suffix ? html `` : html ``; }\nfunction block15(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-popover\", tags, suffix)} skip-registry-update _disable-initial-focus prevent-focus-restore hide-arrow class=\"ui5-valuestatemessage-popover\" horizontal-align=\"${ifDefined(this._valueStatePopoverHorizontalAlign)}\" placement-type=\"Bottom\"><${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-input-value-state-message-icon\" name=\"${ifDefined(this._valueStateMessageIcon)}\">${scopeTag(\"ui5-icon\", tags, suffix)}>${this.shouldDisplayDefaultValueStateMessage ? block16.call(this, context, tags, suffix) : block17.call(this, context, tags, suffix)}
${scopeTag(\"ui5-popover\", tags, suffix)}>` : html `${this.shouldDisplayDefaultValueStateMessage ? block16.call(this, context, tags, suffix) : block17.call(this, context, tags, suffix)}
`; }\nfunction block16(context, tags, suffix) { return html `${ifDefined(this.valueStateDefaultText)}`; }\nfunction block17(context, tags, suffix) { return html `${repeat(this.valueStateMessageText, (item, index) => item._id || index, (item, index) => block18.call(this, context, tags, suffix, item, index))}`; }\nfunction block18(context, tags, suffix, item, index) { return html `${ifDefined(item)}`; }\nexport default block0;\n//# sourceMappingURL=ComboBoxPopoverTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/ComboBox.css\", content: \":host{vertical-align:middle}.ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}[input-icon]{border-inline-start:var(--_ui5-v1-20-0_input_icon_border);border-radius:var(--_ui5-v1-20-0_input_icon_border_radius);color:var(--_ui5-v1-20-0_input_icon_color);cursor:pointer;min-height:1rem;min-width:1rem;outline:none;padding:var(--_ui5-v1-20-0_input_icon_padding)}[input-icon][pressed]{background:var(--_ui5-v1-20-0_input_icon_pressed_bg);border-inline-start:var(--_ui5-v1-20-0_select_hover_icon_left_border);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_pressed_color)}[input-icon]:active{background-color:var(--sapButton_Active_Background);border-inline-start:var(--_ui5-v1-20-0_select_hover_icon_left_border);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_pressed_color)}[input-icon]:not([pressed]):not(:active):hover{background:var(--_ui5-v1-20-0_input_icon_hover_bg);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow)}[input-icon]:hover{border-inline-start:var(--_ui5-v1-20-0_select_hover_icon_left_border);box-shadow:var(--_ui5-v1-20-0_input_icon_box_shadow)}:host(:not([hidden])){display:inline-block}:host{background:var(--sapField_BackgroundStyle);background-color:var(--_ui5-v1-20-0_input_background_color);border:var(--_ui5-v1-20-0-input-border);border-radius:var(--_ui5-v1-20-0_input_border_radius);box-sizing:border-box;color:var(--sapField_TextColor);font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--sapFontSize);font-style:normal;height:var(--_ui5-v1-20-0_input_height);margin:var(--_ui5-v1-20-0_input_margin_top_bottom) 0;min-width:calc(var(--_ui5-v1-20-0_input_min_width) + var(--_ui5-v1-20-0-input-icons-count)*var(--_ui5-v1-20-0_input_icon_width));text-align:start;transition:var(--_ui5-v1-20-0_input_transition);width:var(--_ui5-v1-20-0_input_width)}:host(:not([readonly])),:host([readonly][disabled]){box-shadow:var(--sapField_Shadow)}:host([focused]:not([opened])){background-color:var(--sapField_Focus_Background);border-color:var(--_ui5-v1-20-0_input_focused_border_color)}.ui5-input-focusable-element{position:relative}:host([focused]:not([opened])) .ui5-input-focusable-element:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--_ui5-v1-20-0_input_focus_outline_color);border-radius:var(--_ui5-v1-20-0_input_focus_border_radius);bottom:var(--_ui5-v1-20-0_input_focus_offset);content:var(--ui5-v1-20-0_input_focus_pseudo_element_content);left:var(--_ui5-v1-20-0_input_focus_offset);pointer-events:none;position:absolute;right:var(--_ui5-v1-20-0_input_focus_offset);top:var(--_ui5-v1-20-0_input_focus_offset);z-index:2}.ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_bottom_border_color);border-bottom-left-radius:8px;border-bottom-right-radius:8px;bottom:-2px;content:\\\"\\\";height:var(--_ui5-v1-20-0_input_bottom_border_height);left:1px;position:absolute;transition:var(--_ui5-v1-20-0_input_transition);width:calc(100% - 2px)}.ui5-input-root{background:transparent;border-radius:var(--_ui5-v1-20-0_input_border_radius);box-sizing:border-box;color:inherit;display:inline-block;height:100%;outline:none;overflow:hidden;position:relative;transition:border-color .2s ease-in-out;width:100%}:host([disabled]){background-color:var(--_ui5-v1-20-0-input_disabled_background);border-color:var(--_ui5-v1-20-0_input_disabled_border_color);cursor:default;opacity:var(--_ui5-v1-20-0_input_disabled_opacity);pointer-events:none}:host([disabled]) .ui5-input-root:before,:host([readonly]) .ui5-input-root:before{content:none}[inner-input]{-webkit-appearance:none;-moz-appearance:textfield;background:transparent;border:none;box-sizing:border-box;color:inherit;flex:1;font-family:inherit;font-size:inherit;font-style:inherit;letter-spacing:inherit;line-height:inherit;min-width:var(--_ui5-v1-20-0_input_min_width);outline:none;padding:var(--_ui5-v1-20-0_input_inner_padding);text-align:inherit;text-overflow:ellipsis;width:100%;word-spacing:inherit}[inner-input][inner-input-with-icon]{padding:var(--_ui5-v1-20-0_input_inner_padding_with_icon)}.ui5-input-value-state-icon{align-items:center;display:var(--_ui5-v1-20-0-input-value-state-icon-display);height:100%}.ui5-input-value-state-icon>svg{margin-right:8px}[inner-input]::selection{background:var(--sapSelectedColor);color:var(--sapContent_ContrastTextColor)}:host([disabled]) [inner-input]::-webkit-input-placeholder{visibility:hidden}:host([readonly]) [inner-input]::-webkit-input-placeholder{visibility:hidden}:host([disabled]) [inner-input]::-moz-placeholder{visibility:hidden}:host([readonly]) [inner-input]::-moz-placeholder{visibility:hidden}[inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color);font-style:var(--_ui5-v1-20-0_input_placeholder_style);font-weight:400;padding-right:.125rem}[inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color);font-style:var(--_ui5-v1-20-0_input_placeholder_style);font-weight:400;padding-right:.125rem}:host([value-state=Error]) [inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0-input_error_placeholder_color);font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Error]) [inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0-input_error_placeholder_color);font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Warning]) [inner-input]::-webkit-input-placeholder{font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Warning]) [inner-input]::-moz-placeholder{font-weight:var(--_ui5-v1-20-0_input_value_state_error_warning_placeholder_font_weight)}:host([value-state=Success]) [inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}:host([value-state=Success]) [inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}:host([value-state=Information]) [inner-input]::-webkit-input-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}:host([value-state=Information]) [inner-input]::-moz-placeholder{color:var(--_ui5-v1-20-0_input_placeholder_color)}.ui5-input-content{background:transparent;border-radius:var(--_ui5-v1-20-0_input_border_radius);box-sizing:border-box;color:inherit;display:flex;flex-direction:row;height:100%;justify-content:flex-end;outline:none;overflow:hidden}:host([readonly]:not([disabled])){background:var(--sapField_ReadOnly_BackgroundStyle);background-color:var(--_ui5-v1-20-0_input_readonly_background);border-color:var(--_ui5-v1-20-0_input_readonly_border_color)}:host(:not([value-state]):not([readonly]):hover),:host([value-state=None]:not([readonly]):hover){background:var(--sapField_Hover_BackgroundStyle);background-color:var(--sapField_Hover_Background);border:var(--_ui5-v1-20-0_input_hover_border);border-color:var(--_ui5-v1-20-0_input_focused_border_color);box-shadow:var(--sapField_Hover_Shadow)}:host(:not([value-state]):not([readonly])[focused]:not([opened]):hover),:host([value-state=None]:not([readonly])[focused]:not([opened]):hover){box-shadow:none}:host([focused]):not([opened]) .ui5-input-root:before{content:none}:host(:not([readonly]):not([disabled])[value-state]:not([value-state=None])){border-width:var(--_ui5-v1-20-0_input_state_border_width)}:host([value-state=Error]) [inner-input],:host([value-state=Warning]) [inner-input]{font-style:var(--_ui5-v1-20-0_input_error_warning_font_style);text-indent:var(--_ui5-v1-20-0_input_error_warning_text_indent)}:host([value-state=Error]) [inner-input]{font-weight:var(--_ui5-v1-20-0_input_error_font_weight)}:host([value-state=Warning]) [inner-input]{font-weight:var(--_ui5-v1-20-0_input_warning_font_weight)}:host([value-state=Error]:not([readonly]):not([disabled])){background:var(--sapField_InvalidBackgroundStyle);background-color:var(--sapField_InvalidBackground);border-color:var(--_ui5-v1-20-0_input_value_state_error_border_color);box-shadow:var(--sapField_InvalidShadow)}:host([value-state=Error][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_error_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_error_border_color)}:host([value-state=Error][focused]:not([opened]):not([readonly])) .ui5-input-focusable-element:after{border-color:var(--_ui5-v1-20-0_input_focused_value_state_error_focus_outline_color)}:host([value-state=Error]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0-input-value-state-error-border-botom-color)}:host([value-state=Error]:not([readonly]):not([focused]):hover),:host([value-state=Error]:not([readonly])[focused][opened]:hover){background-color:var(--_ui5-v1-20-0_input_value_state_error_hover_background);box-shadow:var(--sapField_Hover_InvalidShadow)}:host([value-state=Error]:not([readonly]):not([disabled])),:host([value-state=Information]:not([readonly]):not([disabled])),:host([value-state=Warning]:not([readonly]):not([disabled])){border-style:var(--_ui5-v1-20-0_input_error_warning_border_style)}:host([value-state=Warning]:not([readonly]):not([disabled])){background:var(--sapField_WarningBackgroundStyle);background-color:var(--sapField_WarningBackground);border-color:var(--_ui5-v1-20-0_input_value_state_warning_border_color);box-shadow:var(--sapField_WarningShadow)}:host([value-state=Warning][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_warning_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_warning_border_color)}:host([value-state=Warning][focused]:not([opened]):not([readonly])) .ui5-input-focusable-element:after{border-color:var(--_ui5-v1-20-0_input_focused_value_state_warning_focus_outline_color)}:host([value-state=Warning]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_value_state_warning_border_botom_color)}:host([value-state=Warning]:not([readonly]):not([focused]):hover),:host([value-state=Warning]:not([readonly])[focused][opened]:hover){background-color:var(--sapField_Hover_Background);box-shadow:var(--sapField_Hover_WarningShadow)}:host([value-state=Success]:not([readonly]):not([disabled])){background:var(--sapField_SuccessBackgroundStyle);background-color:var(--sapField_SuccessBackground);border-color:var(--_ui5-v1-20-0_input_value_state_success_border_color);border-width:var(--_ui5-v1-20-0_input_value_state_success_border_width);box-shadow:var(--sapField_SuccessShadow)}:host([value-state=Success][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_success_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_success_border_color)}:host([value-state=Success][focused]:not([opened]):not([readonly])) .ui5-input-focusable-element:after{border-color:var(--_ui5-v1-20-0_input_focused_value_state_success_focus_outline_color)}:host([value-state=Success]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_value_state_success_border_botom_color)}:host([value-state=Success]:not([readonly]):not([focused]):hover),:host([value-state=Success]:not([readonly])[focused][opened]:hover){background-color:var(--sapField_Hover_Background);box-shadow:var(--sapField_Hover_SuccessShadow)}:host([value-state=Information]:not([readonly]):not([disabled])){background:var(--sapField_InformationBackgroundStyle);background-color:var(--sapField_InformationBackground);border-color:var(--_ui5-v1-20-0_input_value_state_information_border_color);border-width:var(--_ui5-v1-20-0_input_information_border_width);box-shadow:var(--sapField_InformationShadow)}:host([value-state=Information][focused]:not([opened]):not([readonly])){background-color:var(--_ui5-v1-20-0_input_focused_value_state_information_background);border-color:var(--_ui5-v1-20-0_input_focused_value_state_information_border_color)}:host([value-state=Information]:not([readonly])) .ui5-input-root:before{background-color:var(--_ui5-v1-20-0_input_value_success_information_border_botom_color)}:host([value-state=Information]:not([readonly]):not([focused]):hover),:host([value-state=Information]:not([readonly])[focused][opened]:hover){background-color:var(--sapField_Hover_Background);box-shadow:var(--sapField_Hover_InformationShadow)}.ui5-input-icon-root{align-items:center;display:flex;height:100%;justify-content:center;min-width:var(--_ui5-v1-20-0_input_icon_min_width)}::slotted([ui5-icon][slot=icon]){align-self:start;box-sizing:content-box!important;padding:var(--_ui5-v1-20-0_input_custom_icon_padding)}:host([value-state=Error]) [input-icon],:host([value-state=Warning]) [input-icon]{padding:var(--_ui5-v1-20-0_input_error_warning_icon_padding)}:host([value-state=Error][focused]) [input-icon],:host([value-state=Warning][focused]) [input-icon]{padding:var(--_ui5-v1-20-0_input_error_warning_focused_icon_padding)}:host([value-state=Information]) [input-icon]{padding:var(--_ui5-v1-20-0_input_information_icon_padding)}:host([value-state=Information][focused]) [input-icon]{padding:var(--_ui5-v1-20-0_input_information_focused_icon_padding)}:host([value-state=Error]) ::slotted([input-icon][ui5-icon]),:host([value-state=Error]) ::slotted([ui5-icon][slot=icon]),:host([value-state=Warning]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_error_warning_custom_icon_padding)}:host([value-state=Error][focused]) ::slotted([input-icon][ui5-icon]),:host([value-state=Error][focused]) ::slotted([ui5-icon][slot=icon]),:host([value-state=Warning][focused]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_error_warning_custom_focused_icon_padding)}:host([value-state=Information]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_information_custom_icon_padding)}:host([value-state=Information][focused]) ::slotted([ui5-icon][slot=icon]){padding:var(--_ui5-v1-20-0_input_information_custom_focused_icon_padding)}:host([value-state=Error]) [input-icon]:active,:host([value-state=Error]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_error_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_error_pressed_color)}:host([value-state=Error]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_error_icon_box_shadow)}:host([value-state=Warning]) [input-icon]:active,:host([value-state=Warning]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_warning_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_warning_pressed_color)}:host([value-state=Warning]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_warning_icon_box_shadow)}:host([value-state=Information]) [input-icon]:active,:host([value-state=Information]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_information_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_information_pressed_color)}:host([value-state=Information]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_information_icon_box_shadow)}:host([value-state=Success]) [input-icon]:active,:host([value-state=Success]) [input-icon][pressed]{box-shadow:var(--_ui5-v1-20-0_input_success_icon_box_shadow);color:var(--_ui5-v1-20-0_input_icon_success_pressed_color)}:host([value-state=Success]) [input-icon]:not([pressed]):not(:active):hover{box-shadow:var(--_ui5-v1-20-0_input_success_icon_box_shadow)}.ui5-input-clear-icon-wrapper{align-items:center;box-sizing:border-box;display:flex;height:var(--_ui5-v1-20-0_input_icon_wrapper_height);justify-content:center;min-width:var(--_ui5-v1-20-0_input_icon_width);padding:0;width:var(--_ui5-v1-20-0_input_icon_width)}:host([value-state]:not([value-state=None]):not([value-state=Success])) .ui5-input-clear-icon-wrapper{height:var(--_ui5-v1-20-0_input_icon_wrapper_state_height);vertical-align:top}:host([value-state=Success]) .ui5-input-clear-icon-wrapper{height:var(--_ui5-v1-20-0_input_icon_wrapper_success_state_height)}[ui5-icon].ui5-input-clear-icon{color:inherit;padding:0}[inner-input]::-webkit-inner-spin-button,[inner-input]::-webkit-outer-spin-button{-webkit-appearance:inherit;margin:inherit}.ui5-combobox-root{border-radius:var(--_ui5-v1-20-0_input_border_radius);display:flex;height:100%;overflow:hidden;width:100%}\" };\nexport default styleData;\n//# sourceMappingURL=ComboBox.css.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/ComboBoxPopover.css\", content: \".ui5-combobox-busy{align-items:center;display:flex;height:100%;justify-content:center;left:50%;pointer-events:all;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%;z-index:42}.ui5-combobox-busy:not([active]){display:none}\" };\nexport default styleData;\n//# sourceMappingURL=ComboBoxPopover.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n/**\n * @class\n * The ui5-cb-group-item
is type of suggestion item,\n * that can be used to split the ui5-combobox
suggestions into groups.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.ComboBoxGroupItem\n * @extends sap.ui.webc.base.UI5Element\n * @abstract\n * @tagname ui5-cb-group-item\n * @public\n * @implements sap.ui.webc.main.IComboBoxItem\n * @since 1.0.0-rc.15\n */\nlet ComboBoxGroupItem = class ComboBoxGroupItem extends UI5Element {\n /**\n * Used to avoid tag name checks\n * @protected\n */\n get isGroupItem() {\n return true;\n }\n};\n__decorate([\n property()\n], ComboBoxGroupItem.prototype, \"text\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBoxGroupItem.prototype, \"focused\", void 0);\nComboBoxGroupItem = __decorate([\n customElement(\"ui5-cb-group-item\")\n], ComboBoxGroupItem);\nComboBoxGroupItem.define();\nexport default ComboBoxGroupItem;\n//# sourceMappingURL=ComboBoxGroupItem.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar ComboBox_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { isPhone, isAndroid, isSafari } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport InvisibleMessageMode from \"@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport announce from \"@ui5/webcomponents-base/dist/util/InvisibleMessage.js\";\nimport { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-down.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/not-editable.js\";\nimport \"@ui5/webcomponents-icons/dist/error.js\";\nimport \"@ui5/webcomponents-icons/dist/alert.js\";\nimport \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\nimport \"@ui5/webcomponents-icons/dist/information.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { isBackSpace, isDelete, isShow, isUp, isDown, isEnter, isEscape, isTabNext, isTabPrevious, isPageUp, isPageDown, isHome, isEnd, } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport * as Filters from \"./Filters.js\";\nimport { VALUE_STATE_SUCCESS, VALUE_STATE_ERROR, VALUE_STATE_WARNING, VALUE_STATE_INFORMATION, VALUE_STATE_TYPE_SUCCESS, VALUE_STATE_TYPE_INFORMATION, VALUE_STATE_TYPE_ERROR, VALUE_STATE_TYPE_WARNING, INPUT_SUGGESTIONS_TITLE, SELECT_OPTIONS, LIST_ITEM_POSITION, LIST_ITEM_GROUP_HEADER, } from \"./generated/i18n/i18n-defaults.js\";\n// Templates\nimport ComboBoxTemplate from \"./generated/templates/ComboBoxTemplate.lit.js\";\nimport ComboBoxPopoverTemplate from \"./generated/templates/ComboBoxPopoverTemplate.lit.js\";\n// Styles\nimport ComboBoxCss from \"./generated/themes/ComboBox.css.js\";\nimport ComboBoxPopoverCss from \"./generated/themes/ComboBoxPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\nimport ValueStateMessageCss from \"./generated/themes/ValueStateMessage.css.js\";\nimport SuggestionsCss from \"./generated/themes/Suggestions.css.js\";\nimport ComboBoxItem from \"./ComboBoxItem.js\";\nimport Icon from \"./Icon.js\";\nimport Popover from \"./Popover.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport List from \"./List.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\nimport Button from \"./Button.js\";\nimport StandardListItem from \"./StandardListItem.js\";\nimport ComboBoxGroupItem from \"./ComboBoxGroupItem.js\";\nimport GroupHeaderListItem from \"./GroupHeaderListItem.js\";\nimport ComboBoxFilter from \"./types/ComboBoxFilter.js\";\nimport PopoverHorizontalAlign from \"./types/PopoverHorizontalAlign.js\";\nconst SKIP_ITEMS_SIZE = 10;\nvar ValueStateIconMapping;\n(function (ValueStateIconMapping) {\n ValueStateIconMapping[\"Error\"] = \"error\";\n ValueStateIconMapping[\"Warning\"] = \"alert\";\n ValueStateIconMapping[\"Success\"] = \"sys-enter-2\";\n ValueStateIconMapping[\"Information\"] = \"information\";\n})(ValueStateIconMapping || (ValueStateIconMapping = {}));\n/**\n * @class\n *\n * \n *\n * The ui5-combobox
component represents a drop-down menu with a list of the available options and a text input field to narrow down the options.\n *\n * It is commonly used to enable users to select an option from a predefined list.\n *\n * Structure
\n * The ui5-combobox
consists of the following elements:\n *\n * \n * - Input field - displays the selected option or a custom user entry. Users can type to narrow down the list or enter their own value.
\n * - Drop-down arrow - expands\\collapses the option list.
\n * - Option list - the list of available options.
\n *
\n *\n * Keyboard Handling
\n *\n * The ui5-combobox
provides advanced keyboard handling.\n *
\n *\n * \n * - [F4], [ALT]+[UP], or [ALT]+[DOWN] - Toggles the picker.
\n * - [ESC] - Closes the picker, if open. If closed, cancels changes and reverts the typed in value.
\n * - [ENTER] or [RETURN] - If picker is open, takes over the currently selected item and closes it.
\n * - [DOWN] - Selects the next matching item in the picker.
\n * - [UP] - Selects the previous matching item in the picker.
\n * - [PAGEDOWN] - Moves selection down by page size (10 items by default).
\n * - [PAGEUP] - Moves selection up by page size (10 items by default).
\n * - [HOME] - If focus is in the ComboBox, moves cursor at the beginning of text. If focus is in the picker, selects the first item.
\n * - [END] - If focus is in the ComboBox, moves cursor at the end of text. If focus is in the picker, selects the last item.
\n *
\n *\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/ComboBox\";
\n *\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.ComboBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-combobox\n * @appenddocs sap.ui.webc.main.ComboBoxItem sap.ui.webc.main.ComboBoxGroupItem\n * @public\n * @since 1.0.0-rc.6\n */\nlet ComboBox = ComboBox_1 = class ComboBox extends UI5Element {\n constructor() {\n super();\n this._filteredItems = [];\n this._initialRendering = true;\n this._itemFocused = false;\n this._autocomplete = false;\n this._isKeyNavigation = false;\n this._lastValue = \"\";\n this._selectionPerformed = false;\n this._selectedItemText = \"\";\n this._userTypedValue = \"\";\n }\n onBeforeRendering() {\n const popover = this.valueStatePopover;\n this.FormSupport = getFeature(\"FormSupport\");\n if (this._initialRendering || this.filter === \"None\") {\n this._filteredItems = this.items;\n }\n if (!this._initialRendering && document.activeElement === this && !this._filteredItems.length) {\n popover?.close();\n }\n this._selectMatchingItem();\n this._initialRendering = false;\n const slottedIconsCount = this.icon.length || 0;\n const arrowDownIconsCount = this.readonly ? 0 : 1;\n this.style.setProperty(getScopedVarName(\"--_ui5-input-icons-count\"), `${slottedIconsCount + arrowDownIconsCount}`);\n }\n async onAfterRendering() {\n const picker = await this._getPicker();\n if (isPhone() && picker.opened) {\n // Set initial focus to the native input\n this.inner.focus();\n }\n if ((await this.shouldClosePopover()) && !isPhone()) {\n picker.close(false, false, true);\n this._clearFocus();\n this._itemFocused = false;\n }\n this.toggleValueStatePopover(this.shouldOpenValueStateMessagePopover);\n this.storeResponsivePopoverWidth();\n // Safari is quite slow and does not preserve text highlighting on control rerendering.\n // That's why we need to restore it \"manually\".\n if (isSafari() && this._autocomplete && this.filterValue !== this.value) {\n this.inner.setSelectionRange((this._isKeyNavigation ? 0 : this.filterValue.length), this.value.length);\n }\n }\n async shouldClosePopover() {\n const popover = await this._getPicker();\n return popover.opened && !this.focused && !this._itemFocused && !this._isValueStateFocused;\n }\n _focusin(e) {\n this.focused = true;\n this._lastValue = this.value;\n this._autocomplete = false;\n !isPhone() && e.target.setSelectionRange(0, this.value.length);\n }\n _focusout(e) {\n const toBeFocused = e.relatedTarget;\n const focusedOutToValueStateMessage = toBeFocused?.shadowRoot?.querySelector(\".ui5-valuestatemessage-root\");\n this._fireChangeEvent();\n if (focusedOutToValueStateMessage) {\n e.stopImmediatePropagation();\n return;\n }\n if (!(this.shadowRoot.contains(toBeFocused)) && (this.staticAreaItem !== e.relatedTarget)) {\n this.focused = false;\n !isPhone() && this._closeRespPopover(e);\n }\n }\n _afterOpenPopover() {\n this._iconPressed = true;\n }\n _afterClosePopover() {\n this._iconPressed = false;\n this._filteredItems = this.items;\n // close device's keyboard and prevent further typing\n if (isPhone()) {\n this.blur();\n }\n if (this._selectionPerformed) {\n this._lastValue = this.value;\n this._selectionPerformed = false;\n }\n }\n async _toggleRespPopover() {\n const picker = await this._getPicker();\n if (picker.opened) {\n this._closeRespPopover();\n }\n else {\n this._openRespPopover();\n }\n }\n async storeResponsivePopoverWidth() {\n if (this.open && !this._listWidth) {\n this._listWidth = (await this._getPicker()).offsetWidth;\n }\n }\n toggleValueStatePopover(open) {\n if (open) {\n this.openValueStatePopover();\n }\n else {\n this.closeValueStatePopover();\n }\n }\n async openValueStatePopover() {\n (await this._getValueStatePopover())?.showAt(this);\n }\n async closeValueStatePopover() {\n (await this._getValueStatePopover())?.close();\n }\n async _getValueStatePopover() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n const popover = staticAreaItem.querySelector(\".ui5-valuestatemessage-popover\");\n // backward compatibility\n // rework all methods to work with async getters\n this.valueStatePopover = popover;\n return popover;\n }\n _resetFilter() {\n this._userTypedValue = \"\";\n this.inner.setSelectionRange(0, this.value.length);\n this._filteredItems = this._filterItems(\"\");\n this._selectMatchingItem();\n }\n _arrowClick() {\n this.inner.focus();\n this._resetFilter();\n if (isPhone() && this.value && !this._lastValue) {\n this._lastValue = this.value;\n }\n this._toggleRespPopover();\n }\n _input(e) {\n const { value } = e.target;\n const shouldAutocomplete = this.shouldAutocomplete(e);\n if (e.target === this.inner) {\n // stop the native event, as the semantic \"input\" would be fired.\n e.stopImmediatePropagation();\n this.focused = true;\n this._isValueStateFocused = false;\n }\n this._filteredItems = this._filterItems(value);\n this.value = value;\n this.filterValue = value;\n this._clearFocus();\n // autocomplete\n if (shouldAutocomplete && !isAndroid()) {\n const item = this._getFirstMatchingItem(value);\n item && this._applyAtomicValueAndSelection(item, value, true);\n if (value !== \"\" && (item && !item.selected && !item.isGroupItem)) {\n this.fireEvent(\"selection-change\", {\n item,\n });\n }\n }\n this.fireEvent(\"input\");\n if (isPhone()) {\n return;\n }\n if (!this._filteredItems.length || value === \"\") {\n this._closeRespPopover();\n }\n else {\n this._openRespPopover();\n }\n }\n shouldAutocomplete(e) {\n const eventType = e.inputType;\n const allowedEventTypes = [\n \"deleteWordBackward\",\n \"deleteWordForward\",\n \"deleteSoftLineBackward\",\n \"deleteSoftLineForward\",\n \"deleteEntireSoftLine\",\n \"deleteHardLineBackward\",\n \"deleteHardLineForward\",\n \"deleteByDrag\",\n \"deleteByCut\",\n \"deleteContent\",\n \"deleteContentBackward\",\n \"deleteContentForward\",\n \"historyUndo\",\n ];\n return !this.noTypeahead && !allowedEventTypes.includes(eventType);\n }\n _startsWithMatchingItems(str) {\n return Filters.StartsWith(str, this._filteredItems, \"text\");\n }\n _clearFocus() {\n this._filteredItems.map(item => {\n item.focused = false;\n return item;\n });\n }\n handleNavKeyPress(e) {\n if (this.focused && (isHome(e) || isEnd(e)) && this.value) {\n return;\n }\n const isOpen = this.open;\n const currentItem = this._filteredItems.find(item => {\n return isOpen ? item.focused : item.selected;\n });\n const indexOfItem = currentItem ? this._filteredItems.indexOf(currentItem) : -1;\n e.preventDefault();\n if (this.focused && isOpen && (isUp(e) || isPageUp(e) || isPageDown(e))) {\n return;\n }\n if (this._filteredItems.length - 1 === indexOfItem && isDown(e)) {\n return;\n }\n this._isKeyNavigation = true;\n if (e.key === \"ArrowDown\"\n || e.key === \"ArrowUp\"\n || e.key === \"PageUp\"\n || e.key === \"PageDown\"\n || e.key === \"Home\"\n || e.key === \"End\") {\n this[`_handle${e.key}`](e, indexOfItem);\n }\n }\n _handleItemNavigation(e, indexOfItem, isForward) {\n const isOpen = this.open;\n const currentItem = this._filteredItems[indexOfItem];\n const nextItem = isForward ? this._filteredItems[indexOfItem + 1] : this._filteredItems[indexOfItem - 1];\n const isGroupItem = currentItem && currentItem.isGroupItem;\n if ((!isOpen) && ((isGroupItem && !nextItem) || (!isGroupItem && !currentItem))) {\n return;\n }\n this._clearFocus();\n if (isOpen) {\n this._itemFocused = true;\n this.value = isGroupItem ? \"\" : currentItem.text;\n this.focused = false;\n currentItem.focused = true;\n }\n else {\n this.focused = true;\n this.value = isGroupItem ? nextItem.text : currentItem.text;\n currentItem.focused = false;\n }\n this._isValueStateFocused = false;\n this._announceSelectedItem(indexOfItem);\n if (isGroupItem && isOpen) {\n return;\n }\n // autocomplete\n const item = this._getFirstMatchingItem(this.value);\n item && this._applyAtomicValueAndSelection(item, (this.open ? this._userTypedValue : \"\"), true);\n if ((item && !item.selected)) {\n this.fireEvent(\"selection-change\", {\n item,\n });\n }\n this.fireEvent(\"input\");\n this._fireChangeEvent();\n }\n _handleArrowDown(e, indexOfItem) {\n const isOpen = this.open;\n if (this.focused && indexOfItem === -1 && this.hasValueStateText && isOpen) {\n this._isValueStateFocused = true;\n this._announceValueStateText();\n this.focused = false;\n return;\n }\n indexOfItem = !isOpen && this.hasValueState && indexOfItem === -1 ? 0 : indexOfItem;\n this._handleItemNavigation(e, ++indexOfItem, true /* isForward */);\n }\n _handleArrowUp(e, indexOfItem) {\n const isOpen = this.open;\n if (indexOfItem === 0 && !this.hasValueStateText) {\n this._clearFocus();\n this.focused = true;\n this._itemFocused = false;\n return;\n }\n if (indexOfItem === 0 && this.hasValueStateText && isOpen) {\n this._clearFocus();\n this._itemFocused = false;\n this._isValueStateFocused = true;\n this._announceValueStateText();\n this._filteredItems[0].selected = false;\n return;\n }\n if (this._isValueStateFocused) {\n this.focused = true;\n this._isValueStateFocused = false;\n return;\n }\n indexOfItem = !isOpen && this.hasValueState && indexOfItem === -1 ? 0 : indexOfItem;\n this._handleItemNavigation(e, --indexOfItem, false /* isForward */);\n }\n _handlePageUp(e, indexOfItem) {\n const isProposedIndexValid = indexOfItem - SKIP_ITEMS_SIZE > -1;\n indexOfItem = isProposedIndexValid ? indexOfItem - SKIP_ITEMS_SIZE : 0;\n const shouldMoveForward = this._filteredItems[indexOfItem].isGroupItem && !this.open;\n if (!isProposedIndexValid && this.hasValueStateText && this.open) {\n this._clearFocus();\n this._itemFocused = false;\n this._isValueStateFocused = true;\n this._announceValueStateText();\n return;\n }\n this._handleItemNavigation(e, indexOfItem, shouldMoveForward);\n }\n _handlePageDown(e, indexOfItem) {\n const itemsLength = this._filteredItems.length;\n const isProposedIndexValid = indexOfItem + SKIP_ITEMS_SIZE < itemsLength;\n indexOfItem = isProposedIndexValid ? indexOfItem + SKIP_ITEMS_SIZE : itemsLength - 1;\n const shouldMoveForward = this._filteredItems[indexOfItem].isGroupItem && !this.open;\n this._handleItemNavigation(e, indexOfItem, shouldMoveForward);\n }\n _handleHome(e) {\n const shouldMoveForward = this._filteredItems[0].isGroupItem && !this.open;\n if (this.hasValueStateText && this.open) {\n this._clearFocus();\n this._itemFocused = false;\n this._isValueStateFocused = true;\n this._announceValueStateText();\n return;\n }\n this._handleItemNavigation(e, 0, shouldMoveForward);\n }\n _handleEnd(e) {\n this._handleItemNavigation(e, this._filteredItems.length - 1, true /* isForward */);\n }\n _keyup() {\n this._userTypedValue = this.value.substring(0, this.inner.selectionStart || 0);\n }\n _keydown(e) {\n const isNavKey = isDown(e) || isUp(e) || isPageUp(e) || isPageDown(e) || isHome(e) || isEnd(e);\n const picker = this.responsivePopover;\n this._autocomplete = !(isBackSpace(e) || isDelete(e));\n this._isKeyNavigation = false;\n if (isNavKey && !this.readonly && this._filteredItems.length) {\n this.handleNavKeyPress(e);\n }\n if (isEnter(e)) {\n this._fireChangeEvent();\n if (picker?.opened) {\n this._closeRespPopover();\n this.focused = true;\n }\n else if (this.FormSupport) {\n this.FormSupport.triggerFormSubmit(this);\n }\n }\n if (isEscape(e)) {\n this.focused = true;\n this.value = !this.open ? this._lastValue : this.value;\n this._isValueStateFocused = false;\n }\n if ((isTabNext(e) || isTabPrevious(e)) && this.open) {\n this._closeRespPopover();\n }\n if (isShow(e) && !this.readonly && !this.disabled) {\n e.preventDefault();\n this._resetFilter();\n this._toggleRespPopover();\n const selectedItem = this._filteredItems.find(item => {\n return item.selected;\n });\n if (selectedItem && this.open) {\n this._itemFocused = true;\n selectedItem.focused = true;\n this.focused = false;\n }\n else if (this.open && this._filteredItems.length) {\n // If no item is selected, select the first one on \"Show\" (F4, Alt+Up/Down)\n this._handleItemNavigation(e, 0, true /* isForward */);\n }\n else {\n this.focused = true;\n }\n }\n }\n _click() {\n if (isPhone() && !this.readonly) {\n this._openRespPopover();\n }\n }\n _closeRespPopover(e) {\n const picker = this.responsivePopover;\n if (e && e.target.classList.contains(\"ui5-responsive-popover-close-btn\") && this._selectedItemText) {\n this.value = this._selectedItemText;\n this.filterValue = this._selectedItemText;\n }\n if (e && e.target.classList.contains(\"ui5-responsive-popover-close-btn\")) {\n this.value = this._lastValue || \"\";\n this.filterValue = this._lastValue || \"\";\n }\n if (isPhone()) {\n this._fireChangeEvent();\n }\n this._isValueStateFocused = false;\n this._clearFocus();\n picker?.close();\n }\n async _openRespPopover() {\n (await this._getPicker()).showAt(this);\n }\n _filterItems(str) {\n const itemsToFilter = this.items.filter(item => !item.isGroupItem);\n const filteredItems = (Filters[this.filter] || Filters.StartsWithPerTerm)(str, itemsToFilter, \"text\");\n // Return the filtered items and their group items\n return this.items.filter((item, idx, allItems) => ComboBox_1._groupItemFilter(item, ++idx, allItems, filteredItems) || filteredItems.indexOf(item) !== -1);\n }\n /**\n * Returns true if the group header should be shown (if there is a filtered suggestion item for this group item)\n *\n * @private\n */\n static _groupItemFilter(item, idx, allItems, filteredItems) {\n if (item.isGroupItem) {\n let groupHasFilteredItems;\n while (allItems[idx] && !allItems[idx].isGroupItem && !groupHasFilteredItems) {\n groupHasFilteredItems = filteredItems.indexOf(allItems[idx]) !== -1;\n idx++;\n }\n return groupHasFilteredItems;\n }\n }\n _getFirstMatchingItem(current) {\n const currentlyFocusedItem = this.items.find(item => item.focused === true);\n if (currentlyFocusedItem?.isGroupItem) {\n this.value = this.filterValue;\n return;\n }\n const matchingItems = this._startsWithMatchingItems(current).filter(item => !item.isGroupItem);\n if (matchingItems.length) {\n return matchingItems[0];\n }\n }\n _applyAtomicValueAndSelection(item, filterValue, highlightValue) {\n const value = (item && item.text) || \"\";\n this.inner.value = value;\n if (highlightValue) {\n this.inner.setSelectionRange(filterValue.length, value.length);\n }\n this.value = value;\n }\n _selectMatchingItem() {\n const currentlyFocusedItem = this.items.find(item => item.focused);\n const shouldSelectionBeCleared = currentlyFocusedItem && currentlyFocusedItem.isGroupItem;\n const itemToBeSelected = this._filteredItems.find(item => {\n return !item.isGroupItem && (item.text === this.value) && !shouldSelectionBeCleared;\n });\n this._filteredItems = this._filteredItems.map(item => {\n item.selected = item === itemToBeSelected;\n return item;\n });\n }\n _fireChangeEvent() {\n if (this.value !== this._lastValue) {\n this.fireEvent(\"change\");\n this._lastValue = this.value;\n }\n }\n _inputChange(e) {\n e.preventDefault();\n }\n _itemMousedown(e) {\n e.preventDefault();\n }\n _selectItem(e) {\n const listItem = e.detail.item;\n this._selectedItemText = listItem.mappedItem.text;\n this._selectionPerformed = true;\n const sameItemSelected = this.value === this._selectedItemText;\n const sameSelectionPerformed = this.value.toLowerCase() === this.filterValue.toLowerCase();\n if (sameItemSelected && sameSelectionPerformed) {\n this._fireChangeEvent(); // Click on an already typed, but not memoized value shouold also trigger the change event\n return this._closeRespPopover();\n }\n this.value = this._selectedItemText;\n if (!listItem.mappedItem.selected) {\n this.fireEvent(\"selection-change\", {\n item: listItem.mappedItem,\n });\n }\n this._filteredItems.map(item => {\n item.selected = (item === listItem.mappedItem && !item.isGroupItem);\n return item;\n });\n this._fireChangeEvent();\n this._closeRespPopover();\n // reset selection\n this.inner.setSelectionRange(this.value.length, this.value.length);\n }\n _onItemFocus() {\n this._itemFocused = true;\n }\n _announceSelectedItem(indexOfItem) {\n const currentItem = this._filteredItems[indexOfItem];\n const nonGroupItems = this._filteredItems.filter(item => !item.isGroupItem);\n const currentItemAdditionalText = currentItem.additionalText || \"\";\n const isGroupItem = currentItem?.isGroupItem;\n const itemPositionText = ComboBox_1.i18nBundle.getText(LIST_ITEM_POSITION, nonGroupItems.indexOf(currentItem) + 1, nonGroupItems.length);\n const groupHeaderText = ComboBox_1.i18nBundle.getText(LIST_ITEM_GROUP_HEADER);\n if (isGroupItem) {\n announce(`${groupHeaderText} ${currentItem.text}`, InvisibleMessageMode.Polite);\n }\n else {\n announce(`${currentItemAdditionalText} ${itemPositionText}`.trim(), InvisibleMessageMode.Polite);\n }\n }\n _announceValueStateText() {\n const valueStateText = this.shouldDisplayDefaultValueStateMessage ? this.valueStateDefaultText : this.valueStateMessageText.map(el => el.textContent).join(\" \");\n if (valueStateText) {\n announce(valueStateText, InvisibleMessageMode.Polite);\n }\n }\n get _headerTitleText() {\n return ComboBox_1.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);\n }\n get _iconAccessibleNameText() {\n return ComboBox_1.i18nBundle.getText(SELECT_OPTIONS);\n }\n get inner() {\n return isPhone() ? this.responsivePopover.querySelector(\".ui5-input-inner-phone\") : this.shadowRoot.querySelector(\"[inner-input]\");\n }\n async _getPicker() {\n const staticAreaItem = await this.getStaticAreaItemDomRef();\n const picker = staticAreaItem.querySelector(\"[ui5-responsive-popover]\");\n // backward compatibility\n // rework all methods to work with async getters\n this.responsivePopover = picker;\n return picker;\n }\n get hasValueState() {\n return this.valueState !== ValueState.None;\n }\n get hasValueStateText() {\n return this.hasValueState && this.valueState !== ValueState.Success;\n }\n get ariaValueStateHiddenText() {\n if (!this.hasValueState) {\n return \"\";\n }\n let text = \"\";\n if (this.valueState !== ValueState.None) {\n text = this.valueStateTypeMappings[this.valueState];\n }\n if (this.shouldDisplayDefaultValueStateMessage) {\n return `${text} ${this.valueStateDefaultText || \"\"}`;\n }\n return `${text}`.concat(\" \", this.valueStateMessageText.map(el => el.textContent).join(\" \"));\n }\n get valueStateDefaultText() {\n if (this.valueState === ValueState.None) {\n return;\n }\n return this.valueStateTextMappings[this.valueState];\n }\n get valueStateMessageText() {\n return this.getSlottedNodes(\"valueStateMessage\").map(el => el.cloneNode(true));\n }\n get valueStateTextMappings() {\n return {\n [ValueState.Success]: ComboBox_1.i18nBundle.getText(VALUE_STATE_SUCCESS),\n [ValueState.Error]: ComboBox_1.i18nBundle.getText(VALUE_STATE_ERROR),\n [ValueState.Warning]: ComboBox_1.i18nBundle.getText(VALUE_STATE_WARNING),\n [ValueState.Information]: ComboBox_1.i18nBundle.getText(VALUE_STATE_INFORMATION),\n };\n }\n get valueStateTypeMappings() {\n return {\n [ValueState.Success]: ComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_SUCCESS),\n [ValueState.Information]: ComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_INFORMATION),\n [ValueState.Error]: ComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_ERROR),\n [ValueState.Warning]: ComboBox_1.i18nBundle.getText(VALUE_STATE_TYPE_WARNING),\n };\n }\n get shouldOpenValueStateMessagePopover() {\n return this.focused && !this.readonly && this.hasValueStateText && !this._iconPressed\n && !this.open && !this._isPhone;\n }\n get shouldDisplayDefaultValueStateMessage() {\n return !this.valueStateMessage.length && this.hasValueStateText;\n }\n get _valueStatePopoverHorizontalAlign() {\n return this.effectiveDir !== \"rtl\" ? PopoverHorizontalAlign.Left : PopoverHorizontalAlign.Right;\n }\n /**\n * This method is relevant for sap_horizon theme only\n */\n get _valueStateMessageIcon() {\n return this.valueState !== ValueState.None ? ValueStateIconMapping[this.valueState] : \"\";\n }\n get open() {\n return this?.responsivePopover?.opened || false;\n }\n get _isPhone() {\n return isPhone();\n }\n get itemTabIndex() {\n return undefined;\n }\n get ariaLabelText() {\n return getEffectiveAriaLabelText(this);\n }\n static async onDefine() {\n ComboBox_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n get styles() {\n const remSizeInPx = parseInt(getComputedStyle(document.documentElement).fontSize);\n return {\n popoverHeader: {\n \"width\": `${this.offsetWidth}px`,\n },\n suggestionPopoverHeader: {\n \"display\": this._listWidth === 0 ? \"none\" : \"inline-block\",\n \"width\": `${this._listWidth || \"\"}px`,\n },\n suggestionsPopover: {\n \"min-width\": `${this.offsetWidth || 0}px`,\n \"max-width\": (this.offsetWidth / remSizeInPx) > 40 ? `${this.offsetWidth}px` : \"40rem\",\n },\n };\n }\n get classes() {\n return {\n popover: {\n \"ui5-suggestions-popover\": !this._isPhone,\n \"ui5-suggestions-popover-with-value-state-header\": !this._isPhone && this.hasValueStateText,\n },\n popoverValueState: {\n \"ui5-valuestatemessage-header\": true,\n \"ui5-valuestatemessage-root\": true,\n \"ui5-valuestatemessage--success\": this.valueState === ValueState.Success,\n \"ui5-valuestatemessage--error\": this.valueState === ValueState.Error,\n \"ui5-valuestatemessage--warning\": this.valueState === ValueState.Warning,\n \"ui5-valuestatemessage--information\": this.valueState === ValueState.Information,\n },\n };\n }\n};\n__decorate([\n property()\n], ComboBox.prototype, \"value\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"noTypeahead\", void 0);\n__decorate([\n property()\n], ComboBox.prototype, \"filterValue\", void 0);\n__decorate([\n property()\n], ComboBox.prototype, \"placeholder\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: ValueState, defaultValue: ValueState.None })\n], ComboBox.prototype, \"valueState\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"readonly\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"required\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"loading\", void 0);\n__decorate([\n property({ type: ComboBoxFilter, defaultValue: ComboBoxFilter.StartsWithPerTerm })\n], ComboBox.prototype, \"filter\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"focused\", void 0);\n__decorate([\n property({ type: Boolean })\n], ComboBox.prototype, \"_isValueStateFocused\", void 0);\n__decorate([\n property()\n], ComboBox.prototype, \"accessibleName\", void 0);\n__decorate([\n property()\n], ComboBox.prototype, \"accessibleNameRef\", void 0);\n__decorate([\n property({ type: Boolean, noAttribute: true })\n], ComboBox.prototype, \"_iconPressed\", void 0);\n__decorate([\n property({ type: Object, noAttribute: true, multiple: true })\n], ComboBox.prototype, \"_filteredItems\", void 0);\n__decorate([\n property({ validator: Integer, noAttribute: true })\n], ComboBox.prototype, \"_listWidth\", void 0);\n__decorate([\n slot({ type: HTMLElement, \"default\": true, invalidateOnChildChange: true })\n], ComboBox.prototype, \"items\", void 0);\n__decorate([\n slot()\n], ComboBox.prototype, \"valueStateMessage\", void 0);\n__decorate([\n slot()\n], ComboBox.prototype, \"icon\", void 0);\nComboBox = ComboBox_1 = __decorate([\n customElement({\n tag: \"ui5-combobox\",\n languageAware: true,\n renderer: litRender,\n styles: ComboBoxCss,\n staticAreaStyles: [\n ResponsivePopoverCommonCss,\n ValueStateMessageCss,\n ComboBoxPopoverCss,\n SuggestionsCss,\n ],\n template: ComboBoxTemplate,\n staticAreaTemplate: ComboBoxPopoverTemplate,\n dependencies: [\n ComboBoxItem,\n Icon,\n ResponsivePopover,\n List,\n BusyIndicator,\n Button,\n StandardListItem,\n GroupHeaderListItem,\n Popover,\n ComboBoxGroupItem,\n ],\n })\n /**\n * Fired when the input operation has finished by pressing Enter, focusout or an item is selected.\n *\n * @event sap.ui.webc.main.ComboBox#change\n * @public\n */\n ,\n event(\"change\")\n /**\n * Fired when typing in input.\n *
\n * Note: filterValue property is updated, input is changed.\n * @event sap.ui.webc.main.ComboBox#input\n * @public\n */\n ,\n event(\"input\")\n /**\n * Fired when selection is changed by user interaction\n *\n * @event sap.ui.webc.main.ComboBox#selection-change\n * @param {sap.ui.webc.main.IComboBoxItem} item item to be selected.\n * @public\n */\n ,\n event(\"selection-change\", {\n detail: {\n item: { type: HTMLElement },\n },\n })\n], ComboBox);\nComboBox.define();\nexport default ComboBox;\n//# sourceMappingURL=ComboBox.js.map","function getY(max, height, diff, value) {\n return parseFloat((height - (value * height / max) + diff).toFixed(2));\n}\n\nfunction removeChildren(svg) {\n [...svg.querySelectorAll(\"*\")].forEach(element => svg.removeChild(element));\n}\n\nfunction defaultFetch(entry) {\n return entry.value;\n}\n\nfunction buildElement(tag, attrs) {\n const element = document.createElementNS(\"http://www.w3.org/2000/svg\", tag);\n\n for (let name in attrs) {\n element.setAttribute(name, attrs[name]);\n }\n\n return element;\n}\n\nexport function sparkline(svg, entries, options) {\n removeChildren(svg);\n\n if (entries.length <= 1) {\n return;\n }\n\n options = options || {};\n\n if (typeof(entries[0]) === \"number\") {\n entries = entries.map(entry => {\n return {value: entry};\n });\n }\n\n // This function will be called whenever the mouse moves\n // over the SVG. You can use it to render something like a\n // tooltip.\n const onmousemove = options.onmousemove;\n\n // This function will be called whenever the mouse leaves\n // the SVG area. You can use it to hide the tooltip.\n const onmouseout = options.onmouseout;\n\n // Should we run in interactive mode? If yes, this will handle the\n // cursor and spot position when moving the mouse.\n const interactive = (\"interactive\" in options) ? options.interactive : !!onmousemove;\n\n // Define how big should be the spot area.\n const spotRadius = options.spotRadius || 2;\n const spotDiameter = spotRadius * 2;\n\n // Define how wide should be the cursor area.\n const cursorWidth = options.cursorWidth || 2;\n\n // Get the stroke width; this is used to compute the\n // rendering offset.\n const strokeWidth = parseFloat(svg.attributes[\"stroke-width\"].value);\n\n // By default, data must be formatted as an array of numbers or\n // an array of objects with the value key (like `[{value: 1}]`).\n // You can set a custom function to return data for a different\n // data structure.\n const fetch = options.fetch || defaultFetch;\n\n // Retrieve only values, easing the find for the maximum value.\n const values = entries.map(entry => fetch(entry));\n\n // The rendering width will account for the spot size.\n const width = parseFloat(svg.attributes.width.value) - spotDiameter * 2;\n\n // Get the SVG element's full height.\n // This is used\n const fullHeight = parseFloat(svg.attributes.height.value);\n\n // The rendering height accounts for stroke width and spot size.\n const height = fullHeight - (strokeWidth * 2) - spotDiameter;\n\n // The maximum value. This is used to calculate the Y coord of\n // each sparkline datapoint.\n const max = Math.max(...values);\n\n // Some arbitrary value to remove the cursor and spot out of\n // the viewing canvas.\n const offscreen = -1000;\n\n // Cache the last item index.\n const lastItemIndex = values.length - 1;\n\n // Calculate the X coord base step.\n const offset = width / lastItemIndex;\n\n // Hold all datapoints, which is whatever we got as the entry plus\n // x/y coords and the index.\n const datapoints = [];\n\n // Hold the line coordinates.\n const pathY = getY(max, height, strokeWidth + spotRadius, values[0]);\n let pathCoords = `M${spotDiameter} ${pathY}`;\n\n values.forEach((value, index) => {\n const x = index * offset + spotDiameter;\n const y = getY(max, height, strokeWidth + spotRadius, value);\n\n datapoints.push(Object.assign({}, entries[index], {\n index: index,\n x: x,\n y: y\n }));\n\n pathCoords += ` L ${x} ${y}`;\n });\n\n const path = buildElement(\"path\", {\n class: \"sparkline--line\",\n d: pathCoords,\n fill: \"none\"\n });\n\n let fillCoords = `${pathCoords} V ${fullHeight} L ${spotDiameter} ${fullHeight} Z`;\n\n const fill = buildElement(\"path\", {\n class: \"sparkline--fill\",\n d: fillCoords,\n stroke: \"none\"\n });\n\n svg.appendChild(fill);\n svg.appendChild(path);\n\n if (!interactive) {\n return;\n }\n\n const cursor = buildElement(\"line\", {\n class: \"sparkline--cursor\",\n x1: offscreen,\n x2: offscreen,\n y1: 0,\n y2: fullHeight,\n \"stroke-width\": cursorWidth\n });\n\n const spot = buildElement(\"circle\", {\n class: \"sparkline--spot\",\n cx: offscreen,\n cy: offscreen,\n r: spotRadius\n });\n\n svg.appendChild(cursor);\n svg.appendChild(spot);\n\n const interactionLayer = buildElement(\"rect\", {\n width: svg.attributes.width.value,\n height: svg.attributes.height.value,\n style: \"fill: transparent; stroke: transparent\",\n class: \"sparkline--interaction-layer\",\n });\n svg.appendChild(interactionLayer);\n\n interactionLayer.addEventListener(\"mouseout\", event => {\n cursor.setAttribute(\"x1\", offscreen);\n cursor.setAttribute(\"x2\", offscreen);\n\n spot.setAttribute(\"cx\", offscreen);\n\n if (onmouseout) {\n onmouseout(event);\n }\n });\n\n interactionLayer.addEventListener(\"mousemove\", event => {\n const mouseX = event.offsetX;\n\n let nextDataPoint = datapoints.find(entry => {\n return entry.x >= mouseX;\n });\n\n if (!nextDataPoint) {\n nextDataPoint = datapoints[lastItemIndex];\n }\n\n let previousDataPoint = datapoints[datapoints.indexOf(nextDataPoint) - 1];\n let currentDataPoint;\n let halfway;\n\n if (previousDataPoint) {\n halfway = previousDataPoint.x + ((nextDataPoint.x - previousDataPoint.x) / 2);\n currentDataPoint = mouseX >= halfway ? nextDataPoint : previousDataPoint;\n } else {\n currentDataPoint = nextDataPoint;\n }\n\n const x = currentDataPoint.x;\n const y = currentDataPoint.y;\n\n spot.setAttribute(\"cx\", x);\n spot.setAttribute(\"cy\", y);\n\n cursor.setAttribute(\"x1\", x);\n cursor.setAttribute(\"x2\", x);\n\n if (onmousemove) {\n onmousemove(event, currentDataPoint);\n }\n });\n}\n\nexport default sparkline;\n","/**\n * Different navigation modes for ItemNavigation.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.NavigationMode\n */\nvar NavigationMode;\n(function (NavigationMode) {\n /**\n * @public\n * @type {Auto}\n */\n NavigationMode[\"Auto\"] = \"Auto\";\n /**\n * @public\n * @type {Vertical}\n */\n NavigationMode[\"Vertical\"] = \"Vertical\";\n /**\n * @public\n * @type {Horizontal}\n */\n NavigationMode[\"Horizontal\"] = \"Horizontal\";\n /**\n * @public\n * @type {Paging}\n */\n NavigationMode[\"Paging\"] = \"Paging\";\n})(NavigationMode || (NavigationMode = {}));\nexport default NavigationMode;\n//# sourceMappingURL=NavigationMode.js.map","/**\n * Different behavior for ItemNavigation.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.ItemNavigationBehavior\n */\nvar ItemNavigationBehavior;\n(function (ItemNavigationBehavior) {\n /**\n * Static behavior: navigations stops at the first or last item.\n * @public\n * @type {Static}\n */\n ItemNavigationBehavior[\"Static\"] = \"Static\";\n /**\n * Cycling behavior: navigating past the last item continues with the first and vice versa.\n * @public\n * @type {Cyclic}\n */\n ItemNavigationBehavior[\"Cyclic\"] = \"Cyclic\";\n})(ItemNavigationBehavior || (ItemNavigationBehavior = {}));\nexport default ItemNavigationBehavior;\n//# sourceMappingURL=ItemNavigationBehavior.js.map","import { isDown, isUp, isLeft, isRight, isHome, isEnd, isPageDown, isPageUp, } from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n /**\n *\n * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @param {ItemNavigationOptions} options Object with configuration options:\n * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n */\n constructor(rootWebComponent, options) {\n if (!rootWebComponent.isUI5Element) {\n throw new Error(\"The root web component must be a UI5 Element instance\");\n }\n this.rootWebComponent = rootWebComponent;\n this.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n this._initBound = this._init.bind(this);\n this.rootWebComponent.attachComponentStateFinalized(this._initBound);\n if (typeof options.getItemsCallback !== \"function\") {\n throw new Error(\"getItemsCallback is required\");\n }\n this._getItems = options.getItemsCallback;\n this._currentIndex = options.currentIndex || 0;\n this._rowSize = options.rowSize || 1;\n this._behavior = options.behavior || ItemNavigationBehavior.Static;\n this._navigationMode = options.navigationMode || NavigationMode.Auto;\n this._affectedPropertiesNames = options.affectedPropertiesNames || [];\n this._skipItemsSize = options.skipItemsSize || null;\n }\n /**\n * Call this method to set a new \"current\" (selected) item in the item navigation\n * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n *\n * @public\n * @param current the new selected item\n */\n setCurrentItem(current) {\n const currentItemIndex = this._getItems().indexOf(current);\n if (currentItemIndex === -1) {\n console.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n return;\n }\n this._currentIndex = currentItemIndex;\n this._applyTabIndex();\n }\n /**\n * Call this method to dynamically change the row size\n *\n * @public\n * @param newRowSize\n */\n setRowSize(newRowSize) {\n this._rowSize = newRowSize;\n }\n _init() {\n this._getItems().forEach((item, idx) => {\n item._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n });\n }\n _onkeydown(event) {\n if (!this._canNavigate()) {\n return;\n }\n const horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n const verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n const isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n if (isRTL && isLeft(event) && horizontalNavigationOn) {\n this._handleRight();\n }\n else if (isRTL && isRight(event) && horizontalNavigationOn) {\n this._handleLeft();\n }\n else if (isLeft(event) && horizontalNavigationOn) {\n this._handleLeft();\n }\n else if (isRight(event) && horizontalNavigationOn) {\n this._handleRight();\n }\n else if (isUp(event) && verticalNavigationOn) {\n this._handleUp();\n }\n else if (isDown(event) && verticalNavigationOn) {\n this._handleDown();\n }\n else if (isHome(event)) {\n this._handleHome();\n }\n else if (isEnd(event)) {\n this._handleEnd();\n }\n else if (isPageUp(event)) {\n this._handlePageUp();\n }\n else if (isPageDown(event)) {\n this._handlePageDown();\n }\n else {\n return; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n }\n event.preventDefault();\n this._applyTabIndex();\n this._focusCurrentItem();\n }\n _handleUp() {\n const itemsLength = this._getItems().length;\n if (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n this._currentIndex -= this._rowSize;\n return;\n }\n if (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n const firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n const firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n const rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n let lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n if (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n lastItemInPreviousColumnIndex -= this._rowSize;\n }\n this._currentIndex = lastItemInPreviousColumnIndex;\n }\n else { // not cyclic, so just go to the first item\n this._currentIndex = 0;\n }\n }\n _handleDown() {\n const itemsLength = this._getItems().length;\n if (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n this._currentIndex += this._rowSize;\n return;\n }\n if (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n const firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n const firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n this._currentIndex = firstItemInNextColumnIndex;\n }\n else { // not cyclic, so just go to the last item\n this._currentIndex = itemsLength - 1;\n }\n }\n _handleLeft() {\n const itemsLength = this._getItems().length;\n if (this._currentIndex > 0) {\n this._currentIndex -= 1;\n return;\n }\n if (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n this._currentIndex = itemsLength - 1;\n }\n }\n _handleRight() {\n const itemsLength = this._getItems().length;\n if (this._currentIndex < itemsLength - 1) {\n this._currentIndex += 1;\n return;\n }\n if (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n this._currentIndex = 0;\n }\n }\n _handleHome() {\n const homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n this._currentIndex -= this._currentIndex % homeEndRange;\n }\n _handleEnd() {\n const homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n this._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n }\n _handlePageUp() {\n if (this._rowSize > 1) {\n // eslint-disable-next-line\n // TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n return;\n }\n this._handlePageUpFlat();\n }\n _handlePageDown() {\n if (this._rowSize > 1) {\n // eslint-disable-next-line\n // TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n return;\n }\n this._handlePageDownFlat();\n }\n /**\n * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n */\n _handlePageUpFlat() {\n if (this._skipItemsSize === null) {\n // Move the focus to the very top (as Home).\n this._currentIndex -= this._currentIndex;\n return;\n }\n if (this._currentIndex + 1 > this._skipItemsSize) {\n // When there are more than \"skipItemsSize\" number of items to the top,\n // move the focus up/left with the predefined number.\n this._currentIndex -= this._skipItemsSize;\n }\n else {\n // Otherwise, move the focus to the very top (as Home).\n this._currentIndex -= this._currentIndex;\n }\n }\n /**\n * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n */\n _handlePageDownFlat() {\n if (this._skipItemsSize === null) {\n // Move the focus to the very bottom (as End).\n this._currentIndex = this._getItems().length - 1;\n return;\n }\n const currentToEndRange = this._getItems().length - this._currentIndex - 1;\n if (currentToEndRange > this._skipItemsSize) {\n // When there are more than \"skipItemsSize\" number of items until the bottom,\n // move the focus down/right with the predefined number.\n this._currentIndex += this._skipItemsSize;\n }\n else {\n // Otherwise, move the focus to the very bottom (as End).\n this._currentIndex = this._getItems().length - 1;\n }\n }\n _applyTabIndex() {\n const items = this._getItems();\n for (let i = 0; i < items.length; i++) {\n items[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n }\n this._affectedPropertiesNames.forEach(propName => {\n const prop = this.rootWebComponent[propName];\n this.rootWebComponent[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n });\n }\n _focusCurrentItem() {\n const currentItem = this._getCurrentItem();\n if (currentItem) {\n currentItem.focus();\n }\n }\n _canNavigate() {\n const currentItem = this._getCurrentItem();\n const activeElement = getActiveElement();\n return currentItem && currentItem === activeElement;\n }\n _getCurrentItem() {\n const items = this._getItems();\n if (!items.length) {\n return;\n }\n // normalize the index\n while (this._currentIndex >= items.length) {\n this._currentIndex -= this._rowSize;\n }\n if (this._currentIndex < 0) {\n this._currentIndex = 0;\n }\n const currentItem = items[this._currentIndex];\n if (!currentItem) {\n return;\n }\n if (instanceOfUI5Element(currentItem)) {\n return currentItem.getFocusDomRef();\n }\n const currentItemDOMRef = this.rootWebComponent.getDomRef();\n if (!currentItemDOMRef) {\n return;\n }\n if (currentItem.id) {\n return currentItemDOMRef.querySelector(`[id=\"${currentItem.id}\"]`);\n }\n }\n}\nexport default ItemNavigation;\n//# sourceMappingURL=ItemNavigation.js.map","/**\n * Returns the normalized event target in cases when it has shadow root.\n * @param {Object} target The original event target\n * @returns {Object} The normalized target\n */\nconst getNormalizedTarget = (target) => {\n let element = target;\n if (target.shadowRoot && target.shadowRoot.activeElement) {\n element = target.shadowRoot.activeElement;\n }\n return element;\n};\nexport default getNormalizedTarget;\n//# sourceMappingURL=getNormalizedTarget.js.map","/**\n * Delays function execution by given threshold.\n * @param fn {Function}\n * @param delay {Integer}\n */\nlet debounceInterval = null;\nconst debounce = (fn, delay) => {\n debounceInterval && clearTimeout(debounceInterval);\n debounceInterval = setTimeout(() => {\n debounceInterval = null;\n fn();\n }, delay);\n};\nexport default debounce;\n//# sourceMappingURL=debounce.js.map","/**\n * Determines if the element is within the viewport.\n * @param el {HTMLElement}\n */\nconst isElementInView = (el) => {\n const rect = el.getBoundingClientRect();\n return (rect.top >= 0 && rect.left >= 0\n && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)\n && rect.right <= (window.innerWidth || document.documentElement.clientWidth));\n};\nexport default isElementInView;\n//# sourceMappingURL=isElementInView.js.map","/**\n * Different list modes.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ListMode\n */\nvar ListMode;\n(function (ListMode) {\n /**\n * Default mode (no selection).\n * @public\n * @type {None}\n */\n ListMode[\"None\"] = \"None\";\n /**\n * Right-positioned single selection mode (only one list item can be selected).\n * @public\n * @type {SingleSelect}\n */\n ListMode[\"SingleSelect\"] = \"SingleSelect\";\n /**\n * Left-positioned single selection mode (only one list item can be selected).\n * @public\n * @type {SingleSelectBegin}\n */\n ListMode[\"SingleSelectBegin\"] = \"SingleSelectBegin\";\n /**\n * Selected item is highlighted but no selection element is visible\n * (only one list item can be selected).\n * @public\n * @type {SingleSelectEnd}\n */\n ListMode[\"SingleSelectEnd\"] = \"SingleSelectEnd\";\n /**\n * Selected item is highlighted and selection is changed upon arrow navigation\n * (only one list item can be selected - this is always the focused item).\n * @public\n * @type {SingleSelectAuto}\n */\n ListMode[\"SingleSelectAuto\"] = \"SingleSelectAuto\";\n /**\n * Multi selection mode (more than one list item can be selected).\n * @public\n * @type {MultiSelect}\n */\n ListMode[\"MultiSelect\"] = \"MultiSelect\";\n /**\n * Delete mode (only one list item can be deleted via provided delete button)\n * @public\n * @type {Delete}\n */\n ListMode[\"Delete\"] = \"Delete\";\n})(ListMode || (ListMode = {}));\nexport default ListMode;\n//# sourceMappingURL=ListMode.js.map","/**\n * Different list growing modes.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ListGrowingMode\n */\nvar ListGrowingMode;\n(function (ListGrowingMode) {\n /**\n * Component's \"load-more\" is fired upon pressing a \"More\" button.\n * at the bottom.\n * @public\n * @type {Button}\n */\n ListGrowingMode[\"Button\"] = \"Button\";\n /**\n * Component's \"load-more\" is fired upon scroll.\n * @public\n * @type {Scroll}\n */\n ListGrowingMode[\"Scroll\"] = \"Scroll\";\n /**\n * Component's growing is not enabled.\n * @public\n * @type {None}\n */\n ListGrowingMode[\"None\"] = \"None\";\n})(ListGrowingMode || (ListGrowingMode = {}));\nexport default ListGrowingMode;\n//# sourceMappingURL=ListGrowingMode.js.map","/**\n * Different types of list items separators.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ListSeparators\n */\nvar ListSeparators;\n(function (ListSeparators) {\n /**\n * Separators between the items including the last and the first one.\n * @public\n * @type {All}\n */\n ListSeparators[\"All\"] = \"All\";\n /**\n * Separators between the items.\n * Note: This enumeration depends on the theme.\n * @public\n * @type {Inner}\n */\n ListSeparators[\"Inner\"] = \"Inner\";\n /**\n * No item separators.\n * @public\n * @type {None}\n */\n ListSeparators[\"None\"] = \"None\";\n})(ListSeparators || (ListSeparators = {}));\nexport default ListSeparators;\n//# sourceMappingURL=ListSeparators.js.map","/**\n * Different BusyIndicator sizes.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.BusyIndicatorSize\n */\nvar BusyIndicatorSize;\n(function (BusyIndicatorSize) {\n /**\n * small size\n * @public\n * @type {Small}\n */\n BusyIndicatorSize[\"Small\"] = \"Small\";\n /**\n * medium size\n * @public\n * @type {Medium}\n */\n BusyIndicatorSize[\"Medium\"] = \"Medium\";\n /**\n * large size\n * @public\n * @type {Large}\n */\n BusyIndicatorSize[\"Large\"] = \"Large\";\n})(BusyIndicatorSize || (BusyIndicatorSize = {}));\nexport default BusyIndicatorSize;\n//# sourceMappingURL=BusyIndicatorSize.js.map","/**\n * Different types of wrapping.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.WrappingType\n */\nvar WrappingType;\n(function (WrappingType) {\n /**\n * The text will be truncated with an ellipsis.\n * @public\n * @type {None}\n */\n WrappingType[\"None\"] = \"None\";\n /**\n * The text will wrap. The words will not be broken based on hyphenation.\n * @public\n * @type {Normal}\n */\n WrappingType[\"Normal\"] = \"Normal\";\n})(WrappingType || (WrappingType = {}));\nexport default WrappingType;\n//# sourceMappingURL=WrappingType.js.map","/* eslint no-unused-vars: 0 */\nimport { html, ifDefined } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html ``; }\nexport default block0;\n//# sourceMappingURL=LabelTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/Label.css\", content: \":host(:not([hidden])){display:inline-flex}:host{color:var(--sapContent_LabelColor);cursor:text;font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;max-width:100%}.ui5-label-root{cursor:inherit;width:100%}:host([wrapping-type=Normal]) .ui5-label-root{white-space:normal}:host(:not([wrapping-type=Normal])) .ui5-label-root{display:inline-flex;white-space:nowrap}:host(:not([wrapping-type=Normal])) .ui5-label-text-wrapper{display:inline-block;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;vertical-align:top}:host([show-colon]) .ui5-label-required-colon:before{content:attr(data-colon)}:host([required]) .ui5-label-required-colon:after{color:var(--sapField_RequiredColor);content:\\\"*\\\";font-size:1.25rem;font-style:normal;font-weight:700;line-height:0;position:relative;vertical-align:middle}:host([required][show-colon]) .ui5-label-required-colon:after{margin-inline-start:.125rem}bdi{padding-right:.075rem}:host([show-colon]) .ui5-label-required-colon{margin-inline-start:-.05rem;white-space:pre}\" };\nexport default styleData;\n//# sourceMappingURL=Label.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar Label_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport { LABEL_COLON } from \"./generated/i18n/i18n-defaults.js\";\n// Template\nimport LabelTemplate from \"./generated/templates/LabelTemplate.lit.js\";\n// Styles\nimport labelCss from \"./generated/themes/Label.css.js\";\n/**\n * @class\n *\n * \n *\n * The ui5-label
is a component used to represent a label for elements like input, textarea, select.
\n * The for
property of the ui5-label
must be the same as the id attribute of the related input element.
\n * Screen readers read out the label, when the user focuses the labelled control.\n *
\n * The ui5-label
appearance can be influenced by properties,\n * such as required
and wrappingType
.\n * The appearance of the Label can be configured in a limited way by using the design property.\n * For a broader choice of designs, you can use custom styles.\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/Label\";
\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Label\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-label\n * @public\n */\nlet Label = Label_1 = class Label extends UI5Element {\n static async onDefine() {\n Label_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n /**\n * Defines the text of the component.\n *
Note: Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n *\n * @type {Node[]}\n * @slot\n * @public\n * @name sap.ui.webc.main.Label.prototype.default\n */\n _onclick() {\n if (!this.for) {\n return;\n }\n const elementToFocus = this.getRootNode().querySelector(`[id=\"${this.for}\"]`);\n if (elementToFocus) {\n elementToFocus.focus();\n }\n }\n get _colonSymbol() {\n return Label_1.i18nBundle.getText(LABEL_COLON);\n }\n};\n__decorate([\n property()\n], Label.prototype, \"for\", void 0);\n__decorate([\n property({ type: Boolean })\n], Label.prototype, \"showColon\", void 0);\n__decorate([\n property({ type: Boolean })\n], Label.prototype, \"required\", void 0);\n__decorate([\n property({ type: WrappingType, defaultValue: WrappingType.None })\n], Label.prototype, \"wrappingType\", void 0);\nLabel = Label_1 = __decorate([\n customElement({\n tag: \"ui5-label\",\n renderer: litRender,\n template: LabelTemplate,\n styles: labelCss,\n languageAware: true,\n })\n], Label);\nLabel.define();\nexport default Label;\n//# sourceMappingURL=Label.js.map","/* eslint no-unused-vars: 0 */\nimport { html, classMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html `${this._isBusy ? block1.call(this, context, tags, suffix) : undefined}${this._isBusy ? block3.call(this, context, tags, suffix) : undefined}
`; }\nfunction block1(context, tags, suffix) { return html `${this.text ? block2.call(this, context, tags, suffix) : undefined}
`; }\nfunction block2(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-label\", tags, suffix)} id=\"${ifDefined(this._id)}-label\" class=\"ui5-busy-indicator-text\" wrapping-type=\"Normal\">${ifDefined(this.text)}${scopeTag(\"ui5-label\", tags, suffix)}>` : html `${ifDefined(this.text)}`; }\nfunction block3(context, tags, suffix) { return html ``; }\nexport default block0;\n//# sourceMappingURL=BusyIndicatorTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/BusyIndicator.css\", content: \":host(:not([hidden])){display:inline-block}:host([_is-busy]){color:var(--_ui5-v1-20-0_busy_indicator_color)}:host([size=Small]) .ui5-busy-indicator-root{min-height:.5rem;min-width:1.625rem}:host([size=Small][text]:not([text=\\\"\\\"])) .ui5-busy-indicator-root{min-height:1.75rem}:host([size=Small]) .ui5-busy-indicator-circle{height:.5rem;width:.5rem}:host([size=Small]) .ui5-busy-indicator-circle:first-child,:host([size=Small]) .ui5-busy-indicator-circle:nth-child(2){margin-inline-end:.0625rem}:host(:not([size])) .ui5-busy-indicator-root,:host([size=Medium]) .ui5-busy-indicator-root{min-height:1rem;min-width:3.375rem}:host([size=Medium]) .ui5-busy-indicator-circle:first-child,:host([size=Medium]) .ui5-busy-indicator-circle:nth-child(2){margin-inline-end:.1875rem}:host(:not([size])[text]:not([text=\\\"\\\"])) .ui5-busy-indicator-root,:host([size=Medium][text]:not([text=\\\"\\\"])) .ui5-busy-indicator-root{min-height:2.25rem}:host(:not([size])) .ui5-busy-indicator-circle,:host([size=Medium]) .ui5-busy-indicator-circle{height:1rem;width:1rem}:host([size=Large]) .ui5-busy-indicator-root{min-height:2rem;min-width:6.5rem}:host([size=Large]) .ui5-busy-indicator-circle:first-child,:host([size=Large]) .ui5-busy-indicator-circle:nth-child(2){margin-inline-end:.25rem}:host([size=Large][text]:not([text=\\\"\\\"])) .ui5-busy-indicator-root{min-height:3.25rem}:host([size=Large]) .ui5-busy-indicator-circle{height:2rem;width:2rem}.ui5-busy-indicator-root{align-items:center;background-color:inherit;display:flex;height:inherit;justify-content:center;position:relative}.ui5-busy-indicator-busy-area{align-items:center;background-color:inherit;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:99}.ui5-busy-indicator-busy-area:focus{border-radius:var(--_ui5-v1-20-0_busy_indicator_focus_border_radius);outline:var(--_ui5-v1-20-0_busy_indicator_focus_outline);outline-offset:-2px}.ui5-busy-indicator-circles-wrapper{line-height:0}.ui5-busy-indicator-circle{background-color:currentColor;border-radius:50%;display:inline-block}.ui5-busy-indicator-circle:before{border-radius:100%;content:\\\"\\\";height:100%;width:100%}.circle-animation-0{animation:grow 1.6s cubic-bezier(.32,.06,.85,1.11) infinite}.circle-animation-1{animation:grow 1.6s cubic-bezier(.32,.06,.85,1.11) infinite;animation-delay:.2s}.circle-animation-2{animation:grow 1.6s cubic-bezier(.32,.06,.85,1.11) infinite;animation-delay:.4s}.ui5-busy-indicator-text{margin-top:.25rem;text-align:center;width:100%}@keyframes grow{0%,50%,to{-webkit-transform:scale(.5);-moz-transform:scale(.5);transform:scale(.5)}25%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}}\" };\nexport default styleData;\n//# sourceMappingURL=BusyIndicator.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar BusyIndicator_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { isTabNext } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport BusyIndicatorSize from \"./types/BusyIndicatorSize.js\";\nimport Label from \"./Label.js\";\n// Template\nimport BusyIndicatorTemplate from \"./generated/templates/BusyIndicatorTemplate.lit.js\";\nimport { BUSY_INDICATOR_TITLE } from \"./generated/i18n/i18n-defaults.js\";\n// Styles\nimport busyIndicatorCss from \"./generated/themes/BusyIndicator.css.js\";\n/**\n * @class\n *\n * \n *\n * The ui5-busy-indicator
signals that some operation is going on and that the\n * user must wait. It does not block the current UI screen so other operations could be triggered in parallel.\n * It displays 3 dots and each dot expands and shrinks at a different rate, resulting in a cascading flow of animation.\n *\n * Usage
\n * For the ui5-busy-indicator
you can define the size, the text and whether it is shown or hidden.\n * In order to hide it, use the \"active\" property.\n *
\n * In order to show busy state over an HTML element, simply nest the HTML element in a ui5-busy-indicator
instance.\n *
\n * Note: Since ui5-busy-indicator
has display: inline-block;
by default and no width of its own,\n * whenever you need to wrap a block-level element, you should set display: block
to the busy indicator as well.\n *\n * When to use:
\n * \n * - The user needs to be able to cancel the operation.
\n * - Only part of the application or a particular component is affected.
\n *
\n *\n * When not to use:
\n * \n * - The operation takes less than one second.
\n * - You need to block the screen and prevent the user from starting another activity.
\n * - Do not show multiple busy indicators at once.
\n *
\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/BusyIndicator\";
\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.BusyIndicator\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-busy-indicator\n * @public\n * @since 0.12.0\n */\nlet BusyIndicator = BusyIndicator_1 = class BusyIndicator extends UI5Element {\n constructor() {\n super();\n this._keydownHandler = this._handleKeydown.bind(this);\n this._preventEventHandler = this._preventEvent.bind(this);\n }\n onEnterDOM() {\n this.addEventListener(\"keydown\", this._keydownHandler, {\n capture: true,\n });\n this.addEventListener(\"keyup\", this._preventEventHandler, {\n capture: true,\n });\n }\n onExitDOM() {\n if (this._busyTimeoutId) {\n clearTimeout(this._busyTimeoutId);\n delete this._busyTimeoutId;\n }\n this.removeEventListener(\"keydown\", this._keydownHandler, true);\n this.removeEventListener(\"keyup\", this._preventEventHandler, true);\n }\n static async onDefine() {\n BusyIndicator_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n get ariaTitle() {\n return BusyIndicator_1.i18nBundle.getText(BUSY_INDICATOR_TITLE);\n }\n get labelId() {\n return this.text ? `${this._id}-label` : undefined;\n }\n get classes() {\n return {\n root: {\n \"ui5-busy-indicator-root\": true,\n },\n };\n }\n onBeforeRendering() {\n if (this.active) {\n if (!this._isBusy && !this._busyTimeoutId) {\n this._busyTimeoutId = setTimeout(() => {\n delete this._busyTimeoutId;\n this._isBusy = true;\n }, Math.max(0, this.delay));\n }\n }\n else {\n if (this._busyTimeoutId) {\n clearTimeout(this._busyTimeoutId);\n delete this._busyTimeoutId;\n }\n this._isBusy = false;\n }\n }\n _handleKeydown(e) {\n if (!this._isBusy) {\n return;\n }\n e.stopImmediatePropagation();\n // move the focus to the last element in this DOM and let TAB continue to the next focusable element\n if (isTabNext(e)) {\n this.focusForward = true;\n this.shadowRoot.querySelector(\"[data-ui5-focus-redirect]\").focus();\n this.focusForward = false;\n }\n }\n _preventEvent(e) {\n if (this._isBusy) {\n e.stopImmediatePropagation();\n }\n }\n /**\n * Moves the focus to busy area when coming with SHIFT + TAB\n */\n _redirectFocus(e) {\n if (this.focusForward) {\n return;\n }\n e.preventDefault();\n this.shadowRoot.querySelector(\".ui5-busy-indicator-busy-area\").focus();\n }\n};\n__decorate([\n property()\n], BusyIndicator.prototype, \"text\", void 0);\n__decorate([\n property({ type: BusyIndicatorSize, defaultValue: BusyIndicatorSize.Medium })\n], BusyIndicator.prototype, \"size\", void 0);\n__decorate([\n property({ type: Boolean })\n], BusyIndicator.prototype, \"active\", void 0);\n__decorate([\n property({ validator: Integer, defaultValue: 1000 })\n], BusyIndicator.prototype, \"delay\", void 0);\n__decorate([\n property({ type: Boolean })\n], BusyIndicator.prototype, \"_isBusy\", void 0);\nBusyIndicator = BusyIndicator_1 = __decorate([\n customElement({\n tag: \"ui5-busy-indicator\",\n languageAware: true,\n styles: busyIndicatorCss,\n renderer: litRender,\n template: BusyIndicatorTemplate,\n dependencies: [Label],\n })\n], BusyIndicator);\nBusyIndicator.define();\nexport default BusyIndicator;\n//# sourceMappingURL=BusyIndicator.js.map","/* eslint no-unused-vars: 0 */\nimport { html, classMap, styleMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html `${this.busy ? block8.call(this, context, tags, suffix) : undefined}
`; }\nfunction block1(context, tags, suffix) { return html ``; }\nfunction block2(context, tags, suffix) { return html ``; }\nfunction block3(context, tags, suffix) { return html ``; }\nfunction block4(context, tags, suffix) { return html `${ifDefined(this.noDataText)}
`; }\nfunction block5(context, tags, suffix) { return html `${ifDefined(this._growingButtonText)}
`; }\nfunction block6(context, tags, suffix) { return html ``; }\nfunction block7(context, tags, suffix) { return html ``; }\nfunction block8(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-busy-indicator\", tags, suffix)} delay=\"${ifDefined(this.busyDelay)}\" active size=\"Medium\" class=\"ui5-list-busy-ind\" style=\"${styleMap(this.styles.busyInd)}\" data-sap-focus-ref>${scopeTag(\"ui5-busy-indicator\", tags, suffix)}>
` : html `
`; }\nexport default block0;\n//# sourceMappingURL=ListTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/List.css\", content: \".ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}[growing-button]{align-items:center;border-bottom:var(--_ui5-v1-20-0_load_more_border-bottom);border-top:1px solid var(--sapList_BorderColor);box-sizing:border-box;cursor:pointer;display:flex;outline:none;padding:var(--_ui5-v1-20-0_load_more_padding)}[growing-button-inner]{align-items:center;background-color:var(--sapList_Background);border:var(--_ui5-v1-20-0_load_more_border);border-radius:var(--_ui5-v1-20-0_load_more_border_radius);box-sizing:border-box;color:var(--sapButton_TextColor);display:flex;flex-direction:column;justify-content:center;min-height:var(--_ui5-v1-20-0_load_more_text_height);width:100%}[growing-button-inner]:focus{border-color:transparent;outline:var(--_ui5-v1-20-0_load_more_outline_width) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:-.125rem}[growing-button-inner]:hover{background-color:var(--sapList_Hover_Background)}[growing-button-inner]:active,[growing-button-inner][active]{background-color:var(--sapList_Active_Background);border-color:var(--sapList_Active_Background)}[growing-button-inner]:active>*,[growing-button-inner][active]>*{color:var(--sapList_Active_TextColor)}[growing-button-subtext],[growing-button-text]{box-sizing:border-box;font-family:\\\"72override\\\",var(--sapFontFamily);overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}[growing-button-text]{font-size:var(--_ui5-v1-20-0_load_more_text_font_size);font-weight:700;height:var(--_ui5-v1-20-0_load_more_text_height);padding:.875rem 1rem 0 1rem}[growing-button-subtext]{font-size:var(--sapFontSize);padding:var(--_ui5-v1-20-0_load_more_desc_padding)}:host(:not([hidden])){-webkit-tap-highlight-color:transparent;display:block;max-width:100%;width:100%}:host([indent]) .ui5-list-root{padding:2rem}:host([separators=None]) .ui5-list-nodata{border-bottom:0}:host([busy]){opacity:.72}:host([busy]) .ui5-list-busy-row{bottom:0;left:0;outline:none;position:absolute;right:0;top:0}:host([busy]) .ui5-list-busy-ind{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.ui5-list-root{box-sizing:border-box;height:100%;position:relative;width:100%}.ui5-list-scroll-container{height:100%;overflow:auto}.ui5-list-ul{list-style-type:none;margin:0;padding:0}.ui5-list-ul:focus{outline:none}.ui5-list-focusarea{position:fixed}.ui5-list-header{background-color:var(--sapGroup_TitleBackground);border-bottom:1px solid var(--sapGroup_TitleBorderColor);box-sizing:border-box;color:var(--sapGroup_TitleTextColor);font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--sapFontHeader4Size);height:3rem;line-height:3rem;overflow:hidden;padding:0 1rem;text-overflow:ellipsis;white-space:nowrap}.ui5-list-footer{-webkit-text-size-adjust:none;background-color:var(--sapList_FooterBackground);box-sizing:border-box;color:var(--ui5-v1-20-0_list_footer_text_color);font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--sapFontSize);height:2rem;line-height:2rem;overflow:hidden;padding:0 1rem;text-overflow:ellipsis;white-space:nowrap}.ui5-list-nodata{-webkit-box-align:center;-webkit-box-pack:center;align-items:center;background-color:var(--sapList_Background);border-bottom:1px solid var(--sapList_BorderColor);color:var(--sapTextColor);display:-webkit-box;display:flex;font-family:\\\"72override\\\",var(--sapFontFamily);font-size:var(--_ui5-v1-20-0_list_no_data_font_size);height:var(--_ui5-v1-20-0_list_no_data_height);justify-content:center;list-style-type:none;padding:0 1rem!important}.ui5-list-nodata-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\" };\nexport default styleData;\n//# sourceMappingURL=List.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar List_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport { isTabNext, isSpace, isEnter, isTabPrevious, } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport getNormalizedTarget from \"@ui5/webcomponents-base/dist/util/getNormalizedTarget.js\";\nimport getEffectiveScrollbarStyle from \"@ui5/webcomponents-base/dist/util/getEffectiveScrollbarStyle.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport debounce from \"@ui5/webcomponents-base/dist/util/debounce.js\";\nimport isElementInView from \"@ui5/webcomponents-base/dist/util/isElementInView.js\";\nimport ListMode from \"./types/ListMode.js\";\nimport ListGrowingMode from \"./types/ListGrowingMode.js\";\nimport ListSeparators from \"./types/ListSeparators.js\";\nimport BusyIndicator from \"./BusyIndicator.js\";\n// Template\nimport ListTemplate from \"./generated/templates/ListTemplate.lit.js\";\n// Styles\nimport listCss from \"./generated/themes/List.css.js\";\nimport browserScrollbarCSS from \"./generated/themes/BrowserScrollbar.css.js\";\n// Texts\nimport { LOAD_MORE_TEXT, ARIA_LABEL_LIST_SELECTABLE, ARIA_LABEL_LIST_MULTISELECTABLE, ARIA_LABEL_LIST_DELETABLE, } from \"./generated/i18n/i18n-defaults.js\";\nconst INFINITE_SCROLL_DEBOUNCE_RATE = 250; // ms\nconst PAGE_UP_DOWN_SIZE = 10;\n/**\n * @class\n *\n * \n *\n * The ui5-list
component allows displaying a list of items, advanced keyboard\n * handling support for navigating between items, and predefined modes to improve the development efficiency.\n *
\n * The ui5-list
is a container for the available list items:\n * \n * ui5-li
\n * ui5-li-custom
\n * ui5-li-groupheader
\n *
\n *
\n * To benefit from the built-in selection mechanism, you can use the available\n * selection modes, such as\n * SingleSelect
, MultiSelect
and Delete
.\n *
\n * Additionally, the ui5-list
provides header, footer, and customization for the list item separators.\n *\n *
\n * Keyboard Handling
\n *\n * Basic Navigation
\n * The ui5-list
provides advanced keyboard handling.\n * When a list is focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n *
\n *\n * \n * - [UP/DOWN] - Navigates up and down the items
\n * - [HOME] - Navigates to first item
\n * - [END] - Navigates to the last item
\n *
\n *\n * The user can use the following keyboard shortcuts to perform actions (such as select, delete),\n * when the mode
property is in use:\n * \n * - [SPACE] - Select an item (if
type
is 'Active') when mode
is selection \n * - [DELETE] - Delete an item if
mode
property is Delete
\n *
\n *\n * Fast Navigation
\n * This component provides a build in fast navigation group which can be used via F6 / Shift + F6
or Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up
.\n * In order to use this functionality, you need to import the following module:\n * import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"
\n *
\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/List.js\";
\n *
\n * import \"@ui5/webcomponents/dist/StandardListItem.js\";
(for ui5-li
)\n *
\n * import \"@ui5/webcomponents/dist/CustomListItem.js\";
(for ui5-li-custom
)\n *
\n * import \"@ui5/webcomponents/dist/GroupHeaderListItem.js\";
(for ui5-li-groupheader
)\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.List\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-list\n * @appenddocs sap.ui.webc.main.StandardListItem sap.ui.webc.main.CustomListItem sap.ui.webc.main.GroupHeaderListItem\n * @public\n */\nlet List = List_1 = class List extends UI5Element {\n static async onDefine() {\n List_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n constructor() {\n super();\n this._previouslyFocusedItem = null;\n // Indicates that the List is forwarding the focus before or after the internal ul.\n this._forwardingFocus = false;\n // Indicates that the List has already subscribed for resize.\n this.resizeListenerAttached = false;\n // Indicates if the IntersectionObserver started observing the List\n this.listEndObserved = false;\n this._itemNavigation = new ItemNavigation(this, {\n skipItemsSize: PAGE_UP_DOWN_SIZE,\n navigationMode: NavigationMode.Vertical,\n getItemsCallback: () => this.getEnabledItems(),\n });\n this._handleResize = this.checkListInViewport.bind(this);\n this._handleResize = this.checkListInViewport.bind(this);\n // Indicates the List bottom most part has been detected by the IntersectionObserver\n // for the first time.\n this.initialIntersection = true;\n }\n onExitDOM() {\n this.unobserveListEnd();\n this.resizeListenerAttached = false;\n ResizeHandler.deregister(this.getDomRef(), this._handleResize);\n }\n onBeforeRendering() {\n this.prepareListItems();\n }\n onAfterRendering() {\n if (this.growsOnScroll) {\n this.observeListEnd();\n }\n else if (this.listEndObserved) {\n this.unobserveListEnd();\n }\n if (this.grows) {\n this.checkListInViewport();\n this.attachForResize();\n }\n }\n attachForResize() {\n if (!this.resizeListenerAttached) {\n this.resizeListenerAttached = true;\n ResizeHandler.register(this.getDomRef(), this._handleResize);\n }\n }\n get shouldRenderH1() {\n return !this.header.length && this.headerText;\n }\n get headerID() {\n return `${this._id}-header`;\n }\n get modeLabelID() {\n return `${this._id}-modeLabel`;\n }\n get listEndDOM() {\n return this.shadowRoot.querySelector(\".ui5-list-end-marker\");\n }\n get hasData() {\n return this.getItems().length !== 0;\n }\n get showNoDataText() {\n return !this.hasData && this.noDataText;\n }\n get isDelete() {\n return this.mode === ListMode.Delete;\n }\n get isSingleSelect() {\n return [\n ListMode.SingleSelect,\n ListMode.SingleSelectBegin,\n ListMode.SingleSelectEnd,\n ListMode.SingleSelectAuto,\n ].includes(this.mode);\n }\n get isMultiSelect() {\n return this.mode === ListMode.MultiSelect;\n }\n get ariaLabelledBy() {\n if (this.accessibleNameRef || this.accessibleName) {\n return undefined;\n }\n const ids = [];\n if (this.isMultiSelect || this.isSingleSelect || this.isDelete) {\n ids.push(this.modeLabelID);\n }\n if (this.shouldRenderH1) {\n ids.push(this.headerID);\n }\n return ids.length ? ids.join(\" \") : undefined;\n }\n get ariaLabelTxt() {\n return getEffectiveAriaLabelText(this);\n }\n get ariaLabelModeText() {\n if (this.hasData) {\n if (this.isMultiSelect) {\n return List_1.i18nBundle.getText(ARIA_LABEL_LIST_MULTISELECTABLE);\n }\n if (this.isSingleSelect) {\n return List_1.i18nBundle.getText(ARIA_LABEL_LIST_SELECTABLE);\n }\n if (this.isDelete) {\n return List_1.i18nBundle.getText(ARIA_LABEL_LIST_DELETABLE);\n }\n }\n return \"\";\n }\n get grows() {\n return this.growing !== ListGrowingMode.None;\n }\n get growsOnScroll() {\n return this.growing === ListGrowingMode.Scroll;\n }\n get growsWithButton() {\n return this.growing === ListGrowingMode.Button;\n }\n get _growingButtonText() {\n return List_1.i18nBundle.getText(LOAD_MORE_TEXT);\n }\n get busyIndPosition() {\n if (!this.grows) {\n return \"absolute\";\n }\n return this._inViewport ? \"absolute\" : \"sticky\";\n }\n get styles() {\n return {\n busyInd: {\n position: this.busyIndPosition,\n },\n };\n }\n get classes() {\n return {\n root: {\n \"ui5-list-root\": true,\n \"ui5-content-native-scrollbars\": getEffectiveScrollbarStyle(),\n },\n };\n }\n prepareListItems() {\n const slottedItems = this.getItemsForProcessing();\n slottedItems.forEach((item, key) => {\n const isLastChild = key === slottedItems.length - 1;\n const showBottomBorder = this.separators === ListSeparators.All\n || (this.separators === ListSeparators.Inner && !isLastChild);\n if (item.hasConfigurableMode) {\n item._mode = this.mode;\n }\n item.hasBorder = showBottomBorder;\n });\n }\n async observeListEnd() {\n if (!this.listEndObserved) {\n await renderFinished();\n this.getIntersectionObserver().observe(this.listEndDOM);\n this.listEndObserved = true;\n }\n }\n unobserveListEnd() {\n if (this.growingIntersectionObserver) {\n this.growingIntersectionObserver.disconnect();\n this.growingIntersectionObserver = null;\n this.listEndObserved = false;\n }\n }\n onInteresection(entries) {\n if (this.initialIntersection) {\n this.initialIntersection = false;\n return;\n }\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n debounce(this.loadMore.bind(this), INFINITE_SCROLL_DEBOUNCE_RATE);\n }\n });\n }\n /*\n * ITEM SELECTION BASED ON THE CURRENT MODE\n */\n onSelectionRequested(e) {\n const previouslySelectedItems = this.getSelectedItems();\n let selectionChange = false;\n this._selectionRequested = true;\n if (this.mode !== ListMode.None && this[`handle${this.mode}`]) {\n selectionChange = this[`handle${this.mode}`](e.detail.item, !!e.detail.selected);\n }\n if (selectionChange) {\n const changePrevented = !this.fireEvent(\"selection-change\", {\n selectedItems: this.getSelectedItems(),\n previouslySelectedItems,\n selectionComponentPressed: e.detail.selectionComponentPressed,\n targetItem: e.detail.item,\n key: e.detail.key,\n }, true);\n if (changePrevented) {\n this._revertSelection(previouslySelectedItems);\n }\n }\n }\n handleSingleSelect(item) {\n if (item.selected) {\n return false;\n }\n this.deselectSelectedItems();\n item.selected = true;\n return true;\n }\n handleSingleSelectBegin(item) {\n return this.handleSingleSelect(item);\n }\n handleSingleSelectEnd(item) {\n return this.handleSingleSelect(item);\n }\n handleSingleSelectAuto(item) {\n return this.handleSingleSelect(item);\n }\n handleMultiSelect(item, selected) {\n item.selected = selected;\n return true;\n }\n handleDelete(item) {\n this.fireEvent(\"item-delete\", { item });\n return true;\n }\n deselectSelectedItems() {\n this.getSelectedItems().forEach(item => { item.selected = false; });\n }\n getSelectedItems() {\n return this.getItems().filter(item => item.selected);\n }\n getEnabledItems() {\n return this.getItems().filter(item => !item.disabled);\n }\n getItems() {\n return this.getSlottedNodes(\"items\");\n }\n getItemsForProcessing() {\n return this.getItems();\n }\n _revertSelection(previouslySelectedItems) {\n this.getItems().forEach((item) => {\n const oldSelection = previouslySelectedItems.indexOf(item) !== -1;\n const multiSelectCheckBox = item.shadowRoot.querySelector(\".ui5-li-multisel-cb\");\n const singleSelectRadioButton = item.shadowRoot.querySelector(\".ui5-li-singlesel-radiobtn\");\n item.selected = oldSelection;\n if (multiSelectCheckBox) {\n multiSelectCheckBox.checked = oldSelection;\n }\n else if (singleSelectRadioButton) {\n singleSelectRadioButton.checked = oldSelection;\n }\n });\n }\n _onkeydown(e) {\n if (isTabNext(e)) {\n this._handleTabNext(e);\n }\n }\n _onLoadMoreKeydown(e) {\n if (isSpace(e)) {\n e.preventDefault();\n this._loadMoreActive = true;\n }\n if (isEnter(e)) {\n this._onLoadMoreClick();\n this._loadMoreActive = true;\n }\n if (isTabNext(e)) {\n this.focusAfterElement();\n }\n if (isTabPrevious(e)) {\n if (this.getPreviouslyFocusedItem()) {\n this.focusPreviouslyFocusedItem();\n }\n else {\n this.focusFirstItem();\n }\n e.preventDefault();\n }\n }\n _onLoadMoreKeyup(e) {\n if (isSpace(e)) {\n this._onLoadMoreClick();\n }\n this._loadMoreActive = false;\n }\n _onLoadMoreMousedown() {\n this._loadMoreActive = true;\n }\n _onLoadMoreMouseup() {\n this._loadMoreActive = false;\n }\n _onLoadMoreClick() {\n this.loadMore();\n }\n checkListInViewport() {\n this._inViewport = isElementInView(this.getDomRef());\n }\n loadMore() {\n this.fireEvent(\"load-more\");\n }\n /*\n * KEYBOARD SUPPORT\n */\n _handleTabNext(e) {\n let lastTabbableEl;\n const target = getNormalizedTarget(e.target);\n if (!lastTabbableEl) {\n return;\n }\n if (lastTabbableEl === target) {\n if (this.getFirstItem(x => x.selected && !x.disabled)) {\n this.focusFirstSelectedItem();\n }\n else if (this.getPreviouslyFocusedItem()) {\n this.focusPreviouslyFocusedItem();\n }\n else {\n this.focusFirstItem();\n }\n e.stopImmediatePropagation();\n e.preventDefault();\n }\n }\n _onfocusin(e) {\n const target = getNormalizedTarget(e.target);\n // If the focusin event does not origin from one of the 'triggers' - ignore it.\n if (!this.isForwardElement(target)) {\n e.stopImmediatePropagation();\n return;\n }\n // The focus arrives in the List for the first time.\n // If there is selected item - focus it or focus the first item.\n if (!this.getPreviouslyFocusedItem()) {\n if (this.growsWithButton && this.isForwardAfterElement(target)) {\n this.focusGrowingButton();\n }\n else {\n this.focusFirstItem();\n }\n e.stopImmediatePropagation();\n return;\n }\n // The focus returns to the List,\n // focus the first selected item or the previously focused element.\n if (!this.getForwardingFocus()) {\n if (this.growsWithButton && this.isForwardAfterElement(target)) {\n this.focusGrowingButton();\n e.stopImmediatePropagation();\n return;\n }\n this.focusPreviouslyFocusedItem();\n e.stopImmediatePropagation();\n }\n this.setForwardingFocus(false);\n }\n isForwardElement(element) {\n const elementId = element.id;\n const beforeElement = this.getBeforeElement();\n if (this._id === elementId || (beforeElement && beforeElement.id === elementId)) {\n return true;\n }\n return this.isForwardAfterElement(element);\n }\n isForwardAfterElement(element) {\n const elementId = element.id;\n const afterElement = this.getAfterElement();\n return afterElement && afterElement.id === elementId;\n }\n onItemTabIndexChange(e) {\n const target = e.target;\n this._itemNavigation.setCurrentItem(target);\n }\n onItemFocused(e) {\n const target = e.target;\n e.stopPropagation();\n this._itemNavigation.setCurrentItem(target);\n this.fireEvent(\"item-focused\", { item: target });\n if (this.mode === ListMode.SingleSelectAuto) {\n const detail = {\n item: target,\n selectionComponentPressed: false,\n selected: true,\n key: e.detail.key,\n };\n this.onSelectionRequested({ detail });\n }\n }\n onItemPress(e) {\n const pressedItem = e.detail.item;\n if (!this.fireEvent(\"item-click\", { item: pressedItem }, true)) {\n return;\n }\n if (!this._selectionRequested && this.mode !== ListMode.Delete) {\n this._selectionRequested = true;\n const detail = {\n item: pressedItem,\n selectionComponentPressed: false,\n selected: !pressedItem.selected,\n key: e.detail.key,\n };\n this.onSelectionRequested({ detail });\n }\n this._selectionRequested = false;\n }\n // This is applicable to NotificationListItem\n onItemClose(e) {\n const target = e.target;\n const shouldFireItemClose = target?.hasAttribute(\"ui5-li-notification\") || target?.hasAttribute(\"ui5-li-notification-group\");\n if (shouldFireItemClose) {\n this.fireEvent(\"item-close\", { item: e.detail?.item });\n }\n }\n onItemToggle(e) {\n this.fireEvent(\"item-toggle\", { item: e.detail.item });\n }\n onForwardBefore(e) {\n this.setPreviouslyFocusedItem(e.target);\n this.focusBeforeElement();\n e.stopPropagation();\n }\n onForwardAfter(e) {\n this.setPreviouslyFocusedItem(e.target);\n if (!this.growsWithButton) {\n this.focusAfterElement();\n }\n else {\n this.focusGrowingButton();\n e.preventDefault();\n }\n e.stopPropagation();\n }\n focusBeforeElement() {\n this.setForwardingFocus(true);\n this.getBeforeElement().focus();\n }\n focusAfterElement() {\n this.setForwardingFocus(true);\n this.getAfterElement().focus();\n }\n focusGrowingButton() {\n const growingBtn = this.getGrowingButton();\n if (growingBtn) {\n growingBtn.focus();\n }\n }\n getGrowingButton() {\n return this.shadowRoot.querySelector(`[id=\"${this._id}-growing-btn\"]`);\n }\n /**\n * Focuses the first list item and sets its tabindex to \"0\" via the ItemNavigation\n * @protected\n */\n focusFirstItem() {\n // only enabled items are focusable\n const firstItem = this.getFirstItem(x => !x.disabled);\n if (firstItem) {\n firstItem.focus();\n }\n }\n focusPreviouslyFocusedItem() {\n const previouslyFocusedItem = this.getPreviouslyFocusedItem();\n if (previouslyFocusedItem) {\n previouslyFocusedItem.focus();\n }\n }\n focusFirstSelectedItem() {\n // only enabled items are focusable\n const firstSelectedItem = this.getFirstItem(x => x.selected && !x.disabled);\n if (firstSelectedItem) {\n firstSelectedItem.focus();\n }\n }\n /**\n * Focuses a list item and sets its tabindex to \"0\" via the ItemNavigation\n * @protected\n * @param item\n */\n focusItem(item) {\n this._itemNavigation.setCurrentItem(item);\n item.focus();\n }\n onFocusRequested(e) {\n setTimeout(() => {\n this.setPreviouslyFocusedItem(e.target);\n this.focusPreviouslyFocusedItem();\n }, 0);\n }\n setForwardingFocus(forwardingFocus) {\n this._forwardingFocus = forwardingFocus;\n }\n getForwardingFocus() {\n return this._forwardingFocus;\n }\n setPreviouslyFocusedItem(item) {\n this._previouslyFocusedItem = item;\n }\n getPreviouslyFocusedItem() {\n return this._previouslyFocusedItem;\n }\n getFirstItem(filter) {\n const slottedItems = this.getItems();\n let firstItem = null;\n if (!filter) {\n return slottedItems.length ? slottedItems[0] : null;\n }\n for (let i = 0; i < slottedItems.length; i++) {\n if (filter(slottedItems[i])) {\n firstItem = slottedItems[i];\n break;\n }\n }\n return firstItem;\n }\n getAfterElement() {\n if (!this._afterElement) {\n this._afterElement = this.shadowRoot.querySelector(`[id=\"${this._id}-after\"]`);\n }\n return this._afterElement;\n }\n getBeforeElement() {\n if (!this._beforeElement) {\n this._beforeElement = this.shadowRoot.querySelector(`[id=\"${this._id}-before\"]`);\n }\n return this._beforeElement;\n }\n getIntersectionObserver() {\n if (!this.growingIntersectionObserver) {\n this.growingIntersectionObserver = new IntersectionObserver(this.onInteresection.bind(this), {\n root: null,\n rootMargin: \"0px\",\n threshold: 1.0,\n });\n }\n return this.growingIntersectionObserver;\n }\n};\n__decorate([\n property()\n], List.prototype, \"headerText\", void 0);\n__decorate([\n property()\n], List.prototype, \"footerText\", void 0);\n__decorate([\n property({ type: Boolean })\n], List.prototype, \"indent\", void 0);\n__decorate([\n property({ type: ListMode, defaultValue: ListMode.None })\n], List.prototype, \"mode\", void 0);\n__decorate([\n property()\n], List.prototype, \"noDataText\", void 0);\n__decorate([\n property({ type: ListSeparators, defaultValue: ListSeparators.All })\n], List.prototype, \"separators\", void 0);\n__decorate([\n property({ type: ListGrowingMode, defaultValue: ListGrowingMode.None })\n], List.prototype, \"growing\", void 0);\n__decorate([\n property({ type: Boolean })\n], List.prototype, \"busy\", void 0);\n__decorate([\n property({ validator: Integer, defaultValue: 1000 })\n], List.prototype, \"busyDelay\", void 0);\n__decorate([\n property()\n], List.prototype, \"accessibleName\", void 0);\n__decorate([\n property({ defaultValue: \"\" })\n], List.prototype, \"accessibleNameRef\", void 0);\n__decorate([\n property({ defaultValue: \"list\" })\n], List.prototype, \"accessibleRole\", void 0);\n__decorate([\n property({ defaultValue: undefined, noAttribute: true })\n], List.prototype, \"accessibleRoleDescription\", void 0);\n__decorate([\n property({ type: Boolean })\n], List.prototype, \"_inViewport\", void 0);\n__decorate([\n property({ type: Boolean })\n], List.prototype, \"_loadMoreActive\", void 0);\n__decorate([\n slot({ type: HTMLElement, \"default\": true })\n], List.prototype, \"items\", void 0);\n__decorate([\n slot()\n], List.prototype, \"header\", void 0);\nList = List_1 = __decorate([\n customElement({\n tag: \"ui5-list\",\n fastNavigation: true,\n renderer: litRender,\n template: ListTemplate,\n styles: [browserScrollbarCSS, listCss],\n dependencies: [BusyIndicator],\n })\n /**\n * Fired when an item is activated, unless the item's type
property\n * is set to Inactive
.\n *\n * @event sap.ui.webc.main.List#item-click\n * @allowPreventDefault\n * @param {HTMLElement} item The clicked item.\n * @public\n */\n ,\n event(\"item-click\", {\n detail: {\n item: { type: HTMLElement },\n },\n })\n /**\n * Fired when the Close
button of any item is clicked\n *
\n * Note: This event is only applicable to list items that can be closed (such as notification list items),\n * not to be confused with item-delete
.\n *\n * @event sap.ui.webc.main.List#item-close\n * @param {HTMLElement} item the item about to be closed.\n * @public\n * @since 1.0.0-rc.8\n */\n ,\n event(\"item-close\", {\n detail: {\n item: { type: HTMLElement },\n },\n })\n /**\n * Fired when the Toggle
button of any item is clicked.\n *
\n * Note: This event is only applicable to list items that can be toggled (such as notification group list items).\n *\n * @event sap.ui.webc.main.List#item-toggle\n * @param {HTMLElement} item the toggled item.\n * @public\n * @since 1.0.0-rc.8\n */\n ,\n event(\"item-toggle\", {\n detail: {\n item: { type: HTMLElement },\n },\n })\n /**\n * Fired when the Delete button of any item is pressed.\n *
\n * Note: A Delete button is displayed on each item,\n * when the component mode
property is set to Delete
.\n *\n * @event sap.ui.webc.main.List#item-delete\n * @param {HTMLElement} item the deleted item.\n * @public\n */\n ,\n event(\"item-delete\", {\n detail: {\n item: { type: HTMLElement },\n },\n })\n /**\n * Fired when selection is changed by user interaction\n * in SingleSelect
, SingleSelectBegin
, SingleSelectEnd
and MultiSelect
modes.\n *\n * @event sap.ui.webc.main.List#selection-change\n * @allowPreventDefault\n * @param {Array} selectedItems An array of the selected items.\n * @param {Array} previouslySelectedItems An array of the previously selected items.\n * @public\n */\n ,\n event(\"selection-change\", {\n detail: {\n selectedItems: { type: Array },\n previouslySelectedItems: { type: Array },\n targetItem: { type: HTMLElement },\n selectionComponentPressed: { type: Boolean }, // protected, indicates if the user used the selection components to change the selection\n },\n })\n /**\n * Fired when the user scrolls to the bottom of the list.\n *
\n * Note: The event is fired when the growing='Scroll'
property is enabled.\n *\n * @event sap.ui.webc.main.List#load-more\n * @public\n * @since 1.0.0-rc.6\n */\n ,\n event(\"load-more\")\n /**\n * @private\n */\n ,\n event(\"item-focused\", {\n detail: {\n item: { type: HTMLElement },\n },\n })\n], List);\nList.define();\nexport default List;\n//# sourceMappingURL=List.js.map","const markedEvents = new WeakMap();\n/**\n * Marks the given event with random marker.\n */\nconst markEvent = (event, value) => {\n markedEvents.set(event, value);\n};\n/**\n * Returns the marker for the given event.\n */\nconst getEventMark = (event) => {\n return markedEvents.get(event);\n};\nexport { markEvent, getEventMark, };\n//# sourceMappingURL=MarkedEvents.js.map","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"edit\";\nconst pathData = \"M475 104q5 7 5 12 0 6-5 11L150 453q-4 4-8 4L32 480l22-110q0-5 4-9L384 36q4-4 11-4t11 4zm-121 99l-46-45L84 381l46 46zm87-88l-46-44-64 64 45 45z\";\nconst ltr = false;\nconst accData = null;\nconst collection = \"SAP-icons-v4\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v4/edit\";\nexport { pathData, ltr, accData };","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"edit\";\nconst pathData = \"M505 94q7 7 7 18t-6 17L130 505q-7 7-18 7H26q-11 0-18.5-7.5T0 486v-86q1-10 6-16L382 7q7-7 18-7t18 7zm-55 18l-50-50-50 50 50 50zm-86 86l-50-50L62 400l50 50z\";\nconst ltr = false;\nconst accData = null;\nconst collection = \"SAP-icons-v5\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v5/edit\";\nexport { pathData, ltr, accData };","import { isLegacyThemeFamily } from \"@ui5/webcomponents-base/dist/config/Theme.js\";\nimport { pathData as pathDatav4, ltr, accData } from \"./v4/edit.js\";\nimport { pathData as pathDatav5 } from \"./v5/edit.js\";\n\nconst pathData = isLegacyThemeFamily() ? pathDatav4 : pathDatav5;\n\nexport default \"edit\";\nexport { pathData, ltr, accData };","/**\n * Different list item types.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ListItemType\n */\nvar ListItemType;\n(function (ListItemType) {\n /**\n * Indicates the list item does not have any active feedback when item is pressed.\n * @public\n * @type {Inactive}\n */\n ListItemType[\"Inactive\"] = \"Inactive\";\n /**\n * Indicates that the item is clickable via active feedback when item is pressed.\n * @public\n * @type {Active}\n */\n ListItemType[\"Active\"] = \"Active\";\n /**\n * Enables detail button of the list item that fires detail-click event.\n * @public\n * @type {Detail}\n */\n ListItemType[\"Detail\"] = \"Detail\";\n /**\n * Enables the type of navigation, which is specified to add an arrow at the end of the items and fires navigate-click event.\n * @public\n * @type {Navigation}\n */\n ListItemType[\"Navigation\"] = \"Navigation\";\n})(ListItemType || (ListItemType = {}));\nexport default ListItemType;\n//# sourceMappingURL=ListItemType.js.map","import isElementHidden from \"./isElementHidden.js\";\n/**\n * Returns if the HTMLElement is tabbable.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { boolean } true if the element is tabbable or false - if not\n */\nconst isElementTabbable = (el) => {\n if (!el) {\n return false;\n }\n const nodeName = el.nodeName.toLowerCase();\n if (el.hasAttribute(\"data-sap-no-tab-ref\")) {\n return false;\n }\n if (isElementHidden(el)) {\n return false;\n }\n const tabIndex = el.getAttribute(\"tabindex\");\n if (tabIndex !== null && tabIndex !== undefined) {\n return parseInt(tabIndex) >= 0;\n }\n if (nodeName === \"a\" || /input|select|textarea|button|object/.test(nodeName)) {\n return !el.disabled;\n }\n return false;\n};\nexport default isElementTabbable;\n//# sourceMappingURL=isElementTabbable.js.map","import isElementTabbable from \"./isElementTabbable.js\";\n/**\n * Returns the tabbable elements within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { Array } the tabbable elements\n */\nconst getTabbableElements = (el) => {\n return getTabbables([...el.children]);\n};\n/**\n * Returns the last tabbable element within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { HTMLElement | null } the last tabbable element or \"null\" if not found\n */\nconst getLastTabbableElement = (el) => {\n const tabbables = getTabbables([...el.children]);\n return tabbables.length ? tabbables[tabbables.length - 1] : null;\n};\nconst getTabbables = (nodes, tabbables) => {\n const tabbableElements = tabbables || [];\n if (!nodes) {\n return tabbableElements;\n }\n nodes.forEach(currentNode => {\n if (currentNode.nodeType === Node.TEXT_NODE || currentNode.nodeType === Node.COMMENT_NODE) {\n return;\n }\n let currentElement = currentNode;\n if (currentElement.hasAttribute(\"data-sap-no-tab-ref\")) {\n return;\n }\n if (currentElement.shadowRoot) {\n // get the root node of the ShadowDom (1st none style tag)\n const children = currentElement.shadowRoot.children;\n currentElement = Array.from(children).find(node => node.tagName !== \"STYLE\");\n }\n if (!currentElement) {\n return;\n }\n if (isElementTabbable(currentElement)) {\n tabbableElements.push(currentElement);\n }\n if (currentElement.tagName === \"SLOT\") {\n getTabbables(currentElement.assignedNodes(), tabbableElements);\n }\n else {\n getTabbables([...currentElement.children], tabbableElements);\n }\n });\n return tabbableElements;\n};\nexport { getTabbableElements, getLastTabbableElement, };\n//# sourceMappingURL=TabbableElements.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/ListItemBase.css\", content: \":host(:not([hidden])){display:block}:host{background:var(--ui5-v1-20-0-listitem-background-color);border-bottom:1px solid transparent;box-sizing:border-box;height:var(--_ui5-v1-20-0_list_item_base_height)}:host([selected]){background:var(--sapList_SelectionBackgroundColor)}:host([has-border]){border-bottom:var(--ui5-v1-20-0-listitem-border-bottom)}:host([selected]){border-bottom:var(--ui5-v1-20-0-listitem-selected-border-bottom)}:host(:not([focused])[selected][has-border]){border-bottom:var(--ui5-v1-20-0-listitem-selected-border-bottom)}:host([focused][selected]){border-bottom:var(--ui5-v1-20-0-listitem-focused-selected-border-bottom)}.ui5-li-root{align-items:center;box-sizing:border-box;display:flex;height:100%;padding:0 1rem;position:relative;width:100%}:host([focused]) .ui5-li-root.ui5-li--focusable{outline:none}:host([focused]) .ui5-li-root.ui5-li--focusable:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:0;content:\\\"\\\";inset:.125rem;pointer-events:none;position:absolute}:host([focused]) .ui5-li-content:focus:after{border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);bottom:0;content:\\\"\\\";left:0;pointer-events:none;position:absolute;right:0;top:0}:host([active][focused]) .ui5-li-root.ui5-li--focusable:after{border-color:var(--ui5-v1-20-0-listitem-active-border-color)}:host([disabled]){opacity:var(--_ui5-v1-20-0-listitembase_disabled_opacity);pointer-events:none}.ui5-li-content{color:var(--sapList_TextColor);font-family:\\\"72override\\\",var(--sapFontFamily);max-width:100%}\" };\nexport default styleData;\n//# sourceMappingURL=ListItemBase.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport { getTabbableElements } from \"@ui5/webcomponents-base/dist/util/TabbableElements.js\";\nimport { isTabNext, isTabPrevious } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n// Styles\nimport styles from \"./generated/themes/ListItemBase.css.js\";\n/**\n * @class\n * A class to serve as a foundation\n * for the ListItem
and GroupHeaderListItem
classes.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.ListItemBase\n * @extends sap.ui.webc.base.UI5Element\n * @public\n */\nlet ListItemBase = class ListItemBase extends UI5Element {\n _onfocusin(e) {\n this.fireEvent(\"_request-tabindex-change\", e);\n if (e.target !== this.getFocusDomRef()) {\n return;\n }\n this.focused = true;\n this.fireEvent(\"_focused\", e);\n }\n _onfocusout() {\n this.focused = false;\n }\n _onkeydown(e) {\n if (isTabNext(e)) {\n return this._handleTabNext(e);\n }\n if (isTabPrevious(e)) {\n return this._handleTabPrevious(e);\n }\n }\n _onkeyup(e) { } // eslint-disable-line\n _handleTabNext(e) {\n if (this.shouldForwardTabAfter()) {\n if (!this.fireEvent(\"_forward-after\", {}, true)) {\n e.preventDefault();\n }\n }\n }\n _handleTabPrevious(e) {\n const target = e.target;\n if (this.shouldForwardTabBefore(target)) {\n this.fireEvent(\"_forward-before\");\n }\n }\n /*\n * Determines if th current list item either has no tabbable content or\n * [TAB] is performed onto the last tabbale content item.\n */\n shouldForwardTabAfter() {\n const aContent = getTabbableElements(this.getFocusDomRef());\n return aContent.length === 0 || (aContent[aContent.length - 1] === getActiveElement());\n }\n /*\n * Determines if the current list item is target of [SHIFT+TAB].\n */\n shouldForwardTabBefore(target) {\n return this.getFocusDomRef() === target;\n }\n get classes() {\n return {\n main: {\n \"ui5-li-root\": true,\n \"ui5-li--focusable\": !this.disabled,\n },\n };\n }\n get _ariaDisabled() {\n return this.disabled ? true : undefined;\n }\n get hasConfigurableMode() {\n return false;\n }\n get _effectiveTabIndex() {\n if (this.disabled) {\n return -1;\n }\n if (this.selected) {\n return 0;\n }\n return this._tabIndex;\n }\n};\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"selected\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"hasBorder\", void 0);\n__decorate([\n property({ defaultValue: \"-1\", noAttribute: true })\n], ListItemBase.prototype, \"_tabIndex\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItemBase.prototype, \"focused\", void 0);\nListItemBase = __decorate([\n customElement({\n renderer: litRender,\n styles,\n }),\n event(\"_request-tabindex-change\"),\n event(\"_focused\"),\n event(\"_forward-after\"),\n event(\"_forward-before\")\n], ListItemBase);\nexport default ListItemBase;\n//# sourceMappingURL=ListItemBase.js.map","class RadioButtonGroup {\n static hasGroup(groupName) {\n return this.groups.has(groupName);\n }\n static getGroup(groupName) {\n return this.groups.get(groupName);\n }\n static getCheckedRadioFromGroup(groupName) {\n return this.checkedRadios.get(groupName);\n }\n static removeGroup(groupName) {\n this.checkedRadios.delete(groupName);\n return this.groups.delete(groupName);\n }\n static addToGroup(radioBtn, groupName) {\n if (this.hasGroup(groupName)) {\n this.enforceSingleSelection(radioBtn, groupName);\n if (this.getGroup(groupName)) {\n this.getGroup(groupName).push(radioBtn);\n }\n }\n else {\n this.createGroup(radioBtn, groupName);\n }\n this.updateTabOrder(groupName);\n }\n static removeFromGroup(radioBtn, groupName) {\n const group = this.getGroup(groupName);\n if (!group) {\n return;\n }\n const checkedRadio = this.getCheckedRadioFromGroup(groupName);\n // Remove the radio button from the given group\n group.forEach((_radioBtn, idx, arr) => {\n if (radioBtn._id === _radioBtn._id) {\n return arr.splice(idx, 1);\n }\n });\n if (checkedRadio === radioBtn) {\n this.checkedRadios.set(groupName, null);\n }\n // Remove the group if it is empty\n if (!group.length) {\n this.removeGroup(groupName);\n }\n this.updateTabOrder(groupName);\n }\n static createGroup(radioBtn, groupName) {\n if (radioBtn.checked) {\n this.checkedRadios.set(groupName, radioBtn);\n }\n this.groups.set(groupName, [radioBtn]);\n }\n static selectNextItem(item, groupName) {\n const group = this.getGroup(groupName);\n if (!group) {\n return;\n }\n const groupLength = group.length, currentItemPosition = group.indexOf(item);\n if (groupLength <= 1) {\n return;\n }\n const nextItemToSelect = this._nextSelectable(currentItemPosition, group);\n if (!nextItemToSelect) {\n return;\n }\n this.updateSelectionInGroup(nextItemToSelect, groupName);\n }\n static updateFormValidity(groupName) {\n const group = this.getGroup(groupName);\n if (!group) {\n return;\n }\n group.forEach(r => r._resetFormValidity());\n const groupRequiresValue = group.some(r => r.required) && group.every(r => !r.checked);\n if (groupRequiresValue) {\n group[0]._invalidateForm();\n }\n }\n static updateTabOrder(groupName) {\n const group = this.getGroup(groupName);\n if (!group) {\n return;\n }\n const hasCheckedRadio = group.some(radioBtn => radioBtn.checked);\n group.filter(radioBtn => !radioBtn.disabled).forEach((radioBtn, idx) => {\n if (hasCheckedRadio) {\n radioBtn._tabIndex = radioBtn.checked ? \"0\" : \"-1\";\n }\n else {\n radioBtn._tabIndex = idx === 0 ? \"0\" : \"-1\";\n }\n });\n }\n static selectPreviousItem(item, groupName) {\n const group = this.getGroup(groupName);\n if (!group) {\n return;\n }\n const groupLength = group.length, currentItemPosition = group.indexOf(item);\n if (groupLength <= 1) {\n return;\n }\n const previousItemToSelect = this._previousSelectable(currentItemPosition, group);\n if (!previousItemToSelect) {\n return;\n }\n this.updateSelectionInGroup(previousItemToSelect, groupName);\n }\n static selectItem(item, groupName) {\n this.updateSelectionInGroup(item, groupName);\n this.updateTabOrder(groupName);\n }\n static updateSelectionInGroup(radioBtnToSelect, groupName) {\n const checkedRadio = this.getCheckedRadioFromGroup(groupName);\n if (checkedRadio) {\n this._deselectRadio(checkedRadio);\n }\n this._selectRadio(radioBtnToSelect);\n this.checkedRadios.set(groupName, radioBtnToSelect);\n }\n static _deselectRadio(radioBtn) {\n if (radioBtn) {\n radioBtn.checked = false;\n }\n }\n static _selectRadio(radioBtn) {\n if (radioBtn) {\n radioBtn.focus();\n radioBtn.checked = true;\n radioBtn._checked = true;\n radioBtn.fireEvent(\"change\");\n }\n }\n static _nextSelectable(pos, group) {\n if (!group) {\n return null;\n }\n const groupLength = group.length;\n let nextRadioToSelect = null;\n if (pos === groupLength - 1) {\n if (group[0].disabled || group[0].readonly) {\n return this._nextSelectable(1, group);\n }\n nextRadioToSelect = group[0];\n }\n else if (group[pos + 1].disabled || group[pos + 1].readonly) {\n return this._nextSelectable(pos + 1, group);\n }\n else {\n nextRadioToSelect = group[pos + 1];\n }\n return nextRadioToSelect;\n }\n static _previousSelectable(pos, group) {\n const groupLength = group.length;\n let previousRadioToSelect = null;\n if (pos === 0) {\n if (group[groupLength - 1].disabled || group[groupLength - 1].readonly) {\n return this._previousSelectable(groupLength - 1, group);\n }\n previousRadioToSelect = group[groupLength - 1];\n }\n else if (group[pos - 1].disabled || group[pos - 1].readonly) {\n return this._previousSelectable(pos - 1, group);\n }\n else {\n previousRadioToSelect = group[pos - 1];\n }\n return previousRadioToSelect;\n }\n static enforceSingleSelection(radioBtn, groupName) {\n const checkedRadio = this.getCheckedRadioFromGroup(groupName);\n if (radioBtn.checked) {\n if (!checkedRadio) {\n this.checkedRadios.set(groupName, radioBtn);\n }\n else if (radioBtn !== checkedRadio) {\n this._deselectRadio(checkedRadio);\n this.checkedRadios.set(groupName, radioBtn);\n }\n }\n else if (radioBtn === checkedRadio) {\n this.checkedRadios.set(groupName, null);\n }\n this.updateTabOrder(groupName);\n this.updateFormValidity(groupName);\n }\n static get groups() {\n if (!this._groups) {\n this._groups = new Map();\n }\n return this._groups;\n }\n static get checkedRadios() {\n if (!this._checkedRadios) {\n this._checkedRadios = new Map();\n }\n return this._checkedRadios;\n }\n}\nexport default RadioButtonGroup;\n//# sourceMappingURL=RadioButtonGroup.js.map","/* eslint no-unused-vars: 0 */\nimport { html, svg, classMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html ``; }\nfunction block1(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-label\", tags, suffix)} id=\"${ifDefined(this._id)}-label\" class=\"ui5-radio-label\" for=\"${ifDefined(this._id)}\" wrapping-type=\"${ifDefined(this.wrappingType)}\">${ifDefined(this.text)}${scopeTag(\"ui5-label\", tags, suffix)}>` : html `${ifDefined(this.text)}`; }\nfunction block2(context, tags, suffix) { return html `${ifDefined(this.valueStateText)}`; }\nfunction blockSVG1(context, tags, suffix) {\n return svg ``;\n}\n;\nexport default block0;\n//# sourceMappingURL=RadioButtonTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/RadioButton.css\", content: \".ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}:host(:not([hidden])){display:inline-block}:host{border-radius:var(--_ui5-v1-20-0_radio_button_border_radius);color:var(--_ui5-v1-20-0_radio_button_color);max-width:100%;min-width:var(--_ui5-v1-20-0_radio_button_min_width);overflow:hidden;text-overflow:ellipsis}:host(:not([disabled])) .ui5-radio-root{cursor:pointer}:host([checked]){color:var(--_ui5-v1-20-0_radio_button_checked_fill)}:host([checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v1-20-0_radio_button_inner_ring_color)}:host([checked]) .ui5-radio-svg-outer{stroke:var(--_ui5-v1-20-0_radio_button_outer_ring_color)}:host([disabled]) .ui5-radio-root{color:var(--_ui5-v1-20-0_radio_button_color);opacity:var(--sapContent_DisabledOpacity)}:host([disabled][checked]) .ui5-radio-svg-outer{stroke:var(--_ui5-v1-20-0_radio_button_color)}:host(:not([disabled])) .ui5-radio-root:focus:before{border:var(--_ui5-v1-20-0_radio_button_border_width) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);border-radius:var(--_ui5-v1-20-0_radio_button_border_radius);content:\\\"\\\";display:var(--_ui5-v1-20-0_radio_button_focus_outline);inset:var(--_ui5-v1-20-0_radio_button_focus_dist);pointer-events:none;position:absolute}:host(:not([disabled])) .ui5-radio-root:focus{border:var(--_ui5-v1-20-0_radio_button_focus_border);border-radius:var(--_ui5-v1-20-0_radio_button_border_radius)}:host(:not([value-state=Error]):not([value-state=Warning]):not([value-state=Success]):not([value-state=Information])) .ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer{stroke:var(--_ui5-v1-20-0_radio_button_outer_ring_hover_color)}:host(:not([value-state=Error]):not([value-state=Warning]):not([value-state=Success]):not([value-state=Information])[checked]) .ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer{stroke:var(--_ui5-v1-20-0_radio_button_outer_ring_checked_hover_color)}.ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer,:host([checked]) .ui5-radio-root:hover .ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v1-20-0_radio_button_hover_fill)}:host([active][checked]:not([value-state]):not([disabled]):not([readonly])) .ui5-radio-svg-outer{stroke:var(--_ui5-v1-20-0_radio_button_outer_ring_checked_hover_color)}:host([active]:not([checked]):not([value-state]):not([disabled]):not([readonly])) .ui5-radio-svg-outer{stroke:var(--_ui5-v1-20-0_radio_button_outer_ring_active_color)}:host([text]) .ui5-radio-root{padding-inline-end:var(--_ui5-v1-20-0_radio_button_border_width)}:host([text]) .ui5-radio-root:focus:before{inset-inline-end:0}:host([text]) .ui5-radio-inner{padding:var(--_ui5-v1-20-0_radio_button_outer_ring_padding_with_label)}:host([checked][readonly]) .ui5-radio-svg-inner{fill:var(--_ui5-v1-20-0_radio_button_read_only_inner_ring_color)}:host([readonly]) .ui5-radio-root .ui5-radio-svg-outer{fill:var(--sapField_ReadOnly_Background);stroke:var(--sapField_ReadOnly_BorderColor);stroke-dasharray:var(--_ui5-v1-20-0_radio_button_read_only_border_type);stroke-width:var(--_ui5-v1-20-0_radio_button_read_only_border_width)}:host([value-state=Error]) .ui5-radio-svg-outer,:host([value-state=Warning]) .ui5-radio-svg-outer{stroke-width:var(--sapField_InvalidBorderWidth)}:host([value-state=Information]) .ui5-radio-svg-outer{stroke-width:var(--_ui5-v1-20-0_radio_button_information_border_width)}:host([value-state=Error][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v1-20-0_radio_button_checked_error_fill)}:host([value-state=Error]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer,:host([value-state=Error]) .ui5-radio-svg-outer{stroke:var(--sapField_InvalidColor);fill:var(--sapField_InvalidBackground)}:host([value-state=Error]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v1-20-0_radio_button_hover_fill_error)}:host([value-state=Warning][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v1-20-0_radio_button_checked_warning_fill)}:host([value-state=Warning]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer,:host([value-state=Warning]) .ui5-radio-svg-outer{stroke:var(--sapField_WarningColor);fill:var(--sapField_WarningBackground)}:host([value-state=Warning]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v1-20-0_radio_button_hover_fill_warning)}:host([value-state=Success][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v1-20-0_radio_button_checked_success_fill)}:host([value-state=Success]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer,:host([value-state=Success]) .ui5-radio-svg-outer{stroke:var(--sapField_SuccessColor);fill:var(--sapField_SuccessBackground)}:host([value-state=Success]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v1-20-0_radio_button_hover_fill_success)}:host([value-state=Information][checked]) .ui5-radio-svg-inner{fill:var(--_ui5-v1-20-0_radio_button_checked_information_fill)}:host([value-state=Information]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable:hover .ui5-radio-svg-outer,:host([value-state=Information]) .ui5-radio-svg-outer{stroke:var(--sapField_InformationColor);fill:var(--sapField_InformationBackground)}:host([value-state=Information]) .ui5-radio-root:hover .ui5-radio-inner.ui5-radio-inner--hoverable .ui5-radio-svg-outer{fill:var(--_ui5-v1-20-0_radio_button_hover_fill_information)}:host([value-state=Error]) .ui5-radio-root,:host([value-state=Information]) .ui5-radio-root,:host([value-state=Warning]) .ui5-radio-root{stroke-dasharray:var(--_ui5-v1-20-0_radio_button_warning_error_border_dash)}.ui5-radio-root{border:var(--_ui5-v1-20-0_radio_button_border);border-radius:var(--_ui5-v1-20-0_radio_button_border_radius);box-sizing:border-box;display:inline-flex;flex-wrap:nowrap;height:var(--_ui5-v1-20-0_radio_button_height);max-width:100%;outline:none;position:relative}.ui5-radio-inner{align-items:center;display:flex;flex-shrink:0;font-size:1rem;height:var(--_ui5-v1-20-0_radio_button_inner_size);padding:var(--_ui5-v1-20-0_radio_button_outer_ring_padding);pointer-events:none;vertical-align:top}.ui5-radio-inner{outline:none}.ui5-radio-inner input{-webkit-appearance:none;font-size:inherit;left:0;margin:0;position:absolute;visibility:hidden;width:0}[ui5-label].ui5-radio-label{align-items:center;color:var(--_ui5-v1-20-0_radio_button_label_color);display:flex;max-width:100%;overflow:hidden;padding-inline-end:var(--_ui5-v1-20-0_radio_button_label_offset);pointer-events:none;text-overflow:ellipsis;vertical-align:top}:host([wrapping-type=Normal][text]) .ui5-radio-root{height:auto}:host([wrapping-type=Normal][text]) [ui5-label].ui5-radio-label{overflow-wrap:break-word;padding:var(--_ui5-v1-20-0_radio_button_label_side_padding) 0}.ui5-radio-svg{height:var(--_ui5-v1-20-0_radio_button_svg_size);overflow:visible;pointer-events:none;width:var(--_ui5-v1-20-0_radio_button_svg_size)}.ui5-radio-svg-outer{fill:var(--_ui5-v1-20-0_radio_button_outer_ring_bg);stroke:currentColor;stroke-width:var(--_ui5-v1-20-0_radio_button_outer_ring_width)}.ui5-radio-svg-inner{fill:none;r:var(--_ui5-v1-20-0_radio_button_inner_ring_radius)}.ui5-radio-svg-inner,.ui5-radio-svg-outer{flex-shrink:0}:host(.ui5-li-singlesel-radiobtn) .ui5-radio-root .ui5-radio-inner .ui5-radio-svg-outer{fill:var(--sapList_Background)}\" };\nexport default styleData;\n//# sourceMappingURL=RadioButton.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar RadioButton_1;\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter, isDown, isLeft, isUp, isRight, } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport Label from \"./Label.js\";\nimport RadioButtonGroup from \"./RadioButtonGroup.js\";\nimport WrappingType from \"./types/WrappingType.js\";\n// Template\nimport RadioButtonTemplate from \"./generated/templates/RadioButtonTemplate.lit.js\";\n// i18n\nimport { VALUE_STATE_ERROR, VALUE_STATE_WARNING, VALUE_STATE_SUCCESS, VALUE_STATE_INFORMATION, RADIO_BUTTON_GROUP_REQUIRED, } from \"./generated/i18n/i18n-defaults.js\";\n// Styles\nimport radioButtonCss from \"./generated/themes/RadioButton.css.js\";\nlet isGlobalHandlerAttached = false;\nlet activeRadio;\n/**\n * @class\n *\n * \n *\n * The ui5-radio-button
component enables users to select a single option from a set of options.\n * When a ui5-radio-button
is selected by the user, the\n * change
event is fired.\n * When a ui5-radio-button
that is within a group is selected, the one\n * that was previously selected gets automatically deselected. You can group radio buttons by using the name
property.\n *
\n * Note: If ui5-radio-button
is not part of a group, it can be selected once, but can not be deselected back.\n *\n * Keyboard Handling
\n *\n * Once the ui5-radio-button
is on focus, it might be selected by pressing the Space and Enter keys.\n *
\n * The Arrow Down/Arrow Up and Arrow Left/Arrow Right keys can be used to change selection between next/previous radio buttons in one group,\n * while TAB and SHIFT + TAB can be used to enter or leave the radio button group.\n *
\n * Note: On entering radio button group, the focus goes to the currently selected radio button.\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/RadioButton\";
\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.RadioButton\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-radio-button\n * @public\n */\nlet RadioButton = RadioButton_1 = class RadioButton extends UI5Element {\n static get formAssociated() {\n return true;\n }\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._deactivate = () => {\n if (activeRadio) {\n activeRadio.active = false;\n }\n };\n if (!isGlobalHandlerAttached) {\n document.addEventListener(\"mouseup\", this._deactivate);\n isGlobalHandlerAttached = true;\n }\n }\n static async onDefine() {\n RadioButton_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n onBeforeRendering() {\n this.syncGroup();\n this._enableFormSupport();\n }\n onExitDOM() {\n this.syncGroup(true);\n }\n syncGroup(forceRemove) {\n const oldGroup = this._name;\n const currentGroup = this.name;\n const oldChecked = this._checked;\n const currentChecked = this.checked;\n if (forceRemove) {\n RadioButtonGroup.removeFromGroup(this, oldGroup);\n }\n if (currentGroup !== oldGroup) {\n if (oldGroup) {\n // remove the control from the previous group\n RadioButtonGroup.removeFromGroup(this, oldGroup);\n }\n if (currentGroup) {\n // add the control to the existing group\n RadioButtonGroup.addToGroup(this, currentGroup);\n }\n }\n else if (currentGroup) {\n RadioButtonGroup.enforceSingleSelection(this, currentGroup);\n }\n if (this.name && currentChecked !== oldChecked) {\n RadioButtonGroup.updateTabOrder(this.name);\n }\n this._name = this.name;\n this._checked = this.checked;\n }\n _enableFormSupport() {\n const formSupport = getFeature(\"FormSupport\");\n if (formSupport) {\n this._setFormValue();\n }\n else if (this.value) {\n console.warn(`In order for the \"value\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n }\n }\n _setFormValue() {\n this._internals.setFormValue(this.checked ? this.value : null);\n }\n _resetFormValidity() {\n this._internals.setValidity({});\n }\n _invalidateForm() {\n this._internals.setValidity({ valueMissing: true }, this.radioButtonGroupRequiredText, this.shadowRoot.firstElementChild);\n }\n _onclick() {\n return this.toggle();\n }\n _handleDown(e) {\n const currentGroup = this.name;\n if (!currentGroup) {\n return;\n }\n e.preventDefault();\n RadioButtonGroup.selectNextItem(this, currentGroup);\n }\n _handleUp(e) {\n const currentGroup = this.name;\n if (!currentGroup) {\n return;\n }\n e.preventDefault();\n RadioButtonGroup.selectPreviousItem(this, currentGroup);\n }\n _onkeydown(e) {\n if (isSpace(e)) {\n this.active = true;\n return e.preventDefault();\n }\n if (isEnter(e)) {\n this.active = true;\n return this.toggle();\n }\n const isRTL = this.effectiveDir === \"rtl\";\n if (isDown(e) || (!isRTL && isRight(e)) || (isRTL && isLeft(e))) {\n this._handleDown(e);\n }\n if (isUp(e) || (!isRTL && isLeft(e)) || (isRTL && isRight(e))) {\n this._handleUp(e);\n }\n }\n _onkeyup(e) {\n if (isSpace(e)) {\n this.toggle();\n }\n this.active = false;\n }\n _onmousedown() {\n this.active = true;\n activeRadio = this; // eslint-disable-line\n }\n _onmouseup() {\n this.active = false;\n }\n _onfocusout() {\n this.active = false;\n }\n toggle() {\n if (!this.canToggle()) {\n return this;\n }\n if (!this.name) {\n this.checked = !this.checked;\n this.fireEvent(\"change\");\n return this;\n }\n RadioButtonGroup.selectItem(this, this.name);\n return this;\n }\n canToggle() {\n return !(this.disabled || this.readonly || this.checked);\n }\n get classes() {\n return {\n inner: {\n \"ui5-radio-inner--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n },\n };\n }\n get effectiveAriaDisabled() {\n return this.disabled ? \"true\" : null;\n }\n get ariaLabelText() {\n return [getEffectiveAriaLabelText(this), this.text].filter(Boolean).join(\" \");\n }\n get effectiveAriaDescribedBy() {\n return this.hasValueState ? `${this._id}-descr` : undefined;\n }\n get hasValueState() {\n return this.valueState !== ValueState.None;\n }\n get valueStateText() {\n switch (this.valueState) {\n case ValueState.Error:\n return RadioButton_1.i18nBundle.getText(VALUE_STATE_ERROR);\n case ValueState.Warning:\n return RadioButton_1.i18nBundle.getText(VALUE_STATE_WARNING);\n case ValueState.Success:\n return RadioButton_1.i18nBundle.getText(VALUE_STATE_SUCCESS);\n case ValueState.Information:\n return RadioButton_1.i18nBundle.getText(VALUE_STATE_INFORMATION);\n default:\n return \"\";\n }\n }\n get radioButtonGroupRequiredText() {\n return RadioButton_1.i18nBundle.getText(RADIO_BUTTON_GROUP_REQUIRED);\n }\n get effectiveTabIndex() {\n const tabindex = this.getAttribute(\"tabindex\");\n if (this.disabled) {\n return \"-1\";\n }\n if (this.name) {\n return this._tabIndex;\n }\n return tabindex || \"0\";\n }\n get strokeWidth() {\n return this.valueState === \"None\" ? \"1\" : \"2\";\n }\n};\n__decorate([\n property({ type: Boolean })\n], RadioButton.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], RadioButton.prototype, \"readonly\", void 0);\n__decorate([\n property({ type: Boolean })\n], RadioButton.prototype, \"required\", void 0);\n__decorate([\n property({ type: Boolean })\n], RadioButton.prototype, \"checked\", void 0);\n__decorate([\n property()\n], RadioButton.prototype, \"text\", void 0);\n__decorate([\n property({ type: ValueState, defaultValue: ValueState.None })\n], RadioButton.prototype, \"valueState\", void 0);\n__decorate([\n property()\n], RadioButton.prototype, \"name\", void 0);\n__decorate([\n property()\n], RadioButton.prototype, \"value\", void 0);\n__decorate([\n property({ type: WrappingType, defaultValue: WrappingType.None })\n], RadioButton.prototype, \"wrappingType\", void 0);\n__decorate([\n property()\n], RadioButton.prototype, \"accessibleName\", void 0);\n__decorate([\n property()\n], RadioButton.prototype, \"accessibleNameRef\", void 0);\n__decorate([\n property({ defaultValue: \"-1\", noAttribute: true })\n], RadioButton.prototype, \"_tabIndex\", void 0);\n__decorate([\n property({ type: Boolean })\n], RadioButton.prototype, \"active\", void 0);\n__decorate([\n slot()\n], RadioButton.prototype, \"formSupport\", void 0);\nRadioButton = RadioButton_1 = __decorate([\n customElement({\n tag: \"ui5-radio-button\",\n languageAware: true,\n renderer: litRender,\n template: RadioButtonTemplate,\n styles: radioButtonCss,\n dependencies: [Label],\n })\n /**\n * Fired when the component checked state changes.\n *\n * @event sap.ui.webc.main.RadioButton#change\n * @public\n * @since 1.0.0-rc.15\n */\n ,\n event(\"change\")\n], RadioButton);\nRadioButton.define();\nexport default RadioButton;\n//# sourceMappingURL=RadioButton.js.map","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"accept\";\nconst pathData = \"M455.8 94q9 9 3 19l-222 326q-4 8-12 9t-14-5l-151-167q-5-5-4.5-11t5.5-11l25-25q12-12 23 0l96 96q5 5 13 4.5t12-8.5l175-249q4-7 11.5-8t13.5 4z\";\nconst ltr = true;\nconst accData = null;\nconst collection = \"SAP-icons-v4\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v4/accept\";\nexport { pathData, ltr, accData };","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"accept\";\nconst pathData = \"M187 416q-12 0-20-9L71 299q-7-7-7-17 0-11 7.5-18.5T90 256q12 0 19 9l77 87 217-247q8-9 19-9t18.5 7.5T448 122q0 10-6 16L206 407q-7 9-19 9z\";\nconst ltr = true;\nconst accData = null;\nconst collection = \"SAP-icons-v5\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v5/accept\";\nexport { pathData, ltr, accData };","import { isLegacyThemeFamily } from \"@ui5/webcomponents-base/dist/config/Theme.js\";\nimport { pathData as pathDatav4, ltr, accData } from \"./v4/accept.js\";\nimport { pathData as pathDatav5 } from \"./v5/accept.js\";\n\nconst pathData = isLegacyThemeFamily() ? pathDatav4 : pathDatav5;\n\nexport default \"accept\";\nexport { pathData, ltr, accData };","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/CheckBox.css\", content: \".ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}:host{-webkit-tap-highlight-color:rgba(0,0,0,0)}:host(:not([hidden])){display:inline-block}:host{border-radius:var(--_ui5-v1-20-0_checkbox_border_radius);cursor:pointer;max-width:100%;outline:none;overflow:hidden;transition:var(--_ui5-v1-20-0_checkbox_transition);user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}:host([disabled]){cursor:default}:host([disabled]) .ui5-checkbox-root{opacity:var(--_ui5-v1-20-0_checkbox_disabled_opacity)}:host([disabled]) .ui5-checkbox-inner{border-color:var(--_ui5-v1-20-0_checkbox_inner_disabled_border_color)}:host([disabled]) .ui5-checkbox-label{color:var(--_ui5-v1-20-0_checkbox_disabled_label_color)}:host([readonly]:not([value-state=Warning]):not([value-state=Error])) .ui5-checkbox-inner{background:var(--sapField_ReadOnly_Background);border:var(--_ui5-v1-20-0_checkbox_inner_readonly_border);color:var(--sapField_TextColor)}:host([wrapping-type=Normal][text]) .ui5-checkbox-root{align-items:flex-start;box-sizing:border-box;min-height:auto;padding-bottom:var(--_ui5-v1-20-0_checkbox_root_side_padding);padding-top:var(--_ui5-v1-20-0_checkbox_root_side_padding)}:host([wrapping-type=Normal][text]) .ui5-checkbox-root .ui5-checkbox-inner,:host([wrapping-type=Normal][text]) .ui5-checkbox-root .ui5-checkbox-label{margin-top:var(--_ui5-v1-20-0_checkbox_wrapped_content_margin_top)}:host([wrapping-type=Normal][text]) .ui5-checkbox-root .ui5-checkbox-label{align-self:center;overflow-wrap:break-word}:host([wrapping-type=Normal]) .ui5-checkbox-root:focus:before{bottom:var(--_ui5-v1-20-0_checkbox_wrapped_focus_left_top_bottom_position)}:host([value-state=Error]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host([value-state=Error]) .ui5-checkbox-inner{background:var(--sapField_InvalidBackground);border:var(--_ui5-v1-20-0_checkbox_inner_error_border);color:var(--sapField_InvalidColor)}:host([value-state=Error]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_inner_error_background_hover)}:host([value-state=Warning]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host([value-state=Warning]) .ui5-checkbox-inner{background:var(--sapField_WarningBackground);border:var(--_ui5-v1-20-0_checkbox_inner_warning_border);color:var(--_ui5-v1-20-0_checkbox_inner_warning_color)}:host([value-state=Warning]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_inner_warning_background_hover)}:host([value-state=Information]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host([value-state=Information]) .ui5-checkbox-inner{background:var(--sapField_InformationBackground);border:var(--_ui5-v1-20-0_checkbox_inner_information_border);color:var(--_ui5-v1-20-0_checkbox_inner_information_color)}:host([value-state=Information]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_inner_information_background_hover)}:host([value-state=Success]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host([value-state=Success]) .ui5-checkbox-inner{background:var(--sapField_SuccessBackground);border:var(--_ui5-v1-20-0_checkbox_inner_success_border);color:var(--sapField_SuccessColor)}:host([value-state=Success]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_inner_success_background_hover)}:host([value-state=Warning]) .ui5-checkbox-icon,:host([value-state=Warning][indeterminate]) .ui5-checkbox-inner:after{color:var(--_ui5-v1-20-0_checkbox_checkmark_warning_color)}:host([text]) .ui5-checkbox-root{padding-inline-end:var(--_ui5-v1-20-0_checkbox_right_focus_distance)}:host([text]) .ui5-checkbox-root:focus:before{inset-inline-end:0}.ui5-checkbox-root{align-items:center;border:var(--_ui5-v1-20-0_checkbox_default_focus_border);border-radius:var(--_ui5-v1-20-0_checkbox_border_radius);box-sizing:border-box;display:inline-flex;min-height:var(--_ui5-v1-20-0_checkbox_width_height);min-width:var(--_ui5-v1-20-0_checkbox_width_height);outline:none;padding:0 var(--_ui5-v1-20-0_checkbox_wrapper_padding);position:relative;transition:var(--_ui5-v1-20-0_checkbox_transition);width:100%}.ui5-checkbox-root:focus:before{border:var(--_ui5-v1-20-0_checkbox_focus_outline);border-radius:var(--_ui5-v1-20-0_checkbox_focus_border_radius);content:\\\"\\\";display:var(--_ui5-v1-20-0_checkbox_focus_outline_display);inset-block:var(--_ui5-v1-20-0_checkbox_focus_position);inset-inline:var(--_ui5-v1-20-0_checkbox_focus_position);position:absolute}:host .ui5-checkbox-root:focus{border:var(--_ui5-v1-20-0_checkbox_focus_border);border-radius:.5rem}:host(:hover:not([disabled])){background:var(--_ui5-v1-20-0_checkbox_outer_hover_background)}.ui5-checkbox--hoverable .ui5-checkbox-label:hover{color:var(--_ui5-v1-20-0_checkbox_label_color)}:host(:not([active]):not([checked]):not([value-state])) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host(:not([active]):not([checked])[value-state=None]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_hover_background);border-color:var(--_ui5-v1-20-0_checkbox_inner_hover_border_color)}:host(:not([active])[checked]:not([value-state])) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner,:host(:not([active])[checked][value-state=None]) .ui5-checkbox--hoverable:hover .ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_hover_background);border-color:var(--_ui5-v1-20-0_checkbox_inner_hover_checked_border_color)}:host([checked]:not([value-state])) .ui5-checkbox-inner,:host([checked][value-state=None]) .ui5-checkbox-inner{border-color:var(--_ui5-v1-20-0_checkbox_inner_selected_border_color)}:host([active]:not([checked]):not([value-state]):not([disabled])) .ui5-checkbox-inner,:host([active]:not([checked])[value-state=None]:not([disabled])) .ui5-checkbox-inner{background-color:var(--_ui5-v1-20-0_checkbox_active_background);border-color:var(--_ui5-v1-20-0_checkbox_inner_active_border_color)}:host([active][checked]:not([value-state]):not([disabled])) .ui5-checkbox-inner,:host([active][checked][value-state=None]:not([disabled])) .ui5-checkbox-inner{background-color:var(--_ui5-v1-20-0_checkbox_active_background);border-color:var(--_ui5-v1-20-0_checkbox_inner_selected_border_color)}.ui5-checkbox-inner{background:var(--_ui5-v1-20-0_checkbox_inner_background);border:var(--_ui5-v1-20-0_checkbox_inner_border);border-radius:var(--_ui5-v1-20-0_checkbox_inner_border_radius);box-sizing:border-box;color:var(--_ui5-v1-20-0_checkbox_checkmark_color);cursor:inherit;height:var(--_ui5-v1-20-0_checkbox_inner_width_height);max-height:var(--_ui5-v1-20-0_checkbox_inner_width_height);max-width:var(--_ui5-v1-20-0_checkbox_inner_width_height);min-width:var(--_ui5-v1-20-0_checkbox_inner_width_height);position:relative}:host([indeterminate][checked]) .ui5-checkbox-inner:after{background-color:currentColor;content:\\\"\\\";height:var(--_ui5-v1-20-0_checkbox_partially_icon_size);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_ui5-v1-20-0_checkbox_partially_icon_size)}.ui5-checkbox-inner input{-webkit-appearance:none;font-size:inherit;left:0;position:absolute;visibility:hidden;width:0}.ui5-checkbox-root .ui5-checkbox-label{color:var(--_ui5-v1-20-0_checkbox_label_color);cursor:inherit;margin-inline-start:var(--_ui5-v1-20-0_checkbox_label_offset);overflow:hidden;pointer-events:none;text-overflow:ellipsis}.ui5-checkbox-icon{color:currentColor;cursor:inherit;height:var(--_ui5-v1-20-0_checkbox_icon_size);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:var(--_ui5-v1-20-0_checkbox_icon_size)}\" };\nexport default styleData;\n//# sourceMappingURL=CheckBox.css.js.map","/* eslint no-unused-vars: 0 */\nimport { html, classMap, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html ``; }\nfunction block1(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} aria-hidden=\"true\" name=\"accept\" class=\"ui5-checkbox-icon\">${scopeTag(\"ui5-icon\", tags, suffix)}>` : html ``; }\nfunction block2(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-label\", tags, suffix)} id=\"${ifDefined(this._id)}-label\" class=\"ui5-checkbox-label\" wrapping-type=\"${ifDefined(this.wrappingType)}\">${ifDefined(this.text)}${scopeTag(\"ui5-label\", tags, suffix)}>` : html `${ifDefined(this.text)}`; }\nfunction block3(context, tags, suffix) { return html `${ifDefined(this.valueStateText)}`; }\nexport default block0;\n//# sourceMappingURL=CheckBoxTemplate.lit.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar CheckBox_1;\nimport { isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport \"@ui5/webcomponents-icons/dist/accept.js\";\nimport Icon from \"./Icon.js\";\nimport Label from \"./Label.js\";\nimport WrappingType from \"./types/WrappingType.js\";\nimport { VALUE_STATE_ERROR, VALUE_STATE_WARNING, VALUE_STATE_SUCCESS, } from \"./generated/i18n/i18n-defaults.js\";\n// Styles\nimport checkboxCss from \"./generated/themes/CheckBox.css.js\";\n// Template\nimport CheckBoxTemplate from \"./generated/templates/CheckBoxTemplate.lit.js\";\nlet isGlobalHandlerAttached = false;\nlet activeCb;\n/**\n * @class\n *\n * \n *\n * Allows the user to set a binary value, such as true/false or yes/no for an item.\n *
\n * The ui5-checkbox
component consists of a box and a label that describes its purpose.\n * If it's checked, an indicator is displayed inside the box.\n * To check/uncheck the ui5-checkbox
, the user has to click or tap the square\n * box or its label.\n *
\n * The ui5-checkbox
component only has 2 states - checked and unchecked.\n * Clicking or tapping toggles the ui5-checkbox
between checked and unchecked state.\n *\n * Usage
\n *\n * You can define the checkbox text with via the text
property. If the text exceeds the available width, it is truncated by default.\n * In case you prefer text to wrap, set the wrappingType
property to \"Normal\".\n * The touchable area for toggling the ui5-checkbox
ends where the text ends.\n *
\n * You can disable the ui5-checkbox
by setting the disabled
property to\n * true
,\n * or use the ui5-checkbox
in read-only mode by setting the readonly
\n * property to true
.\n *\n *
\n * CSS Shadow Parts
\n *\n * CSS Shadow Parts allow developers to style elements inside the Shadow DOM.\n *
\n * The ui5-checkbox
exposes the following CSS Shadow Parts:\n * \n * - root - Used to style the outermost wrapper of the
ui5-checkbox
\n *
\n *\n *
\n * Keyboard Handling
\n *\n * The user can use the following keyboard shortcuts to toggle the checked state of the ui5-checkbox
.\n * \n * - [SPACE, ENTER] - Toggles between different states: checked, not checked.
\n *
\n *
\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/CheckBox\";
\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.CheckBox\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-checkbox\n * @public\n */\nlet CheckBox = CheckBox_1 = class CheckBox extends UI5Element {\n constructor() {\n super();\n this._deactivate = () => {\n if (activeCb) {\n activeCb.active = false;\n }\n };\n if (!isGlobalHandlerAttached) {\n document.addEventListener(\"mouseup\", this._deactivate);\n isGlobalHandlerAttached = true;\n }\n }\n onBeforeRendering() {\n this._enableFormSupport();\n }\n _enableFormSupport() {\n const formSupport = getFeature(\"FormSupport\");\n if (formSupport) {\n formSupport.syncNativeHiddenInput(this, (element, nativeInput) => {\n nativeInput.disabled = !!element.disabled;\n nativeInput.checked = !!element.checked;\n nativeInput.value = element.checked ? \"on\" : \"\";\n });\n }\n else if (this.name) {\n console.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n }\n }\n _onclick() {\n this.toggle();\n }\n _onmousedown() {\n if (this.readonly || this.disabled) {\n return;\n }\n this.active = true;\n activeCb = this; // eslint-disable-line\n }\n _onmouseup() {\n this.active = false;\n }\n _onfocusout() {\n this.active = false;\n }\n _onkeydown(e) {\n if (isSpace(e)) {\n e.preventDefault();\n this.active = true;\n }\n if (isEnter(e)) {\n this.toggle();\n this.active = true;\n }\n }\n _onkeyup(e) {\n if (isSpace(e)) {\n this.toggle();\n }\n this.active = false;\n }\n toggle() {\n if (this.canToggle()) {\n const lastState = {\n checked: this.checked,\n indeterminate: this.indeterminate,\n };\n if (this.indeterminate) {\n this.indeterminate = false;\n this.checked = true;\n }\n else {\n this.checked = !this.checked;\n }\n const changePrevented = !this.fireEvent(\"change\", null, true);\n // Angular two way data binding\n const valueChagnePrevented = !this.fireEvent(\"value-changed\", null, true);\n if (changePrevented || valueChagnePrevented) {\n this.checked = lastState.checked;\n this.indeterminate = lastState.indeterminate;\n }\n }\n return this;\n }\n canToggle() {\n return !(this.disabled || this.readonly);\n }\n valueStateTextMappings() {\n return {\n \"Error\": CheckBox_1.i18nBundle.getText(VALUE_STATE_ERROR),\n \"Warning\": CheckBox_1.i18nBundle.getText(VALUE_STATE_WARNING),\n \"Success\": CheckBox_1.i18nBundle.getText(VALUE_STATE_SUCCESS),\n };\n }\n get ariaLabelText() {\n return getEffectiveAriaLabelText(this);\n }\n get classes() {\n return {\n main: {\n \"ui5-checkbox--hoverable\": !this.disabled && !this.readonly && isDesktop(),\n },\n };\n }\n get ariaReadonly() {\n return this.readonly ? \"true\" : undefined;\n }\n get effectiveAriaDisabled() {\n return this.disabled ? \"true\" : undefined;\n }\n get effectiveAriaChecked() {\n return this.indeterminate && this.checked ? \"mixed\" : this.checked;\n }\n get ariaLabelledBy() {\n if (!this.ariaLabelText) {\n return this.text ? `${this._id}-label` : undefined;\n }\n return undefined;\n }\n get ariaDescribedBy() {\n return this.hasValueState ? `${this._id}-descr` : undefined;\n }\n get hasValueState() {\n return this.valueState !== ValueState.None;\n }\n get valueStateText() {\n if (this.valueState !== ValueState.None && this.valueState !== ValueState.Information) {\n return this.valueStateTextMappings()[this.valueState];\n }\n }\n get effectiveTabIndex() {\n const tabindex = this.getAttribute(\"tabindex\");\n return this.disabled ? undefined : tabindex || \"0\";\n }\n get isCompletelyChecked() {\n return this.checked && !this.indeterminate;\n }\n static async onDefine() {\n CheckBox_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n};\n__decorate([\n property()\n], CheckBox.prototype, \"accessibleNameRef\", void 0);\n__decorate([\n property()\n], CheckBox.prototype, \"accessibleName\", void 0);\n__decorate([\n property({ type: Boolean })\n], CheckBox.prototype, \"disabled\", void 0);\n__decorate([\n property({ type: Boolean })\n], CheckBox.prototype, \"readonly\", void 0);\n__decorate([\n property({ type: Boolean })\n], CheckBox.prototype, \"required\", void 0);\n__decorate([\n property({ type: Boolean })\n], CheckBox.prototype, \"indeterminate\", void 0);\n__decorate([\n property({ type: Boolean })\n], CheckBox.prototype, \"checked\", void 0);\n__decorate([\n property()\n], CheckBox.prototype, \"text\", void 0);\n__decorate([\n property({ type: ValueState, defaultValue: ValueState.None })\n], CheckBox.prototype, \"valueState\", void 0);\n__decorate([\n property({ type: WrappingType, defaultValue: WrappingType.None })\n], CheckBox.prototype, \"wrappingType\", void 0);\n__decorate([\n property()\n], CheckBox.prototype, \"name\", void 0);\n__decorate([\n property({ type: Boolean })\n], CheckBox.prototype, \"active\", void 0);\n__decorate([\n slot()\n], CheckBox.prototype, \"formSupport\", void 0);\nCheckBox = CheckBox_1 = __decorate([\n customElement({\n tag: \"ui5-checkbox\",\n languageAware: true,\n renderer: litRender,\n template: CheckBoxTemplate,\n styles: checkboxCss,\n dependencies: [\n Label,\n Icon,\n ],\n })\n /**\n * Fired when the component checked state changes.\n *\n * @public\n * @event sap.ui.webc.main.CheckBox#change\n */\n ,\n event(\"change\")\n], CheckBox);\nCheckBox.define();\nexport default CheckBox;\n//# sourceMappingURL=CheckBox.js.map","const willShowContent = (childNodes) => {\n return Array.from(childNodes).filter(node => {\n return node.nodeType !== Node.COMMENT_NODE && (node.nodeType !== Node.TEXT_NODE || (node.nodeValue || \"\").trim().length !== 0);\n }).length > 0;\n};\nexport default willShowContent;\n//# sourceMappingURL=willShowContent.js.map","/**\n * Different Button designs.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ButtonDesign\n */\nvar ButtonDesign;\n(function (ButtonDesign) {\n /**\n * default type (no special styling)\n * @public\n * @type {Default}\n */\n ButtonDesign[\"Default\"] = \"Default\";\n /**\n * accept type (green button)\n * @public\n * @type {Positive}\n */\n ButtonDesign[\"Positive\"] = \"Positive\";\n /**\n * reject style (red button)\n * @public\n * @type {Negative}\n */\n ButtonDesign[\"Negative\"] = \"Negative\";\n /**\n * transparent type\n * @public\n * @type {Transparent}\n */\n ButtonDesign[\"Transparent\"] = \"Transparent\";\n /**\n * emphasized type\n * @public\n * @type {Emphasized}\n */\n ButtonDesign[\"Emphasized\"] = \"Emphasized\";\n /**\n * attention type\n * @public\n * @type {Attention}\n */\n ButtonDesign[\"Attention\"] = \"Attention\";\n})(ButtonDesign || (ButtonDesign = {}));\nexport default ButtonDesign;\n//# sourceMappingURL=ButtonDesign.js.map","/**\n * Determines if the button has special form-related functionality.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.ButtonType\n */\nvar ButtonType;\n(function (ButtonType) {\n /**\n * The button does not do anything special when inside a form\n * @public\n * @type {Button}\n */\n ButtonType[\"Button\"] = \"Button\";\n /**\n * The button acts as a submit button (submits a form)\n * @public\n * @type {Submit}\n */\n ButtonType[\"Submit\"] = \"Submit\";\n /**\n * The button acts as a reset button (resets a form)\n * @public\n * @type {Reset}\n */\n ButtonType[\"Reset\"] = \"Reset\";\n})(ButtonType || (ButtonType = {}));\nexport default ButtonType;\n//# sourceMappingURL=ButtonType.js.map","/* eslint no-unused-vars: 0 */\nimport { html, ifDefined, scopeTag } from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nfunction block0(context, tags, suffix) { return html ` `; }\nfunction block1(context, tags, suffix) { return suffix ? html `<${scopeTag(\"ui5-icon\", tags, suffix)} class=\"ui5-button-icon\" name=\"${ifDefined(this.icon)}\" accessible-role=\"${ifDefined(this.iconRole)}\" part=\"icon\" ?show-tooltip=${this.showIconTooltip}>${scopeTag(\"ui5-icon\", tags, suffix)}>` : html ``; }\nfunction block2(context, tags, suffix) { return html `${ifDefined(this.buttonTypeText)}`; }\nexport default block0;\n//# sourceMappingURL=ButtonTemplate.lit.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/Button.css\", content: \":host{vertical-align:middle}.ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}:host(:not([hidden])){display:inline-block}:host{background-color:var(--sapButton_Background);border:var(--sapButton_BorderWidth) solid var(--sapButton_BorderColor);border-radius:var(--_ui5-v1-20-0_button_border_radius);box-sizing:border-box;color:var(--sapButton_TextColor);cursor:pointer;font-family:var(--_ui5-v1-20-0_button_fontFamily);font-size:var(--sapFontSize);height:var(--_ui5-v1-20-0_button_base_height);line-height:normal;min-width:var(--_ui5-v1-20-0_button_base_min_width);overflow:hidden;text-overflow:ellipsis;text-shadow:var(--_ui5-v1-20-0_button_text_shadow);white-space:nowrap}.ui5-button-root{align-items:center;background:transparent;border:none;box-sizing:border-box;color:inherit;cursor:inherit;display:flex;font:inherit;height:100%;justify-content:center;letter-spacing:inherit;line-height:inherit;min-width:inherit;outline:none;overflow:inherit;padding:0 var(--_ui5-v1-20-0_button_base_padding);position:relative;text-overflow:inherit;text-shadow:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:inherit;width:100%;word-spacing:inherit}:host(:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]):hover),:host(:not([hidden]):not([disabled]).ui5_hovered){background:var(--sapButton_Hover_Background);border:1px solid var(--sapButton_Hover_BorderColor);color:var(--sapButton_Hover_TextColor)}.ui5-button-icon{color:inherit;flex-shrink:0}:host([icon-end]) .ui5-button-root{flex-direction:row-reverse}:host([icon-end]) .ui5-button-icon{margin-inline-start:var(--_ui5-v1-20-0_button_base_icon_margin)}:host([icon-only]) .ui5-button-root{min-width:auto;padding:0}:host([icon-only]) .ui5-button-text{display:none}.ui5-button-text{outline:none;overflow:inherit;position:relative;text-overflow:inherit;white-space:inherit}:host([has-icon]:not([icon-end])) .ui5-button-text{margin-inline-start:var(--_ui5-v1-20-0_button_base_icon_margin)}:host([has-icon][icon-end]) .ui5-button-text{margin-inline-start:0}:host([disabled]){cursor:default;opacity:var(--sapContent_DisabledOpacity);pointer-events:unset}:host([has-icon]:not([icon-only])) .ui5-button-text{min-width:calc(var(--_ui5-v1-20-0_button_base_min_width) - var(--_ui5-v1-20-0_button_base_icon_margin) - 1rem)}:host([disabled]:active){pointer-events:none}:host([focused]) .ui5-button-root:after{border:var(--_ui5-v1-20-0_button_focused_border);border-radius:var(--_ui5-v1-20-0_button_focused_border_radius);bottom:.0625rem;box-sizing:border-box;content:\\\"\\\";left:.0625rem;position:absolute;right:.0625rem;top:.0625rem}:host([design=Emphasized][focused]) .ui5-button-root:before{border:var(--_ui5-v1-20-0_button_emphasized_focused_border_before);border-radius:var(--_ui5-v1-20-0_button_focused_border_radius);bottom:.0625rem;box-sizing:border-box;content:\\\"\\\";left:.0625rem;position:absolute;right:.0625rem;top:.0625rem}.ui5-button-root::-moz-focus-inner{border:0}bdi{display:block;overflow:inherit;text-overflow:inherit;white-space:inherit}:host([ui5-button][active]:not([disabled]):not([non-interactive])){background-color:var(--sapButton_Active_Background);background-image:none;border-color:var(--sapButton_Active_BorderColor);color:var(--sapButton_Active_TextColor)}:host([design=Positive]){background-color:var(--sapButton_Accept_Background);border-color:var(--sapButton_Accept_BorderColor);color:var(--sapButton_Accept_TextColor)}:host([design=Positive]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]).ui5_hovered),:host([design=Positive]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]):hover){background-color:var(--sapButton_Accept_Hover_Background);border-color:var(--sapButton_Accept_Hover_BorderColor);color:var(--sapButton_Accept_Hover_TextColor)}:host([ui5-button][design=Positive][active]:not([non-interactive])){background-color:var(--sapButton_Accept_Active_Background);border-color:var(--sapButton_Accept_Active_BorderColor);color:var(--sapButton_Accept_Active_TextColor)}:host([design=Negative]){background-color:var(--sapButton_Reject_Background);border-color:var(--sapButton_Reject_BorderColor);color:var(--sapButton_Reject_TextColor)}:host([design=Negative]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]).ui5_hovered),:host([design=Negative]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]):hover){background-color:var(--sapButton_Reject_Hover_Background);border-color:var(--sapButton_Reject_Hover_BorderColor);color:var(--sapButton_Reject_Hover_TextColor)}:host([ui5-button][design=Negative][active]:not([non-interactive])){background-color:var(--sapButton_Reject_Active_Background);border-color:var(--sapButton_Reject_Active_BorderColor);color:var(--sapButton_Reject_Active_TextColor)}:host([design=Attention]){background-color:var(--sapButton_Attention_Background);border-color:var(--sapButton_Attention_BorderColor);color:var(--sapButton_Attention_TextColor)}:host([design=Attention]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]).ui5_hovered),:host([design=Attention]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]):hover){background-color:var(--sapButton_Attention_Hover_Background);border-color:var(--sapButton_Attention_Hover_BorderColor);color:var(--sapButton_Attention_Hover_TextColor)}:host([ui5-button][design=Attention][active]:not([non-interactive])){background-color:var(--sapButton_Attention_Active_Background);border-color:var(--sapButton_Attention_Active_BorderColor);color:var(--sapButton_Attention_Active_TextColor)}:host([design=Emphasized]){background-color:var(--sapButton_Emphasized_Background);border-color:var(--sapButton_Emphasized_BorderColor);border-width:var(--_ui5-v1-20-0_button_emphasized_border_width);color:var(--sapButton_Emphasized_TextColor);font-weight:var(--sapButton_Emphasized_FontWeight)}:host([design=Emphasized]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]).ui5_hovered),:host([design=Emphasized]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]):hover){background-color:var(--sapButton_Emphasized_Hover_Background);border-color:var(--sapButton_Emphasized_Hover_BorderColor);border-width:var(--_ui5-v1-20-0_button_emphasized_border_width);color:var(--sapButton_Emphasized_Hover_TextColor)}:host([ui5-button][design=Empasized][active]:not([non-interactive])){background-color:var(--sapButton_Emphasized_Active_Background);border-color:var(--sapButton_Emphasized_Active_BorderColor);color:var(--sapButton_Emphasized_Active_TextColor)}:host([design=Emphasized][focused]) .ui5-button-root:after{border-color:var(--_ui5-v1-20-0_button_emphasized_focused_border_color);outline:none}:host([design=Emphasized][focused][active]:not([non-interactive])) .ui5-button-root:after{border-color:var(--_ui5-v1-20-0_button_emphasized_focused_active_border_color)}:host([design=Transparent]){background-color:var(--sapButton_Lite_Background);border-color:var(--sapButton_Lite_BorderColor);color:var(--sapButton_Lite_TextColor)}:host([design=Transparent]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]).ui5_hovered),:host([design=Transparent]:not([active]):not([non-interactive]):not([_is-touch]):not([disabled]):hover){background-color:var(--sapButton_Lite_Hover_Background);border-color:var(--sapButton_Lite_Hover_BorderColor);color:var(--sapButton_Lite_Hover_TextColor)}:host([ui5-button][design=Transparent][active]:not([non-interactive])){background-color:var(--sapButton_Lite_Active_Background);border-color:var(--sapButton_Lite_Active_BorderColor);color:var(--sapButton_Active_TextColor)}:host([pressed][focused]) .ui5-button-root:after,:host([ui5-segmented-button-item][active][focused]) .ui5-button-root:after{border-color:var(--_ui5-v1-20-0_button_pressed_focused_border_color);outline:none}:host([ui5-segmented-button-item][focused]:not(:last-child)) .ui5-button-root:after{border-bottom-right-radius:var(--_ui5-v1-20-0_button_focused_inner_border_radius);border-top-right-radius:var(--_ui5-v1-20-0_button_focused_inner_border_radius)}:host([ui5-segmented-button-item][focused]:not(:first-child)) .ui5-button-root:after{border-bottom-left-radius:var(--_ui5-v1-20-0_button_focused_inner_border_radius);border-top-left-radius:var(--_ui5-v1-20-0_button_focused_inner_border_radius)}\" };\nexport default styleData;\n//# sourceMappingURL=Button.css.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar Button_1;\nimport UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport { isSpace, isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { markEvent } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport { getIconAccessibleName } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\nimport { isPhone, isTablet, isCombi, isDesktop, isSafari, } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport willShowContent from \"@ui5/webcomponents-base/dist/util/willShowContent.js\";\nimport ButtonDesign from \"./types/ButtonDesign.js\";\nimport ButtonType from \"./types/ButtonType.js\";\nimport ButtonTemplate from \"./generated/templates/ButtonTemplate.lit.js\";\nimport Icon from \"./Icon.js\";\nimport { BUTTON_ARIA_TYPE_ACCEPT, BUTTON_ARIA_TYPE_REJECT, BUTTON_ARIA_TYPE_EMPHASIZED } from \"./generated/i18n/i18n-defaults.js\";\n// Styles\nimport buttonCss from \"./generated/themes/Button.css.js\";\nlet isGlobalHandlerAttached = false;\nlet activeButton = null;\n/**\n * @class\n *\n * \n *\n * The ui5-button
component represents a simple push button.\n * It enables users to trigger actions by clicking or tapping the ui5-button
, or by pressing\n * certain keyboard keys, such as Enter.\n *\n *\n * Usage
\n *\n * For the ui5-button
UI, you can define text, icon, or both. You can also specify\n * whether the text or the icon is displayed first.\n *
\n * You can choose from a set of predefined types that offer different\n * styling to correspond to the triggered action.\n *
\n * You can set the ui5-button
as enabled or disabled. An enabled\n * ui5-button
can be pressed by clicking or tapping it. The button changes\n * its style to provide visual feedback to the user that it is pressed or hovered over with\n * the mouse cursor. A disabled ui5-button
appears inactive and cannot be pressed.\n *\n * CSS Shadow Parts
\n *\n * CSS Shadow Parts allow developers to style elements inside the Shadow DOM.\n *
\n * The ui5-button
exposes the following CSS Shadow Parts:\n * \n * - button - Used to style the native button element
\n *
\n *\n * ES6 Module Import
\n *\n * import \"@ui5/webcomponents/dist/Button\";
\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Button\n * @extends sap.ui.webc.base.UI5Element\n * @tagname ui5-button\n * @implements sap.ui.webc.main.IButton\n * @public\n */\nlet Button = Button_1 = class Button extends UI5Element {\n constructor() {\n super();\n this._deactivate = () => {\n if (activeButton) {\n activeButton.active = false;\n }\n };\n if (!isGlobalHandlerAttached) {\n document.addEventListener(\"mouseup\", this._deactivate);\n isGlobalHandlerAttached = true;\n }\n const handleTouchStartEvent = (e) => {\n markEvent(e, \"button\");\n if (this.nonInteractive) {\n return;\n }\n this.active = true;\n };\n this._ontouchstart = {\n handleEvent: handleTouchStartEvent,\n passive: true,\n };\n }\n onEnterDOM() {\n this._isTouch = (isPhone() || isTablet()) && !isCombi();\n }\n async onBeforeRendering() {\n const formSupport = getFeature(\"FormSupport\");\n if (this.type !== ButtonType.Button && !formSupport) {\n console.warn(`In order for the \"type\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n }\n if (this.submits && !formSupport) {\n console.warn(`In order for the \"submits\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n }\n this.iconOnly = this.isIconOnly;\n this.hasIcon = !!this.icon;\n this.buttonTitle = this.tooltip || await getIconAccessibleName(this.icon);\n }\n _onclick(e) {\n if (this.nonInteractive) {\n return;\n }\n markEvent(e, \"button\");\n const formSupport = getFeature(\"FormSupport\");\n if (formSupport && this._isSubmit) {\n formSupport.triggerFormSubmit(this);\n }\n if (formSupport && this._isReset) {\n formSupport.triggerFormReset(this);\n }\n if (isSafari()) {\n this.getDomRef()?.focus();\n }\n }\n _onmousedown(e) {\n if (this.nonInteractive || this._isTouch) {\n return;\n }\n markEvent(e, \"button\");\n this.active = true;\n activeButton = this; // eslint-disable-line\n }\n _ontouchend(e) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n }\n this.active = false;\n if (activeButton) {\n activeButton.active = false;\n }\n }\n _onmouseup(e) {\n markEvent(e, \"button\");\n }\n _onkeydown(e) {\n markEvent(e, \"button\");\n if (isSpace(e) || isEnter(e)) {\n this.active = true;\n }\n }\n _onkeyup(e) {\n if (isSpace(e) || isEnter(e)) {\n this.active = false;\n }\n }\n _onfocusout() {\n if (this.nonInteractive) {\n return;\n }\n this.active = false;\n if (isDesktop()) {\n this.focused = false;\n }\n }\n _onfocusin(e) {\n if (this.nonInteractive) {\n return;\n }\n markEvent(e, \"button\");\n if (isDesktop()) {\n this.focused = true;\n }\n }\n get hasButtonType() {\n return this.design !== ButtonDesign.Default && this.design !== ButtonDesign.Transparent;\n }\n get iconRole() {\n if (!this.icon) {\n return \"\";\n }\n return \"presentation\";\n }\n get isIconOnly() {\n return !willShowContent(this.text);\n }\n static typeTextMappings() {\n return {\n \"Positive\": BUTTON_ARIA_TYPE_ACCEPT,\n \"Negative\": BUTTON_ARIA_TYPE_REJECT,\n \"Emphasized\": BUTTON_ARIA_TYPE_EMPHASIZED,\n };\n }\n get buttonTypeText() {\n return Button_1.i18nBundle.getText(Button_1.typeTextMappings()[this.design]);\n }\n get tabIndexValue() {\n const tabindex = this.getAttribute(\"tabindex\");\n if (tabindex) {\n return tabindex;\n }\n return this.nonInteractive ? \"-1\" : this._tabIndex;\n }\n get showIconTooltip() {\n return this.iconOnly && !this.tooltip;\n }\n get ariaLabelText() {\n return getEffectiveAriaLabelText(this);\n }\n get _isSubmit() {\n return this.type === ButtonType.Submit || this.submits;\n }\n get _isReset() {\n return this.type === ButtonType.Reset;\n }\n static async onDefine() {\n Button_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n};\n__decorate([\n property({ type: ButtonDesign, defaultValue: ButtonDesign.Default })\n], Button.prototype, \"design\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"disabled\", void 0);\n__decorate([\n property()\n], Button.prototype, \"icon\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"iconEnd\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"submits\", void 0);\n__decorate([\n property()\n], Button.prototype, \"tooltip\", void 0);\n__decorate([\n property({ defaultValue: undefined })\n], Button.prototype, \"accessibleName\", void 0);\n__decorate([\n property({ defaultValue: \"\" })\n], Button.prototype, \"accessibleNameRef\", void 0);\n__decorate([\n property({ type: Object })\n], Button.prototype, \"accessibilityAttributes\", void 0);\n__decorate([\n property({ type: ButtonType, defaultValue: ButtonType.Button })\n], Button.prototype, \"type\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"active\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"iconOnly\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"focused\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"hasIcon\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"nonInteractive\", void 0);\n__decorate([\n property({ noAttribute: true })\n], Button.prototype, \"buttonTitle\", void 0);\n__decorate([\n property({ type: Object })\n], Button.prototype, \"_iconSettings\", void 0);\n__decorate([\n property({ defaultValue: \"0\", noAttribute: true })\n], Button.prototype, \"_tabIndex\", void 0);\n__decorate([\n property({ type: Boolean })\n], Button.prototype, \"_isTouch\", void 0);\n__decorate([\n slot({ type: Node, \"default\": true })\n], Button.prototype, \"text\", void 0);\nButton = Button_1 = __decorate([\n customElement({\n tag: \"ui5-button\",\n languageAware: true,\n renderer: litRender,\n template: ButtonTemplate,\n styles: buttonCss,\n dependencies: [Icon],\n })\n /**\n * Fired when the component is activated either with a\n * mouse/tap or by using the Enter or Space key.\n *
\n * Note: The event will not be fired if the disabled
\n * property is set to true
.\n *\n * @event sap.ui.webc.main.Button#click\n * @public\n * @native\n */\n ,\n event(\"click\")\n], Button);\nButton.define();\nexport default Button;\n//# sourceMappingURL=Button.js.map","import { registerThemePropertiesLoader } from \"@ui5/webcomponents-base/dist/asset-registries/Themes.js\";\nimport defaultThemeBase from \"@ui5/webcomponents-theming/dist/generated/themes/sap_horizon/parameters-bundle.css.js\";\nimport defaultTheme from \"./sap_horizon/parameters-bundle.css.js\";\nregisterThemePropertiesLoader(\"@ui5/webcomponents-theming\", \"sap_horizon\", async () => defaultThemeBase);\nregisterThemePropertiesLoader(\"@ui5/webcomponents\", \"sap_horizon\", async () => defaultTheme);\nconst styleData = { packageName: \"@ui5/webcomponents\", fileName: \"themes/ListItem.css\", content: \".ui5-hidden-text{clip:rect(1px,1px,1px,1px);font-size:0;left:-1000px;pointer-events:none;position:absolute;top:-1000px;user-select:none}:host([actionable]:not([disabled])){cursor:pointer}:host([selected][actionable]:not([active]):hover){background:var(--sapList_Hover_SelectionBackground)}:host([active][actionable]),:host([selected][active][actionable]){background:var(--sapList_Active_Background)}:host([actionable]:not([active]):not([selected]):hover){background:var(--sapList_Hover_Background)}:host([active][actionable]) .ui5-li-root.ui5-li--focusable .ui5-li-content:focus,:host([active][actionable]) .ui5-li-root.ui5-li--focusable:focus{outline-color:var(--sapContent_ContrastFocusColor)}:host([navigated]) .ui5-li-root .ui5-li-navigated{background-color:var(--sapList_SelectionBorderColor);bottom:0;position:absolute;right:0;top:0;width:.1875rem}:host([active][actionable]) .ui5-li-root .ui5-li-icon{color:var(--sapList_Active_TextColor)}:host([active][actionable]) .ui5-li-additional-text,:host([active][actionable]) .ui5-li-desc,:host([active][actionable]) .ui5-li-title{color:var(--sapList_Active_TextColor)}:host([additional-text-state=Warning]) .ui5-li-additional-text{color:var(--sapCriticalTextColor)}:host([additional-text-state=Success]) .ui5-li-additional-text{color:var(--sapPositiveTextColor)}:host([additional-text-state=Error]) .ui5-li-additional-text{color:var(--sapNegativeTextColor)}:host([additional-text-state=Information]) .ui5-li-additional-text{color:var(--sapInformativeTextColor)}:host([has-title][description]){height:5rem}:host([has-title][image]){height:5rem}:host([_has-image-content]){height:5rem}:host([image]) .ui5-li-content{height:3rem}:host([description]) .ui5-li-root{padding:1rem}:host([description]) .ui5-li-content{height:3rem}:host([has-title][description]) .ui5-li-title{padding-bottom:.375rem}.ui5-li-text-wrapper{display:flex;flex:auto;flex-direction:column;line-height:normal;min-width:1px}:host([description]) .ui5-li-text-wrapper{height:100%;justify-content:space-between;padding:.125rem 0}.ui5-li-description-info-wrapper{display:flex;justify-content:space-between}.ui5-li-title{color:var(--sapList_TextColor);font-size:var(--_ui5-v1-20-0_list_item_title_size)}.ui5-li-additional-text,.ui5-li-desc,:host(:not([wrapping-type=Normal])) .ui5-li-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([wrapping-type=Normal]){height:auto}:host([wrapping-type=Normal]) .ui5-li-content{margin:var(--_ui5-v1-20-0_list_item_content_vertical_offset) 0}.ui5-li-desc{color:var(--sapContent_LabelColor);font-size:var(--sapFontSize)}.ui5-li-additional-text{color:var(--sapNeutralTextColor);font-size:var(--sapFontSize);margin:0 .25rem;min-width:3.75rem;text-align:end}:host([description]) .ui5-li-additional-text{align-self:flex-end}.ui5-li-img{border-radius:var(--ui5-v1-20-0-avatar-border-radius);height:var(--_ui5-v1-20-0_list_item_img_size);width:var(--_ui5-v1-20-0_list_item_img_size)}.ui5-li-img,.ui5-li-imgContent{margin-bottom:var(--_ui5-v1-20-0_list_item_img_bottom_margin);margin-top:var(--_ui5-v1-20-0_list_item_img_top_margin);margin-inline-end:var(--_ui5-v1-20-0_list_item_img_hn_margin);min-height:var(--_ui5-v1-20-0_list_item_img_size);min-width:var(--_ui5-v1-20-0_list_item_img_size)}.ui5-li-img-inner{object-fit:contain}.ui5-li-icon{color:var(--sapContent_NonInteractiveIconColor);min-height:var(--_ui5-v1-20-0_list_item_icon_size);min-width:var(--_ui5-v1-20-0_list_item_icon_size);padding-inline-end:var(--_ui5-v1-20-0_list_item_icon_padding-inline-end)}.ui5-li-content{align-items:center;display:flex;flex:auto;overflow:hidden}.ui5-li-deletebtn,.ui5-li-detailbtn{align-items:center;display:flex;margin-left:var(--_ui5-v1-20-0_list_buttons_left_space)}.ui5-li-multisel-cb,.ui5-li-singlesel-radiobtn{flex-shrink:0}:host([description]) .ui5-li-singlesel-radiobtn{align-self:flex-start;margin-top:var(--_ui5-v1-20-0_list_item_selection_btn_margin_top)}:host([description]) .ui5-li-multisel-cb{align-self:flex-start;margin-top:var(--_ui5-v1-20-0_list_item_selection_btn_margin_top)}:host([_mode=SingleSelectBegin]) .ui5-li-root{padding-inline:0 1rem}:host([_mode=MultiSelect]) .ui5-li-root{padding-inline:0 1rem}:host([_mode=SingleSelectEnd]) .ui5-li-root{padding-inline:1rem 0}:host [ui5-checkbox].ui5-li-singlesel-radiobtn{margin-right:var(--_ui5-v1-20-0_list_item_cb_margin_right)}\" };\nexport default styleData;\n//# sourceMappingURL=ListItem.css.js.map","/**\n * Different types of HasPopup.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.main.types.HasPopup\n */\nvar HasPopup;\n(function (HasPopup) {\n /**\n * Dialog popup type.\n * @public\n * @type {Dialog}\n */\n HasPopup[\"Dialog\"] = \"Dialog\";\n /**\n * Grid popup type.\n * @public\n * @type {Grid}\n */\n HasPopup[\"Grid\"] = \"Grid\";\n /**\n * ListBox popup type.\n * @public\n * @type {ListBox}\n */\n HasPopup[\"ListBox\"] = \"ListBox\";\n /**\n * Menu popup type.\n * @public\n * @type {Menu}\n */\n HasPopup[\"Menu\"] = \"Menu\";\n /**\n * Tree popup type.\n * @public\n * @type {Tree}\n */\n HasPopup[\"Tree\"] = \"Tree\";\n})(HasPopup || (HasPopup = {}));\nexport default HasPopup;\n//# sourceMappingURL=HasPopup.js.map","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"slim-arrow-right\";\nconst pathData = \"M357.5 233q10 10 10 23t-10 23l-165 165q-12 11-23 0t0-23l160-159q6-6 0-12l-159-159q-5-5-5-11t5-11 11-5 11 5z\";\nconst ltr = false;\nconst accData = null;\nconst collection = \"SAP-icons-v4\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v4/slim-arrow-right\";\nexport { pathData, ltr, accData };","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"slim-arrow-right\";\nconst pathData = \"M186 416q-11 0-18.5-7.5T160 390q0-10 8-18l121-116-121-116q-8-8-8-18 0-11 7.5-18.5T186 96q10 0 17 7l141 134q8 8 8 19 0 12-8 18L203 409q-7 7-17 7z\";\nconst ltr = false;\nconst accData = null;\nconst collection = \"SAP-icons-v5\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v5/slim-arrow-right\";\nexport { pathData, ltr, accData };","import { isLegacyThemeFamily } from \"@ui5/webcomponents-base/dist/config/Theme.js\";\nimport { pathData as pathDatav4, ltr, accData } from \"./v4/slim-arrow-right.js\";\nimport { pathData as pathDatav5 } from \"./v5/slim-arrow-right.js\";\n\nconst pathData = isLegacyThemeFamily() ? pathDatav4 : pathDatav5;\n\nexport default \"slim-arrow-right\";\nexport { pathData, ltr, accData };","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar ListItem_1;\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport Integer from \"@ui5/webcomponents-base/dist/types/Integer.js\";\nimport { getEventMark } from \"@ui5/webcomponents-base/dist/MarkedEvents.js\";\nimport { isSpace, isEnter, isDelete } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport \"@ui5/webcomponents-icons/dist/edit.js\";\nimport ListItemType from \"./types/ListItemType.js\";\nimport ListMode from \"./types/ListMode.js\";\nimport ListItemBase from \"./ListItemBase.js\";\nimport RadioButton from \"./RadioButton.js\";\nimport CheckBox from \"./CheckBox.js\";\nimport Button from \"./Button.js\";\nimport { DELETE, ARIA_LABEL_LIST_ITEM_CHECKBOX, ARIA_LABEL_LIST_ITEM_RADIO_BUTTON, LIST_ITEM_SELECTED, LIST_ITEM_NOT_SELECTED, } from \"./generated/i18n/i18n-defaults.js\";\n// Styles\nimport styles from \"./generated/themes/ListItem.css.js\";\nimport HasPopup from \"./types/HasPopup.js\";\n// Icons\nimport \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n/**\n * @class\n * A class to serve as a base\n * for the StandardListItem
and CustomListItem
classes.\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.ListItem\n * @extends sap.ui.webc.main.ListItemBase\n * @public\n */\nlet ListItem = ListItem_1 = class ListItem extends ListItemBase {\n constructor() {\n super();\n this.deactivateByKey = (e) => {\n if (isEnter(e)) {\n this.deactivate();\n }\n };\n this.deactivate = () => {\n if (this.active) {\n this.active = false;\n }\n };\n const handleTouchStartEvent = (e) => {\n this._onmousedown(e);\n };\n this._ontouchstart = {\n handleEvent: handleTouchStartEvent,\n passive: true,\n };\n }\n onBeforeRendering() {\n this.actionable = (this.type === ListItemType.Active || this.type === ListItemType.Navigation) && (this._mode !== ListMode.Delete);\n }\n onEnterDOM() {\n document.addEventListener(\"mouseup\", this.deactivate);\n document.addEventListener(\"touchend\", this.deactivate);\n document.addEventListener(\"keyup\", this.deactivateByKey);\n }\n onExitDOM() {\n document.removeEventListener(\"mouseup\", this.deactivate);\n document.removeEventListener(\"keyup\", this.deactivateByKey);\n document.removeEventListener(\"touchend\", this.deactivate);\n }\n _onkeydown(e) {\n super._onkeydown(e);\n const itemActive = this.type === ListItemType.Active, itemNavigated = this.typeNavigation;\n if (isSpace(e)) {\n e.preventDefault();\n }\n if ((isSpace(e) || isEnter(e)) && (itemActive || itemNavigated)) {\n this.activate();\n }\n if (isEnter(e)) {\n this.fireItemPress(e);\n }\n }\n _onkeyup(e) {\n if (isSpace(e) || isEnter(e)) {\n this.deactivate();\n }\n if (isSpace(e)) {\n this.fireItemPress(e);\n }\n if (this.modeDelete && isDelete(e)) {\n this.onDelete();\n }\n }\n _onmousedown(e) {\n if (getEventMark(e) === \"button\") {\n return;\n }\n this.activate();\n }\n _onmouseup(e) {\n if (getEventMark(e) === \"button\") {\n return;\n }\n this.deactivate();\n }\n _ontouchend(e) {\n this._onmouseup(e);\n }\n _onfocusout() {\n super._onfocusout();\n this.deactivate();\n }\n _onclick(e) {\n if (getEventMark(e) === \"button\") {\n return;\n }\n this.fireItemPress(e);\n }\n /*\n * Called when selection components in Single (ui5-radio-button)\n * and Multi (ui5-checkbox) selection modes are used.\n */\n onMultiSelectionComponentPress(e) {\n if (this.isInactive) {\n return;\n }\n this.fireEvent(\"_selection-requested\", { item: this, selected: e.target.checked, selectionComponentPressed: true });\n }\n onSingleSelectionComponentPress(e) {\n if (this.isInactive) {\n return;\n }\n this.fireEvent(\"_selection-requested\", { item: this, selected: !e.target.checked, selectionComponentPressed: true });\n }\n activate() {\n if (this.type === ListItemType.Active || this.type === ListItemType.Navigation) {\n this.active = true;\n }\n }\n onDelete() {\n this.fireEvent(\"_selection-requested\", { item: this, selectionComponentPressed: false });\n }\n onDetailClick() {\n this.fireEvent(\"detail-click\", { item: this, selected: this.selected });\n }\n fireItemPress(e) {\n if (this.isInactive) {\n return;\n }\n if (isEnter(e)) {\n e.preventDefault();\n }\n this.fireEvent(\"_press\", { item: this, selected: this.selected, key: e.key });\n }\n get isInactive() {\n return this.type === ListItemType.Inactive || this.type === ListItemType.Detail;\n }\n get placeSelectionElementBefore() {\n return this._mode === ListMode.MultiSelect\n || this._mode === ListMode.SingleSelectBegin;\n }\n get placeSelectionElementAfter() {\n return !this.placeSelectionElementBefore\n && (this._mode === ListMode.SingleSelectEnd || this._mode === ListMode.Delete);\n }\n get modeSingleSelect() {\n return [\n ListMode.SingleSelectBegin,\n ListMode.SingleSelectEnd,\n ListMode.SingleSelect,\n ].includes(this._mode);\n }\n get modeMultiSelect() {\n return this._mode === ListMode.MultiSelect;\n }\n get modeDelete() {\n return this._mode === ListMode.Delete;\n }\n /**\n * Used in UploadCollectionItem\n */\n get renderDeleteButton() {\n return this.modeDelete;\n }\n /**\n * End\n */\n get typeDetail() {\n return this.type === ListItemType.Detail;\n }\n get typeNavigation() {\n return this.type === ListItemType.Navigation;\n }\n get typeActive() {\n return this.type === ListItemType.Active;\n }\n get _ariaSelected() {\n if (this.modeMultiSelect || this.modeSingleSelect) {\n return this.selected;\n }\n return undefined;\n }\n get ariaSelectedText() {\n let ariaSelectedText;\n // Selected state needs to be supported separately since now the role mapping is list -> listitem[]\n // to avoid the issue of nesting interactive elements, ex. (option -> radio/checkbox);\n // The text is added to aria-describedby because as part of the aria-labelledby\n // the whole content of the item is readout when the aria-labelledby value is changed.\n if (this._ariaSelected !== undefined) {\n ariaSelectedText = this._ariaSelected ? ListItem_1.i18nBundle.getText(LIST_ITEM_SELECTED) : ListItem_1.i18nBundle.getText(LIST_ITEM_NOT_SELECTED);\n }\n return ariaSelectedText;\n }\n get deleteText() {\n return ListItem_1.i18nBundle.getText(DELETE);\n }\n get hasDeleteButtonSlot() {\n return !!this.deleteButton.length;\n }\n get _accessibleNameRef() {\n if (this.accessibleName) {\n // accessibleName is set - return labels excluding content\n return `${this._id}-invisibleText`;\n }\n // accessibleName is not set - return _accInfo.listItemAriaLabel including content\n return `${this._id}-content ${this._id}-invisibleText`;\n }\n get _accInfo() {\n return {\n role: this.accessibleRole || this.role,\n ariaExpanded: undefined,\n ariaLevel: this._level || undefined,\n ariaLabel: ListItem_1.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),\n ariaLabelRadioButton: ListItem_1.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_RADIO_BUTTON),\n ariaSelectedText: this.ariaSelectedText,\n ariaHaspopup: this.ariaHaspopup || undefined,\n setsize: this.accessibilityAttributes.ariaSetsize,\n posinset: this.accessibilityAttributes.ariaPosinset,\n };\n }\n get hasConfigurableMode() {\n return true;\n }\n static async onDefine() {\n ListItem_1.i18nBundle = await getI18nBundle(\"@ui5/webcomponents\");\n }\n};\n__decorate([\n property({ type: ListItemType, defaultValue: ListItemType.Active })\n], ListItem.prototype, \"type\", void 0);\n__decorate([\n property({ type: Object })\n], ListItem.prototype, \"accessibilityAttributes\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItem.prototype, \"navigated\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItem.prototype, \"active\", void 0);\n__decorate([\n property()\n], ListItem.prototype, \"title\", void 0);\n__decorate([\n property({ type: Boolean })\n], ListItem.prototype, \"actionable\", void 0);\n__decorate([\n property({ defaultValue: \"listitem\" })\n], ListItem.prototype, \"role\", void 0);\n__decorate([\n property({ defaultValue: undefined, noAttribute: true })\n], ListItem.prototype, \"accessibleRoleDescription\", void 0);\n__decorate([\n property()\n], ListItem.prototype, \"accessibleRole\", void 0);\n__decorate([\n property({ type: ListMode, defaultValue: ListMode.None })\n], ListItem.prototype, \"_mode\", void 0);\n__decorate([\n property({ type: HasPopup, noAttribute: true })\n], ListItem.prototype, \"ariaHaspopup\", void 0);\n__decorate([\n property({ type: Integer })\n], ListItem.prototype, \"_level\", void 0);\n__decorate([\n property({ type: Boolean, noAttribute: true })\n], ListItem.prototype, \"disableDeleteButton\", void 0);\n__decorate([\n slot()\n], ListItem.prototype, \"deleteButton\", void 0);\nListItem = ListItem_1 = __decorate([\n customElement({\n languageAware: true,\n styles: [ListItemBase.styles, styles],\n dependencies: [\n Button,\n RadioButton,\n CheckBox,\n ],\n })\n /**\n * Fired when the user clicks on the detail button when type is Detail
.\n *\n * @event sap.ui.webc.main.ListItem#detail-click\n * @public\n */\n ,\n event(\"detail-click\"),\n event(\"_press\"),\n event(\"_focused\"),\n event(\"_selection-requested\")\n], ListItem);\nexport default ListItem;\n//# sourceMappingURL=ListItem.js.map","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"cancel\";\nconst pathData = \"M256 0q53 0 99.5 20T437 74.5t55 81.5 20 100-20 99.5-55 81.5-81.5 55-99.5 20-99.5-20T75 437t-55-81.5T0 256t20-100 55-81.5T156.5 20 256 0zm0 480q38 0 72.5-12.5T392 434L78 120q-22 29-34 63.5T32 256q0 46 17.5 87t48 71.5 71.5 48 87 17.5zm180-92q21-28 32.5-61.5T480 256q0-46-17.5-87t-48-71.5-71.5-48T256 32q-37 0-70.5 11.5T124 75z\";\nconst ltr = true;\nconst accData = null;\nconst collection = \"SAP-icons-v4\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v4/cancel\";\nexport { pathData, ltr, accData };","import { registerIcon } from \"@ui5/webcomponents-base/dist/asset-registries/Icons.js\";\n\nconst name = \"cancel\";\nconst pathData = \"M256 0q53 0 100 20t81.5 54.5T492 156t20 100-20 100-54.5 81.5T356 492t-100 20-100-20-81.5-54.5T20 356 0 256t20-100 54.5-81.5T156 20 256 0zm162 382q43-55 43-126 0-43-16-80.5t-43.5-65-65-43.5T256 51q-71 0-126 43zM51 256q0 43 16 80t44 65 65 44 80 16q71 0 126-43L94 130q-43 55-43 126z\";\nconst ltr = true;\nconst accData = null;\nconst collection = \"SAP-icons-v5\";\nconst packageName = \"@ui5/webcomponents-icons\";\n\nregisterIcon(name, { pathData, ltr, collection, packageName });\n\nexport default \"SAP-icons-v5/cancel\";\nexport { pathData, ltr, accData };","import { isLegacyThemeFamily } from \"@ui5/webcomponents-base/dist/config/Theme.js\";\nimport { pathData as pathDatav4, ltr, accData } from \"./v4/cancel.js\";\nimport { pathData as pathDatav5 } from \"./v5/cancel.js\";\n\nconst pathData = isLegacyThemeFamily() ? pathDatav4 : pathDatav5;\n\nexport default \"cancel\";\nexport { pathData, ltr, accData };","/**\n * @module ol/events/Event\n */\n\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nclass BaseEvent {\n /**\n * @param {string} type Type.\n */\n constructor(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n\n /**\n * @type {boolean}\n */\n this.defaultPrevented;\n\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n\n /**\n * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n * will be fired.\n * @api\n */\n preventDefault() {\n this.defaultPrevented = true;\n }\n\n /**\n * Stop event propagation.\n * @api\n */\n stopPropagation() {\n this.propagationStopped = true;\n }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\n\nexport default BaseEvent;\n","/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a property is changed.\n * @event module:ol/Object.ObjectEvent#propertychange\n * @api\n */\n PROPERTYCHANGE: 'propertychange',\n};\n\n/**\n * @typedef {'propertychange'} Types\n */\n","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n constructor() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n\n /**\n * Clean up.\n */\n dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n }\n\n /**\n * Extension point for disposable objects.\n * @protected\n */\n disposeInternal() {}\n}\n\nexport default Disposable;\n","/**\n * @module ol/array\n */\n\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function} [comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, comparator) {\n let mid, cmp;\n comparator = comparator || ascending;\n let low = 0;\n let high = haystack.length;\n let found = false;\n\n while (low < high) {\n /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n * to double (which gives the wrong results). */\n mid = low + ((high - low) >> 1);\n cmp = +comparator(haystack[mid], needle);\n\n if (cmp < 0.0) {\n /* Too low. */\n low = mid + 1;\n } else {\n /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n\n /* Key not found. */\n return found ? low : ~low;\n}\n\n/**\n * Compare function sorting arrays in ascending order. Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is less than, equal to, or greater than the second.\n */\nexport function ascending(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * Compare function sorting arrays in descending order. Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is greater than, equal to, or less than the second.\n */\nexport function descending(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\n\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n\n/**\n * @param {Array} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n * 0 means return the nearest,\n * > 0 means return the largest nearest,\n * < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n if (arr[0] <= target) {\n return 0;\n }\n\n const n = arr.length;\n if (target <= arr[n - 1]) {\n return n - 1;\n }\n\n if (typeof direction === 'function') {\n for (let i = 1; i < n; ++i) {\n const candidate = arr[i];\n if (candidate === target) {\n return i;\n }\n if (candidate < target) {\n if (direction(target, arr[i - 1], candidate) > 0) {\n return i - 1;\n }\n return i;\n }\n }\n return n - 1;\n }\n\n if (direction > 0) {\n for (let i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\n }\n }\n return n - 1;\n }\n\n if (direction < 0) {\n for (let i = 1; i < n; ++i) {\n if (arr[i] <= target) {\n return i;\n }\n }\n return n - 1;\n }\n\n for (let i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n }\n if (arr[i] < target) {\n if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n }\n return i;\n }\n }\n return n - 1;\n}\n\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n while (begin < end) {\n const tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {!Array|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n const extension = Array.isArray(data) ? data : [data];\n const length = extension.length;\n for (let i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n const i = arr.indexOf(obj);\n const found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n const len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (let i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preserved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n const length = arr.length;\n const tmp = Array(arr.length);\n let i;\n for (i = 0; i < length; i++) {\n tmp[i] = {index: i, value: arr[i]};\n }\n tmp.sort(function (a, b) {\n return compareFnc(a.value, b.value) || a.index - b.index;\n });\n for (i = 0; i < arr.length; i++) {\n arr[i] = tmp[i].value;\n }\n}\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [func] Comparison function.\n * @param {boolean} [strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, func, strict) {\n const compare = func || ascending;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n const res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (strict && res === 0));\n });\n}\n","/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nexport function FALSE() {\n return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() {}\n\n/**\n * Wrap a function in another function that remembers the last return. If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n let called = false;\n\n /** @type {ReturnType} */\n let lastResult;\n\n /** @type {Array} */\n let lastArgs;\n\n let lastThis;\n\n return function () {\n const nextArgs = Array.prototype.slice.call(arguments);\n if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n called = true;\n lastThis = this;\n lastArgs = nextArgs;\n lastResult = fn.apply(this, arguments);\n }\n return lastResult;\n };\n}\n\n/**\n * @template T\n * @param {function(): (T | Promise)} getter A function that returns a value or a promise for a value.\n * @return {Promise} A promise for the value.\n */\nexport function toPromise(getter) {\n function promiseGetter() {\n let value;\n try {\n value = getter();\n } catch (err) {\n return Promise.reject(err);\n }\n if (value instanceof Promise) {\n return value;\n }\n return Promise.resolve(value);\n }\n return promiseGetter();\n}\n","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport {VOID} from '../functions.js';\nimport {clear} from '../obj.js';\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n * `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n * There is no event target hierarchy. When a listener calls\n * `stopPropagation` or `preventDefault` on an event object, it means that no\n * more listeners after this one will be called. Same as when the listener\n * returns false.\n */\nclass Target extends Disposable {\n /**\n * @param {*} [target] Default event target for dispatched events.\n */\n constructor(target) {\n super();\n\n /**\n * @private\n * @type {*}\n */\n this.eventTarget_ = target;\n\n /**\n * @private\n * @type {Object}\n */\n this.pendingRemovals_ = null;\n\n /**\n * @private\n * @type {Object}\n */\n this.dispatching_ = null;\n\n /**\n * @private\n * @type {Object>}\n */\n this.listeners_ = null;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n addEventListener(type, listener) {\n if (!type || !listener) {\n return;\n }\n const listeners = this.listeners_ || (this.listeners_ = {});\n const listenersForType = listeners[type] || (listeners[type] = []);\n if (!listenersForType.includes(listener)) {\n listenersForType.push(listener);\n }\n }\n\n /**\n * Dispatches an event and calls all listeners listening for events\n * of this type. The event parameter can either be a string or an\n * Object with a `type` property.\n *\n * @param {import(\"./Event.js\").default|string} event Event object.\n * @return {boolean|undefined} `false` if anyone called preventDefault on the\n * event object or if any of the listeners returned false.\n * @api\n */\n dispatchEvent(event) {\n const isString = typeof event === 'string';\n const type = isString ? event : event.type;\n const listeners = this.listeners_ && this.listeners_[type];\n if (!listeners) {\n return;\n }\n\n const evt = isString ? new Event(event) : /** @type {Event} */ (event);\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n const dispatching = this.dispatching_ || (this.dispatching_ = {});\n const pendingRemovals =\n this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n let propagate;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (\n listeners[i]\n ).handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (\n listeners[i]\n ).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n if (--dispatching[type] === 0) {\n let pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.listeners_ && clear(this.listeners_);\n }\n\n /**\n * Get the listeners for a specified event type. Listeners are returned in the\n * order that they will be called in.\n *\n * @param {string} type Type.\n * @return {Array|undefined} Listeners.\n */\n getListeners(type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n }\n\n /**\n * @param {string} [type] Type. If not provided,\n * `true` will be returned if this event target has any listeners.\n * @return {boolean} Has listeners.\n */\n hasListener(type) {\n if (!this.listeners_) {\n return false;\n }\n return type\n ? type in this.listeners_\n : Object.keys(this.listeners_).length > 0;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n removeEventListener(type, listener) {\n const listeners = this.listeners_ && this.listeners_[type];\n if (listeners) {\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n // make listener a no-op, and remove later in #dispatchEvent()\n listeners[index] = VOID;\n ++this.pendingRemovals_[type];\n } else {\n listeners.splice(index, 1);\n if (listeners.length === 0) {\n delete this.listeners_[type];\n }\n }\n }\n }\n }\n}\n\nexport default Target;\n","/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n /**\n * Generic change event. Triggered when the revision counter is increased.\n * @event module:ol/events/Event~BaseEvent#change\n * @api\n */\n CHANGE: 'change',\n\n /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n\n BLUR: 'blur',\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n FOCUS: 'focus',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n RESIZE: 'resize',\n TOUCHMOVE: 'touchmove',\n WHEEL: 'wheel',\n};\n","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\n\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events.unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean} [once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, thisArg, once) {\n if (thisArg && thisArg !== target) {\n listener = listener.bind(thisArg);\n }\n if (once) {\n const originalListener = listener;\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener.apply(this, arguments);\n };\n }\n const eventsKey = {\n target: target,\n type: type,\n listener: listener,\n };\n target.addEventListener(type, listener);\n return eventsKey;\n}\n\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events.unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events.listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, thisArg) {\n return listen(target, type, listener, thisArg, true);\n}\n\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n if (key && key.target) {\n key.target.removeEventListener(key.type, key.listener);\n clear(key);\n }\n}\n","/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport {listen, listenOnce, unlistenByKey} from './events.js';\n\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nclass Observable extends EventTarget {\n constructor() {\n super();\n\n this.on =\n /** @type {ObservableOnSignature} */ (\n this.onInternal\n );\n\n this.once =\n /** @type {ObservableOnSignature} */ (\n this.onceInternal\n );\n\n this.un = /** @type {ObservableOnSignature} */ (this.unInternal);\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n }\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n changed() {\n ++this.revision_;\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Get the version number for this object. Each time the object is modified,\n * its version number will be incremented.\n * @return {number} Revision.\n * @api\n */\n getRevision() {\n return this.revision_;\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onInternal(type, listener) {\n if (Array.isArray(type)) {\n const len = type.length;\n const keys = new Array(len);\n for (let i = 0; i < len; ++i) {\n keys[i] = listen(this, type[i], listener);\n }\n return keys;\n }\n return listen(this, /** @type {string} */ (type), listener);\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onceInternal(type, listener) {\n let key;\n if (Array.isArray(type)) {\n const len = type.length;\n key = new Array(len);\n for (let i = 0; i < len; ++i) {\n key[i] = listenOnce(this, type[i], listener);\n }\n } else {\n key = listenOnce(this, /** @type {string} */ (type), listener);\n }\n /** @type {Object} */ (listener).ol_key = key;\n return key;\n }\n\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @protected\n */\n unInternal(type, listener) {\n const key = /** @type {Object} */ (listener).ol_key;\n if (key) {\n unByKey(key);\n } else if (Array.isArray(type)) {\n for (let i = 0, ii = type.length; i < ii; ++i) {\n this.removeEventListener(type[i], listener);\n }\n } else {\n this.removeEventListener(type, listener);\n }\n }\n}\n\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array} key The key returned by `on()`\n * or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n if (Array.isArray(key)) {\n for (let i = 0, ii = key.length; i < ii; ++i) {\n unlistenByKey(key[i]);\n }\n } else {\n unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\n\nexport default Observable;\n","/**\n * @module ol/util\n */\n\n/**\n * @return {never} Any return.\n */\nexport function abstract() {\n throw new Error('Unimplemented abstract method.');\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nlet uidCounter_ = 0;\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport const VERSION = '7.5.1';\n","/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport {getUid} from './util.js';\nimport {isEmpty} from './obj.js';\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport class ObjectEvent extends Event {\n /**\n * @param {string} type The event type.\n * @param {string} key The property name.\n * @param {*} oldValue The old value for `key`.\n */\n constructor(type, key, oldValue) {\n super(type);\n\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n this.key = key;\n\n /**\n * The old value. To get the new value use `e.target.get(e.key)` where\n * `e` is the event object.\n * @type {*}\n * @api\n */\n this.oldValue = oldValue;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ObjectOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable~Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nclass BaseObject extends Observable {\n /**\n * @param {Object} [values] An object with key-value pairs.\n */\n constructor(values) {\n super();\n\n /***\n * @type {ObjectOnSignature}\n */\n this.on;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.once;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.un;\n\n // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is\n // the same as the order in which they were created. This also helps to\n // ensure that object properties are always added in the same order, which\n // helps many JavaScript engines generate faster code.\n getUid(this);\n\n /**\n * @private\n * @type {Object}\n */\n this.values_ = null;\n\n if (values !== undefined) {\n this.setProperties(values);\n }\n }\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n get(key) {\n let value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n }\n\n /**\n * Get a list of object property names.\n * @return {Array} List of property names.\n * @api\n */\n getKeys() {\n return (this.values_ && Object.keys(this.values_)) || [];\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object} Object.\n * @api\n */\n getProperties() {\n return (this.values_ && Object.assign({}, this.values_)) || {};\n }\n\n /**\n * @return {boolean} The object has properties.\n */\n hasProperties() {\n return !!this.values_;\n }\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n notify(key, oldValue) {\n let eventType;\n eventType = `change:${key}`;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n eventType = ObjectEventType.PROPERTYCHANGE;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n addChangeListener(key, listener) {\n this.addEventListener(`change:${key}`, listener);\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n removeChangeListener(key, listener) {\n this.removeEventListener(`change:${key}`, listener);\n }\n\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n set(key, value, silent) {\n const values = this.values_ || (this.values_ = {});\n if (silent) {\n values[key] = value;\n } else {\n const oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\n }\n }\n\n /**\n * Sets a collection of key-value pairs. Note that this changes any existing\n * properties and adds new ones (it does not remove any existing properties).\n * @param {Object} values Values.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n setProperties(values, silent) {\n for (const key in values) {\n this.set(key, values[key], silent);\n }\n }\n\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n applyProperties(source) {\n if (!source.values_) {\n return;\n }\n Object.assign(this.values_ || (this.values_ = {}), source.values_);\n }\n\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean} [silent] Unset without triggering an event.\n * @api\n */\n unset(key, silent) {\n if (this.values_ && key in this.values_) {\n const oldValue = this.values_[key];\n delete this.values_[key];\n if (isEmpty(this.values_)) {\n this.values_ = null;\n }\n if (!silent) {\n this.notify(key, oldValue);\n }\n }\n }\n}\n\nexport default BaseObject;\n","/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n OPACITY: 'opacity',\n VISIBLE: 'visible',\n EXTENT: 'extent',\n Z_INDEX: 'zIndex',\n MAX_RESOLUTION: 'maxResolution',\n MIN_RESOLUTION: 'minResolution',\n MAX_ZOOM: 'maxZoom',\n MIN_ZOOM: 'minZoom',\n SOURCE: 'source',\n MAP: 'map',\n};\n","/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {abstract} from '../util.js';\nimport {assert} from '../asserts.js';\nimport {clamp} from '../math.js';\n\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseLayerOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nclass BaseLayer extends BaseObject {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.un;\n\n /**\n * @type {BackgroundColor|false}\n * @private\n */\n this.background_ = options.background;\n\n /**\n * @type {Object}\n */\n const properties = Object.assign({}, options);\n if (typeof options.properties === 'object') {\n delete properties.properties;\n Object.assign(properties, options.properties);\n }\n\n properties[LayerProperty.OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\n assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number\n\n properties[LayerProperty.VISIBLE] =\n options.visible !== undefined ? options.visible : true;\n properties[LayerProperty.Z_INDEX] = options.zIndex;\n properties[LayerProperty.MAX_RESOLUTION] =\n options.maxResolution !== undefined ? options.maxResolution : Infinity;\n properties[LayerProperty.MIN_RESOLUTION] =\n options.minResolution !== undefined ? options.minResolution : 0;\n properties[LayerProperty.MIN_ZOOM] =\n options.minZoom !== undefined ? options.minZoom : -Infinity;\n properties[LayerProperty.MAX_ZOOM] =\n options.maxZoom !== undefined ? options.maxZoom : Infinity;\n\n /**\n * @type {string}\n * @private\n */\n this.className_ =\n properties.className !== undefined ? properties.className : 'ol-layer';\n delete properties.className;\n\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n }\n\n /**\n * Get the background for this layer.\n * @return {BackgroundColor|false} Layer background.\n */\n getBackground() {\n return this.background_;\n }\n\n /**\n * @return {string} CSS class name.\n */\n getClassName() {\n return this.className_;\n }\n\n /**\n * This method is not meant to be called by layers or layer renderers because the state\n * is incorrect if the layer is included in a layer group.\n *\n * @param {boolean} [managed] Layer is managed.\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n getLayerState(managed) {\n /** @type {import(\"./Layer.js\").State} */\n const state =\n this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: managed === undefined ? true : managed,\n });\n const zIndex = this.getZIndex();\n state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n state.minZoom = this.getMinZoom();\n state.maxZoom = this.getMaxZoom();\n this.state_ = state;\n\n return state;\n }\n\n /**\n * @abstract\n * @param {Array} [array] Array of layers (to be\n * modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Array} [states] Optional list of layer\n * states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(states) {\n return abstract();\n }\n\n /**\n * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n * will be visible regardless of extent.\n * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n * @observable\n * @api\n */\n getExtent() {\n return /** @type {import(\"../extent.js\").Extent|undefined} */ (\n this.get(LayerProperty.EXTENT)\n );\n }\n\n /**\n * Return the maximum resolution of the layer.\n * @return {number} The maximum resolution of the layer.\n * @observable\n * @api\n */\n getMaxResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n }\n\n /**\n * Return the minimum resolution of the layer.\n * @return {number} The minimum resolution of the layer.\n * @observable\n * @api\n */\n getMinResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n }\n\n /**\n * Return the minimum zoom level of the layer.\n * @return {number} The minimum zoom level of the layer.\n * @observable\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n }\n\n /**\n * Return the maximum zoom level of the layer.\n * @return {number} The maximum zoom level of the layer.\n * @observable\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n }\n\n /**\n * Return the opacity of the layer (between 0 and 1).\n * @return {number} The opacity of the layer.\n * @observable\n * @api\n */\n getOpacity() {\n return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n }\n\n /**\n * @abstract\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n getSourceState() {\n return abstract();\n }\n\n /**\n * Return the value of this layer's `visible` property. To find out whether the layer\n * is visible on a map, use `isVisible()` instead.\n * @return {boolean} The value of the `visible` property of the layer.\n * @observable\n * @api\n */\n getVisible() {\n return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n }\n\n /**\n * Return the Z-index of the layer, which is used to order layers before\n * rendering. The default Z-index is 0.\n * @return {number} The Z-index of the layer.\n * @observable\n * @api\n */\n getZIndex() {\n return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n }\n\n /**\n * Sets the background color.\n * @param {BackgroundColor} [background] Background color.\n */\n setBackground(background) {\n this.background_ = background;\n this.changed();\n }\n\n /**\n * Set the extent at which the layer is visible. If `undefined`, the layer\n * will be visible at all extents.\n * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n * @observable\n * @api\n */\n setExtent(extent) {\n this.set(LayerProperty.EXTENT, extent);\n }\n\n /**\n * Set the maximum resolution at which the layer is visible.\n * @param {number} maxResolution The maximum resolution of the layer.\n * @observable\n * @api\n */\n setMaxResolution(maxResolution) {\n this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n }\n\n /**\n * Set the minimum resolution at which the layer is visible.\n * @param {number} minResolution The minimum resolution of the layer.\n * @observable\n * @api\n */\n setMinResolution(minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n }\n\n /**\n * Set the maximum zoom (exclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} maxZoom The maximum zoom of the layer.\n * @observable\n * @api\n */\n setMaxZoom(maxZoom) {\n this.set(LayerProperty.MAX_ZOOM, maxZoom);\n }\n\n /**\n * Set the minimum zoom (inclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} minZoom The minimum zoom of the layer.\n * @observable\n * @api\n */\n setMinZoom(minZoom) {\n this.set(LayerProperty.MIN_ZOOM, minZoom);\n }\n\n /**\n * Set the opacity of the layer, allowed values range from 0 to 1.\n * @param {number} opacity The opacity of the layer.\n * @observable\n * @api\n */\n setOpacity(opacity) {\n assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n this.set(LayerProperty.OPACITY, opacity);\n }\n\n /**\n * Set the visibility of the layer (`true` or `false`).\n * @param {boolean} visible The visibility of the layer.\n * @observable\n * @api\n */\n setVisible(visible) {\n this.set(LayerProperty.VISIBLE, visible);\n }\n\n /**\n * Set Z-index of the layer, which is used to order layers before rendering.\n * The default Z-index is 0.\n * @param {number} zindex The z-index of the layer.\n * @observable\n * @api\n */\n setZIndex(zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.state_) {\n this.state_.layer = null;\n this.state_ = null;\n }\n super.disposeInternal();\n }\n}\n\nexport default BaseLayer;\n","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered before a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#prerender\n * @api\n */\n PRERENDER: 'prerender',\n\n /**\n * Triggered after a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered before layers are composed. When dispatched by the map, the event object will not have\n * a `context` set. When dispatched by a layer, the event object will have a `context` set. Only\n * WebGL layers currently dispatch this event.\n * @event module:ol/render/Event~RenderEvent#precompose\n * @api\n */\n PRECOMPOSE: 'precompose',\n\n /**\n * Triggered after layers are composed. When dispatched by the map, the event object will not have\n * a `context` set. When dispatched by a layer, the event object will have a `context` set. Only\n * WebGL layers currently dispatch this event.\n * @event module:ol/render/Event~RenderEvent#postcompose\n * @api\n */\n POSTCOMPOSE: 'postcompose',\n\n /**\n * Triggered when rendering is complete, i.e. all sources and tiles have\n * finished loading for the current viewport, and all tiles are faded in.\n * The event object will not have a `context` set.\n * @event module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\n RENDERCOMPLETE: 'rendercomplete',\n};\n\n/**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */\n\n/**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */\n","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n ANIMATING: 0,\n INTERACTING: 1,\n};\n","/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation',\n};\n","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport const DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport const DEFAULT_TILE_SIZE = 256;\n","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @param {number|undefined} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @param {Array} [centerShift] Shift between map center and viewport center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, isMoving, centerShift) {\n if (!center) {\n return undefined;\n }\n if (!resolution && !onlyCenter) {\n return center;\n }\n const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n const shiftX = centerShift ? centerShift[0] : 0;\n const shiftY = centerShift ? centerShift[1] : 0;\n let minX = extent[0] + viewWidth / 2 + shiftX;\n let maxX = extent[2] - viewWidth / 2 + shiftX;\n let minY = extent[1] + viewHeight / 2 + shiftY;\n let maxY = extent[3] - viewHeight / 2 + shiftY;\n\n // note: when zooming out of bounds, min and max values for x and y may\n // end up inverted (min > max); this has to be accounted for\n if (minX > maxX) {\n minX = (maxX + minX) / 2;\n maxX = minX;\n }\n if (minY > maxY) {\n minY = (maxY + minY) / 2;\n maxY = minY;\n }\n\n let x = clamp(center[0], minX, maxX);\n let y = clamp(center[1], minY, maxY);\n\n // during an interaction, allow some overscroll\n if (isMoving && smooth && resolution) {\n const ratio = 30 * resolution;\n x +=\n -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n y +=\n -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n\n return [x, y];\n }\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} [center] Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n return center;\n}\n","/**\n * @module ol/resolutionconstraint\n */\nimport {clamp} from './math.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {linearFindNearest} from './array.js';\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(\n resolution,\n maxExtent,\n viewportSize,\n showFullExtent\n) {\n const xResolution = getWidth(maxExtent) / viewportSize[0];\n const yResolution = getHeight(maxExtent) / viewportSize[1];\n\n if (showFullExtent) {\n return Math.min(resolution, Math.max(xResolution, yResolution));\n }\n return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n * - at 1, ln(x) is 0\n * - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n let result = Math.min(resolution, maxResolution);\n const ratio = 50;\n\n result *=\n Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n 1;\n if (minResolution) {\n result = Math.max(result, minResolution);\n result /=\n Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n ratio +\n 1;\n }\n return clamp(result, minResolution / 2, maxResolution * 2);\n}\n\n/**\n * @param {Array} resolutions Resolutions.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(\n resolutions,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const maxResolution = resolutions[0];\n const minResolution = resolutions[resolutions.length - 1];\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const capped = Math.min(cappedMaxRes, resolution);\n const z = Math.floor(linearFindNearest(resolutions, capped, direction));\n if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n return resolutions[z + 1];\n }\n return resolutions[z];\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number} [minResolution] Minimum resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(\n power,\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n minResolution = minResolution !== undefined ? minResolution : 0;\n\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const tolerance = 1e-9;\n const minZoomLevel = Math.ceil(\n Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance\n );\n const offset = -direction * (0.5 - tolerance) + 0.5;\n const capped = Math.min(cappedMaxRes, resolution);\n const cappedZoomLevel = Math.floor(\n Math.log(maxResolution / capped) / Math.log(power) + offset\n );\n const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n const newResolution = maxResolution / Math.pow(power, zoomLevel);\n return clamp(newResolution, minResolution, cappedMaxRes);\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n if (!smooth || !isMoving) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n return undefined;\n }\n );\n}\n","/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n if (rotation !== undefined) {\n return 0;\n }\n return undefined;\n}\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n if (rotation !== undefined) {\n return rotation;\n }\n return undefined;\n}\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n const theta = (2 * Math.PI) / n;\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Rotation.\n */\n function (rotation, isMoving) {\n if (isMoving) {\n return rotation;\n }\n\n if (rotation !== undefined) {\n rotation = Math.floor(rotation / theta + 0.5) * theta;\n return rotation;\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} [tolerance] Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(tolerance) {\n tolerance = tolerance || toRadians(5);\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Rotation.\n */\n function (rotation, isMoving) {\n if (isMoving) {\n return rotation;\n }\n\n if (rotation !== undefined) {\n if (Math.abs(rotation) <= tolerance) {\n return 0;\n }\n return rotation;\n }\n return undefined;\n }\n );\n}\n","/**\n * @module ol/easing\n */\n\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n return Math.pow(t, 3);\n}\n\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n return 1 - easeIn(1 - t);\n}\n\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n}\n\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n return t;\n}\n\n/**\n * Start slow, speed up, and at the very end slow down again. This has the\n * same general behavior as {@link module:ol/easing.inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n if (t < 0.5) {\n return inAndOut(2 * t);\n }\n return 1 - inAndOut(2 * (t - 0.5));\n}\n","/**\n * @module ol/has\n */\n\nconst ua =\n typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport const FIREFOX = ua.includes('firefox');\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport const SAFARI_BUG_237906 =\n SAFARI &&\n (ua.includes('version/15.4') ||\n /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.includes('macintosh');\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport const DEVICE_PIXEL_RATIO =\n typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n let passive = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n\n window.addEventListener('_', null, options);\n window.removeEventListener('_', null, options);\n } catch (error) {\n // passive not supported\n }\n return passive;\n})();\n","/**\n * @module ol/transform\n */\nimport {WORKER_OFFSCREEN_CANVAS} from './has.js';\nimport {assert} from './asserts.js';\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array} Transform\n * @api\n */\n\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n\n/**\n * @private\n * @type {Transform}\n */\nconst tmp_ = new Array(6);\n\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n return [1, 0, 0, 1, 0, 0];\n}\n\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n return set(transform, 1, 0, 0, 1, 0, 0);\n}\n\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n const a1 = transform1[0];\n const b1 = transform1[1];\n const c1 = transform1[2];\n const d1 = transform1[3];\n const e1 = transform1[4];\n const f1 = transform1[5];\n const a2 = transform2[0];\n const b2 = transform2[1];\n const c2 = transform2[2];\n const d2 = transform2[3];\n const e2 = transform2[4];\n const f2 = transform2[5];\n\n transform1[0] = a1 * a2 + c1 * b2;\n transform1[1] = b1 * a2 + d1 * b2;\n transform1[2] = a1 * c2 + c1 * d2;\n transform1[3] = b1 * c2 + d1 * d2;\n transform1[4] = a1 * e2 + c1 * f2 + e1;\n transform1[5] = b1 * e2 + d1 * f2 + f1;\n\n return transform1;\n}\n\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n transform[0] = a;\n transform[1] = b;\n transform[2] = c;\n transform[3] = d;\n transform[4] = e;\n transform[5] = f;\n return transform;\n}\n\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n transform1[0] = transform2[0];\n transform1[1] = transform2[1];\n transform1[2] = transform2[2];\n transform1[3] = transform2[3];\n transform1[4] = transform2[4];\n transform1[5] = transform2[5];\n return transform1;\n}\n\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n * chained together.\n */\nexport function apply(transform, coordinate) {\n const x = coordinate[0];\n const y = coordinate[1];\n coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n return coordinate;\n}\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n return set(target, x, 0, 0, y, 0, 0);\n}\n\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n transform[0] = sx * cos;\n transform[1] = sy * sin;\n transform[2] = -sx * sin;\n transform[3] = sy * cos;\n transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n return transform;\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` property of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n return makeInverse(source, source);\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n * the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n const det = determinant(source);\n assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n const a = source[0];\n const b = source[1];\n const c = source[2];\n const d = source[3];\n const e = source[4];\n const f = source[5];\n\n target[0] = d / det;\n target[1] = -b / det;\n target[2] = -c / det;\n target[3] = a / det;\n target[4] = (c * f - d * e) / det;\n target[5] = -(a * f - b * e) / det;\n\n return target;\n}\n\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n return mat[0] * mat[3] - mat[1] * mat[2];\n}\n\n/**\n * @type {HTMLElement}\n * @private\n */\nlet transformStringDiv;\n\n/**\n * A rounded string version of the transform. This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n const transformString = 'matrix(' + mat.join(', ') + ')';\n if (WORKER_OFFSCREEN_CANVAS) {\n return transformString;\n }\n const node =\n transformStringDiv || (transformStringDiv = document.createElement('div'));\n node.style.transform = transformString;\n return node.style.transform;\n}\n","/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n transform,\n dest\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const x = flatCoordinates[j];\n const y = flatCoordinates[j + 1];\n dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array} anchor Rotation anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function rotate(\n flatCoordinates,\n offset,\n end,\n stride,\n angle,\n anchor,\n dest\n) {\n dest = dest ? dest : [];\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array} anchor Scale anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function scale(\n flatCoordinates,\n offset,\n end,\n stride,\n sx,\n sy,\n anchor,\n dest\n) {\n dest = dest ? dest : [];\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function translate(\n flatCoordinates,\n offset,\n end,\n stride,\n deltaX,\n deltaY,\n dest\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n","/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport {abstract} from '../util.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {\n createEmpty,\n createOrUpdateEmpty,\n getHeight,\n returnOrUpdate,\n} from '../extent.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {memoizeOne} from '../functions.js';\nimport {transform2D} from './flat/transform.js';\n\n/**\n * @typedef {'XY' | 'XYZ' | 'XYM' | 'XYZM'} GeometryLayout\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available.\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nclass Geometry extends BaseObject {\n constructor() {\n super();\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.extentRevision_ = -1;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryRevision = 0;\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} revision The geometry revision.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n this.simplifyTransformedInternal = memoizeOne(function (\n revision,\n squaredTolerance,\n transform\n ) {\n if (!transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n const clone = this.clone();\n clone.applyTransform(transform);\n return clone.getSimplifiedGeometry(squaredTolerance);\n });\n }\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this.simplifyTransformedInternal(\n this.getRevision(),\n squaredTolerance,\n transform\n );\n }\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n clone() {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n return abstract();\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const coord = this.getClosestPoint([x, y]);\n return coord[0] === x && coord[1] === y;\n }\n\n /**\n * Return the closest point of the geometry to the passed point as\n * {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} point Point.\n * @param {import(\"../coordinate.js\").Coordinate} [closestPoint] Closest point.\n * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n * @api\n */\n getClosestPoint(point, closestPoint) {\n closestPoint = closestPoint ? closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n }\n\n /**\n * Returns true if this geometry includes the specified coordinate. If the\n * coordinate is on the boundary of the geometry, returns false.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains coordinate.\n * @api\n */\n intersectsCoordinate(coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return abstract();\n }\n\n /**\n * Get the extent of the geometry.\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n getExtent(extent) {\n if (this.extentRevision_ != this.getRevision()) {\n const extent = this.computeExtent(this.extent_);\n if (isNaN(extent[0]) || isNaN(extent[1])) {\n createOrUpdateEmpty(extent);\n }\n this.extentRevision_ = this.getRevision();\n }\n return returnOrUpdate(this.extent_, extent);\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n abstract();\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n abstract();\n }\n\n /**\n * Create a simplified version of this geometry. For linestrings, this uses\n * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n * algorithm. For polygons, a quantization-based\n * simplification is used to preserve topology.\n * @param {number} tolerance The tolerance distance for simplification.\n * @return {Geometry} A new, simplified version of the original geometry.\n * @api\n */\n simplify(tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker\n * algorithm.\n * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Geometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return abstract();\n }\n\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {Type} Geometry type.\n */\n getType() {\n return abstract();\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @abstract\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n */\n applyTransform(transformFn) {\n abstract();\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n */\n intersectsExtent(extent) {\n return abstract();\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n abstract();\n }\n\n /**\n * Transform each coordinate of the geometry from one coordinate reference\n * system to another. The geometry is modified in place.\n * For example, a line will be transformed to a line and a circle to a circle.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Geometry} This geometry. Note that original geometry is\n * modified in place.\n * @api\n */\n transform(source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n const sourceProj = getProjection(source);\n const transformFn =\n sourceProj.getUnits() == 'tile-pixels'\n ? function (inCoordinates, outCoordinates, stride) {\n const pixelExtent = sourceProj.getExtent();\n const projectedExtent = sourceProj.getWorldExtent();\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0\n );\n transform2D(\n inCoordinates,\n 0,\n inCoordinates.length,\n stride,\n tmpTransform,\n outCoordinates\n );\n return getTransform(sourceProj, destination)(\n inCoordinates,\n outCoordinates,\n stride\n );\n }\n : getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n }\n}\n\nexport default Geometry;\n","/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport {rotate, scale, transform2D, translate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nclass SimpleGeometry extends Geometry {\n constructor() {\n super();\n\n /**\n * @protected\n * @type {import(\"./Geometry.js\").GeometryLayout}\n */\n this.layout = 'XY';\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array}\n */\n this.flatCoordinates = null;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromFlatCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent\n );\n }\n\n /**\n * @abstract\n * @return {Array<*> | null} Coordinates.\n */\n getCoordinates() {\n return abstract();\n }\n\n /**\n * Return the first coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n * @api\n */\n getFirstCoordinate() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @return {Array} Flat coordinates.\n */\n getFlatCoordinates() {\n return this.flatCoordinates;\n }\n\n /**\n * Return the last coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} Last point.\n * @api\n */\n getLastCoordinate() {\n return this.flatCoordinates.slice(\n this.flatCoordinates.length - this.stride\n );\n }\n\n /**\n * Return the {@link import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n * @return {import(\"./Geometry.js\").GeometryLayout} Layout.\n * @api\n */\n getLayout() {\n return this.layout;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n // If squaredTolerance is negative or if we know that simplification will not\n // have any effect then just return this.\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometry =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\n }\n // Simplification did not actually remove any coordinates. We now know\n // that any calls to getSimplifiedGeometry with a squaredTolerance less\n // than or equal to the current squaredTolerance will also not have any\n // effect. This allows us to short circuit simplification (saving CPU\n // cycles) and prevents the cache of simplified geometries from filling\n // up with useless identical copies of this geometry (saving memory).\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n return this;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride;\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @param {Array} flatCoordinates Flat coordinates.\n */\n setFlatCoordinates(layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n }\n\n /**\n * @abstract\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n setCoordinates(coordinates, layout) {\n abstract();\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout|undefined} layout Layout.\n * @param {Array<*>} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n setLayout(layout, coordinates, nesting) {\n /** @type {number} */\n let stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n } else {\n for (let i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = 'XY';\n this.stride = 2;\n return;\n }\n coordinates = /** @type {Array} */ (coordinates[0]);\n }\n stride = coordinates.length;\n layout = getLayoutForStride(stride);\n }\n this.layout = layout;\n this.stride = stride;\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n */\n applyTransform(transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n rotate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n angle,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n if (sy === undefined) {\n sy = sx;\n }\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n scale(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n sx,\n sy,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n translate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n deltaX,\n deltaY,\n flatCoordinates\n );\n this.changed();\n }\n }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n let layout;\n if (stride == 2) {\n layout = 'XY';\n } else if (stride == 3) {\n layout = 'XYZ';\n } else if (stride == 4) {\n layout = 'XYZM';\n }\n return /** @type {import(\"./Geometry.js\").GeometryLayout} */ (layout);\n}\n\n/**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n let stride;\n if (layout == 'XY') {\n stride = 2;\n } else if (layout == 'XYZ' || layout == 'XYM') {\n stride = 3;\n } else if (layout == 'XYZM') {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, dest) {\n const flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n }\n const stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n transform,\n dest\n );\n}\n\nexport default SimpleGeometry;\n","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y). Extra\n * dimensions are linearly interpolated.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n */\nfunction assignClosest(\n flatCoordinates,\n offset1,\n offset2,\n stride,\n x,\n y,\n closestPoint\n) {\n const x1 = flatCoordinates[offset1];\n const y1 = flatCoordinates[offset1 + 1];\n const dx = flatCoordinates[offset2] - x1;\n const dy = flatCoordinates[offset2 + 1] - y1;\n let offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n } else {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n } else if (t > 0) {\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(\n flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i],\n t\n );\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n const squaredDelta = squaredDx(x1, y1, x2, y2);\n if (squaredDelta > max) {\n max = squaredDelta;\n }\n x1 = x2;\n y1 = y2;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n ends,\n stride,\n max\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n endss,\n stride,\n max\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n if (offset == end) {\n return minSquaredDistance;\n }\n let i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[offset],\n flatCoordinates[offset + 1]\n );\n if (squaredDistance < minSquaredDistance) {\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n let index = offset + stride;\n while (index < end) {\n assignClosest(\n flatCoordinates,\n index - stride,\n index,\n stride,\n x,\n y,\n tmpPoint\n );\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n index += stride;\n } else {\n // Skip ahead multiple points, because we know that all the skipped\n // points cannot be any closer than the closest point we have found so\n // far. We know this because we know how close the current point is, how\n // close the closest point we have found so far is, and the maximum\n // distance between consecutive points. For example, if we're currently\n // at distance 10, the best we've found so far is 3, and that the maximum\n // distance between consecutive points is 2, then we'll need to skip at\n // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n // finding a closer point. We use Math.max(..., 1) to ensure that we\n // always advance at least one point, to avoid an infinite loop.\n index +=\n stride *\n Math.max(\n ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n maxDelta) |\n 0,\n 1\n );\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n flatCoordinates,\n end - stride,\n offset,\n stride,\n x,\n y,\n tmpPoint\n );\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n minSquaredDistance = assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = end;\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(\n flatCoordinates,\n offset,\n endss,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n","/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n flatCoordinates,\n offset,\n coordinates,\n stride\n) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n const coordinate = coordinates[i];\n for (let j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array} [ends] Ends.\n * @return {Array} Ends.\n */\nexport function deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatess,\n stride,\n ends\n) {\n ends = ends ? ends : [];\n let i = 0;\n for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n const end = deflateCoordinates(\n flatCoordinates,\n offset,\n coordinatess[j],\n stride\n );\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array>} [endss] Endss.\n * @return {Array>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss,\n stride,\n endss\n) {\n endss = endss ? endss : [];\n let i = 0;\n for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n const ends = deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss[j],\n stride,\n endss[i]\n );\n if (ends.length === 0) {\n ends[0] = offset;\n }\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// 1. Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array} [simplifiedFlatCoordinates] Simplified flat\n * coordinates.\n * @return {Array} Simplified line string.\n */\nexport function simplifyLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n highQuality,\n simplifiedFlatCoordinates\n) {\n simplifiedFlatCoordinates =\n simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\n if (!highQuality) {\n end = radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n const n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array} */\n const markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array} */\n const stack = [offset, end - stride];\n let index = 0;\n while (stack.length > 0) {\n const last = stack.pop();\n const first = stack.pop();\n let maxSquaredDistance = 0;\n const x1 = flatCoordinates[first];\n const y1 = flatCoordinates[first + 1];\n const x2 = flatCoordinates[last];\n const y2 = flatCoordinates[last + 1];\n for (let i = first + stride; i < last; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n const squaredDistance = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n if (squaredDistance > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance;\n }\n }\n if (maxSquaredDistance > squaredTolerance) {\n markers[(index - offset) / stride] = 1;\n if (first + stride < index) {\n stack.push(first, index);\n }\n if (index + stride < last) {\n stack.push(index, last);\n }\n }\n }\n for (let i = 0; i < n; ++i) {\n if (markers[i]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride + 1];\n }\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n if (end <= offset + stride) {\n // zero or one point, no simplification possible, so copy and return\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n let x2 = x1;\n let y2 = y1;\n for (offset += stride; offset < end; offset += stride) {\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n // copy point at offset\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n }\n }\n if (x2 != x1 || y2 != y1) {\n // copy last point\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n return tolerance * Math.round(value / tolerance);\n}\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n let x1 = snap(flatCoordinates[offset], tolerance);\n let y1 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // add the first coordinate to the output\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n // find the next coordinate that does not snap to the same value as the first\n // coordinate (P2)\n let x2, y2;\n do {\n x2 = snap(flatCoordinates[offset], tolerance);\n y2 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n if (offset == end) {\n // all coordinates snap to the same value, the line collapses to a point\n // push the last snapped value anyway to ensure that the output contains\n // at least two points\n // FIXME should we really return at least two points anyway?\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n }\n } while (x2 == x1 && y2 == y1);\n while (offset < end) {\n // snap the next coordinate (P3)\n const x3 = snap(flatCoordinates[offset], tolerance);\n const y3 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // skip P3 if it is equal to P2\n if (x3 == x2 && y3 == y2) {\n continue;\n }\n // calculate the delta between P1 and P2\n const dx1 = x2 - x1;\n const dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n const dx2 = x3 - x1;\n const dy2 = y3 - y1;\n // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n // P1 in the same direction then P2 is on the straight line between P1 and\n // P3\n if (\n dx1 * dy2 == dy1 * dx2 &&\n ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))\n ) {\n // discard P2 and set P2 = P3\n x2 = x3;\n y2 = y3;\n continue;\n }\n // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n // between P3 and P1 or on the opposite half of the line to P2. add P2,\n // and continue with P1 = P2 and P2 = P3\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n x2 = x3;\n y2 = y3;\n }\n // add the last point (P2)\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n","/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array} [coordinates] Coordinates.\n * @return {Array} Coordinates.\n */\nexport function inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinates\n) {\n coordinates = coordinates !== undefined ? coordinates : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n coordinates[i++] = flatCoordinates.slice(j, j + stride);\n }\n coordinates.length = i;\n return coordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array>} [coordinatess] Coordinatess.\n * @return {Array>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatess\n) {\n coordinatess = coordinatess !== undefined ? coordinatess : [];\n let i = 0;\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n const end = ends[j];\n coordinatess[i++] = inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinatess[i]\n );\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array>>} [coordinatesss]\n * Coordinatesss.\n * @return {Array>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n coordinatesss\n) {\n coordinatesss = coordinatesss !== undefined ? coordinatesss : [];\n let i = 0;\n for (let j = 0, jj = endss.length; j < jj; ++j) {\n const ends = endss[j];\n coordinatesss[i++] =\n ends.length === 1 && ends[0] === offset\n ? []\n : inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatesss[i]\n );\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n","/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n let twiceArea = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n twiceArea += y1 * x2 - x1 * y2;\n x1 = x2;\n y1 = y2;\n }\n return twiceArea / 2;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n let area = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n let area = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n","/**\n * @module ol/geom/LinearRing\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @api\n */\n clone() {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n maxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Return the area of the linear ring on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingArea(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LinearRing} Simplified LinearRing.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return new LinearRing(simplifiedFlatCoordinates, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'LinearRing';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return false;\n }\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default LinearRing;\n","/**\n * @module ol/geom/Point\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends SimpleGeometry {\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n this.setCoordinates(coordinates, layout);\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @api\n */\n clone() {\n const point = new Point(this.flatCoordinates.slice(), this.layout);\n point.applyProperties(this);\n return point;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[0],\n flatCoordinates[1]\n );\n if (squaredDistance < minSquaredDistance) {\n const stride = this.stride;\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @api\n */\n getCoordinates() {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'Point';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n }\n\n /**\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinate(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default Point;\n","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const outside = forEachCorner(\n extent,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function (coordinate) {\n return !linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinate[0],\n coordinate[1]\n );\n }\n );\n return !outside;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n x,\n y\n) {\n // https://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n let wn = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n if (y1 <= y) {\n if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n wn++;\n }\n } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n wn--;\n }\n x1 = x2;\n y1 = y2;\n }\n return wn !== 0;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n flatCoordinates,\n offset,\n ends,\n stride,\n x,\n y\n) {\n if (ends.length === 0) {\n return false;\n }\n if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n return false;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n flatCoordinates,\n offset,\n endss,\n stride,\n x,\n y\n) {\n if (endss.length === 0) {\n return false;\n }\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {ascending} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array} [dest] Destination.\n * @return {Array} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n flatCentersOffset,\n dest\n) {\n let i, ii, x, x1, x2, y1, y2;\n const y = flatCenters[flatCentersOffset + 1];\n /** @type {Array} */\n const intersections = [];\n // Calculate intersections with the horizontal line\n for (let r = 0, rr = ends.length; r < rr; ++r) {\n const end = ends[r];\n x1 = flatCoordinates[end - stride];\n y1 = flatCoordinates[end - stride + 1];\n for (i = offset; i < end; i += stride) {\n x2 = flatCoordinates[i];\n y2 = flatCoordinates[i + 1];\n if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n intersections.push(x);\n }\n x1 = x2;\n y1 = y2;\n }\n }\n // Find the longest segment of the horizontal line that has its center point\n // inside the linear ring.\n let pointX = NaN;\n let maxSegmentLength = -Infinity;\n intersections.sort(ascending);\n x1 = intersections[0];\n for (i = 1, ii = intersections.length; i < ii; ++i) {\n x2 = intersections[i];\n const segmentLength = Math.abs(x2 - x1);\n if (segmentLength > maxSegmentLength) {\n x = (x1 + x2) / 2;\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n pointX = x;\n maxSegmentLength = segmentLength;\n }\n }\n x1 = x2;\n }\n if (isNaN(pointX)) {\n // There is no horizontal line that has its center point inside the linear\n // ring. Use the center of the the linear ring's extent.\n pointX = flatCenters[flatCentersOffset];\n }\n if (dest) {\n dest.push(pointX, y, maxSegmentLength);\n return dest;\n }\n return [pointX, y, maxSegmentLength];\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @return {Array} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n flatCenters\n) {\n let interiorPoints = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n interiorPoints = getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n 2 * i,\n interiorPoints\n );\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n","/**\n * @module ol/geom/flat/segments\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n let ret;\n offset += stride;\n for (; offset < end; offset += stride) {\n ret = callback(\n flatCoordinates.slice(offset - stride, offset),\n flatCoordinates.slice(offset, offset + stride)\n );\n if (ret) {\n return ret;\n }\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {\n containsExtent,\n createEmpty,\n extendFlatCoordinates,\n intersects,\n intersectsSegment,\n} from '../../extent.js';\nimport {forEach as forEachSegment} from './segments.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\n\n/**\n * @param {Array