function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r
',title:"",trigger:"hover focus"},b={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},e=function(){function r(e,t){if(_classCallCheck(this,r),void 0===l)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");return(e=_callSuper(this,r,[e,t]))._isEnabled=!0,e._timeout=0,e._isHovered=null,e._activeTrigger={},e._popper=null,e._templateFactory=null,e._newContent=null,e.tip=null,e._setListeners(),e._config.selector||e._fixTitle(),e}return _inherits(r,t),_createClass(r,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}},{key:"dispose",value:function(){clearTimeout(this._timeout),a.off(this._element.closest(p),_,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),_superPropGet(r,"dispose",this,3)([])}},{key:"show",value:function(){var e=this;if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(this._isWithContent()&&this._isEnabled){var t=a.trigger(this._element,this.constructor.eventName("show")),r=(s.findShadowRoot(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(!t.defaultPrevented&&r){this._disposePopper();t=this._getTipElement(),r=(this._element.setAttribute("aria-describedby",t.getAttribute("id")),this._config.container);if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(t),a.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(t),t.classList.add(f),"ontouchstart"in document.documentElement){var n,i=_createForOfIteratorHelper((r=[]).concat.apply(r,_toConsumableArray(document.body.children)));try{for(i.s();!(n=i.n()).done;){var o=n.value;a.on(o,"mouseover",s.noop)}}catch(e){i.e(e)}finally{i.f()}}this._queueCallback(function(){a.trigger(e._element,e.constructor.eventName("shown")),!1===e._isHovered&&e._leave(),e._isHovered=!1},this.tip,this._isAnimated())}}}},{key:"hide",value:function(){var e=this;if(this._isShown()){var t=a.trigger(this._element,this.constructor.eventName("hide"));if(!t.defaultPrevented){if(this._getTipElement().classList.remove(f),"ontouchstart"in document.documentElement){var r,n=_createForOfIteratorHelper((t=[]).concat.apply(t,_toConsumableArray(document.body.children)));try{for(n.s();!(r=n.n()).done;){var i=r.value;a.off(i,"mouseover",s.noop)}}catch(e){n.e(e)}finally{n.f()}}this._activeTrigger[d]=!1,this._activeTrigger[y]=!1,this._activeTrigger[h]=!1,this._isHovered=null;this._queueCallback(function(){e._isWithActiveTrigger()||(e._isHovered||e._disposePopper(),e._element.removeAttribute("aria-describedby"),a.trigger(e._element,e.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}}},{key:"update",value:function(){this._popper&&this._popper.update()}},{key:"_isWithContent",value:function(){return Boolean(this._getTitle())}},{key:"_getTipElement",value:function(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}},{key:"_createTipElement",value:function(e){e=this._getTemplateFactory(e).toHtml();if(!e)return null;e.classList.remove(c,f),e.classList.add("bs-".concat(this.constructor.NAME,"-auto"));var t=s.getUID(this.constructor.NAME).toString();return e.setAttribute("id",t),this._isAnimated()&&e.classList.add(c),e}},{key:"setContent",value:function(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}},{key:"_getTemplateFactory",value:function(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new n(_objectSpread(_objectSpread({},this._config),{},{content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}},{key:"_getContentForTemplate",value:function(){return _defineProperty({},".tooltip-inner",this._getTitle())}},{key:"_getTitle",value:function(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}},{key:"_initializeOnDelegatedTarget",value:function(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}},{key:"_isAnimated",value:function(){return this._config.animation||this.tip&&this.tip.classList.contains(c)}},{key:"_isShown",value:function(){return this.tip&&this.tip.classList.contains(f)}},{key:"_createPopper",value:function(e){var t=s.execute(this._config.placement,[this,e,this._element]),t=m[t.toUpperCase()];return l.createPopper(this._element,e,this._getPopperConfig(t))}},{key:"_getOffset",value:function(){var t=this,r=this._config.offset;return"string"==typeof r?r.split(",").map(function(e){return Number.parseInt(e,10)}):"function"==typeof r?function(e){return r(e,t._element)}:r}},{key:"_resolvePossibleFunction",value:function(e){return s.execute(e,[this._element,this._element])}},{key:"_getPopperConfig",value:function(e){var t=this,e={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:".".concat(this.constructor.NAME,"-arrow")}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:function(e){t._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return _objectSpread(_objectSpread({},e),s.execute(this._config.popperConfig,[void 0,e]))}},{key:"_setListeners",value:function(){var e,r=this,t=_createForOfIteratorHelper(this._config.trigger.split(" "));try{for(t.s();!(e=t.n()).done;){var n,i,o=e.value;"click"===o?a.on(this._element,this.constructor.eventName("click"),this._config.selector,function(e){e=r._initializeOnDelegatedTarget(e);e._activeTrigger[d]=!(e._isShown()&&e._activeTrigger[d]),e.toggle()}):"manual"!==o&&(n=o===h?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=o===h?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout"),a.on(this._element,n,this._config.selector,function(e){var t=r._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?y:h]=!0,t._enter()}),a.on(this._element,i,this._config.selector,function(e){var t=r._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?y:h]=t._element.contains(e.relatedTarget),t._leave()}))}}catch(e){t.e(e)}finally{t.f()}this._hideModalHandler=function(){r._element&&r.hide()},a.on(this._element.closest(p),_,this._hideModalHandler)}},{key:"_fixTitle",value:function(){var e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}},{key:"_enter",value:function(){var e=this;this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(function(){e._isHovered&&e.show()},this._config.delay.show))}},{key:"_leave",value:function(){var e=this;this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(function(){e._isHovered||e.hide()},this._config.delay.hide))}},{key:"_setTimeout",value:function(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}},{key:"_isWithActiveTrigger",value:function(){return Object.values(this._activeTrigger).includes(!0)}},{key:"_getConfig",value:function(e){for(var t=o.getDataAttributes(this._element),r=0,n=Object.keys(t);r