(t)
| 19 | <div data-twe-tooltip-inner-ref class="max-w-[200px] text-sm py-1.5 px-4 text-white text-center bg-[#6d6d6d] rounded"></div> |
| 20 | </div> |
| 21 | `,trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:Ea,popperConfig:{hide:!0}},ya={HIDE:`hide${J}`,HIDDEN:`hidden${J}`,SHOW:`show${J}`,SHOWN:`shown${J}`,INSERTED:`inserted${J}`,CLICK:`click${J}`,FOCUSIN:`focusin${J}`,FOCUSOUT:`focusout${J}`,MOUSEENTER:`mouseenter${J}`,MOUSELEAVE:`mouseleave${J}`},Ca="fade",Oa="modal",pi="show",Gt="show",_i="out",tn="[data-twe-tooltip-inner-ref]",en=`.${Oa}`,sn="hide.twe.modal",Qt="hover",gi="focus",Da="click",Na="manual";class Et extends et{constructor(t,e){if(typeof Cs>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Aa}static get NAME(){return Js}static get Event(){return ya}static get DefaultType(){return wa}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(pi)){this._leave(null,this);return}this._enter(null,this)}}dispose(){clearTimeout(this._timeout),d.off(this._element.closest(en),sn,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this.isWithContent()&&this._isEnabled))return;const t=d.trigger(this._element,this.constructor.Event.SHOW),e=ki(this._element),s=e===null?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;this.constructor.NAME==="tooltip"&&this.tip&&this.getTitle()!==this.tip.querySelector(tn).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),r=Yn(this.constructor.NAME);n.setAttribute("id",r),this._element.setAttribute("aria-describedby",r),this._config.animation&&setTimeout(()=>{this.tip.classList.add("opacity-100"),this.tip.classList.remove("opacity-0")},100);const o=typeof this._config.placement=="function"?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(o);this._addAttachmentClass(a);const{container:l}=this._config;if(R.setData(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),d.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Je(this._element,n,this._getPopperConfig(a)),n.getAttribute("id").includes("tooltip"))switch(o){case"bottom":n.classList.add("py-[0.4rem]");break;case"left":n.classList.add("px-[0.4rem]");break;case"right":n.classList.add("px-[0.4rem]");break;default:n.classList.add("py-[0.4rem]");break}const c=this._resolvePossibleFunction(this._config.customClass);c&&n.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(g=>{d.on(g,"mouseover",se)});const f=()=>{const g=this._hoverState;this._hoverState=null,d.trigger(this._element,this.constructor.Event.SHOWN),g===_i&&this._leave(null,this)},v=this.tip.classList.contains("transition-opacity");this._queueCallback(f,this.tip,v)}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{this._isWithActiveTrigger()||(this._hoverState!==Gt&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),d.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(d.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.add("opacity-0"),t.classList.remove("opacity-100"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(r=>d.off(r,"mouseover",se)),this._activeTrigger[Da]=!1,this._activeTrigger[gi]=!1,this._activeTrigger[Qt]=!1;const n=this.tip.classList.contains("opacity-0");this._queueCallback(e,this.tip,n),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return!!this.getTitle()}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Ca,pi),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),tn)}_sanitizeAndSetContent(t,e,s){const n=h.findOne(s,t);if(!e&&n){n.remove();return}this.setElementContent(n,e)}setElementContent(t,e){if(t!==null){if(yt(e)){e=nt(e),this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent;return}this._config.html?(this._config.sanitize&&(e=Zs(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e}}getTitle(){const t=this._element.getAttribute("data-twe-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return t==="right"?"end":t==="left"?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return typeof t=="function"?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,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:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:s=>this._handlePopperPlacementChange(s)}],onFirstUpdate:s=>{s.options.placement!==s.placement&&this._handlePopperPlacementChange(s)}};return{...e,...typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return Ta[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(e=>{if(e==="click")d.on(this._element,this.constructor.Event.CLICK,this._config.selector,s=>this.toggle(s));else if(e!==Na){const s=e===Qt?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,n=e===Qt?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;d.on(this._element,s,this._config.selector,r=>this._enter(r)),d.on(this._element,n,this._config.selector,r=>this._leave(r))}}),this._hideModalHandler=()=>{this._element&&this.hide()},d.on(this._element.closest(en),sn,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-twe-original-title");(t||e!=="string")&&(this._element.setAttribute("data-twe-original-title",t||""),t&&!this._element.getAttribute("aria-label")&&!this._element.textContent&&this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusin"?gi:Qt]=!0),e.getTipElement().classList.contains(pi)||e._hoverState===Gt){e._hoverState=Gt;return}if(clearTimeout(e._timeout),e._hoverState=Gt,!e._config.delay||!e._config.delay.show){e.show();return}e._timeout=setTimeout(()=>{e._hoverState===Gt&&e.show()},e._config.delay.show)}_leave(t,e){if(e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger[t.type==="focusout"?gi:Qt]=e._element.contains(t.relatedTarget)),!e._isWithActiveTrigger()){if(clearTimeout(e._timeout),e._hoverState=_i,!e._config.delay||!e._config.delay.hide){e.hide();return}e._timeout=setTimeout(()=>{e._hoverState===_i&&e.hide()},e._config.delay.hide)}}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=E.getDataAttributes(this._element);return Object.keys(e).forEach(s=>{ba.has(s)&&delete e[s]}),t={...this.constructor.Default,...e,...typeof t=="object"&&t?t:{}},t.container=t.container===!1?document.body:nt(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),x(Js,t,this.constructor.DefaultType),t.sanitize&&(t.template=Zs(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),s=t.getAttribute("class").match(e);s!==null&&s.length>0&&s.map(n=>n.trim()).forEach(n=>t.classList.remove(n))}_getBasicClassPrefix(){return va}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each(function(){const e=Et.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}const Sa="popover",tt=".twe.popover",La="te-popover",$a={...Et.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:` |
| 22 | <div class="opacity-0 transition-opacity duration-150 ease-in-out absolute top-0 left-0 z-[1070] block max-w-[267px] break-words bg-white bg-clip-padding border border-neutral-100 rounded-lg shadow-2 text-sm not-italic font-normal text-left no-underline underline-offset-auto normal-case leading-6 tracking-normal break-normal whitespace-normal dark:border-white/10 dark:bg-surface-dark dark:text-white data-[popper-reference-hidden]:hidden" role="tooltip"> |
| 23 | <h3 data-twe-popover-header-ref class="py-2 px-4 mb-0 border-b-2 border-neutral-100 rounded-t-lg font-medium empty:hidden dark:border-white/10"></h3> |
| 24 | <div data-twe-popover-body-ref class="p-4 text-surface dark:text-white"></div> |
nothing calls this directly
no test coverage detected