{"version":3,"sources":["node_modules/ngx-bootstrap/utils/fesm2022/ngx-bootstrap-utils.mjs","node_modules/ngx-bootstrap/positioning/fesm2022/ngx-bootstrap-positioning.mjs","node_modules/ngx-bootstrap/component-loader/fesm2022/ngx-bootstrap-component-loader.mjs","node_modules/ngx-bootstrap/tooltip/fesm2022/ngx-bootstrap-tooltip.mjs"],"sourcesContent":["import { isDevMode } from '@angular/core';\n\n/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\nclass Trigger {\n constructor(open, close) {\n this.open = open;\n this.close = close || open;\n }\n isManual() {\n return this.open === 'manual' || this.close === 'manual';\n }\n}\nconst DEFAULT_ALIASES = {\n hover: ['mouseover', 'mouseout'],\n focus: ['focusin', 'focusout']\n};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction parseTriggers(triggers, aliases = DEFAULT_ALIASES) {\n const trimmedTriggers = (triggers || '').trim();\n if (trimmedTriggers.length === 0) {\n return [];\n }\n const parsedTriggers = trimmedTriggers.split(/\\s+/).map(trigger => trigger.split(':')).map(triggerPair => {\n const alias = aliases[triggerPair[0]] || triggerPair;\n return new Trigger(alias[0], alias[1]);\n });\n const manualTriggers = parsedTriggers.filter(triggerPair => triggerPair.isManual());\n if (manualTriggers.length > 1) {\n throw new Error('Triggers parse error: only one manual trigger is allowed');\n }\n if (manualTriggers.length === 1 && parsedTriggers.length > 1) {\n throw new Error('Triggers parse error: manual trigger can\\'t be mixed with other triggers');\n }\n return parsedTriggers;\n}\nfunction listenToTriggers(renderer,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntarget, triggers, showFn, hideFn, toggleFn) {\n const parsedTriggers = parseTriggers(triggers);\n const listeners = [];\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n return Function.prototype;\n }\n parsedTriggers.forEach(trigger => {\n if (trigger.open === trigger.close) {\n listeners.push(renderer.listen(target, trigger.open, toggleFn));\n return;\n }\n listeners.push(renderer.listen(target, trigger.open, showFn));\n if (trigger.close) {\n listeners.push(renderer.listen(target, trigger.close, hideFn));\n }\n });\n return () => {\n listeners.forEach(unsubscribeFn => unsubscribeFn());\n };\n}\nfunction listenToTriggersV2(renderer, options) {\n const parsedTriggers = parseTriggers(options.triggers);\n const target = options.target;\n // do nothing\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n return Function.prototype;\n }\n // all listeners\n const listeners = [];\n // lazy listeners registration\n const _registerHide = [];\n const registerHide = () => {\n // add hide listeners to unregister array\n _registerHide.forEach(fn => listeners.push(fn()));\n // register hide events only once\n _registerHide.length = 0;\n };\n // register open\\close\\toggle listeners\n parsedTriggers.forEach(trigger => {\n const useToggle = trigger.open === trigger.close;\n const showFn = useToggle ? options.toggle : options.show;\n if (!useToggle && trigger.close && options.hide) {\n const triggerClose = trigger.close;\n const optionsHide = options.hide;\n const _hide = () => renderer.listen(target, triggerClose, optionsHide);\n _registerHide.push(_hide);\n }\n if (showFn) {\n listeners.push(renderer.listen(target, trigger.open, () => showFn(registerHide)));\n }\n });\n return () => {\n listeners.forEach(unsubscribeFn => unsubscribeFn());\n };\n}\nfunction registerOutsideClick(renderer, options) {\n if (!options.outsideClick) {\n return Function.prototype;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return renderer.listen('document', 'click', event => {\n if (options.target && options.target.contains(event.target)) {\n return;\n }\n if (options.targets && options.targets.some(target => target.contains(event.target))) {\n return;\n }\n if (options.hide) {\n options.hide();\n }\n });\n}\nfunction registerEscClick(renderer, options) {\n if (!options.outsideEsc) {\n return Function.prototype;\n }\n return renderer.listen('document', 'keyup.esc', event => {\n if (options.target && options.target.contains(event.target)) {\n return;\n }\n if (options.targets && options.targets.some(target => target.contains(event.target))) {\n return;\n }\n if (options.hide) {\n options.hide();\n }\n });\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * JS version of browser APIs. This library can only run in the browser.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst win = typeof window !== 'undefined' && window || {};\nconst document = win.document;\nconst location = win.location;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst gc = win.gc ? () => win.gc() : () => null;\nconst performance = win.performance ? win.performance : null;\nconst Event = win.Event;\nconst MouseEvent = win.MouseEvent;\nconst KeyboardEvent = win.KeyboardEvent;\nconst EventTarget = win.EventTarget;\nconst History = win.History;\nconst Location = win.Location;\nconst EventListener = win.EventListener;\nvar BsVerions = /*#__PURE__*/function (BsVerions) {\n BsVerions[\"isBs4\"] = \"bs4\";\n BsVerions[\"isBs5\"] = \"bs5\";\n return BsVerions;\n}(BsVerions || {});\nlet guessedVersion;\nfunction _guessBsVersion() {\n const spanEl = win.document.createElement('span');\n spanEl.innerText = 'testing bs version';\n spanEl.classList.add('d-none');\n spanEl.classList.add('pl-1');\n win.document.head.appendChild(spanEl);\n const checkPadding = win.getComputedStyle(spanEl).paddingLeft;\n if (checkPadding && parseFloat(checkPadding)) {\n win.document.head.removeChild(spanEl);\n return 'bs4';\n }\n win.document.head.removeChild(spanEl);\n return 'bs5';\n}\nfunction setTheme(theme) {\n guessedVersion = theme;\n}\nfunction isBs4() {\n if (guessedVersion) return guessedVersion === 'bs4';\n guessedVersion = _guessBsVersion();\n return guessedVersion === 'bs4';\n}\nfunction isBs5() {\n if (guessedVersion) return guessedVersion === 'bs5';\n guessedVersion = _guessBsVersion();\n return guessedVersion === 'bs5';\n}\nfunction getBsVer() {\n return {\n isBs4: isBs4(),\n isBs5: isBs5()\n };\n}\nfunction currentBsVersion() {\n const bsVer = getBsVer();\n const resVersion = Object.keys(bsVer).find(key => bsVer[key]);\n return BsVerions[resVersion];\n}\nclass LinkedList {\n constructor() {\n this.length = 0;\n this.asArray = [];\n // Array methods overriding END\n }\n get(position) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n return void 0;\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = current?.next;\n }\n return current?.value;\n }\n add(value, position = this.length) {\n if (position < 0 || position > this.length) {\n throw new Error('Position is out of the list');\n }\n const node = {\n value,\n next: undefined,\n previous: undefined\n };\n if (this.length === 0) {\n this.head = node;\n this.tail = node;\n this.current = node;\n } else {\n if (position === 0 && this.head) {\n // first node\n node.next = this.head;\n this.head.previous = node;\n this.head = node;\n } else if (position === this.length && this.tail) {\n // last node\n this.tail.next = node;\n node.previous = this.tail;\n this.tail = node;\n } else {\n // node in middle\n const currentPreviousNode = this.getNode(position - 1);\n const currentNextNode = currentPreviousNode?.next;\n if (currentPreviousNode && currentNextNode) {\n currentPreviousNode.next = node;\n currentNextNode.previous = node;\n node.previous = currentPreviousNode;\n node.next = currentNextNode;\n }\n }\n }\n this.length++;\n this.createInternalArrayRepresentation();\n }\n remove(position = 0) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n throw new Error('Position is out of the list');\n }\n if (position === 0 && this.head) {\n // first node\n this.head = this.head.next;\n if (this.head) {\n // there is no second node\n this.head.previous = undefined;\n } else {\n // there is no second node\n this.tail = undefined;\n }\n } else if (position === this.length - 1 && this.tail?.previous) {\n // last node\n this.tail = this.tail.previous;\n this.tail.next = undefined;\n } else {\n // middle node\n const removedNode = this.getNode(position);\n if (removedNode?.next && removedNode.previous) {\n removedNode.next.previous = removedNode.previous;\n removedNode.previous.next = removedNode.next;\n }\n }\n this.length--;\n this.createInternalArrayRepresentation();\n }\n set(position, value) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n throw new Error('Position is out of the list');\n }\n const node = this.getNode(position);\n if (node) {\n node.value = value;\n this.createInternalArrayRepresentation();\n }\n }\n toArray() {\n return this.asArray;\n }\n findAll(fn) {\n let current = this.head;\n const result = [];\n if (!current) {\n return result;\n }\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return result;\n }\n if (fn(current.value, index)) {\n result.push({\n index,\n value: current.value\n });\n }\n current = current.next;\n }\n return result;\n }\n // Array methods overriding start\n push(...args) {\n args.forEach(arg => {\n this.add(arg);\n });\n return this.length;\n }\n pop() {\n if (this.length === 0) {\n return undefined;\n }\n const last = this.tail;\n this.remove(this.length - 1);\n return last?.value;\n }\n unshift(...args) {\n args.reverse();\n args.forEach(arg => {\n this.add(arg, 0);\n });\n return this.length;\n }\n shift() {\n if (this.length === 0) {\n return undefined;\n }\n const lastItem = this.head?.value;\n this.remove();\n return lastItem;\n }\n forEach(fn) {\n let current = this.head;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return;\n }\n fn(current.value, index);\n current = current.next;\n }\n }\n indexOf(value) {\n let current = this.head;\n let position = -1;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return position;\n }\n if (current.value === value) {\n position = index;\n break;\n }\n current = current.next;\n }\n return position;\n }\n some(fn) {\n let current = this.head;\n let result = false;\n while (current && !result) {\n if (fn(current.value)) {\n result = true;\n break;\n }\n current = current.next;\n }\n return result;\n }\n every(fn) {\n let current = this.head;\n let result = true;\n while (current && result) {\n if (!fn(current.value)) {\n result = false;\n }\n current = current.next;\n }\n return result;\n }\n toString() {\n return '[Linked List]';\n }\n find(fn) {\n let current = this.head;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return;\n }\n if (fn(current.value, index)) {\n return current.value;\n }\n current = current.next;\n }\n }\n findIndex(fn) {\n let current = this.head;\n for (let index = 0; index < this.length; index++) {\n if (!current) {\n return -1;\n }\n if (fn(current.value, index)) {\n return index;\n }\n current = current.next;\n }\n return -1;\n }\n getNode(position) {\n if (this.length === 0 || position < 0 || position >= this.length) {\n throw new Error('Position is out of the list');\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = current?.next;\n }\n return current;\n }\n createInternalArrayRepresentation() {\n const outArray = [];\n let current = this.head;\n while (current) {\n outArray.push(current.value);\n current = current.next;\n }\n this.asArray = outArray;\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction OnChange() {\n const sufix = 'Change';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function OnChangeHandler(target, propertyKey) {\n const _key = ` __${propertyKey}Value`;\n Object.defineProperty(target, propertyKey, {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get() {\n return this[_key];\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(value) {\n const prevValue = this[_key];\n this[_key] = value;\n if (prevValue !== value && this[propertyKey + sufix]) {\n this[propertyKey + sufix].emit(value);\n }\n }\n });\n };\n}\nclass Utils {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static reflow(element) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (bs => bs)(element.offsetHeight);\n }\n // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static getStyles(elem) {\n // Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n // IE throws on elements created in popups\n // FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n let view = elem.ownerDocument.defaultView;\n if (!view || !view.opener) {\n view = win;\n }\n return view.getComputedStyle(elem);\n }\n static stackOverflowConfig() {\n const bsVer = currentBsVersion();\n return {\n crossorigin: \"anonymous\",\n integrity: bsVer === 'bs5' ? 'sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65' : 'sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2',\n cdnLink: bsVer === 'bs5' ? 'https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css' : 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css'\n };\n }\n}\nconst _messagesHash = {};\nconst _hideMsg = typeof console === 'undefined' || !('warn' in console);\nfunction warnOnce(msg) {\n if (!isDevMode() || _hideMsg || msg in _messagesHash) {\n return;\n }\n _messagesHash[msg] = true;\n console.warn(msg);\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BsVerions, LinkedList, OnChange, Trigger, Utils, currentBsVersion, document, getBsVer, listenToTriggers, listenToTriggersV2, parseTriggers, registerEscClick, registerOutsideClick, setTheme, warnOnce, win as window };\n","import { getBsVer } from 'ngx-bootstrap/utils';\nimport * as i0 from '@angular/core';\nimport { PLATFORM_ID, Injectable, Inject, ElementRef } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Subject, merge, fromEvent, of, animationFrameScheduler } from 'rxjs';\nvar MapPlacementInToRL = /*#__PURE__*/function (MapPlacementInToRL) {\n MapPlacementInToRL[\"top\"] = \"top\";\n MapPlacementInToRL[\"bottom\"] = \"bottom\";\n MapPlacementInToRL[\"left\"] = \"left\";\n MapPlacementInToRL[\"right\"] = \"right\";\n MapPlacementInToRL[\"auto\"] = \"auto\";\n MapPlacementInToRL[\"end\"] = \"right\";\n MapPlacementInToRL[\"start\"] = \"left\";\n MapPlacementInToRL[\"top left\"] = \"top left\";\n MapPlacementInToRL[\"top right\"] = \"top right\";\n MapPlacementInToRL[\"right top\"] = \"right top\";\n MapPlacementInToRL[\"right bottom\"] = \"right bottom\";\n MapPlacementInToRL[\"bottom right\"] = \"bottom right\";\n MapPlacementInToRL[\"bottom left\"] = \"bottom left\";\n MapPlacementInToRL[\"left bottom\"] = \"left bottom\";\n MapPlacementInToRL[\"left top\"] = \"left top\";\n MapPlacementInToRL[\"top start\"] = \"top left\";\n MapPlacementInToRL[\"top end\"] = \"top right\";\n MapPlacementInToRL[\"end top\"] = \"right top\";\n MapPlacementInToRL[\"end bottom\"] = \"right bottom\";\n MapPlacementInToRL[\"bottom end\"] = \"bottom right\";\n MapPlacementInToRL[\"bottom start\"] = \"bottom left\";\n MapPlacementInToRL[\"start bottom\"] = \"start bottom\";\n MapPlacementInToRL[\"start top\"] = \"left top\";\n return MapPlacementInToRL;\n}(MapPlacementInToRL || {});\nvar PlacementForBs5 = /*#__PURE__*/function (PlacementForBs5) {\n PlacementForBs5[\"top\"] = \"top\";\n PlacementForBs5[\"bottom\"] = \"bottom\";\n PlacementForBs5[\"left\"] = \"start\";\n PlacementForBs5[\"right\"] = \"end\";\n PlacementForBs5[\"auto\"] = \"auto\";\n PlacementForBs5[\"end\"] = \"end\";\n PlacementForBs5[\"start\"] = \"start\";\n PlacementForBs5[\"top left\"] = \"top start\";\n PlacementForBs5[\"top right\"] = \"top end\";\n PlacementForBs5[\"right top\"] = \"end top\";\n PlacementForBs5[\"right bottom\"] = \"end bottom\";\n PlacementForBs5[\"bottom right\"] = \"bottom end\";\n PlacementForBs5[\"bottom left\"] = \"bottom start\";\n PlacementForBs5[\"left bottom\"] = \"start bottom\";\n PlacementForBs5[\"left top\"] = \"start top\";\n PlacementForBs5[\"top start\"] = \"top start\";\n PlacementForBs5[\"top end\"] = \"top end\";\n PlacementForBs5[\"end top\"] = \"end top\";\n PlacementForBs5[\"end bottom\"] = \"end bottom\";\n PlacementForBs5[\"bottom end\"] = \"bottom end\";\n PlacementForBs5[\"bottom start\"] = \"bottom start\";\n PlacementForBs5[\"start bottom\"] = \"start bottom\";\n PlacementForBs5[\"start top\"] = \"start top\";\n return PlacementForBs5;\n}(PlacementForBs5 || {});\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window?.getComputedStyle(element, null);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return property ? css && css[property] : css;\n}\n\n/**\n * Returns the offset parent of the given element\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n const noOffsetParent = null;\n // NOTE: 1 DOM access here\n let offsetParent = element?.offsetParent;\n // Skip hidden elements which don't have an offsetParent\n let sibling = void 0;\n while (offsetParent === noOffsetParent && element.nextElementSibling && sibling !== element.nextElementSibling) {\n // todo: valorkin fix\n sibling = element.nextElementSibling;\n offsetParent = sibling.offsetParent;\n }\n const nodeName = offsetParent && offsetParent.nodeName;\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return sibling ? sibling.ownerDocument.documentElement : document.documentElement;\n }\n // .offsetParent will return the closest TH, TD or TABLE in case\n if (offsetParent && ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n return offsetParent;\n}\n\n// todo: valorkin fix\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isOffsetContainer(element) {\n const {\n nodeName\n } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n // todo: valorkin fix\n const commonAncestorContainer = range.commonAncestorContainer;\n // Both nodes are inside #document\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n return getOffsetParent(commonAncestorContainer);\n }\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n */\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el?.parentElement && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Helper to detect borders of a given element\n */\nfunction getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n return parseFloat(styles[`border${sideA}Width`]) + parseFloat(styles[`border${sideB}Width`]);\n}\nfunction getSize(axis, body, html) {\n const _body = body;\n const _html = html;\n return Math.max(_body[`offset${axis}`], _body[`scroll${axis}`], _html[`client${axis}`], _html[`offset${axis}`], _html[`scroll${axis}`], 0);\n}\nfunction getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n return {\n height: getSize('Height', body, html),\n width: getSize('Width', body, html)\n };\n}\nfunction getClientRect(offsets) {\n return {\n ...offsets,\n right: (offsets.left || 0) + offsets.width,\n bottom: (offsets.top || 0) + offsets.height\n };\n}\n\n/**\n * Tells if a given input is a number\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(Number(n));\n}\nfunction isNumber(value) {\n return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';\n}\n\n/**\n * Get bounding client rect of given element\n */\nfunction getBoundingClientRect(element) {\n const rect = element.getBoundingClientRect();\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n // try {\n // if (isIE(10)) {\n // const scrollTop = getScroll(element, 'top');\n // const scrollLeft = getScroll(element, 'left');\n // if (rect && isNumber(rect.top) && isNumber(rect.left) && isNumber(rect.bottom) && isNumber(rect.right)) {\n // rect.top += scrollTop;\n // rect.left += scrollLeft;\n // rect.bottom += scrollTop;\n // rect.right += scrollLeft;\n // }\n // }\n // } catch (e) {\n // return rect;\n // }\n if (!(rect && isNumber(rect.top) && isNumber(rect.left) && isNumber(rect.bottom) && isNumber(rect.right))) {\n return rect;\n }\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : undefined;\n const width = sizes?.width || element.clientWidth || isNumber(rect.right) && isNumber(result.left) && rect.right - result.left || 0;\n const height = sizes?.height || element.clientHeight || isNumber(rect.bottom) && isNumber(result.top) && rect.bottom - result.top || 0;\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n return getClientRect(result);\n}\nfunction getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top ?? 0, 0);\n parentRect.left = Math.max(parentRect.left ?? 0, 0);\n }\n const offsets = getClientRect({\n top: (childrenRect.top ?? 0) - (parentRect.top ?? 0) - borderTopWidth,\n left: (childrenRect.left ?? 0) - (parentRect.left ?? 0) - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n if (isNumber(offsets.top)) {\n offsets.top -= borderTopWidth - marginTop;\n }\n if (isNumber(offsets.bottom)) {\n offsets.bottom -= borderTopWidth - marginTop;\n }\n if (isNumber(offsets.left)) {\n offsets.left -= borderLeftWidth - marginLeft;\n }\n if (isNumber(offsets.right)) {\n offsets.right -= borderLeftWidth - marginLeft;\n }\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n return offsets;\n}\n\n/**\n * Returns the parentNode or the host of the element\n */\n// todo: valorkin fix\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n */\n// todo: valorkin fix\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n default:\n }\n // Firefox want us to check `-x` and `-y` variations as well\n const {\n overflow,\n overflowX,\n overflowY\n } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(String(overflow) + String(overflowY) + String(overflowX))) {\n return element;\n }\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n */\nfunction getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n return element[upperSide];\n}\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n const offset = {\n top: scrollTop - Number(relativeOffset?.top) + Number(relativeOffset?.marginTop),\n left: scrollLeft - Number(relativeOffset?.left) + Number(relativeOffset?.marginLeft),\n width,\n height\n };\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n */\nfunction isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n return isFixed(getParentNode(element));\n}\nfunction getBoundaries(target, host, padding = 0, boundariesElement, fixedPosition = false) {\n // NOTE: 1 DOM access here\n let boundaries = {\n top: 0,\n left: 0\n };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(target) : findCommonOffsetParent(target, host);\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(host));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = target.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = target.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n const offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n // In case of HTML, we need a different computation\n if (offsets && boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const {\n height,\n width\n } = getWindowSizes(target.ownerDocument);\n if (isNumber(boundaries.top) && isNumber(offsets.top) && isNumber(offsets.marginTop)) {\n boundaries.top += offsets.top - offsets.marginTop;\n }\n if (isNumber(boundaries.top)) {\n boundaries.bottom = Number(height) + Number(offsets.top);\n }\n if (isNumber(boundaries.left) && isNumber(offsets.left) && isNumber(offsets.marginLeft)) {\n boundaries.left += offsets.left - offsets.marginLeft;\n }\n if (isNumber(boundaries.top)) {\n boundaries.right = Number(width) + Number(offsets.left);\n }\n } else if (offsets) {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n // Add paddings\n if (isNumber(boundaries.left)) {\n boundaries.left += padding;\n }\n if (isNumber(boundaries.top)) {\n boundaries.top += padding;\n }\n if (isNumber(boundaries.right)) {\n boundaries.right -= padding;\n }\n if (isNumber(boundaries.bottom)) {\n boundaries.bottom -= padding;\n }\n return boundaries;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n */\nfunction getArea({\n width,\n height\n}) {\n return width * height;\n}\nfunction computeAutoPlacement(placement, refRect, target, host, allowedPositions = ['top', 'bottom', 'right', 'left'], boundariesElement = 'viewport', padding = 0) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n const boundaries = getBoundaries(target, host, padding, boundariesElement);\n const rects = {\n top: {\n width: boundaries?.width ?? 0,\n height: (refRect?.top ?? 0) - (boundaries?.top ?? 0)\n },\n right: {\n width: (boundaries?.right ?? 0) - (refRect?.right ?? 0),\n height: boundaries?.height ?? 0\n },\n bottom: {\n width: boundaries?.width ?? 0,\n height: (boundaries?.bottom ?? 0) - (refRect?.bottom ?? 0)\n },\n left: {\n width: (refRect.left ?? 0) - (boundaries?.left ?? 0),\n height: boundaries?.height ?? 0\n }\n };\n const sortedAreas = Object.keys(rects).map(key => ({\n position: key,\n ...rects[key],\n area: getArea(rects[key])\n })).sort((a, b) => b.area - a.area);\n let filteredAreas = sortedAreas.filter(({\n width,\n height\n }) => {\n return width >= target.clientWidth && height >= target.clientHeight;\n });\n filteredAreas = filteredAreas.filter(({\n position\n }) => {\n return allowedPositions.some(allowedPosition => {\n return allowedPosition === position;\n });\n });\n const computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].position : sortedAreas[0].position;\n const variation = placement.split(' ')[1];\n // for tooltip on auto position\n target.className = target.className.replace(/bs-tooltip-auto/g, `bs-tooltip-${getBsVer().isBs5 ? PlacementForBs5[computedPlacement] : computedPlacement}`);\n return computedPlacement + (variation ? `-${variation}` : '');\n}\nfunction getOffsets(data) {\n return {\n width: data.offsets.target.width,\n height: data.offsets.target.height,\n left: Math.floor(data.offsets.target.left ?? 0),\n top: Math.round(data.offsets.target.top ?? 0),\n bottom: Math.round(data.offsets.target.bottom ?? 0),\n right: Math.floor(data.offsets.target.right ?? 0)\n };\n}\n\n/**\n * Get the opposite placement of the given one\n */\nfunction getOppositePlacement(placement) {\n const hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n\n/**\n * Get the opposite placement variation of the given one\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'right') {\n return 'left';\n } else if (variation === 'left') {\n return 'right';\n }\n return variation;\n}\nconst parse = (value, def = 0) => value ? parseFloat(value) : def;\nfunction getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window?.getComputedStyle(element);\n const x = parse(styles?.marginTop) + parse(styles?.marginBottom);\n const y = parse(styles?.marginLeft) + parse(styles?.marginRight);\n return {\n width: Number(element.offsetWidth) + y,\n height: Number(element.offsetHeight) + x\n };\n}\n\n/**\n * Get offsets to the reference element\n */\nfunction getReferenceOffsets(target, host, fixedPosition) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(target) : findCommonOffsetParent(target, host);\n return getOffsetRectRelativeToArbitraryNode(host, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get offsets to the target\n */\nfunction getTargetOffsets(target, hostOffsets, position) {\n const placement = position.split(' ')[0];\n // Get target node sizes\n const targetRect = getOuterSizes(target);\n // Add position, width and height to our offsets object\n const targetOffsets = {\n width: targetRect.width,\n height: targetRect.height\n };\n // depending by the target placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n targetOffsets[mainSide] = (hostOffsets[mainSide] ?? 0) + hostOffsets[measurement] / 2 - targetRect[measurement] / 2;\n targetOffsets[secondarySide] = placement === secondarySide ? (hostOffsets[secondarySide] ?? 0) - targetRect[secondaryMeasurement] : hostOffsets[getOppositePlacement(secondarySide)] ?? 0;\n return targetOffsets;\n}\nfunction isModifierEnabled(options, modifierName) {\n return !!options.modifiers[modifierName]?.enabled;\n}\nconst availablePositions = {\n top: ['top', 'top start', 'top end'],\n bottom: ['bottom', 'bottom start', 'bottom end'],\n start: ['start', 'start top', 'start bottom'],\n end: ['end', 'end top', 'end bottom']\n};\nfunction checkPopoverMargin(placement, checkPosition) {\n if (!getBsVer().isBs5) {\n return false;\n }\n return availablePositions[checkPosition].includes(placement);\n}\nfunction checkMargins(placement) {\n if (!getBsVer().isBs5) {\n return '';\n }\n if (checkPopoverMargin(placement, 'end')) {\n return 'ms-2';\n }\n if (checkPopoverMargin(placement, 'start')) {\n return 'me-2';\n }\n if (checkPopoverMargin(placement, 'top')) {\n return 'mb-2';\n }\n if (checkPopoverMargin(placement, 'bottom')) {\n return 'mt-2';\n }\n return '';\n}\nfunction updateContainerClass(data, renderer) {\n const target = data.instance.target;\n let containerClass = target.className;\n const dataPlacement = getBsVer().isBs5 ? PlacementForBs5[data.placement] : data.placement;\n if (data.placementAuto) {\n containerClass = containerClass.replace(/bs-popover-auto/g, `bs-popover-${dataPlacement}`);\n containerClass = containerClass.replace(/ms-2|me-2|mb-2|mt-2/g, '');\n containerClass = containerClass.replace(/bs-tooltip-auto/g, `bs-tooltip-${dataPlacement}`);\n containerClass = containerClass.replace(/\\sauto/g, ` ${dataPlacement}`);\n if (containerClass.indexOf('popover') !== -1) {\n containerClass = containerClass + ' ' + checkMargins(dataPlacement);\n }\n if (containerClass.indexOf('popover') !== -1 && containerClass.indexOf('popover-auto') === -1) {\n containerClass += ' popover-auto';\n }\n if (containerClass.indexOf('tooltip') !== -1 && containerClass.indexOf('tooltip-auto') === -1) {\n containerClass += ' tooltip-auto';\n }\n }\n containerClass = containerClass.replace(/left|right|top|bottom|end|start/g, `${dataPlacement.split(' ')[0]}`);\n if (renderer) {\n renderer.setAttribute(target, 'class', containerClass);\n return;\n }\n target.className = containerClass;\n}\nfunction setStyles(element, styles, renderer) {\n if (!element || !styles) {\n return;\n }\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n if (renderer) {\n renderer.setStyle(element, prop, `${String(styles[prop])}${unit}`);\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n element.style[prop] = String(styles[prop]) + unit;\n });\n}\nfunction arrow(data) {\n let targetOffsets = data.offsets.target;\n // if arrowElement is a string, suppose it's a CSS selector\n const arrowElement = data.instance.target.querySelector('.arrow');\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n const isVertical = ['left', 'right'].indexOf(data.placement.split(' ')[0]) !== -1;\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n const placementVariation = data.placement.split(' ')[1];\n // top/left side\n if ((data.offsets.host[opSide] ?? 0) - arrowElementSize < (targetOffsets[side] ?? 0)) {\n targetOffsets[side] -= (targetOffsets[side] ?? 0) - ((data.offsets.host[opSide] ?? 0) - arrowElementSize);\n }\n // bottom/right side\n if (Number(data.offsets.host[side]) + Number(arrowElementSize) > (targetOffsets[opSide] ?? 0)) {\n targetOffsets[side] += Number(data.offsets.host[side]) + Number(arrowElementSize) - Number(targetOffsets[opSide]);\n }\n targetOffsets = getClientRect(targetOffsets);\n // Compute the sideValue using the updated target offsets\n // take target margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.target);\n const targetMarginSide = parseFloat(css[`margin${sideCapitalized}`]) || 0;\n const targetBorderSide = parseFloat(css[`border${sideCapitalized}Width`]) || 0;\n // compute center of the target\n let center;\n if (!placementVariation) {\n center = Number(data.offsets.host[side]) + Number(data.offsets.host[len] / 2 - arrowElementSize / 2);\n } else {\n const targetBorderRadius = parseFloat(css[\"borderRadius\"]) || 0;\n const targetSideArrowOffset = Number(targetMarginSide + targetBorderSide + targetBorderRadius);\n center = side === placementVariation ? Number(data.offsets.host[side]) + targetSideArrowOffset : Number(data.offsets.host[side]) + Number(data.offsets.host[len] - targetSideArrowOffset);\n }\n let sideValue = center - (targetOffsets[side] ?? 0) - targetMarginSide - targetBorderSide;\n // prevent arrowElement from being placed not contiguously to its target\n sideValue = Math.max(Math.min(targetOffsets[len] - (arrowElementSize + 5), sideValue), 0);\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '' // make sure to unset any eventual altSide value from the DOM node\n };\n data.instance.arrow = arrowElement;\n return data;\n}\nfunction flip(data) {\n data.offsets.target = getClientRect(data.offsets.target);\n if (!isModifierEnabled(data.options, 'flip')) {\n data.offsets.target = {\n ...data.offsets.target,\n ...getTargetOffsets(data.instance.target, data.offsets.host, data.placement)\n };\n return data;\n }\n const boundaries = getBoundaries(data.instance.target, data.instance.host, 0,\n // padding\n 'viewport', false // positionFixed\n );\n let placement = data.placement.split(' ')[0];\n let variation = data.placement.split(' ')[1] || '';\n const offsetsHost = data.offsets.host;\n const target = data.instance.target;\n const host = data.instance.host;\n const adaptivePosition = computeAutoPlacement('auto', offsetsHost, target, host, data.options.allowedPositions);\n const flipOrder = [placement, adaptivePosition];\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return;\n }\n placement = data.placement.split(' ')[0];\n // using floor because the host offsets may contain decimals we are not going to consider here\n const overlapsRef = placement === 'left' && Math.floor(data.offsets.target.right ?? 0) > Math.floor(data.offsets.host.left ?? 0) || placement === 'right' && Math.floor(data.offsets.target.left ?? 0) < Math.floor(data.offsets.host.right ?? 0) || placement === 'top' && Math.floor(data.offsets.target.bottom ?? 0) > Math.floor(data.offsets.host.top ?? 0) || placement === 'bottom' && Math.floor(data.offsets.target.top ?? 0) < Math.floor(data.offsets.host.bottom ?? 0);\n const overflowsLeft = Math.floor(data.offsets.target.left ?? 0) < Math.floor(boundaries.left ?? 0);\n const overflowsRight = Math.floor(data.offsets.target.right ?? 0) > Math.floor(boundaries.right ?? 0);\n const overflowsTop = Math.floor(data.offsets.target.top ?? 0) < Math.floor(boundaries.top ?? 0);\n const overflowsBottom = Math.floor(data.offsets.target.bottom ?? 0) > Math.floor(boundaries.bottom ?? 0);\n const overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const flippedVariation = isVertical && variation === 'left' && overflowsLeft || isVertical && variation === 'right' && overflowsRight || !isVertical && variation === 'left' && overflowsTop || !isVertical && variation === 'right' && overflowsBottom;\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n data.placement = placement + (variation ? ` ${variation}` : '');\n data.offsets.target = {\n ...data.offsets.target,\n ...getTargetOffsets(data.instance.target, data.offsets.host, data.placement)\n };\n }\n });\n return data;\n}\nfunction initData(targetElement, hostElement, position, options) {\n if (!targetElement || !hostElement) {\n return;\n }\n const hostElPosition = getReferenceOffsets(targetElement, hostElement);\n if (!position.match(/^(auto)*\\s*(left|right|top|bottom|start|end)*$/) && !position.match(/^(left|right|top|bottom|start|end)*(?: (left|right|top|bottom|start|end))*$/)) {\n position = 'auto';\n }\n const placementAuto = !!position.match(/auto/g);\n // support old placements 'auto left|right|top|bottom'\n let placement = position.match(/auto\\s(left|right|top|bottom|start|end)/) ? position.split(' ')[1] || 'auto' : position;\n // Normalize placements that have identical main placement and variation (\"right right\" => \"right\").\n const matches = placement.match(/^(left|right|top|bottom|start|end)* ?(?!\\1)(left|right|top|bottom|start|end)?/);\n if (matches) {\n placement = matches[1] + (matches[2] ? ` ${matches[2]}` : '');\n }\n // \"left right\", \"top bottom\" etc. placements also considered incorrect.\n if (['left right', 'right left', 'top bottom', 'bottom top'].indexOf(placement) !== -1) {\n placement = 'auto';\n }\n placement = computeAutoPlacement(placement, hostElPosition, targetElement, hostElement, options ? options.allowedPositions : undefined);\n const targetOffset = getTargetOffsets(targetElement, hostElPosition, placement);\n return {\n options: options || {\n modifiers: {}\n },\n instance: {\n target: targetElement,\n host: hostElement,\n arrow: void 0\n },\n offsets: {\n target: targetOffset,\n host: hostElPosition,\n arrow: void 0\n },\n positionFixed: false,\n placement,\n placementAuto\n };\n}\nfunction preventOverflow(data) {\n if (!isModifierEnabled(data.options, 'preventOverflow')) {\n return data;\n }\n // NOTE: DOM access here\n // resets the target Offsets's position so that the document size can be calculated excluding\n // the size of the targetOffsets element itself\n const transformProp = 'transform';\n const targetStyles = data.instance.target.style; // assignment to help minification\n const {\n top,\n left,\n [transformProp]: transform\n } = targetStyles;\n targetStyles.top = '';\n targetStyles.left = '';\n targetStyles[transformProp] = '';\n const boundaries = getBoundaries(data.instance.target, data.instance.host, 0,\n // padding\n data.options.modifiers.preventOverflow?.boundariesElement || 'scrollParent', false // positionFixed\n );\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n targetStyles.top = top;\n targetStyles.left = left;\n targetStyles[transformProp] = transform;\n const order = ['left', 'right', 'top', 'bottom'];\n const check = {\n primary(placement) {\n let value = data.offsets.target[placement];\n // options.escapeWithReference\n if ((data.offsets.target[placement] ?? 0) < (boundaries[placement] ?? 0)) {\n value = Math.max(data.offsets.target[placement] ?? 0, boundaries[placement] ?? 0);\n }\n return {\n [placement]: value\n };\n },\n secondary(placement) {\n const isPlacementHorizontal = placement === 'right';\n const mainSide = isPlacementHorizontal ? 'left' : 'top';\n const measurement = isPlacementHorizontal ? 'width' : 'height';\n let value = data.offsets.target[mainSide];\n // escapeWithReference\n if ((data.offsets.target[placement] ?? 0) > (boundaries[placement] ?? 0)) {\n value = Math.min(data.offsets.target[mainSide] ?? 0, (boundaries[placement] ?? 0) - data.offsets.target[measurement]);\n }\n return {\n [mainSide]: value\n };\n }\n };\n order.forEach(placement => {\n const side = ['left', 'top', 'start'].indexOf(placement) !== -1 ? check['primary'] : check['secondary'];\n data.offsets.target = {\n ...data.offsets.target,\n ...side(placement)\n };\n });\n return data;\n}\nfunction shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split(' ')[0];\n const shiftVariation = placement.split(' ')[1];\n if (shiftVariation) {\n const {\n host,\n target\n } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n const shiftOffsets = {\n start: {\n [side]: host[side]\n },\n end: {\n [side]: (host[side] ?? 0) + host[measurement] - target[measurement]\n }\n };\n data.offsets.target = {\n ...target,\n ...{\n [side]: side === shiftVariation ? shiftOffsets.start[side] : shiftOffsets.end[side]\n }\n };\n }\n return data;\n}\nclass Positioning {\n position(hostElement, targetElement /*, round = true*/) {\n return this.offset(hostElement, targetElement /*, false*/);\n }\n offset(hostElement, targetElement /*, round = true*/) {\n return getReferenceOffsets(targetElement, hostElement);\n }\n positionElements(hostElement, targetElement, position, appendToBody, options) {\n const chainOfModifiers = [flip, shift, preventOverflow, arrow];\n const _position = MapPlacementInToRL[position];\n const data = initData(targetElement, hostElement, _position, options);\n if (!data) {\n return;\n }\n return chainOfModifiers.reduce((modifiedData, modifier) => modifier(modifiedData), data);\n }\n}\nconst positionService = new Positioning();\nfunction positionElements(hostElement, targetElement, placement, appendToBody, options, renderer) {\n const data = positionService.positionElements(hostElement, targetElement, placement, appendToBody, options);\n if (!data) {\n return;\n }\n const offsets = getOffsets(data);\n setStyles(targetElement, {\n 'will-change': 'transform',\n top: '0px',\n left: '0px',\n transform: `translate3d(${offsets.left}px, ${offsets.top}px, 0px)`\n }, renderer);\n if (data.instance.arrow) {\n setStyles(data.instance.arrow, data.offsets.arrow, renderer);\n }\n updateContainerClass(data, renderer);\n}\nlet PositioningService = /*#__PURE__*/(() => {\n class PositioningService {\n constructor(ngZone, rendererFactory, platformId) {\n this.update$$ = new Subject();\n this.positionElements = new Map();\n this.isDisabled = false;\n if (isPlatformBrowser(platformId)) {\n ngZone.runOutsideAngular(() => {\n this.triggerEvent$ = merge(fromEvent(window, 'scroll', {\n passive: true\n }), fromEvent(window, 'resize', {\n passive: true\n }), of(0, animationFrameScheduler), this.update$$);\n this.triggerEvent$.subscribe(() => {\n if (this.isDisabled) {\n return;\n }\n this.positionElements\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .forEach(positionElement => {\n positionElements(_getHtmlElement(positionElement.target), _getHtmlElement(positionElement.element), positionElement.attachment, positionElement.appendToBody, this.options, rendererFactory.createRenderer(null, null));\n });\n });\n });\n }\n }\n position(options) {\n this.addPositionElement(options);\n }\n get event$() {\n return this.triggerEvent$;\n }\n disable() {\n this.isDisabled = true;\n }\n enable() {\n this.isDisabled = false;\n }\n addPositionElement(options) {\n this.positionElements.set(_getHtmlElement(options.element), options);\n }\n calcPosition() {\n this.update$$.next(null);\n }\n deletePositionElement(elRef) {\n this.positionElements.delete(_getHtmlElement(elRef));\n }\n setOptions(options) {\n this.options = options;\n }\n static {\n this.ɵfac = function PositioningService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || PositioningService)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i0.RendererFactory2), i0.ɵɵinject(PLATFORM_ID));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PositioningService,\n factory: PositioningService.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return PositioningService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction _getHtmlElement(element) {\n // it means that we got a selector\n if (typeof element === 'string') {\n return document.querySelector(element);\n }\n if (element instanceof ElementRef) {\n return element.nativeElement;\n }\n return element ?? null;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { PlacementForBs5, Positioning, PositioningService, checkMargins, positionElements };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Injector, ElementRef, TemplateRef, Injectable, Inject } from '@angular/core';\nimport { listenToTriggersV2, registerOutsideClick, registerEscClick } from 'ngx-bootstrap/utils';\nimport * as i1 from 'ngx-bootstrap/positioning';\nimport { DOCUMENT } from '@angular/common';\nclass BsComponentRef {}\n\n/**\n * @copyright Valor Software\n * @copyright Angular ng-bootstrap team\n */\nclass ContentRef {\n constructor(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nodes, viewRef,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n componentRef) {\n this.nodes = nodes;\n this.viewRef = viewRef;\n this.componentRef = componentRef;\n }\n}\n\n// todo: add delay support\n// todo: merge events onShow, onShown, etc...\n// todo: add global positioning configuration?\nclass ComponentLoader {\n /**\n * Do not use this directly, it should be instanced via\n * `ComponentLoadFactory.attach`\n * @internal\n */\n constructor(_viewContainerRef, _renderer, _elementRef, _injector, _componentFactoryResolver, _ngZone, _applicationRef, _posService, _document) {\n this._viewContainerRef = _viewContainerRef;\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this._injector = _injector;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._ngZone = _ngZone;\n this._applicationRef = _applicationRef;\n this._posService = _posService;\n this._document = _document;\n this.onBeforeShow = new EventEmitter();\n this.onShown = new EventEmitter();\n this.onBeforeHide = new EventEmitter();\n this.onHidden = new EventEmitter();\n this._providers = [];\n this._isHiding = false;\n /**\n * A selector used if container element was not found\n */\n this.containerDefaultSelector = 'body';\n this._listenOpts = {};\n this._globalListener = Function.prototype;\n }\n get isShown() {\n if (this._isHiding) {\n return false;\n }\n return !!this._componentRef;\n }\n attach(compType) {\n this._componentFactory = this._componentFactoryResolver.resolveComponentFactory(compType);\n return this;\n }\n // todo: add behaviour: to target element, `body`, custom element\n to(container) {\n this.container = container || this.container;\n return this;\n }\n position(opts) {\n if (!opts) {\n return this;\n }\n this.attachment = opts.attachment || this.attachment;\n this._elementRef = opts.target || this._elementRef;\n return this;\n }\n provide(provider) {\n this._providers.push(provider);\n return this;\n }\n // todo: appendChild to element or document.querySelector(this.container)\n show(opts = {}) {\n this._subscribePositioning();\n this._innerComponent = void 0;\n if (!this._componentRef) {\n this.onBeforeShow.emit();\n this._contentRef = this._getContentRef(opts.content, opts.context, opts.initialState);\n const injector = Injector.create({\n providers: this._providers,\n parent: this._injector\n });\n if (!this._componentFactory) {\n return;\n }\n this._componentRef = this._componentFactory.create(injector, this._contentRef.nodes);\n this._applicationRef.attachView(this._componentRef.hostView);\n // this._componentRef = this._viewContainerRef\n // .createComponent(this._componentFactory, 0, injector, this._contentRef.nodes);\n this.instance = this._componentRef.instance;\n Object.assign(this._componentRef.instance, opts);\n if (this.container instanceof ElementRef) {\n this.container.nativeElement.appendChild(this._componentRef.location.nativeElement);\n }\n if (typeof this.container === 'string' && typeof this._document !== 'undefined') {\n const selectedElement = this._document.querySelector(this.container) || this._document.querySelector(this.containerDefaultSelector);\n if (!selectedElement) {\n return;\n }\n selectedElement.appendChild(this._componentRef.location.nativeElement);\n }\n if (!this.container && this._elementRef && this._elementRef.nativeElement.parentElement) {\n this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement);\n }\n // we need to manually invoke change detection since events registered\n // via\n // Renderer::listen() are not picked up by change detection with the\n // OnPush strategy\n if (this._contentRef.componentRef) {\n this._innerComponent = this._contentRef.componentRef.instance;\n this._contentRef.componentRef.changeDetectorRef.markForCheck();\n this._contentRef.componentRef.changeDetectorRef.detectChanges();\n }\n this._componentRef.changeDetectorRef.markForCheck();\n this._componentRef.changeDetectorRef.detectChanges();\n this.onShown.emit(opts.id ? {\n id: opts.id\n } : this._componentRef.instance);\n }\n this._registerOutsideClick();\n return this._componentRef;\n }\n hide(id) {\n if (!this._componentRef) {\n return this;\n }\n this._posService.deletePositionElement(this._componentRef.location);\n this.onBeforeHide.emit(this._componentRef.instance);\n const componentEl = this._componentRef.location.nativeElement;\n componentEl.parentNode?.removeChild(componentEl);\n this._contentRef?.componentRef?.destroy();\n if (this._viewContainerRef && this._contentRef?.viewRef) {\n this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef));\n }\n this._contentRef?.viewRef?.destroy();\n this._componentRef?.destroy();\n this._contentRef = void 0;\n this._componentRef = void 0;\n this._removeGlobalListener();\n this.onHidden.emit(id ? {\n id\n } : null);\n return this;\n }\n toggle() {\n if (this.isShown) {\n this.hide();\n return;\n }\n this.show();\n }\n dispose() {\n if (this.isShown) {\n this.hide();\n }\n this._unsubscribePositioning();\n if (this._unregisterListenersFn) {\n this._unregisterListenersFn();\n }\n }\n listen(listenOpts) {\n this.triggers = listenOpts.triggers || this.triggers;\n this._listenOpts.outsideClick = listenOpts.outsideClick;\n this._listenOpts.outsideEsc = listenOpts.outsideEsc;\n listenOpts.target = listenOpts.target || this._elementRef?.nativeElement;\n const hide = this._listenOpts.hide = () => listenOpts.hide ? listenOpts.hide() : void this.hide();\n const show = this._listenOpts.show = registerHide => {\n listenOpts.show ? listenOpts.show(registerHide) : this.show(registerHide);\n registerHide();\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const toggle = registerHide => {\n this.isShown ? hide() : show(registerHide);\n };\n if (this._renderer) {\n this._unregisterListenersFn = listenToTriggersV2(this._renderer, {\n target: listenOpts.target,\n triggers: listenOpts.triggers,\n show,\n hide,\n toggle\n });\n }\n return this;\n }\n _removeGlobalListener() {\n if (this._globalListener) {\n this._globalListener();\n this._globalListener = Function.prototype;\n }\n }\n attachInline(vRef,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n template) {\n if (vRef && template) {\n this._inlineViewRef = vRef.createEmbeddedView(template);\n }\n return this;\n }\n _registerOutsideClick() {\n if (!this._componentRef || !this._componentRef.location) {\n return;\n }\n let unsubscribeOutsideClick = Function.prototype;\n let unsubscribeEscClick = Function.prototype;\n // why: should run after first event bubble\n if (this._listenOpts.outsideClick) {\n const target = this._componentRef.location.nativeElement;\n setTimeout(() => {\n if (this._renderer && this._elementRef) {\n unsubscribeOutsideClick = registerOutsideClick(this._renderer, {\n targets: [target, this._elementRef.nativeElement],\n outsideClick: this._listenOpts.outsideClick,\n hide: () => this._listenOpts.hide && this._listenOpts.hide()\n });\n }\n });\n }\n if (this._listenOpts.outsideEsc && this._renderer && this._elementRef) {\n const target = this._componentRef.location.nativeElement;\n unsubscribeEscClick = registerEscClick(this._renderer, {\n targets: [target, this._elementRef.nativeElement],\n outsideEsc: this._listenOpts.outsideEsc,\n hide: () => this._listenOpts.hide && this._listenOpts.hide()\n });\n }\n this._globalListener = () => {\n unsubscribeOutsideClick();\n unsubscribeEscClick();\n };\n }\n getInnerComponent() {\n return this._innerComponent;\n }\n _subscribePositioning() {\n if (this._zoneSubscription || !this.attachment) {\n return;\n }\n this.onShown.subscribe(() => {\n this._posService.position({\n element: this._componentRef?.location,\n target: this._elementRef,\n attachment: this.attachment,\n appendToBody: this.container === 'body'\n });\n });\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => {\n if (!this._componentRef) {\n return;\n }\n this._posService.calcPosition();\n });\n }\n _unsubscribePositioning() {\n if (!this._zoneSubscription) {\n return;\n }\n this._zoneSubscription.unsubscribe();\n this._zoneSubscription = void 0;\n }\n _getContentRef(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n content,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n context,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n initialState) {\n if (!content) {\n return new ContentRef([]);\n }\n if (content instanceof TemplateRef) {\n if (this._viewContainerRef) {\n const _viewRef = this._viewContainerRef.createEmbeddedView(content, context);\n _viewRef.markForCheck();\n return new ContentRef([_viewRef.rootNodes], _viewRef);\n }\n const viewRef = content.createEmbeddedView({});\n this._applicationRef.attachView(viewRef);\n return new ContentRef([viewRef.rootNodes], viewRef);\n }\n if (typeof content === 'function') {\n const contentCmptFactory = this._componentFactoryResolver.resolveComponentFactory(content);\n const modalContentInjector = Injector.create({\n providers: this._providers,\n parent: this._injector\n });\n const componentRef = contentCmptFactory.create(modalContentInjector);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n Object.assign(componentRef.instance, initialState);\n this._applicationRef.attachView(componentRef.hostView);\n return new ContentRef([[componentRef.location.nativeElement]], componentRef.hostView, componentRef);\n }\n const nodes = this._renderer ? [this._renderer.createText(`${content}`)] : [];\n return new ContentRef([nodes]);\n }\n}\nlet ComponentLoaderFactory = /*#__PURE__*/(() => {\n class ComponentLoaderFactory {\n constructor(_componentFactoryResolver, _ngZone, _injector, _posService, _applicationRef, _document) {\n this._componentFactoryResolver = _componentFactoryResolver;\n this._ngZone = _ngZone;\n this._injector = _injector;\n this._posService = _posService;\n this._applicationRef = _applicationRef;\n this._document = _document;\n }\n /**\n *\n * @param _elementRef\n * @param _viewContainerRef\n * @param _renderer\n */\n createLoader(_elementRef, _viewContainerRef, _renderer) {\n return new ComponentLoader(_viewContainerRef, _renderer, _elementRef, this._injector, this._componentFactoryResolver, this._ngZone, this._applicationRef, this._posService, this._document);\n }\n static {\n this.ɵfac = function ComponentLoaderFactory_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ComponentLoaderFactory)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i1.PositioningService), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ComponentLoaderFactory,\n factory: ComponentLoaderFactory.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return ComponentLoaderFactory;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BsComponentRef, ComponentLoader, ComponentLoaderFactory, ContentRef };\n","import * as i0 from '@angular/core';\nimport { Injectable, Component, ChangeDetectionStrategy, EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';\nimport { getBsVer, warnOnce, parseTriggers, OnChange } from 'ngx-bootstrap/utils';\nimport * as i3 from 'ngx-bootstrap/positioning';\nimport { PlacementForBs5, PositioningService } from 'ngx-bootstrap/positioning';\nimport { __decorate, __metadata } from 'tslib';\nimport * as i1 from 'ngx-bootstrap/component-loader';\nimport { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';\nimport { timer } from 'rxjs';\nimport { CommonModule } from '@angular/common';\n\n/** Default values provider for tooltip */\nconst _c0 = [\"*\"];\nlet TooltipConfig = /*#__PURE__*/(() => {\n class TooltipConfig {\n constructor() {\n /** sets disable adaptive position */\n this.adaptivePosition = true;\n /** tooltip placement, supported positions: 'top', 'bottom', 'left', 'right' */\n this.placement = 'top';\n /** array of event names which triggers tooltip opening */\n this.triggers = 'hover focus';\n /** delay before showing the tooltip */\n this.delay = 0;\n }\n static {\n this.ɵfac = function TooltipConfig_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipConfig)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TooltipConfig,\n factory: TooltipConfig.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return TooltipConfig;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TooltipContainerComponent = /*#__PURE__*/(() => {\n class TooltipContainerComponent {\n get _bsVersions() {\n return getBsVer();\n }\n constructor(config) {\n Object.assign(this, config);\n }\n ngAfterViewInit() {\n this.classMap = {\n in: false,\n fade: false\n };\n if (this.placement) {\n if (this._bsVersions.isBs5) {\n this.placement = PlacementForBs5[this.placement];\n }\n this.classMap[this.placement] = true;\n }\n this.classMap[`tooltip-${this.placement}`] = true;\n this.classMap[\"in\"] = true;\n if (this.animation) {\n this.classMap[\"fade\"] = true;\n }\n if (this.containerClass) {\n this.classMap[this.containerClass] = true;\n }\n }\n static {\n this.ɵfac = function TooltipContainerComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipContainerComponent)(i0.ɵɵdirectiveInject(TooltipConfig));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TooltipContainerComponent,\n selectors: [[\"bs-tooltip-container\"]],\n hostAttrs: [\"role\", \"tooltip\"],\n hostVars: 3,\n hostBindings: function TooltipContainerComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id);\n i0.ɵɵclassMap(\"show tooltip in tooltip-\" + ctx.placement + \" \" + \"bs-tooltip-\" + ctx.placement + \" \" + ctx.placement + \" \" + ctx.containerClass);\n }\n },\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 3,\n vars: 0,\n consts: [[1, \"tooltip-arrow\", \"arrow\"], [1, \"tooltip-inner\"]],\n template: function TooltipContainerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n }\n },\n styles: [\".tooltip[_nghost-%COMP%]{display:block;pointer-events:none;position:absolute}.tooltip[_nghost-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{position:absolute}\"],\n changeDetection: 0\n });\n }\n }\n return TooltipContainerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet id = 0;\nlet TooltipDirective = /*#__PURE__*/(() => {\n class TooltipDirective {\n /**\n * Returns whether or not the tooltip is currently being shown\n */\n get isOpen() {\n return this._tooltip.isShown;\n }\n set isOpen(value) {\n if (value) {\n this.show();\n } else {\n this.hide();\n }\n }\n /** @deprecated - please use `tooltip` instead */\n set htmlContent(value) {\n warnOnce('tooltipHtml was deprecated, please use `tooltip` instead');\n this.tooltip = value;\n }\n /** @deprecated - please use `placement` instead */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _placement(value) {\n warnOnce('tooltipPlacement was deprecated, please use `placement` instead');\n this.placement = value;\n }\n /** @deprecated - please use `isOpen` instead */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _isOpen(value) {\n warnOnce('tooltipIsOpen was deprecated, please use `isOpen` instead');\n this.isOpen = value;\n }\n get _isOpen() {\n warnOnce('tooltipIsOpen was deprecated, please use `isOpen` instead');\n return this.isOpen;\n }\n /** @deprecated - please use `isDisabled` instead */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _enable(value) {\n warnOnce('tooltipEnable was deprecated, please use `isDisabled` instead');\n this.isDisabled = !value;\n }\n get _enable() {\n warnOnce('tooltipEnable was deprecated, please use `isDisabled` instead');\n return this.isDisabled;\n }\n /** @deprecated - please use `container=\"body\"` instead */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _appendToBody(value) {\n warnOnce('tooltipAppendToBody was deprecated, please use `container=\"body\"` instead');\n this.container = value ? 'body' : this.container;\n }\n get _appendToBody() {\n warnOnce('tooltipAppendToBody was deprecated, please use `container=\"body\"` instead');\n return this.container === 'body';\n }\n /** @deprecated - will replaced with customClass */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _popupClass(value) {\n warnOnce('tooltipClass deprecated');\n }\n /** @deprecated - removed */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _tooltipContext(value) {\n warnOnce('tooltipContext deprecated');\n }\n /** @deprecated */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n set _tooltipPopupDelay(value) {\n warnOnce('tooltipPopupDelay is deprecated, use `delay` instead');\n this.delay = value;\n }\n /** @deprecated - please use `triggers` instead */\n get _tooltipTrigger() {\n warnOnce('tooltipTrigger was deprecated, please use `triggers` instead');\n return this.triggers;\n }\n set _tooltipTrigger(value) {\n warnOnce('tooltipTrigger was deprecated, please use `triggers` instead');\n this.triggers = (value || '').toString();\n }\n constructor(_viewContainerRef, cis, config, _elementRef, _renderer, _positionService) {\n this._elementRef = _elementRef;\n this._renderer = _renderer;\n this._positionService = _positionService;\n this.tooltipId = id++;\n /** sets disable adaptive position */\n this.adaptivePosition = true;\n /** Fired when tooltip content changes */\n this.tooltipChange = new EventEmitter();\n /**\n * Placement of a tooltip. Accepts: \"top\", \"bottom\", \"left\", \"right\"\n */\n this.placement = 'top';\n /**\n * Specifies events that should trigger. Supports a space separated list of\n * event names.\n */\n this.triggers = 'hover focus';\n /**\n * Css class for tooltip container\n */\n this.containerClass = '';\n /**\n * Allows to disable tooltip\n */\n this.isDisabled = false;\n /**\n * Delay before showing the tooltip\n */\n this.delay = 0;\n /** @deprecated - removed, will be added to configuration */\n this.tooltipAnimation = true;\n /** @deprecated */\n this.tooltipFadeDuration = 150;\n /** @deprecated */\n this.tooltipStateChanged = new EventEmitter();\n this._tooltip = cis.createLoader(this._elementRef, _viewContainerRef, this._renderer).provide({\n provide: TooltipConfig,\n useValue: config\n });\n Object.assign(this, config);\n this.onShown = this._tooltip.onShown;\n this.onHidden = this._tooltip.onHidden;\n }\n ngOnInit() {\n this._tooltip.listen({\n triggers: this.triggers,\n show: () => this.show()\n });\n this.tooltipChange.subscribe(value => {\n if (!value) {\n this._tooltip.hide();\n }\n });\n this.onShown.subscribe(() => {\n this.setAriaDescribedBy();\n });\n this.onHidden.subscribe(() => {\n this.setAriaDescribedBy();\n });\n }\n setAriaDescribedBy() {\n this._ariaDescribedby = this.isOpen ? `tooltip-${this.tooltipId}` : void 0;\n if (this._ariaDescribedby) {\n this._renderer.setAttribute(this._elementRef.nativeElement, 'aria-describedby', this._ariaDescribedby);\n } else {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n }\n }\n /**\n * Toggles an element’s tooltip. This is considered a “manual” triggering of\n * the tooltip.\n */\n toggle() {\n if (this.isOpen) {\n return this.hide();\n }\n this.show();\n }\n /**\n * Opens an element’s tooltip. This is considered a “manual” triggering of\n * the tooltip.\n */\n show() {\n this._positionService.setOptions({\n modifiers: {\n flip: {\n enabled: this.adaptivePosition\n },\n preventOverflow: {\n enabled: this.adaptivePosition,\n boundariesElement: this.boundariesElement || 'scrollParent'\n }\n }\n });\n if (this.isOpen || this.isDisabled || this._delayTimeoutId || !this.tooltip) {\n return;\n }\n const showTooltip = () => {\n if (this._delayTimeoutId) {\n this._delayTimeoutId = undefined;\n }\n this._tooltip.attach(TooltipContainerComponent).to(this.container).position({\n attachment: this.placement\n }).show({\n content: this.tooltip,\n placement: this.placement,\n containerClass: this.containerClass,\n id: `tooltip-${this.tooltipId}`\n });\n };\n const cancelDelayedTooltipShowing = () => {\n if (this._tooltipCancelShowFn) {\n this._tooltipCancelShowFn();\n }\n };\n if (this.delay) {\n if (this._delaySubscription) {\n this._delaySubscription.unsubscribe();\n }\n this._delaySubscription = timer(this.delay).subscribe(() => {\n showTooltip();\n cancelDelayedTooltipShowing();\n });\n if (this.triggers) {\n parseTriggers(this.triggers).forEach(trigger => {\n if (!trigger.close) {\n return;\n }\n this._tooltipCancelShowFn = this._renderer.listen(this._elementRef.nativeElement, trigger.close, () => {\n this._delaySubscription?.unsubscribe();\n cancelDelayedTooltipShowing();\n });\n });\n }\n } else {\n showTooltip();\n }\n }\n /**\n * Closes an element’s tooltip. This is considered a “manual” triggering of\n * the tooltip.\n */\n hide() {\n if (this._delayTimeoutId) {\n clearTimeout(this._delayTimeoutId);\n this._delayTimeoutId = undefined;\n }\n if (!this._tooltip.isShown) {\n return;\n }\n if (this._tooltip.instance?.classMap) {\n this._tooltip.instance.classMap['in'] = false;\n }\n setTimeout(() => {\n this._tooltip.hide();\n }, this.tooltipFadeDuration);\n }\n ngOnDestroy() {\n this._tooltip.dispose();\n this.tooltipChange.unsubscribe();\n if (this._delaySubscription) {\n this._delaySubscription.unsubscribe();\n }\n this.onShown.unsubscribe();\n this.onHidden.unsubscribe();\n }\n static {\n this.ɵfac = function TooltipDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipDirective)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i1.ComponentLoaderFactory), i0.ɵɵdirectiveInject(TooltipConfig), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i3.PositioningService));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TooltipDirective,\n selectors: [[\"\", \"tooltip\", \"\"], [\"\", \"tooltipHtml\", \"\"]],\n inputs: {\n adaptivePosition: \"adaptivePosition\",\n tooltip: \"tooltip\",\n placement: \"placement\",\n triggers: \"triggers\",\n container: \"container\",\n containerClass: \"containerClass\",\n boundariesElement: \"boundariesElement\",\n isOpen: \"isOpen\",\n isDisabled: \"isDisabled\",\n delay: \"delay\",\n htmlContent: [0, \"tooltipHtml\", \"htmlContent\"],\n _placement: [0, \"tooltipPlacement\", \"_placement\"],\n _isOpen: [0, \"tooltipIsOpen\", \"_isOpen\"],\n _enable: [0, \"tooltipEnable\", \"_enable\"],\n _appendToBody: [0, \"tooltipAppendToBody\", \"_appendToBody\"],\n tooltipAnimation: \"tooltipAnimation\",\n _popupClass: [0, \"tooltipClass\", \"_popupClass\"],\n _tooltipContext: [0, \"tooltipContext\", \"_tooltipContext\"],\n _tooltipPopupDelay: [0, \"tooltipPopupDelay\", \"_tooltipPopupDelay\"],\n tooltipFadeDuration: \"tooltipFadeDuration\",\n _tooltipTrigger: [0, \"tooltipTrigger\", \"_tooltipTrigger\"]\n },\n outputs: {\n tooltipChange: \"tooltipChange\",\n onShown: \"onShown\",\n onHidden: \"onHidden\",\n tooltipStateChanged: \"tooltipStateChanged\"\n },\n exportAs: [\"bs-tooltip\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([ComponentLoaderFactory, PositioningService])]\n });\n }\n }\n __decorate([OnChange(), __metadata(\"design:type\", Object)], TooltipDirective.prototype, \"tooltip\", void 0);\n return TooltipDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TooltipModule = /*#__PURE__*/(() => {\n class TooltipModule {\n // @deprecated method not required anymore, will be deleted in v19.0.0\n static forRoot() {\n return {\n ngModule: TooltipModule,\n providers: []\n };\n }\n static {\n this.ɵfac = function TooltipModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TooltipModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n }\n return TooltipModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TooltipConfig, TooltipContainerComponent, TooltipDirective, TooltipModule };\n"],"mappings":"+ZAMA,IAAMA,EAAN,KAAc,CACZ,YAAYC,EAAMC,EAAO,CACvB,KAAK,KAAOD,EACZ,KAAK,MAAQC,GAASD,CACxB,CACA,UAAW,CACT,OAAO,KAAK,OAAS,UAAY,KAAK,QAAU,QAClD,CACF,EACME,GAAkB,CACtB,MAAO,CAAC,YAAa,UAAU,EAC/B,MAAO,CAAC,UAAW,UAAU,CAC/B,EAEA,SAASC,EAAcC,EAAUC,EAAUH,GAAiB,CAC1D,IAAMI,GAAmBF,GAAY,IAAI,KAAK,EAC9C,GAAIE,EAAgB,SAAW,EAC7B,MAAO,CAAC,EAEV,IAAM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AiB,UAAW,UAAW,MAAM,EAClGA,CACT,GAAG,EAICwB,IAA8B,IAAM,CACtC,MAAMA,CAAc,CAElB,OAAO,SAAU,CACf,MAAO,CACL,SAAUA,EACV,UAAW,CAAC,CACd,CACF,CACA,MAAO,CACL,KAAK,UAAO,SAA+B3C,EAAmB,CAC5D,OAAO,IAAKA,GAAqB2C,EACnC,CACF,CACA,MAAO,CACL,KAAK,UAAyBC,GAAiB,CAC7C,KAAMD,CACR,CAAC,CACH,CACA,MAAO,CACL,KAAK,UAAyBE,GAAiB,CAC7C,QAAS,CAACC,EAAY,CACxB,CAAC,CACH,CACF,CACA,OAAOH,CACT,GAAG","names":["Trigger","open","close","DEFAULT_ALIASES","parseTriggers","triggers","aliases","trimmedTriggers","parsedTriggers","trigger","triggerPair","alias","manualTriggers","listenToTriggersV2","renderer","options","parsedTriggers","parseTriggers","target","listeners","_registerHide","registerHide","fn","trigger","useToggle","showFn","triggerClose","optionsHide","_hide","unsubscribeFn","registerOutsideClick","event","registerEscClick","win","document","location","gc","performance","Event","MouseEvent","KeyboardEvent","EventTarget","History","Location","EventListener","BsVerions","guessedVersion","_guessBsVersion","spanEl","checkPadding","isBs4","guessedVersion","_guessBsVersion","isBs5","getBsVer","currentBsVersion","bsVer","resVersion","key","BsVerions","OnChange","sufix","target","propertyKey","_key","value","prevValue","Utils","element","elem","view","win","bsVer","currentBsVersion","_messagesHash","_hideMsg","warnOnce","msg","isDevMode","MapPlacementInToRL","PlacementForBs5","getStyleComputedProperty","element","property","css","getOffsetParent","noOffsetParent","offsetParent","sibling","nodeName","isOffsetContainer","getRoot","node","findCommonOffsetParent","element1","element2","order","start","end","range","commonAncestorContainer","element1root","getFixedPositionOffsetParent","el","getBordersSize","styles","axis","sideA","sideB","getSize","body","html","_body","_html","getWindowSizes","document","getClientRect","offsets","__spreadProps","__spreadValues","isNumeric","n","isNumber","value","getBoundingClientRect","rect","result","sizes","width","height","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","children","parent","fixedPosition","isHTML","childrenRect","parentRect","borderTopWidth","borderLeftWidth","marginTop","marginLeft","getParentNode","getScrollParent","overflow","overflowX","overflowY","getScroll","side","upperSide","getViewportOffsetRectRelativeToArtbitraryNode","excludeScroll","relativeOffset","scrollTop","scrollLeft","offset","isFixed","getBoundaries","target","host","padding","boundariesElement","boundaries","boundariesNode","getArea","computeAutoPlacement","placement","refRect","allowedPositions","rects","sortedAreas","key","a","filteredAreas","position","allowedPosition","computedPlacement","variation","getBsVer","getOffsets","data","getOppositePlacement","hash","matched","getOppositeVariation","parse","def","getOuterSizes","x","y","getReferenceOffsets","commonOffsetParent","getTargetOffsets","hostOffsets","targetRect","targetOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","isModifierEnabled","options","modifierName","availablePositions","checkPopoverMargin","checkPosition","checkMargins","updateContainerClass","renderer","containerClass","dataPlacement","setStyles","prop","unit","arrow","arrowElement","isVertical","len","sideCapitalized","altSide","opSide","arrowElementSize","placementVariation","targetMarginSide","targetBorderSide","center","targetBorderRadius","targetSideArrowOffset","sideValue","flip","offsetsHost","adaptivePosition","flipOrder","step","index","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariation","initData","targetElement","hostElement","hostElPosition","placementAuto","matches","targetOffset","preventOverflow","transformProp","targetStyles","top","left","transform","check","isPlacementHorizontal","shift","basePlacement","shiftVariation","shiftOffsets","Positioning","appendToBody","chainOfModifiers","_position","modifiedData","modifier","positionService","positionElements","PositioningService","ngZone","rendererFactory","platformId","Subject","isPlatformBrowser","merge","fromEvent","of","animationFrameScheduler","positionElement","_getHtmlElement","elRef","__ngFactoryType__","ɵɵinject","NgZone","RendererFactory2","PLATFORM_ID","ɵɵdefineInjectable","ElementRef","ContentRef","nodes","viewRef","componentRef","ComponentLoader","_viewContainerRef","_renderer","_elementRef","_injector","_componentFactoryResolver","_ngZone","_applicationRef","_posService","_document","EventEmitter","compType","container","opts","provider","injector","Injector","ElementRef","selectedElement","id","componentEl","listenOpts","hide","show","registerHide","toggle","listenToTriggersV2","vRef","template","unsubscribeOutsideClick","unsubscribeEscClick","target","registerOutsideClick","registerEscClick","content","context","initialState","TemplateRef","_viewRef","contentCmptFactory","modalContentInjector","ComponentLoaderFactory","__ngFactoryType__","ɵɵinject","ComponentFactoryResolver$1","NgZone","PositioningService","ApplicationRef","DOCUMENT","ɵɵdefineInjectable","_c0","TooltipConfig","__ngFactoryType__","ɵɵdefineInjectable","TooltipContainerComponent","getBsVer","config","PlacementForBs5","ɵɵdirectiveInject","ɵɵdefineComponent","rf","ctx","ɵɵattribute","ɵɵclassMap","ɵɵStandaloneFeature","ɵɵprojectionDef","ɵɵelement","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","id","TooltipDirective","value","warnOnce","_viewContainerRef","cis","_elementRef","_renderer","_positionService","EventEmitter","showTooltip","cancelDelayedTooltipShowing","timer","parseTriggers","trigger","ViewContainerRef","ComponentLoaderFactory","ElementRef","Renderer2","PositioningService","ɵɵdefineDirective","ɵɵProvidersFeature","__decorate","OnChange","__metadata","TooltipModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule"],"x_google_ignoreList":[0,1,2,3]}