diff --git a/dist/bootstrap-native.cjs b/dist/bootstrap-native.cjs index 3e94f743..995c353a 100644 --- a/dist/bootstrap-native.cjs +++ b/dist/bootstrap-native.cjs @@ -1,187 +1,2 @@ -"use strict";var qo=Object.defineProperty;var Yo=(t,s,e)=>s in t?qo(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var d=(t,s,e)=>Yo(t,typeof s!="symbol"?s+"":s,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Rn="aria-describedby",ke="aria-expanded",ve="aria-hidden",Ne="aria-modal",Ms="aria-pressed",Ge="aria-selected",Uo="DOMContentLoaded",ys="focus",Cs="focusin",Wn="focusout",Me="keydown",Zo="keyup",_="click",jn="mousedown",Jo="hover",Be="mouseenter",xs="mouseleave",Go="pointerdown",Qo="pointermove",ti="pointerup",Ps="touchstart",ei="dragstart",si='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',ls="ArrowDown",ds="ArrowUp",Bs="ArrowLeft",Fs="ArrowRight",Ss="Escape",ni="transitionDuration",oi="transitionDelay",Qe="transitionend",Vn="transitionProperty",ii=navigator.userAgentData,Ie=ii,{userAgent:ri}=navigator,Le=ri,Rs=/iPhone|iPad|iPod|Android/i;// istanbul ignore else @preserve -Ie?Ie.brands.some(t=>Rs.test(t.brand)):Rs.test(Le);const Ws=/(iPhone|iPod|iPad)/,ci=Ie?Ie.brands.some(t=>Ws.test(t.brand)):Ws.test(Le);Le&&Le.includes("Firefox");const{head:Fe}=document;["webkitPerspective","perspective"].some(t=>t in Fe.style);const zn=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},Xn=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},ai=(t,s,e,n)=>{const o=i=>{// istanbul ignore else @preserve -(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),Xn(t,s,o,n))};zn(t,s,o,n)},he=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});// istanbul ignore next @preserve -ai(document,Uo,he,s)}catch{}return t})();["webkitTransform","transform"].some(t=>t in Fe.style);["webkitAnimation","animation"].some(t=>t in Fe.style);["webkitTransition","transition"].some(t=>t in Fe.style);const st=(t,s)=>t.getAttribute(s),fe=(t,s)=>t.hasAttribute(s),O=(t,s,e)=>t.setAttribute(s,e),_t=(t,s)=>t.removeAttribute(s),f=(t,...s)=>{t.classList.add(...s)},b=(t,...s)=>{t.classList.remove(...s)},g=(t,s)=>t.classList.contains(s),be=t=>t!=null&&typeof t=="object"||!1,A=t=>be(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,y=t=>A(t)&&t.nodeType===1||!1,jt=new Map,kt={data:jt,set:(t,s,e)=>{if(!y(t))return;// istanbul ignore else @preserve -jt.has(s)||jt.set(s,new Map),jt.get(s).set(t,e)},getAllFor:t=>jt.get(t)||null,get:(t,s)=>{if(!y(t)||!s)return null;const e=kt.getAllFor(s);return t&&e&&e.get(t)||null},remove:(t,s)=>{const e=kt.getAllFor(s);if(!e||!y(t))return;e.delete(t);// istanbul ignore else @preserve -e.size===0&&jt.delete(s)}},z=(t,s)=>kt.get(t,s),we=t=>typeof t=="string"||!1,li=t=>be(t)&&t.constructor.name==="Window"||!1,Kn=t=>A(t)&&t.nodeType===9||!1,E=t=>li(t)?t.document:Kn(t)?t:A(t)?t.ownerDocument:globalThis.document,dt=(t,...s)=>Object.assign(t,...s),Et=t=>{if(!t)return;if(we(t))return E().createElement(t);const{tagName:s}=t,e=Et(s);if(!e)return;const n={...t};return delete n.tagName,dt(e,n)},$=(t,s)=>t.dispatchEvent(s),K=(t,s)=>{const e=getComputedStyle(t),n=s.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return e.getPropertyValue(n)},di=t=>{const s=K(t,Vn),e=K(t,oi),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},$e=t=>{const s=K(t,Vn),e=K(t,ni),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},D=(t,s)=>{let e=0;const n=new Event(Qe),o=$e(t),i=di(t);if(o){const r=c=>{// istanbul ignore else @preserve -c.target===t&&(s.apply(t,[c]),t.removeEventListener(Qe,r),e=1)};t.addEventListener(Qe,r),setTimeout(()=>{// istanbul ignore next @preserve -e||$(t,n)},o+i+17)}else s.apply(t,[n])},ht=(t,s)=>t.focus(s),js=t=>["true",!0].includes(t)?!0:["false",!1].includes(t)?!1:["null","",null,void 0].includes(t)?null:t!==""&&!Number.isNaN(+t)?+t:t,Pe=t=>Object.entries(t),ee=t=>t.toLowerCase(),hi=(t,s,e,n)=>{const o={...e},i={...t.dataset},r={...s},c={},l="title";return Pe(i).forEach(([a,h])=>{const p=typeof a=="string"&&a.includes(n)?a.replace(n,"").replace(/[A-Z]/g,u=>ee(u)):a;c[p]=js(h)}),Pe(o).forEach(([a,h])=>{o[a]=js(h)}),Pe(s).forEach(([a,h])=>{// istanbul ignore else @preserve -a in o?r[a]=o[a]:a in c?r[a]=c[a]:r[a]=a===l?st(t,l):h}),r},Vs=t=>Object.keys(t),T=(t,s)=>{const e=new CustomEvent(t,{cancelable:!0,bubbles:!0});// istanbul ignore else @preserve -return be(s)&&dt(e,s),e},ge={passive:!0},Mt=t=>t.offsetHeight,k=(t,s)=>{Pe(s).forEach(([e,n])=>{if(n&&we(e)&&e.includes("--"))t.style.setProperty(e,n);else{const o={};o[e]=n,dt(t.style,o)}})},hs=t=>be(t)&&t.constructor.name==="Map"||!1,fi=t=>typeof t=="number"||!1,vt=new Map,m={set:(t,s,e,n)=>{if(!y(t))return;// istanbul ignore else @preserve -if(n&&n.length){// istanbul ignore else @preserve -vt.has(t)||vt.set(t,new Map),vt.get(t).set(n,setTimeout(s,e))}else vt.set(t,setTimeout(s,e))},get:(t,s)=>{if(!y(t))return null;const e=vt.get(t);return s&&e&&hs(e)?e.get(s)||null:fi(e)?e:null},clear:(t,s)=>{if(!y(t))return;const e=vt.get(t);if(s&&s.length&&hs(e)){clearTimeout(e.get(s)),e.delete(s);// istanbul ignore else @preserve -e.size===0&&vt.delete(t)}else clearTimeout(e),vt.delete(t)}},J=(t,s)=>(A(s)?s:E()).querySelectorAll(t),fs=new Map;function gi(t){const{shiftKey:s,code:e}=t,n=E(this),o=[...J(si,this)].filter(c=>!fe(c,"disabled")&&!st(c,ve));if(!o.length)return;const i=o[0],r=o[o.length-1];// istanbul ignore else @preserve -e==="Tab"&&(s&&n.activeElement===i?(r.focus(),t.preventDefault()):!s&&n.activeElement===r&&(i.focus(),t.preventDefault()))}const pi=t=>fs.has(t)===!0,Re=t=>{const s=pi(t);(s?Xn:zn)(t,"keydown",gi),s?fs.delete(t):fs.set(t,!0)},Ee=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:r,left:c}=t.getBoundingClientRect();let l=1,a=1;if(s&&y(t)){const{offsetWidth:h,offsetHeight:p}=t;l=h>0?Math.round(e)/h:1,a=p>0?Math.round(n)/p:1}return{width:e/l,height:n/a,top:o/a,right:i/l,bottom:r/a,left:c/l,x:c/l,y:o/a}},Pt=t=>E(t).body,it=t=>E(t).documentElement,qn=t=>A(t)&&t.constructor.name==="ShadowRoot"||!1,ui=t=>t.nodeName==="HTML"?t:y(t)&&t.assignedSlot||A(t)&&t.parentNode||qn(t)&&t.host||it(t);let zs=0,Xs=0;const Vt=new Map,Yn=(t,s)=>{let e=s?zs:Xs;if(s){const n=Yn(t),o=Vt.get(n)||new Map;Vt.has(n)||Vt.set(n,o),hs(o)&&!o.has(s)?(o.set(s,e),zs+=1):e=o.get(s)}else{const n=t.id||t;Vt.has(n)?e=Vt.get(n):(Vt.set(n,e),Xs+=1)}return e},mi=t=>{var s;return t?Kn(t)?t.defaultView:A(t)?(s=t==null?void 0:t.ownerDocument)==null?void 0:s.defaultView:t:window},vi=t=>Array.isArray(t)||!1,Un=t=>{if(!A(t))return!1;const{top:s,bottom:e}=Ee(t),{clientHeight:n}=it(t);return s<=n&&e>=0},bi=t=>typeof t=="function"||!1,wi=t=>be(t)&&t.constructor.name==="NodeList"||!1,xt=t=>it(t).dir==="rtl",$i=t=>A(t)&&["TABLE","TD","TH"].includes(t.nodeName)||!1,N=(t,s)=>t?t.closest(s)||N(t.getRootNode().host,s):null,H=(t,s)=>y(t)?t:(A(s)?s:E()).querySelector(t),Hs=(t,s)=>(A(s)?s:E()).getElementsByTagName(t),at=(t,s)=>(s&&A(s)?s:E()).getElementsByClassName(t),Zn=(t,s)=>t.matches(s),zt={},Jn=t=>{const{type:s,currentTarget:e}=t;[...zt[s]].forEach(([n,o])=>{/* istanbul ignore else @preserve */e===n&&[...o].forEach(([i,r])=>{i.apply(n,[t]),typeof r=="object"&&r.once&&R(n,s,i,r)})})},F=(t,s,e,n)=>{/* istanbul ignore else @preserve */zt[s]||(zt[s]=new Map);const o=zt[s];/* istanbul ignore else @preserve */o.has(t)||o.set(t,new Map);const i=o.get(t),{size:r}=i;i.set(e,n);/* istanbul ignore else @preserve */r||t.addEventListener(s,Jn,n)},R=(t,s,e,n)=>{const o=zt[s],i=o&&o.get(t),r=i&&i.get(e),c=r!==void 0?r:n;/* istanbul ignore else @preserve */i&&i.has(e)&&i.delete(e);/* istanbul ignore else @preserve */o&&(!i||!i.size)&&o.delete(t);/* istanbul ignore else @preserve */(!o||!o.size)&&delete zt[s];/* istanbul ignore else @preserve */(!i||!i.size)&&t.removeEventListener(s,Jn,c)},B="fade",v="show",We="data-bs-dismiss",je="alert",Gn="Alert",Ei="5.0.15",Ti=Ei;class nt{constructor(s,e){d(this,"_toggleEventListeners",()=>{});let n;try{if(y(s))n=s;else if(we(s)){n=H(s);// istanbul ignore else @preserve -if(!n)throw Error(`"${s}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(i){throw Error(`${this.name} Error: ${i.message}`)}const o=kt.get(n,this.name);// istanbul ignore else @preserve -o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Vs(this.defaults).length?hi(n,this.defaults,e||{},"bs"):{},kt.set(n,this.name,this)}get version(){return Ti}get name(){return"BaseComponent"}get defaults(){return{}}dispose(){kt.remove(this.element,this.name),Vs(this).forEach(s=>{delete this[s]})}}const yi=`.${je}`,Ci=`[${We}="${je}"]`,xi=t=>z(t,Gn),Pi=t=>new Xt(t),Ks=T(`close.bs.${je}`),Si=T(`closed.bs.${je}`),qs=t=>{const{element:s}=t;$(s,Si),t._toggleEventListeners(),t.dispose(),s.remove()};class Xt extends nt{constructor(e){super(e);d(this,"dismiss");d(this,"close",()=>{const{element:e}=this;// istanbul ignore else @preserve -e&&g(e,v)&&($(e,Ks),Ks.defaultPrevented||(b(e,v),g(e,B)?D(e,()=>qs(this)):qs(this)))});d(this,"_toggleEventListeners",e=>{const n=e?F:R,{dismiss:o,close:i}=this;// istanbul ignore else @preserve -o&&n(o,_,i)});this.dismiss=H(Ci,this.element),this._toggleEventListeners(!0)}get name(){return Gn}dispose(){this._toggleEventListeners(),super.dispose()}}d(Xt,"selector",yi),d(Xt,"init",Pi),d(Xt,"getInstance",xi);const x="active",rt="data-bs-toggle",Hi="button",Qn="Button",Ai=`[${rt}="${Hi}"]`,Di=t=>z(t,Qn),ki=t=>new Kt(t);class Kt extends nt{constructor(e){super(e);d(this,"isActive",!1);d(this,"toggle",e=>{e&&e.preventDefault();const{element:n,isActive:o}=this;!g(n,"disabled")&&!st(n,"disabled")&&((o?b:f)(n,x),O(n,Ms,o?"false":"true"),this.isActive=g(n,x))});d(this,"_toggleEventListeners",e=>{(e?F:R)(this.element,_,this.toggle)});const{element:n}=this;this.isActive=g(n,x),O(n,Ms,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return Qn}dispose(){this._toggleEventListeners(),super.dispose()}}d(Kt,"selector",Ai),d(Kt,"init",ki),d(Kt,"getInstance",Di);const gs="data-bs-target",It="carousel",to="Carousel",Ys="data-bs-parent",Ii="data-bs-container",Y=t=>{const s=[gs,Ys,Ii,"href"],e=E(t);return s.map(n=>{const o=st(t,n);return o?n===Ys?N(t,o):H(o,e):null}).filter(n=>n)[0]},Te=`[data-bs-ride="${It}"]`,Z=`${It}-item`,ps="data-bs-slide-to",$t="data-bs-slide",Tt="paused",Us={pause:"hover",keyboard:!1,touch:!0,interval:5e3},ft=t=>z(t,to),Li=t=>new qt(t);let de=0,Se=0,ts=0;const es=T(`slide.bs.${It}`),us=T(`slid.bs.${It}`),Zs=t=>{const{index:s,direction:e,element:n,slides:o,options:i}=t;// istanbul ignore else @preserve -if(t.isAnimating){const r=ms(t),c=e==="left"?"next":"prev",l=e==="left"?"start":"end";f(o[s],x),b(o[s],`${Z}-${c}`),b(o[s],`${Z}-${l}`),b(o[r],x),b(o[r],`${Z}-${l}`),$(n,us),m.clear(n,$t),t.cycle&&!E(n).hidden&&i.interval&&!t.isPaused&&t.cycle()}};function _i(){const t=ft(this);// istanbul ignore else @preserve -t&&!t.isPaused&&!m.get(this,Tt)&&f(this,Tt)}function Oi(){const t=ft(this);// istanbul ignore else @preserve -t&&t.isPaused&&!m.get(this,Tt)&&t.cycle()}function Ni(t){t.preventDefault();const s=N(this,Te)||Y(this),e=ft(s);// istanbul ignore else @preserve -if(e&&!e.isAnimating){const n=+(st(this,ps)||0);// istanbul ignore else @preserve -this&&!g(this,x)&&!Number.isNaN(n)&&e.to(n)}}function Mi(t){t.preventDefault();const s=N(this,Te)||Y(this),e=ft(s);// istanbul ignore else @preserve -if(e&&!e.isAnimating){const n=st(this,$t);// istanbul ignore else @preserve -n==="next"?e.next():n==="prev"&&e.prev()}}const Bi=({code:t,target:s})=>{const e=E(s),[n]=[...J(Te,e)].filter(i=>Un(i)),o=ft(n);// istanbul ignore next @preserve -if(o&&!o.isAnimating&&!/textarea|input/i.test(s.nodeName)){const i=xt(n),r=i?Bs:Fs,c=i?Fs:Bs;// istanbul ignore else @preserve -t===c?o.prev():t===r&&o.next()}};function Js(t){const{target:s}=t,e=ft(this);// istanbul ignore next @preserve -e&&e.isTouch&&(e.indicator&&!e.indicator.contains(s)||!e.controls.includes(s))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())}function Fi(t){const{target:s}=t,e=ft(this);// istanbul ignore else @preserve -if(e&&!e.isAnimating&&!e.isTouch){const{controls:n,indicators:o}=e;// istanbul ignore else @preserve -if(![...n,...o].every(i=>i===s||i.contains(s))){de=t.pageX;// istanbul ignore else @preserve -this.contains(s)&&(e.isTouch=!0,eo(e,!0))}}}const Ri=t=>{Se=t.pageX},Wi=t=>{var o;const{target:s}=t,e=E(s),n=[...J(Te,e)].map(i=>ft(i)).find(i=>i.isTouch);// istanbul ignore else @preserve -if(n){const{element:i,index:r}=n,c=xt(i);if(ts=t.pageX,n.isTouch=!1,eo(n),!((o=e.getSelection())!=null&&o.toString().length)&&i.contains(s)&&Math.abs(de-ts)>120){// istanbul ignore else @preserve -Sede&&n.to(r+(c?1:-1))}de=0,Se=0,ts=0}},ss=(t,s)=>{const{indicators:e}=t;[...e].forEach(n=>b(n,x));// istanbul ignore else @preserve -t.indicators[s]&&f(e[s],x)},eo=(t,s)=>{const{element:e}=t,n=s?F:R;n(E(e),Qo,Ri,ge),n(E(e),ti,Wi,ge)},ms=t=>{const{slides:s,element:e}=t,n=H(`.${Z}.${x}`,e);return y(n)?[...s].indexOf(n):-1};class qt extends nt{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const{element:n,options:o,slides:i,controls:r,indicators:c}=this,{touch:l,pause:a,interval:h,keyboard:p}=o,u=e?F:R;a&&h&&(u(n,Be,_i),u(n,xs,Oi)),l&&i.length>2&&(u(n,Go,Fi,ge),u(n,Ps,Js,{passive:!1}),u(n,ei,Js,{passive:!1}));// istanbul ignore else @preserve -r.length&&r.forEach(C=>{// istanbul ignore else @preserve -C&&u(C,_,Mi)});// istanbul ignore else @preserve -c.length&&c.forEach(C=>{u(C,_,Ni)}),p&&u(E(n),Me,Bi)});const{element:o}=this;this.direction=xt(o)?"right":"left",this.isTouch=!1,this.slides=at(Z,o);const{slides:i}=this;if(i.length>=2){const r=ms(this),c=[...i].find(h=>Zn(h,`.${Z}-next,.${Z}-next`));this.index=r;const l=E(o);this.controls=[...J(`[${$t}]`,o),...J(`[${$t}][${gs}="#${o.id}"]`,l)].filter((h,p,u)=>p===u.indexOf(h)),this.indicator=H(`.${It}-indicators`,o),this.indicators=[...this.indicator?J(`[${ps}]`,this.indicator):[],...J(`[${ps}][${gs}="#${o.id}"]`,l)].filter((h,p,u)=>p===u.indexOf(h));const{options:a}=this;this.options.interval=a.interval===!0?Us.interval:a.interval;// istanbul ignore next @preserve - impossible to test -c?this.index=[...i].indexOf(c):r<0&&(this.index=0,f(i[0],x),this.indicators.length&&ss(this,0));// istanbul ignore else @preserve -this.indicators.length&&ss(this,this.index),this._toggleEventListeners(!0),a.interval&&this.cycle()}}get name(){return to}get defaults(){return Us}get isPaused(){return g(this.element,Tt)}get isAnimating(){return H(`.${Z}-next,.${Z}-prev`,this.element)!==null}cycle(){const{element:e,options:n,isPaused:o,index:i}=this;m.clear(e,It),o&&(m.clear(e,Tt),b(e,Tt)),m.set(e,()=>{// istanbul ignore else @preserve -this.element&&!this.isPaused&&!this.isTouch&&Un(e)&&this.to(i+1)},n.interval,It)}pause(){const{element:e,options:n}=this;// istanbul ignore else @preserve -!this.isPaused&&n.interval&&(f(e,Tt),m.set(e,()=>{},1,Tt))}next(){// istanbul ignore else @preserve -this.isAnimating||this.to(this.index+1)}prev(){// istanbul ignore else @preserve -this.isAnimating||this.to(this.index-1)}to(e){const{element:n,slides:o,options:i}=this,r=ms(this),c=xt(n);let l=e;if(!this.isAnimating&&r!==l&&!m.get(n,$t)){// istanbul ignore else @preserve -rl||r===o.length-1&&l===0)&&(this.direction=c?"left":"right");const{direction:a}=this;l<0?l=o.length-1:l>=o.length&&(l=0);const h=a==="left"?"next":"prev",p=a==="left"?"start":"end",u={relatedTarget:o[l],from:r,to:l,direction:a};dt(es,u),dt(us,u),$(n,es),es.defaultPrevented||(this.index=l,ss(this,l),$e(o[l])&&g(n,"slide")?m.set(n,()=>{f(o[l],`${Z}-${h}`),Mt(o[l]),f(o[l],`${Z}-${p}`),f(o[r],`${Z}-${p}`),D(o[l],()=>this.slides&&this.slides.length&&Zs(this))},0,$t):(f(o[l],x),b(o[r],x),m.set(n,()=>{m.clear(n,$t);// istanbul ignore else @preserve -n&&i.interval&&!this.isPaused&&this.cycle(),$(n,us)},0,$t)))}}dispose(){const{isAnimating:e}=this,n={...this,isAnimating:e};this._toggleEventListeners(),super.dispose();// istanbul ignore next @preserve - impossible to test in playwright -n.isAnimating&&D(n.slides[n.index],()=>{Zs(n)})}}d(qt,"selector",Te),d(qt,"init",Li),d(qt,"getInstance",ft);const Ot="collapsing",q="collapse",so="Collapse",ji=`.${q}`,no=`[${rt}="${q}"]`,Vi={parent:null},He=t=>z(t,so),zi=t=>new Yt(t),Gs=T(`show.bs.${q}`),Xi=T(`shown.bs.${q}`),Qs=T(`hide.bs.${q}`),Ki=T(`hidden.bs.${q}`),qi=t=>{const{element:s,parent:e,triggers:n}=t;$(s,Gs),Gs.defaultPrevented||(m.set(s,he,17),e&&m.set(e,he,17),f(s,Ot),b(s,q),k(s,{height:`${s.scrollHeight}px`}),D(s,()=>{m.clear(s),e&&m.clear(e),n.forEach(o=>O(o,ke,"true")),b(s,Ot),f(s,q),f(s,v),k(s,{height:""}),$(s,Xi)}))},tn=t=>{const{element:s,parent:e,triggers:n}=t;$(s,Qs),Qs.defaultPrevented||(m.set(s,he,17),e&&m.set(e,he,17),k(s,{height:`${s.scrollHeight}px`}),b(s,q),b(s,v),f(s,Ot),Mt(s),k(s,{height:"0px"}),D(s,()=>{m.clear(s);// istanbul ignore else @preserve -e&&m.clear(e),n.forEach(o=>O(o,ke,"false")),b(s,Ot),f(s,q),k(s,{height:""}),$(s,Ki)}))},Yi=t=>{const{target:s}=t,e=s&&N(s,no),n=e&&Y(e),o=n&&He(n);// istanbul ignore else @preserve -o&&o.toggle(),e&&e.tagName==="A"&&t.preventDefault()};class Yt extends nt{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?F:R,{triggers:o}=this;// istanbul ignore else @preserve -o.length&&o.forEach(i=>n(i,_,Yi))});const{element:o,options:i}=this,r=E(o);this.triggers=[...J(no,r)].filter(c=>Y(c)===o),this.parent=y(i.parent)?i.parent:we(i.parent)?Y(o)||H(i.parent,r):null,this._toggleEventListeners(!0)}get name(){return so}get defaults(){return Vi}hide(){const{triggers:e,element:n}=this;// istanbul ignore else @preserve -if(!m.get(n)){tn(this);// istanbul ignore else @preserve -e.length&&e.forEach(o=>f(o,`${q}d`))}}show(){const{element:e,parent:n,triggers:o}=this;let i,r;if(n&&(i=[...J(`.${q}.${v}`,n)].find(c=>He(c)),r=i&&He(i)),(!n||!m.get(n))&&!m.get(e)){r&&i!==e&&(tn(r),r.triggers.forEach(c=>{f(c,`${q}d`)})),qi(this);// istanbul ignore else @preserve -o.length&&o.forEach(c=>b(c,`${q}d`))}}toggle(){g(this.element,v)?this.hide():this.show()}dispose(){this._toggleEventListeners(),super.dispose()}}d(Yt,"selector",ji),d(Yt,"init",zi),d(Yt,"getInstance",He);const Nt=["dropdown","dropup","dropstart","dropend"],oo="Dropdown",io="dropdown-menu",ro=t=>{const s=N(t,"A");return t.tagName==="A"&&fe(t,"href")&&st(t,"href").slice(-1)==="#"||s&&fe(s,"href")&&st(s,"href").slice(-1)==="#"},[et,vs,bs,ws]=Nt,co=`[${rt}="${et}"]`,se=t=>z(t,oo),Ui=t=>new Ut(t),Zi=`${io}-end`,en=[et,vs],sn=[bs,ws],nn=["A","BUTTON"],Ji={offset:5,display:"dynamic"},ns=T(`show.bs.${et}`),on=T(`shown.bs.${et}`),os=T(`hide.bs.${et}`),rn=T(`hidden.bs.${et}`),ao=T(`updated.bs.${et}`),lo=t=>{const{element:s,menu:e,parentElement:n,options:o}=t,{offset:i}=o;// istanbul ignore else @preserve: this test requires a navbar -if(K(e,"position")!=="static"){const r=xt(s),c=g(e,Zi);["margin","top","bottom","left","right"].forEach(L=>{const pt={};pt[L]="",k(e,pt)});let a=Nt.find(L=>g(n,L))||et;const h={dropdown:[i,0,0],dropup:[0,0,i],dropstart:r?[-1,0,0,i]:[-1,i,0],dropend:r?[-1,i,0]:[-1,0,0,i]},p={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:r?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:r?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:r?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:r?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:u,offsetHeight:C}=e,{clientWidth:j,clientHeight:w}=it(s),{left:M,top:W,width:Ft,height:ct}=Ee(s),P=M-u-i<0,tt=M+u+Ft+i>=j,ot=W+C+i>=w,V=W+C+ct+i>=w,X=W-C-i<0,S=(!r&&c||r&&!c)&&M+Ft-u<0,Rt=(r&&c||!r&&!c)&&M+u>=j;if(sn.includes(a)&&P&&tt&&(a=et),a===bs&&(r?tt:P)&&(a=ws),a===ws&&(r?P:tt)&&(a=bs),a===vs&&X&&!V&&(a=et),a===et&&V&&!X&&(a=vs),sn.includes(a)&&ot&&dt(p[a],{top:"auto",bottom:0}),en.includes(a)&&(S||Rt)){let L={left:"auto",right:"auto"};// istanbul ignore else @preserve -!S&&Rt&&!r&&(L={left:"auto",right:0});// istanbul ignore else @preserve -S&&!Rt&&r&&(L={left:0,right:"auto"});// istanbul ignore else @preserve -L&&dt(p[a],L)}const gt=h[a];if(k(e,{...p[a],margin:`${gt.map(L=>L&&`${L}px`).join(" ")}`}),en.includes(a)&&c){// istanbul ignore else @preserve -c&&k(e,p[!r&&S||r&&Rt?"menuStart":"menuEnd"])}$(n,ao)}},Gi=t=>[...t.children].map(s=>{if(s&&nn.includes(s.tagName))return s;const{firstElementChild:e}=s;return e&&nn.includes(e.tagName)?e:null}).filter(s=>s),cn=t=>{const{element:s,options:e,menu:n}=t,o=t.open?F:R,i=E(s);o(i,_,an),o(i,ys,an),o(i,Me,tr),o(i,Zo,er);// istanbul ignore else @preserve -e.display==="dynamic"&&(t.open?t._observer.observe(n):t._observer.disconnect())},Ve=t=>{const s=[...Nt,"btn-group","input-group"].map(e=>at(`${e} ${v}`,E(t))).find(e=>e.length);if(s&&s.length)return[...s[0].children].find(e=>Nt.some(n=>n===st(e,rt)))},an=t=>{const{target:s,type:e}=t;// istanbul ignore else @preserve -if(s&&y(s)){const n=Ve(s),o=n&&se(n);// istanbul ignore else @preserve -if(o){const{parentElement:i,menu:r}=o,c=i&&i.contains(s)&&(s.tagName==="form"||N(s,"form")!==null);[_,jn].includes(e)&&ro(s)&&t.preventDefault();// istanbul ignore else @preserve -!c&&e!==ys&&s!==n&&s!==r&&o.hide()}}},Qi=t=>{const{target:s}=t,e=s&&N(s,co),n=e&&se(e);// istanbul ignore else @preserve -if(n){t.stopPropagation(),n.toggle();// istanbul ignore else @preserve -e&&ro(e)&&t.preventDefault()}},tr=t=>{// istanbul ignore else @preserve -[ls,ds].includes(t.code)&&t.preventDefault()};function er(t){const{code:s}=t,e=Ve(this),n=e&&se(e),{activeElement:o}=e&&E(e);// istanbul ignore else @preserve -if(n&&o){const{menu:i,open:r}=n,c=Gi(i);if(c&&c.length&&[ls,ds].includes(s)){let l=c.indexOf(o);// istanbul ignore else @preserve -o===e?l=0:s===ds?l=l>1?l-1:0:s===ls&&(l=l{(e?F:R)(this.element,_,Qi)});const{parentElement:o}=this.element,[i]=at(io,o);i&&(this.parentElement=o,this.menu=i,this._observer=new IntersectionObserver(([r])=>sr(r.target),{threshold:1}),this._toggleEventListeners(!0))}get name(){return oo}get defaults(){return Ji}toggle(){this.open?this.hide():this.show()}show(){const{element:e,open:n,menu:o,parentElement:i}=this;// istanbul ignore else @preserve -if(!n){const r=Ve(e),c=r&&se(r);c&&c.hide(),[ns,on,ao].forEach(l=>{l.relatedTarget=e}),$(i,ns),ns.defaultPrevented||(f(o,v),f(i,v),O(e,ke,"true"),lo(this),this.open=!n,ht(e),cn(this),$(i,on))}}hide(){const{element:e,open:n,menu:o,parentElement:i}=this;// istanbul ignore else @preserve -n&&([os,rn].forEach(r=>{r.relatedTarget=e}),$(i,os),os.defaultPrevented||(b(o,v),b(i,v),O(e,ke,"false"),this.open=!n,cn(this),$(i,rn)))}dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}d(Ut,"selector",co),d(Ut,"init",Ui),d(Ut,"getInstance",se);const U="modal",As="Modal",Ds="Offcanvas",nr="fixed-top",or="fixed-bottom",ho="sticky-top",fo="position-sticky",go=t=>[...at(nr,t),...at(or,t),...at(ho,t),...at(fo,t),...at("is-fixed",t)],ir=t=>{const s=Pt(t);k(s,{paddingRight:"",overflow:""});const e=go(s);// istanbul ignore else @preserve -e.length&&e.forEach(n=>{k(n,{paddingRight:"",marginRight:""})})},po=t=>{const{clientWidth:s}=it(t),{innerWidth:e}=mi(t);return Math.abs(e-s)},uo=(t,s)=>{const e=Pt(t),n=parseInt(K(e,"paddingRight"),10),i=K(e,"overflow")==="hidden"&&n?0:po(t),r=go(e);// istanbul ignore else @preserve -if(s){k(e,{overflow:"hidden",paddingRight:`${n+i}px`});// istanbul ignore else @preserve -r.length&&r.forEach(c=>{const l=K(c,"paddingRight");c.style.paddingRight=`${parseInt(l,10)+i}px`;// istanbul ignore else @preserve -if([ho,fo].some(a=>g(c,a))){const a=K(c,"marginRight");c.style.marginRight=`${parseInt(a,10)-i}px`}})}},G="offcanvas",yt=Et({tagName:"div",className:"popup-container"}),mo=(t,s)=>{const e=A(s)&&s.nodeName==="BODY",n=A(s)&&!e?s:yt,o=e?s:Pt(t);// istanbul ignore else @preserve -A(t)&&(n===yt&&o.append(yt),n.append(t))},vo=(t,s)=>{const e=A(s)&&s.nodeName==="BODY",n=A(s)&&!e?s:yt;// istanbul ignore else @preserve -A(t)&&(t.remove(),n===yt&&!yt.children.length&&yt.remove())},ks=(t,s)=>{const e=A(s)&&s.nodeName!=="BODY"?s:yt;return A(t)&&e.contains(t)},bo="backdrop",ln=`${U}-${bo}`,dn=`${G}-${bo}`,wo=`.${U}.${v}`,Is=`.${G}.${v}`,I=Et("div"),Bt=t=>H(`${wo},${Is}`,E(t)),Ls=t=>{const s=t?ln:dn;[ln,dn].forEach(e=>{b(I,e)}),f(I,s)},$o=(t,s,e)=>{Ls(e),mo(I,Pt(t)),s&&f(I,B)},Eo=()=>{g(I,v)||(f(I,v),Mt(I))},ze=()=>{b(I,v)},To=t=>{Bt(t)||(b(I,B),vo(I,Pt(t)),ir(t))},yo=t=>y(t)&&K(t,"visibility")!=="hidden"&&t.offsetParent!==null,rr=`.${U}`,Co=`[${rt}="${U}"]`,cr=`[${We}="${U}"]`,xo=`${U}-static`,ar={backdrop:!0,keyboard:!0},pe=t=>z(t,As),lr=t=>new Zt(t),Ae=T(`show.bs.${U}`),hn=T(`shown.bs.${U}`),is=T(`hide.bs.${U}`),fn=T(`hidden.bs.${U}`),Po=t=>{const{element:s}=t,e=po(s),{clientHeight:n,scrollHeight:o}=it(s),{clientHeight:i,scrollHeight:r}=s,c=i!==r;// istanbul ignore next @preserve: impossible to test? -if(!c&&e){const a={[xt(s)?"paddingLeft":"paddingRight"]:`${e}px`};k(s,a)}uo(s,c||n!==o)},So=(t,s)=>{const e=s?F:R,{element:n}=t;e(n,_,fr),e(E(n),Me,hr),s?t._observer.observe(n):t._observer.disconnect()},gn=t=>{const{triggers:s,element:e,relatedTarget:n}=t;To(e),k(e,{paddingRight:"",display:""}),So(t);const o=Ae.relatedTarget||s.find(yo);// istanbul ignore else @preserve -o&&ht(o),fn.relatedTarget=n,$(e,fn),Re(e)},pn=t=>{const{element:s,relatedTarget:e}=t;ht(s),So(t,!0),hn.relatedTarget=e,$(s,hn),Re(s)},un=t=>{const{element:s,hasFade:e}=t;k(s,{display:"block"}),Po(t);// istanbul ignore else @preserve -Bt(s)||k(Pt(s),{overflow:"hidden"}),f(s,v),_t(s,ve),O(s,Ne,"true"),e?D(s,()=>pn(t)):pn(t)},mn=t=>{const{element:s,options:e,hasFade:n}=t;e.backdrop&&n&&g(I,v)&&!Bt(s)?(ze(),D(I,()=>gn(t))):gn(t)},dr=t=>{const{target:s}=t,e=s&&N(s,Co),n=e&&Y(e),o=n&&pe(n);// istanbul ignore else @preserve -if(o){// istanbul ignore else @preserve -e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.toggle()}},hr=({code:t,target:s})=>{const e=H(wo,E(s)),n=e&&pe(e);// istanbul ignore else @preserve -if(n){const{options:o}=n;// istanbul ignore else @preserve -o.keyboard&&t===Ss&&g(e,v)&&(n.relatedTarget=null,n.hide())}},fr=t=>{var n,o;const{currentTarget:s}=t,e=s&&pe(s);// istanbul ignore else @preserve -if(e&&s&&!m.get(s)){const{options:i,isStatic:r,modalDialog:c}=e,{backdrop:l}=i,{target:a}=t,h=(o=(n=E(s))==null?void 0:n.getSelection())==null?void 0:o.toString().length,p=c.contains(a),u=a&&N(a,cr);// istanbul ignore else @preserve -r&&!p?m.set(s,()=>{f(s,xo),D(c,()=>gr(e))},17):(u||!h&&!r&&!p&&l)&&(e.relatedTarget=u||null,e.hide(),t.preventDefault())}},gr=t=>{const{element:s,modalDialog:e}=t,n=($e(e)||0)+17;b(s,xo),m.set(s,()=>m.clear(s),n)};class Zt extends nt{constructor(e,n){super(e,n);d(this,"update",()=>{// istanbul ignore else @preserve -g(this.element,v)&&Po(this)});d(this,"_toggleEventListeners",e=>{const n=e?F:R,{triggers:o}=this;// istanbul ignore else @preserve -o.length&&o.forEach(i=>n(i,_,dr))});const{element:o}=this,i=H(`.${U}-dialog`,o);// istanbul ignore else @preserve -i&&(this.modalDialog=i,this.triggers=[...J(Co,E(o))].filter(r=>Y(r)===o),this.isStatic=this.options.backdrop==="static",this.hasFade=g(o,B),this.relatedTarget=null,this._observer=new ResizeObserver(()=>this.update()),this._toggleEventListeners(!0))}get name(){return As}get defaults(){return ar}toggle(){g(this.element,v)?this.hide():this.show()}show(){const{element:e,options:n,hasFade:o,relatedTarget:i}=this,{backdrop:r}=n;let c=0;// istanbul ignore else @preserve -if(!g(e,v)&&(Ae.relatedTarget=i||void 0,$(e,Ae),!Ae.defaultPrevented)){const l=Bt(e);// istanbul ignore else @preserve -if(l&&l!==e){const a=pe(l)||z(l,Ds);// istanbul ignore else @preserve -a&&a.hide()}if(r)ks(I)?Ls(!0):$o(e,o,!0),c=$e(I),Eo(),setTimeout(()=>un(this),c);else{un(this);// istanbul ignore else @preserve -l&&g(I,v)&&ze()}}}hide(){const{element:e,hasFade:n,relatedTarget:o}=this;// istanbul ignore else @preserve -if(g(e,v)){is.relatedTarget=o||void 0,$(e,is);// istanbul ignore else @preserve -is.defaultPrevented||(b(e,v),O(e,ve,"true"),_t(e,Ne),n?D(e,()=>mn(this)):mn(this))}}dispose(){const e={...this},{modalDialog:n,hasFade:o}=e,i=()=>setTimeout(()=>super.dispose(),17);this.hide(),this._toggleEventListeners(),o?D(n,i):i()}}d(Zt,"selector",rr),d(Zt,"init",lr),d(Zt,"getInstance",pe);const pr=`.${G}`,_s=`[${rt}="${G}"]`,ur=`[${We}="${G}"]`,Xe=`${G}-toggling`,mr={backdrop:!0,keyboard:!0,scroll:!1},ue=t=>z(t,Ds),vr=t=>new Jt(t),De=T(`show.bs.${G}`),Ho=T(`shown.bs.${G}`),rs=T(`hide.bs.${G}`),Ao=T(`hidden.bs.${G}`),br=t=>{const{element:s}=t,{clientHeight:e,scrollHeight:n}=it(s);uo(s,e!==n)},Do=(t,s)=>{const e=s?F:R,n=E(t.element);e(n,Me,Tr),e(n,_,Er)},vn=t=>{const{element:s,options:e}=t;// istanbul ignore else @preserve -e.scroll||(br(t),k(Pt(s),{overflow:"hidden"})),f(s,Xe),f(s,v),k(s,{visibility:"visible"}),D(s,()=>yr(t))},wr=t=>{const{element:s,options:e}=t,n=Bt(s);s.blur(),!n&&e.backdrop&&g(I,v)&&ze(),D(s,()=>Cr(t))},$r=t=>{const s=N(t.target,_s),e=s&&Y(s),n=e&&ue(e);// istanbul ignore else @preserve -if(n){n.relatedTarget=s,n.toggle();// istanbul ignore else @preserve -s&&s.tagName==="A"&&t.preventDefault()}},Er=t=>{const{target:s}=t,e=H(Is,E(s)),n=H(ur,e),o=e&&ue(e);// istanbul ignore else @preserve -if(o){const{options:i,triggers:r}=o,{backdrop:c}=i,l=N(s,_s),a=E(e).getSelection();// istanbul ignore else: a filter is required here @preserve -if(!I.contains(s)||c!=="static"){// istanbul ignore else @preserve -!(a&&a.toString().length)&&(!e.contains(s)&&c&&(!l||r.includes(s))||n&&n.contains(s))&&(o.relatedTarget=n&&n.contains(s)?n:null,o.hide());// istanbul ignore next @preserve -l&&l.tagName==="A"&&t.preventDefault()}}},Tr=({code:t,target:s})=>{const e=H(Is,E(s)),n=e&&ue(e);// istanbul ignore else @preserve -if(n){// istanbul ignore else @preserve -n.options.keyboard&&t===Ss&&(n.relatedTarget=null,n.hide())}},yr=t=>{const{element:s}=t;b(s,Xe),_t(s,ve),O(s,Ne,"true"),O(s,"role","dialog"),$(s,Ho),Do(t,!0),ht(s),Re(s)},Cr=t=>{const{element:s,triggers:e}=t;O(s,ve,"true"),_t(s,Ne),_t(s,"role"),k(s,{visibility:""});const n=De.relatedTarget||e.find(yo);// istanbul ignore else @preserve -n&&ht(n),To(s),$(s,Ao),b(s,Xe),Re(s),Bt(s)||Do(t)};class Jt extends nt{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?F:R;this.triggers.forEach(o=>n(o,_,$r))});const{element:o}=this;this.triggers=[...J(_s,E(o))].filter(i=>Y(i)===o),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return Ds}get defaults(){return mr}toggle(){g(this.element,v)?this.hide():this.show()}show(){const{element:e,options:n,relatedTarget:o}=this;let i=0;if(!g(e,v)&&(De.relatedTarget=o||void 0,Ho.relatedTarget=o||void 0,$(e,De),!De.defaultPrevented)){const r=Bt(e);if(r&&r!==e){const c=ue(r)||z(r,As);// istanbul ignore else @preserve -c&&c.hide()}if(n.backdrop)ks(I)?Ls():$o(e,!0),i=$e(I),Eo(),setTimeout(()=>vn(this),i);else{vn(this);// istanbul ignore next @preserve - this test was done on Modal -r&&g(I,v)&&ze()}}}hide(){const{element:e,relatedTarget:n}=this;g(e,v)&&(rs.relatedTarget=n||void 0,Ao.relatedTarget=n||void 0,$(e,rs),rs.defaultPrevented||(f(e,Xe),b(e,v),wr(this)))}dispose(){const{element:e}=this,n=g(e,v),o=()=>setTimeout(()=>super.dispose(),1);if(this.hide(),this._toggleEventListeners(),n){D(e,o);// istanbul ignore next @preserve -}else o()}}d(Jt,"selector",pr),d(Jt,"init",vr),d(Jt,"getInstance",ue);const Lt="popover",Ke="Popover",lt="tooltip",ko=t=>{const s=t===lt,e=s?`${t}-inner`:`${t}-body`,n=s?"":`

`,o=`
`,i=`
`;return`
${n+o+i}
`},Io={top:"top",bottom:"bottom",left:"start",right:"end"},$s=t=>{const s=/\b(top|bottom|start|end)+/,{element:e,tooltip:n,container:o,options:i,arrow:r}=t;// istanbul ignore else @preserve -if(n){const c={...Io},l=xt(e);k(n,{top:"",left:"",right:"",bottom:""});const a=t.name===Ke,{offsetWidth:h,offsetHeight:p}=n,{clientWidth:u,clientHeight:C,offsetWidth:j}=it(e);let{placement:w}=i;const{clientWidth:M,offsetWidth:W}=o,ct=K(o,"position")==="fixed",P=Math.abs(ct?M-W:u-j),tt=l&&ct?P:0,ot=u-(l?0:P)-1,{width:V,height:X,left:S,right:Rt,top:gt}=Ee(e,!0),{x:L,y:pt}={x:S,y:gt};k(r,{top:"",left:"",right:"",bottom:""});let St=0,oe="",ut=0,Ye="",Wt="",Ce="",Ue="";const Ht=r.offsetWidth||0,mt=r.offsetHeight||0,Ze=Ht/2;let ie=gt-p-mt<0,re=gt+p+X+mt>=C,ce=S-h-Ht=ot;const xe=["left","right"],Je=["top","bottom"];ie=xe.includes(w)?gt+X/2-p/2-mt<0:ie,re=xe.includes(w)?gt+p/2+X/2+mt>=C:re,ce=Je.includes(w)?S+V/2-h/2=ot:ae,w=xe.includes(w)&&ce&&ae?"top":w,w=w==="top"&&ie?"bottom":w,w=w==="bottom"&&re?"top":w,w=w==="left"&&ce?"right":w,w=w==="right"&&ae?"left":w,n.className.includes(w)||(n.className=n.className.replace(s,c[w]));// istanbul ignore else @preserve -xe.includes(w)?(w==="left"?ut=L-h-(a?Ht:0):ut=L+V+(a?Ht:0),ie&&re?(St=0,oe=0,Wt=gt+X/2-mt/2):ie?(St=pt,oe="",Wt=X/2-Ht):re?(St=pt-p+X,oe="",Wt=p-X/2-Ht):(St=pt-p/2+X/2,Wt=p/2-mt/2)):Je.includes(w)&&(w==="top"?St=pt-p-(a?mt:0):St=pt+X+(a?mt:0),ce?(ut=0,Ce=L+V/2-Ze):ae?(ut="auto",Ye=0,Ue=V/2+ot-Rt-Ze):(ut=L-h/2+V/2,Ce=h/2-Ze)),k(n,{top:`${St}px`,bottom:oe===""?"":`${oe}px`,left:ut==="auto"?ut:`${ut}px`,right:Ye!==""?`${Ye}px`:""});// istanbul ignore else @preserve -y(r)&&(Wt!==""&&(r.style.top=`${Wt}px`),Ce!==""?r.style.left=`${Ce}px`:Ue!==""&&(r.style.right=`${Ue}px`));const Ko=T(`updated.bs.${ee(t.name)}`);$(e,Ko)}},Es={template:ko(lt),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""};var xr=Object.defineProperty,Pr=(t,s,e)=>s in t?xr(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,bt=(t,s,e)=>Pr(t,typeof s!="symbol"?s+"":s,e);const Sr="DOMContentLoaded",Hr=navigator.userAgentData,_e=Hr,{userAgent:Ar}=navigator,Oe=Ar,bn=/iPhone|iPad|iPod|Android/i;// istanbul ignore else @preserve -_e?_e.brands.some(t=>bn.test(t.brand)):bn.test(Oe);const wn=/(iPhone|iPod|iPad)/;_e?_e.brands.some(t=>wn.test(t.brand)):wn.test(Oe);Oe&&Oe.includes("Firefox");const{head:qe}=document;["webkitPerspective","perspective"].some(t=>t in qe.style);const Dr=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},kr=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},Ir=(t,s,e,n)=>{const o=i=>{// istanbul ignore else @preserve -(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),kr(t,s,o,n))};Dr(t,s,o,n)},Lr=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});// istanbul ignore next @preserve -Ir(document,Sr,Lr,s)}catch{}return t})();["webkitTransform","transform"].some(t=>t in qe.style);["webkitAnimation","animation"].some(t=>t in qe.style);["webkitTransition","transition"].some(t=>t in qe.style);const _r=t=>t!=null&&typeof t=="object"||!1,Or=t=>_r(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,Nr=t=>Or(t)&&t.nodeType===1||!1,$n=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:r,left:c}=t.getBoundingClientRect();let l=1,a=1;return{width:e/l,height:n/a,top:o/a,right:i/l,bottom:r/a,left:c/l,x:c/l,y:o/a}},Mr=t=>typeof t=="function"||!1,En="PositionObserver Error";class Lo{constructor(s,e){if(bt(this,"entries"),bt(this,"_tick"),bt(this,"_root"),bt(this,"_callback"),bt(this,"observe",n=>{if(!Nr(n))throw new Error(`${En}: ${n} is not an instance of HTMLElement.`);const{clientWidth:o,clientHeight:i}=this._root,r=$n(n),{left:c,top:l,bottom:a,right:h,width:p,height:u}=r,C=l>1-u&&c>1-p&&a<=i+u-1&&h<=o+p-1;this.entries.push({target:n,boundingBox:r,isVisible:C}),this._tick=requestAnimationFrame(this._runCallback)}),bt(this,"unobserve",n=>{const o=this.entries.findIndex(i=>i.target===n);this.entries.splice(o,1)}),bt(this,"_runCallback",()=>{/* istanbul ignore if @preserve - a guard must be set */if(!this.entries.length)return;const n=[],{clientWidth:o,clientHeight:i}=this._root;this.entries.forEach((r,c)=>{const{target:l,boundingBox:a}=r,h=$n(l),{left:p,top:u,bottom:C,right:j,width:w,height:M}=h;if(a.left!==p||a.top!==u||a.right!==j||a.bottom!==C){const W=u>1-M&&p>1-w&&C<=i+M-1&&j<=o+w-1;this.entries[c].boundingBox=h,this.entries[c].isVisible=W,n.push({target:l,boundingBox:h,isVisible:W})}}),n.length&&this._callback(n),requestAnimationFrame(this._runCallback)}),bt(this,"disconnect",()=>{cancelAnimationFrame(this._tick),this.entries.length=0,this._tick=0}),!Mr(s))throw new Error(`${En}: ${s} is not a function.`);this.entries=[],this._callback=s,this._root=(e==null?void 0:e.root)||(document==null?void 0:document.documentElement),this._tick=0}}const _o="data-original-title",At="Tooltip",wt=(t,s,e)=>{// istanbul ignore else @preserve -if(we(s)&&s.length){let n=s.trim();bi(e)&&(n=e(n));const i=new DOMParser().parseFromString(n,"text/html");t.append(...i.body.childNodes)}else y(s)?t.append(s):(wi(s)||vi(s)&&s.every(A))&&t.append(...s)},Br=t=>{const s=t.name===At,{id:e,element:n,options:o}=t,{title:i,placement:r,template:c,animation:l,customClass:a,sanitizeFn:h,dismissible:p,content:u,btnClose:C}=o,j=s?lt:Lt,w={...Io};let M=[],W=[];xt(n)&&(w.left="end",w.right="start");const Ft=`bs-${j}-${w[r]}`;let ct;if(y(c))ct=c;else{const tt=Et("div");wt(tt,c,h),ct=tt.firstChild}t.tooltip=y(ct)?ct.cloneNode(!0):void 0;const{tooltip:P}=t;// istanbul ignore else @preserve -if(P){O(P,"id",e),O(P,"role",lt);const tt=s?`${lt}-inner`:`${Lt}-body`,ot=s?null:H(`.${Lt}-header`,P),V=H(`.${tt}`,P);t.arrow=H(`.${j}-arrow`,P);const{arrow:X}=t;if(y(i))M=[i.cloneNode(!0)];else{const S=Et("div");wt(S,i,h),M=[...S.childNodes]}if(y(u))W=[u.cloneNode(!0)];else{const S=Et("div");wt(S,u,h),W=[...S.childNodes]}if(p)if(i)if(y(C))M=[...M,C.cloneNode(!0)];else{const S=Et("div");wt(S,C,h),M=[...M,S.firstChild]}else{// istanbul ignore else @preserve -if(ot&&ot.remove(),y(C))W=[...W,C.cloneNode(!0)];else{const S=Et("div");wt(S,C,h),W=[...W,S.firstChild]}}// istanbul ignore else @preserve -if(s)i&&V&&wt(V,i,h);else{// istanbul ignore else @preserve -i&&ot&&wt(ot,M,h);// istanbul ignore else @preserve -u&&V&&wt(V,W,h),t.btn=H(".btn-close",P)||void 0}f(P,"position-fixed"),f(X,"position-absolute");// istanbul ignore else @preserve -g(P,j)||f(P,j);// istanbul ignore else @preserve -l&&!g(P,B)&&f(P,B);// istanbul ignore else @preserve -a&&!g(P,a)&&f(P,a);// istanbul ignore else @preserve -g(P,Ft)||f(P,Ft)}},Fr=t=>{const s=["HTML","BODY"],e=[];let{parentNode:n}=t;for(;n&&!s.includes(n.nodeName);){n=ui(n);// istanbul ignore else @preserve -qn(n)||$i(n)||e.push(n)}return e.find((o,i)=>K(o,"position")!=="relative"&&e.slice(i+1).every(r=>K(r,"position")==="static")?o:null)||E(t).body},Rr=`[${rt}="${lt}"],[data-tip="${lt}"]`,Oo="title";let Tn=t=>z(t,At);const Wr=t=>new Ct(t),jr=t=>{const{element:s,tooltip:e,container:n,offsetParent:o}=t;_t(s,Rn),vo(e,n===o?n:o)},le=t=>{const{tooltip:s,container:e,offsetParent:n}=t;return s&&ks(s,e===n?e:n)},Vr=(t,s)=>{const{element:e}=t;t._toggleEventListeners();// istanbul ignore else @preserve -fe(e,_o)&&t.name===At&&Mo(t);// istanbul ignore else @preserve -s&&s()},No=(t,s)=>{const e=s?F:R,{element:n}=t;e(E(n),Ps,t.handleTouch,ge)},yn=t=>{const{element:s}=t,e=T(`shown.bs.${ee(t.name)}`);No(t,!0),$(s,e),m.clear(s,"in")},Cn=t=>{const{element:s}=t,e=T(`hidden.bs.${ee(t.name)}`);No(t),jr(t),$(s,e),m.clear(s,"out")},xn=(t,s)=>{const e=s?F:R,{element:n}=t,o=N(n,`.${U}`),i=N(n,`.${G}`);s?t._observer.observe(t.element):t._observer.disconnect(),o&&e(o,`hide.bs.${U}`,t.handleHide),i&&e(i,`hide.bs.${G}`,t.handleHide)},Mo=(t,s)=>{const e=[_o,Oo],{element:n}=t;O(n,e[s?0:1],s||st(n,e[0])||""),_t(n,e[s?1:0])};class Ct extends nt{constructor(e,n){super(e,n);d(this,"handleFocus",()=>ht(this.element));d(this,"handleShow",()=>this.show());d(this,"handleHide",()=>this.hide());d(this,"update",()=>{$s(this)});d(this,"toggle",()=>{const{tooltip:e}=this;e&&!le(this)?this.show():this.hide()});d(this,"handleTouch",({target:e})=>{const{tooltip:n,element:o}=this;// istanbul ignore if @preserve -n&&n.contains(e)||e===o||e&&o.contains(e)||this.hide()});d(this,"_toggleEventListeners",e=>{const n=e?F:R,{element:o,options:i,btn:r}=this,{trigger:c}=i,a=!!(this.name!==At&&i.dismissible);// istanbul ignore else @preserve -c.includes("manual")||(this.enabled=!!e,c.split(" ").forEach(p=>{// istanbul ignore else @preserve -if(p===Jo){n(o,jn,this.handleShow),n(o,Be,this.handleShow);// istanbul ignore else @preserve -a||(n(o,xs,this.handleHide),n(E(o),Ps,this.handleTouch,ge))}else if(p===_)n(o,p,a?this.handleShow:this.toggle);else if(p===ys){n(o,Cs,this.handleShow);// istanbul ignore else @preserve -a||n(o,Wn,this.handleHide);// istanbul ignore else @preserve -ci&&n(o,_,this.handleFocus)}// istanbul ignore else @preserve -a&&r&&n(r,_,this.handleHide)}))});const{element:o}=this,i=this.name===At,r=i?lt:Lt,c=i?At:Ke;// istanbul ignore next @preserve: this is to set Popover too -Tn=a=>z(a,c),this.enabled=!0,this.id=`${r}-${Yn(o,r)}`;const{options:l}=this;if(!(!l.title&&i||!i&&!l.content)){dt(Es,{titleAttr:""});// istanbul ignore else @preserve -fe(o,Oo)&&i&&typeof l.title=="string"&&Mo(this,l.title),this.container=Fr(o),this.offsetParent=["sticky","fixed"].some(a=>K(this.container,"position")===a)?this.container:E(this.element).body,Br(this),this._observer=new Lo(()=>this.update()),this._toggleEventListeners(!0)}}get name(){return At}get defaults(){return Es}show(){const{options:e,tooltip:n,element:o,container:i,offsetParent:r,id:c}=this,{animation:l}=e,a=m.get(o,"out"),h=i===r?i:r;m.clear(o,"out"),n&&!a&&!le(this)&&m.set(o,()=>{const p=T(`show.bs.${ee(this.name)}`);$(o,p);// istanbul ignore else @preserve -if(!p.defaultPrevented){mo(n,h),O(o,Rn,`#${c}`),this.update(),xn(this,!0);// istanbul ignore else @preserve -g(n,v)||f(n,v);// istanbul ignore else @preserve -l?D(n,()=>yn(this)):yn(this)}},17,"in")}hide(){const{options:e,tooltip:n,element:o}=this,{animation:i,delay:r}=e;m.clear(o,"in");// istanbul ignore else @preserve -n&&le(this)&&m.set(o,()=>{const c=T(`hide.bs.${ee(this.name)}`);$(o,c);// istanbul ignore else @preserve -if(!c.defaultPrevented){this.update(),b(n,v),xn(this);// istanbul ignore else @preserve -i?D(n,()=>Cn(this)):Cn(this)}},r+17,"out")}enable(){const{enabled:e}=this;// istanbul ignore else @preserve -e||(this._toggleEventListeners(!0),this.enabled=!e)}disable(){const{tooltip:e,enabled:n}=this;// istanbul ignore else @preserve -n&&(e&&le(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!n)}toggleEnabled(){this.enabled?this.disable():this.enable()}dispose(){const{tooltip:e,options:n}=this,o={...this,name:this.name},i=()=>setTimeout(()=>Vr(o,()=>super.dispose()),17);n.animation&&le(o)?(this.options.delay=0,this.hide(),D(e,i)):i()}}d(Ct,"selector",Rr),d(Ct,"init",Wr),d(Ct,"getInstance",Tn),d(Ct,"styleTip",$s);const zr=`[${rt}="${Lt}"],[data-tip="${Lt}"]`,Xr=dt({},Es,{template:ko(Lt),content:"",dismissible:!1,btnClose:''}),Kr=t=>z(t,Ke),qr=t=>new Dt(t);class Dt extends Ct{constructor(e,n){super(e,n);d(this,"show",()=>{super.show();const{options:e,btn:n}=this;// istanbul ignore else @preserve -e.dismissible&&n&&setTimeout(()=>ht(n),17)})}get name(){return Ke}get defaults(){return Xr}}d(Dt,"selector",zr),d(Dt,"init",qr),d(Dt,"getInstance",Kr),d(Dt,"styleTip",$s);const Yr="scrollspy",Bo="ScrollSpy",Ur='[data-bs-spy="scroll"]',Zr={offset:10,target:null},Jr=t=>z(t,Bo),Gr=t=>new Gt(t),Pn=T(`activate.bs.${Yr}`),Qr=t=>{const{target:s,scrollTarget:e,options:n,itemsLength:o,scrollHeight:i,element:r}=t,{offset:c}=n,l=e!==r,a=s&&Hs("A",s),h=E(r),p=e?Fo(e):i;t.scrollTop=e.scrollTop;// istanbul ignore else @preserve -if(a&&(p!==i||o!==a.length)){let u,C,j;t.items=[],t.targets=[],t.offsets=[],t.scrollHeight=p,t.maxScroll=t.scrollHeight-tc(t),Array.from(a).forEach(w=>{u=st(w,"href"),C=u&&u.charAt(0)==="#"&&u.slice(-1)!=="#"&&H(u,h),C&&(t.items.push(w),t.targets.push(C),j=Ee(C),t.offsets.push((l?j.top+t.scrollTop:C.offsetTop)-c))}),t.itemsLength=t.items.length}},Fo=t=>y(t)?t.scrollHeight:it(t).scrollHeight,tc=({element:t,scrollTarget:s})=>s!==t?s.clientHeight:Ee(t).height,Ro=t=>{[...Hs("A",t)].forEach(s=>{g(s,x)&&b(s,x)})},Sn=(t,s)=>{const{target:e,element:n}=t;// istanbul ignore else @preserve -y(e)&&Ro(e),t.activeItem=s,f(s,x);const o=[];let i=s;for(;i!==Pt(n);)i=i.parentElement,(g(i,"nav")||g(i,"dropdown-menu"))&&o.push(i);o.forEach(r=>{const c=r.previousElementSibling;// istanbul ignore else @preserve -c&&!g(c,x)&&f(c,x)}),Pn.relatedTarget=s,$(n,Pn)};class Gt extends nt{constructor(e,n){super(e,n);d(this,"refresh",()=>{const{target:e}=this;// istanbul ignore else @preserve -if(y(e)&&e.offsetHeight>0){Qr(this);const{scrollTop:n,maxScroll:o,itemsLength:i,items:r,activeItem:c}=this;if(n>=o){const a=r[i-1];// istanbul ignore else @preserve -c!==a&&Sn(this,a);return}const{offsets:l}=this;// istanbul ignore else @preserve -if(c&&n0){this.activeItem=null;// istanbul ignore else @preserve -e&&Ro(e);return}r.forEach((a,h)=>{c!==a&&n>=l[h]&&(typeof l[h+1]>"u"||n{e?this.scrollTarget===this.element?this.targets.forEach(n=>this._observer.observe(n)):this._observer.observe(this.element):this._observer.disconnect()});const{element:o,options:i}=this;this.target=H(i.target,E(o)),this.target&&(this.scrollTarget=o.clientHeightthis.refresh(),{root:this.scrollTarget}),this._toggleEventListeners(!0))}get name(){return Bo}get defaults(){return Zr}dispose(){this._toggleEventListeners(),super.dispose()}}d(Gt,"selector",Ur),d(Gt,"init",Gr),d(Gt,"getInstance",Jr);const ye="tab",Wo="Tab",Hn=`[${rt}="${ye}"]`,jo=t=>z(t,Wo),ec=t=>new Qt(t),cs=T(`show.bs.${ye}`),An=T(`shown.bs.${ye}`),as=T(`hide.bs.${ye}`),Dn=T(`hidden.bs.${ye}`),me=new Map,kn=t=>{const{tabContent:s,nav:e}=t;// istanbul ignore else @preserve -s&&g(s,Ot)&&(s.style.height="",b(s,Ot));// istanbul ignore else @preserve -e&&m.clear(e)},In=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=y(o)&&me.get(o)||{tab:null};// istanbul ignore else @preserve -if(e&&n&&g(n,B)){const{currentHeight:r,nextHeight:c}=me.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch -r!==c?setTimeout(()=>{e.style.height=`${c}px`,Mt(e),D(e,()=>kn(t))},50):kn(t)}else o&&m.clear(o);An.relatedTarget=i,$(s,An)},Ln=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:r}=o&&me.get(o)||{tab:null,content:null};let c=0;// istanbul ignore else @preserve -n&&e&&g(e,B)&&([r,e].forEach(l=>{// istanbul ignore else @preserve -y(l)&&f(l,"overflow-hidden")}),c=y(r)?r.scrollHeight:0),cs.relatedTarget=i,Dn.relatedTarget=s,$(s,cs);// istanbul ignore else @preserve -if(!cs.defaultPrevented){// istanbul ignore else @preserve -e&&f(e,x);// istanbul ignore else @preserve -r&&b(r,x);// istanbul ignore else @preserve -if(n&&e&&g(e,B)){const l=e.scrollHeight;me.set(s,{currentHeight:c,nextHeight:l,tab:null,content:null}),f(n,Ot),n.style.height=`${c}px`,Mt(n),[r,e].forEach(a=>{// istanbul ignore else @preserve -a&&b(a,"overflow-hidden")})}if(e&&e&&g(e,B))setTimeout(()=>{f(e,v),D(e,()=>{In(t)})},1);else{// istanbul ignore else @preserve -e&&f(e,v),In(t)}// istanbul ignore else @preserve -i&&$(i,Dn)}},_n=t=>{const{nav:s}=t;// istanbul ignore next @preserve -if(!y(s))return{tab:null,content:null};const e=at(x,s);let n=null;// istanbul ignore else @preserve -e.length===1&&!Nt.some(i=>g(e[0].parentElement,i))?[n]=e:e.length>1&&(n=e[e.length-1]);const o=y(n)?Y(n):null;return{tab:n,content:o}},On=t=>{// istanbul ignore next @preserve -if(!y(t))return null;const s=N(t,`.${Nt.join(",.")}`);return s?H(`.${Nt[0]}-toggle`,s):null},sc=t=>{const s=jo(t.target);// istanbul ignore else @preserve -s&&(t.preventDefault(),s.show())};class Qt extends nt{constructor(e){super(e);d(this,"_toggleEventListeners",e=>{(e?F:R)(this.element,_,sc)});const{element:n}=this,o=Y(n);// istanbul ignore else @preserve -if(o){const i=N(n,".nav"),r=N(o,".tab-content");this.nav=i,this.content=o,this.tabContent=r,this.dropdown=On(n);const{tab:c}=_n(this);if(i&&!c){const l=H(Hn,i),a=l&&Y(l);// istanbul ignore else @preserve -a&&(f(l,x),f(a,v),f(a,x),O(n,Ge,"true"))}this._toggleEventListeners(!0)}}get name(){return Wo}show(){const{element:e,content:n,nav:o,dropdown:i}=this;// istanbul ignore else @preserve -if(!(o&&m.get(o))&&!g(e,x)){const{tab:r,content:c}=_n(this);// istanbul ignore else @preserve -o&&me.set(o,{tab:r,content:c,currentHeight:0,nextHeight:0}),as.relatedTarget=e;// istanbul ignore else @preserve -if(y(r)){$(r,as);// istanbul ignore else @preserve -if(!as.defaultPrevented){f(e,x),O(e,Ge,"true");const l=y(r)&&On(r);l&&g(l,x)&&b(l,x);// istanbul ignore else @preserve -if(o){const a=()=>{// istanbul ignore else @preserve -r&&(b(r,x),O(r,Ge,"false")),i&&!g(i,x)&&f(i,x)};c&&(g(c,B)||n&&g(n,B))?m.set(o,a,1):a()}// istanbul ignore else @preserve -c&&(b(c,v),g(c,B)?D(c,()=>Ln(this)):Ln(this))}}}}dispose(){this._toggleEventListeners(),super.dispose()}}d(Qt,"selector",Hn),d(Qt,"init",ec),d(Qt,"getInstance",jo);const Q="toast",Vo="Toast",nc=`.${Q}`,oc=`[${We}="${Q}"]`,zo=`[${rt}="${Q}"]`,ne="showing",Xo="hide",ic={animation:!0,autohide:!0,delay:5e3},Os=t=>z(t,Vo),rc=t=>new te(t),Nn=T(`show.bs.${Q}`),cc=T(`shown.bs.${Q}`),Mn=T(`hide.bs.${Q}`),ac=T(`hidden.bs.${Q}`),Bn=t=>{const{element:s,options:e}=t;b(s,ne),m.clear(s,ne),$(s,cc);// istanbul ignore else @preserve -e.autohide&&m.set(s,()=>t.hide(),e.delay,Q)},Fn=t=>{const{element:s}=t;b(s,ne),b(s,v),f(s,Xo),m.clear(s,Q),$(s,ac)},lc=t=>{const{element:s,options:e}=t;f(s,ne),e.animation?(Mt(s),D(s,()=>Fn(t))):Fn(t)},dc=t=>{const{element:s,options:e}=t;m.set(s,()=>{b(s,Xo),Mt(s),f(s,v),f(s,ne),e.animation?D(s,()=>Bn(t)):Bn(t)},17,ne)},hc=t=>{const{target:s}=t,e=s&&N(s,zo),n=e&&Y(e),o=n&&Os(n);// istanbul ignore else @preserve -if(o){// istanbul ignore else @preserve -e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.show()}},fc=t=>{const s=t.target,e=Os(s),{type:n,relatedTarget:o}=t;// istanbul ignore else @preserve: a solid filter is required -e&&s!==o&&!s.contains(o)&&([Be,Cs].includes(n)?m.clear(s,Q):m.set(s,()=>e.hide(),e.options.delay,Q))};class te extends nt{constructor(e,n){super(e,n);d(this,"show",()=>{const{element:e,isShown:n}=this;// istanbul ignore else @preserve -e&&!n&&($(e,Nn),Nn.defaultPrevented||dc(this))});d(this,"hide",()=>{const{element:e,isShown:n}=this;// istanbul ignore else @preserve -e&&n&&($(e,Mn),Mn.defaultPrevented||lc(this))});d(this,"_toggleEventListeners",e=>{const n=e?F:R,{element:o,triggers:i,dismiss:r,options:c,hide:l}=this;// istanbul ignore else @preserve -r&&n(r,_,l);// istanbul ignore else @preserve -c.autohide&&[Cs,Wn,Be,xs].forEach(a=>n(o,a,fc));// istanbul ignore else @preserve -i.length&&i.forEach(a=>n(a,_,hc))});const{element:o,options:i}=this;i.animation&&!g(o,B)?f(o,B):!i.animation&&g(o,B)&&b(o,B),this.dismiss=H(oc,o),this.triggers=[...J(zo,E(o))].filter(r=>Y(r)===o),this._toggleEventListeners(!0)}get name(){return Vo}get defaults(){return ic}get isShown(){return g(this.element,v)}dispose(){const{element:e,isShown:n}=this;this._toggleEventListeners(),m.clear(e,Q),n&&b(e,v),super.dispose()}}d(te,"selector",nc),d(te,"init",rc),d(te,"getInstance",Os);const Ns=new Map;[Xt,Kt,qt,Yt,Ut,Zt,Jt,Dt,Gt,Qt,te,Ct].forEach(t=>Ns.set(t.prototype.name,t));const gc=(t,s)=>{[...s].forEach(e=>t(e))},pc=(t,s)=>{const e=kt.getAllFor(t);e&&[...e].forEach(([n,o])=>{s.contains(n)&&o.dispose()})},Ts=t=>{const s=t&&t.nodeName?t:document,e=[...Hs("*",s)];Ns.forEach(n=>{const{init:o,selector:i}=n;gc(o,e.filter(r=>Zn(r,i)))})},uc=t=>{const s=t&&t.nodeName?t:document;Ns.forEach(e=>{pc(e.prototype.name,s)})};document.body?Ts():F(document,"DOMContentLoaded",()=>Ts(),{once:!0});exports.Alert=Xt;exports.Button=Kt;exports.Carousel=qt;exports.Collapse=Yt;exports.Dropdown=Ut;exports.Modal=Zt;exports.Offcanvas=Jt;exports.Popover=Dt;exports.ScrollSpy=Gt;exports.Tab=Qt;exports.Toast=te;exports.Tooltip=Ct;exports.initCallback=Ts;exports.removeDataAPI=uc; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const An="aria-describedby",me="aria-expanded",se="aria-hidden",be="aria-modal",As="aria-pressed",Oe="aria-selected",os="focus",is="focusin",Pn="focusout",Ee="keydown",Oo="keyup",O="click",In="mousedown",ko="hover",we="mouseenter",rs="mouseleave",No="pointerdown",_o="pointermove",Mo="pointerup",as="touchstart",Bo="dragstart",Ro='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',ze="ArrowDown",Ke="ArrowUp",Ps="ArrowLeft",Is="ArrowRight",cs="Escape",Fo="transitionDuration",Wo="transitionDelay",ke="transitionend",Ln="transitionProperty",Vo=()=>{const e=/(iPhone|iPod|iPad)/;return navigator?.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(navigator?.userAgent)||!1},ve=()=>{},jo=(e,t,s,n)=>{const o=n||!1;e.addEventListener(t,s,o)},zo=(e,t,s,n)=>{const o=n||!1;e.removeEventListener(t,s,o)},et=(e,t)=>e.getAttribute(t),Gt=(e,t)=>e.hasAttribute(t),k=(e,t,s)=>e.setAttribute(t,s),Pt=(e,t)=>e.removeAttribute(t),h=(e,...t)=>{e.classList.add(...t)},m=(e,...t)=>{e.classList.remove(...t)},f=(e,t)=>e.classList.contains(t),ne=e=>e!=null&&typeof e=="object"||!1,H=e=>ne(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,T=e=>H(e)&&e.nodeType===1||!1,Bt=new Map,Dt={data:Bt,set:(e,t,s)=>{T(e)&&(Bt.has(t)||Bt.set(t,new Map),Bt.get(t).set(e,s))},getAllFor:e=>Bt.get(e)||null,get:(e,t)=>{if(!T(e)||!t)return null;const s=Dt.getAllFor(t);return e&&s&&s.get(e)||null},remove:(e,t)=>{const s=Dt.getAllFor(t);!s||!T(e)||(s.delete(e),s.size===0&&Bt.delete(t))}},W=(e,t)=>Dt.get(e,t),oe=e=>typeof e=="string"||!1,Ko=e=>ne(e)&&e.constructor.name==="Window"||!1,On=e=>H(e)&&e.nodeType===9||!1,E=e=>Ko(e)?e.document:On(e)?e:H(e)?e.ownerDocument:globalThis.document,ct=(e,...t)=>Object.assign(e,...t),Et=e=>{if(!e)return;if(oe(e))return E().createElement(e);const{tagName:t}=e,s=Et(t);if(!s)return;const n={...e};return delete n.tagName,ct(s,n)},b=(e,t)=>e.dispatchEvent(t),z=(e,t)=>{const s=getComputedStyle(e),n=t.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return s.getPropertyValue(n)},Uo=e=>{const t=z(e,Ln),s=z(e,Wo),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},ie=e=>{const t=z(e,Ln),s=z(e,Fo),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},A=(e,t)=>{let s=0;const n=new Event(ke),o=ie(e),i=Uo(e);if(o){const r=a=>{a.target===e&&(t.apply(e,[a]),e.removeEventListener(ke,r),s=1)};e.addEventListener(ke,r),setTimeout(()=>{s||b(e,n)},o+i+17)}else t.apply(e,[n])},lt=(e,t)=>e.focus(t),Ls=e=>["true",!0].includes(e)?!0:["false",!1].includes(e)?!1:["null","",null,void 0].includes(e)?null:e!==""&&!Number.isNaN(+e)?+e:e,he=e=>Object.entries(e),Wt=e=>e.toLowerCase(),Xo=(e,t,s,n)=>{const o={...s},i={...e.dataset},r={...t},a={},c="title";return he(i).forEach(([l,d])=>{const g=typeof l=="string"&&l.includes(n)?l.replace(n,"").replace(/[A-Z]/g,$=>Wt($)):l;a[g]=Ls(d)}),he(o).forEach(([l,d])=>{o[l]=Ls(d)}),he(t).forEach(([l,d])=>{l in o?r[l]=o[l]:l in a?r[l]=a[l]:r[l]=l===c?et(e,c):d}),r},Os=e=>Object.keys(e),w=(e,t)=>{const s=new CustomEvent(e,{cancelable:!0,bubbles:!0});return ne(t)&&ct(s,t),s},Jt={passive:!0},Ot=e=>e.offsetHeight,P=(e,t)=>{he(t).forEach(([s,n])=>{if(n&&oe(s)&&s.includes("--"))e.style.setProperty(s,n);else{const o={};o[s]=n,ct(e.style,o)}})},Ue=e=>ne(e)&&e.constructor.name==="Map"||!1,qo=e=>typeof e=="number"||!1,mt=new Map,p={set:(e,t,s,n)=>{T(e)&&(n&&n.length?(mt.has(e)||mt.set(e,new Map),mt.get(e).set(n,setTimeout(t,s))):mt.set(e,setTimeout(t,s)))},get:(e,t)=>{if(!T(e))return null;const s=mt.get(e);return t&&s&&Ue(s)?s.get(t)||null:qo(s)?s:null},clear:(e,t)=>{if(!T(e))return;const s=mt.get(e);t&&t.length&&Ue(s)?(clearTimeout(s.get(t)),s.delete(t),s.size===0&&mt.delete(e)):(clearTimeout(s),mt.delete(e))}},Z=(e,t)=>(H(t)?t:E()).querySelectorAll(e),Xe=new Map;function Yo(e){const{shiftKey:t,code:s}=e,n=E(this),o=[...Z(Ro,this)].filter(a=>!Gt(a,"disabled")&&!et(a,se));if(!o.length)return;const i=o[0],r=o[o.length-1];s==="Tab"&&(t&&n.activeElement===i?(r.focus(),e.preventDefault()):!t&&n.activeElement===r&&(i.focus(),e.preventDefault()))}const Zo=e=>Xe.has(e)===!0,Te=e=>{const t=Zo(e);(t?zo:jo)(e,"keydown",Yo),t?Xe.delete(e):Xe.set(e,!0)},re=(e,t)=>{const{width:s,height:n,top:o,right:i,bottom:r,left:a}=e.getBoundingClientRect();let c=1,l=1;if(t&&T(e)){const{offsetWidth:d,offsetHeight:g}=e;c=d>0?Math.round(s)/d:1,l=g>0?Math.round(n)/g:1}return{width:s/c,height:n/l,top:o/l,right:i/c,bottom:r/l,left:a/c,x:a/c,y:o/l}},$t=e=>E(e).body,dt=e=>E(e).documentElement,kn=e=>H(e)&&e.constructor.name==="ShadowRoot"||!1,Go=e=>e.nodeName==="HTML"?e:T(e)&&e.assignedSlot||H(e)&&e.parentNode||kn(e)&&e.host||dt(e);let ks=0,Ns=0;const Rt=new Map,Nn=(e,t)=>{let s=t?ks:Ns;if(t){const n=Nn(e),o=Rt.get(n)||new Map;Rt.has(n)||Rt.set(n,o),Ue(o)&&!o.has(t)?(o.set(t,s),ks+=1):s=o.get(t)}else{const n=e.id||e;Rt.has(n)?s=Rt.get(n):(Rt.set(n,s),Ns+=1)}return s},Jo=e=>e?On(e)?e.defaultView:H(e)?e?.ownerDocument?.defaultView:e:window,Qo=e=>Array.isArray(e)||!1,_n=e=>{if(!H(e))return!1;const{top:t,bottom:s}=re(e),{clientHeight:n}=dt(e);return t<=n&&s>=0},ti=e=>typeof e=="function"||!1,ei=e=>ne(e)&&e.constructor.name==="NodeList"||!1,yt=e=>dt(e).dir==="rtl",si=e=>H(e)&&["TABLE","TD","TH"].includes(e.nodeName)||!1,N=(e,t)=>e?e.closest(t)||N(e.getRootNode().host,t):null,D=(e,t)=>T(e)?e:(H(t)?t:E()).querySelector(e),ls=(e,t)=>(H(t)?t:E()).getElementsByTagName(e),rt=(e,t)=>(t&&H(t)?t:E()).getElementsByClassName(e),Mn=(e,t)=>e.matches(t),Ft={},Bn=e=>{const{type:t,currentTarget:s}=e;[...Ft[t]].forEach(([n,o])=>{s===n&&[...o].forEach(([i,r])=>{i.apply(n,[e]),typeof r=="object"&&r.once&&B(n,t,i,r)})})},M=(e,t,s,n)=>{Ft[t]||(Ft[t]=new Map);const o=Ft[t];o.has(e)||o.set(e,new Map);const i=o.get(e),{size:r}=i;i.set(s,n);r||e.addEventListener(t,Bn,n)},B=(e,t,s,n)=>{const o=Ft[t],i=o&&o.get(e),r=i&&i.get(s),a=r!==void 0?r:n;i&&i.has(s)&&i.delete(s);o&&(!i||!i.size)&&o.delete(e);(!o||!o.size)&&delete Ft[t];(!i||!i.size)&&e.removeEventListener(t,Bn,a)},_="fade",u="show",ye="data-bs-dismiss",$e="alert",Rn="Alert",ni="5.1.0",oi=ni;class st{constructor(t,s){let n;try{if(T(t))n=t;else if(oe(t)){if(n=D(t),!n)throw Error(`"${t}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(i){throw Error(`${this.name} Error: ${i.message}`)}const o=Dt.get(n,this.name);o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Os(this.defaults).length?Xo(n,this.defaults,s||{},"bs"):{},Dt.set(n,this.name,this)}get version(){return oi}get name(){return"BaseComponent"}get defaults(){return{}}_toggleEventListeners=()=>{};dispose(){Dt.remove(this.element,this.name),Os(this).forEach(t=>{delete this[t]})}}const ii=`.${$e}`,ri=`[${ye}="${$e}"]`,ai=e=>W(e,Rn),ci=e=>new ds(e),_s=w(`close.bs.${$e}`),li=w(`closed.bs.${$e}`),Ms=e=>{const{element:t}=e;b(t,li),e._toggleEventListeners(),e.dispose(),t.remove()};class ds extends st{static selector=ii;static init=ci;static getInstance=ai;dismiss;constructor(t){super(t),this.dismiss=D(ri,this.element),this._toggleEventListeners(!0)}get name(){return Rn}close=()=>{const{element:t}=this;t&&f(t,u)&&(b(t,_s),_s.defaultPrevented||(m(t,u),f(t,_)?A(t,()=>Ms(this)):Ms(this)))};_toggleEventListeners=t=>{const s=t?M:B,{dismiss:n,close:o}=this;n&&s(n,O,o)};dispose(){this._toggleEventListeners(),super.dispose()}}const y="active",ot="data-bs-toggle",di="button",Fn="Button",hi=`[${ot}="${di}"]`,fi=e=>W(e,Fn),gi=e=>new hs(e);class hs extends st{static selector=hi;static init=gi;static getInstance=fi;isActive=!1;constructor(t){super(t);const{element:s}=this;this.isActive=f(s,y),k(s,As,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return Fn}toggle=t=>{t&&t.preventDefault();const{element:s,isActive:n}=this;!f(s,"disabled")&&!et(s,"disabled")&&((n?m:h)(s,y),k(s,As,n?"false":"true"),this.isActive=f(s,y))};_toggleEventListeners=t=>{(t?M:B)(this.element,O,this.toggle)};dispose(){this._toggleEventListeners(),super.dispose()}}const qe="data-bs-target",Ht="carousel",Wn="Carousel",Bs="data-bs-parent",pi="data-bs-container",U=e=>{const t=[qe,Bs,pi,"href"],s=E(e);return t.map(n=>{const o=et(e,n);return o?n===Bs?N(e,o):D(o,s):null}).filter(n=>n)[0]},ae=`[data-bs-ride="${Ht}"]`,Y=`${Ht}-item`,Ye="data-bs-slide-to",bt="data-bs-slide",wt="paused",Rs={pause:"hover",keyboard:!1,touch:!0,interval:5e3},ht=e=>W(e,Wn),ui=e=>new fs(e);let Zt=0,fe=0,Ne=0;const _e=w(`slide.bs.${Ht}`),Ze=w(`slid.bs.${Ht}`),Fs=e=>{const{index:t,direction:s,element:n,slides:o,options:i}=e;if(e.isAnimating){const r=Ge(e),a=s==="left"?"next":"prev",c=s==="left"?"start":"end";h(o[t],y),m(o[t],`${Y}-${a}`),m(o[t],`${Y}-${c}`),m(o[r],y),m(o[r],`${Y}-${c}`),b(n,Ze),p.clear(n,bt),e.cycle&&!E(n).hidden&&i.interval&&!e.isPaused&&e.cycle()}};function mi(){const e=ht(this);e&&!e.isPaused&&!p.get(this,wt)&&h(this,wt)}function vi(){const e=ht(this);e&&e.isPaused&&!p.get(this,wt)&&e.cycle()}function bi(e){e.preventDefault();const t=N(this,ae)||U(this),s=ht(t);if(s&&!s.isAnimating){const n=+(et(this,Ye)||0);this&&!f(this,y)&&!Number.isNaN(n)&&s.to(n)}}function Ei(e){e.preventDefault();const t=N(this,ae)||U(this),s=ht(t);if(s&&!s.isAnimating){const n=et(this,bt);n==="next"?s.next():n==="prev"&&s.prev()}}const wi=({code:e,target:t})=>{const s=E(t),[n]=[...Z(ae,s)].filter(i=>_n(i)),o=ht(n);if(o&&!o.isAnimating&&!/textarea|input/i.test(t.nodeName)){const i=yt(n);e===(i?Is:Ps)?o.prev():e===(i?Ps:Is)&&o.next()}};function Ws(e){const{target:t}=e,s=ht(this);s&&s.isTouch&&(s.indicator&&!s.indicator.contains(t)||!s.controls.includes(t))&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}function Ti(e){const{target:t}=e,s=ht(this);if(s&&!s.isAnimating&&!s.isTouch){const{controls:n,indicators:o}=s;[...n,...o].every(i=>i===t||i.contains(t))||(Zt=e.pageX,this.contains(t)&&(s.isTouch=!0,Vn(s,!0)))}}const yi=e=>{fe=e.pageX},$i=e=>{const{target:t}=e,s=E(t),n=[...Z(ae,s)].map(o=>ht(o)).find(o=>o.isTouch);if(n){const{element:o,index:i}=n,r=yt(o);Ne=e.pageX,n.isTouch=!1,Vn(n),!s.getSelection()?.toString().length&&o.contains(t)&&Math.abs(Zt-Ne)>120&&(feZt&&n.to(i+(r?1:-1))),Zt=0,fe=0,Ne=0}},Me=(e,t)=>{const{indicators:s}=e;[...s].forEach(n=>m(n,y)),e.indicators[t]&&h(s[t],y)},Vn=(e,t)=>{const{element:s}=e,n=t?M:B;n(E(s),_o,yi,Jt),n(E(s),Mo,$i,Jt)},Ge=e=>{const{slides:t,element:s}=e,n=D(`.${Y}.${y}`,s);return T(n)?[...t].indexOf(n):-1};class fs extends st{static selector=ae;static init=ui;static getInstance=ht;constructor(t,s){super(t,s);const{element:n}=this;this.direction=yt(n)?"right":"left",this.isTouch=!1,this.slides=rt(Y,n);const{slides:o}=this;if(o.length>=2){const i=Ge(this),r=[...o].find(l=>Mn(l,`.${Y}-next,.${Y}-next`));this.index=i;const a=E(n);this.controls=[...Z(`[${bt}]`,n),...Z(`[${bt}][${qe}="#${n.id}"]`,a)].filter((l,d,g)=>d===g.indexOf(l)),this.indicator=D(`.${Ht}-indicators`,n),this.indicators=[...this.indicator?Z(`[${Ye}]`,this.indicator):[],...Z(`[${Ye}][${qe}="#${n.id}"]`,a)].filter((l,d,g)=>d===g.indexOf(l));const{options:c}=this;this.options.interval=c.interval===!0?Rs.interval:c.interval,r?this.index=[...o].indexOf(r):i<0&&(this.index=0,h(o[0],y),this.indicators.length&&Me(this,0)),this.indicators.length&&Me(this,this.index),this._toggleEventListeners(!0),c.interval&&this.cycle()}}get name(){return Wn}get defaults(){return Rs}get isPaused(){return f(this.element,wt)}get isAnimating(){return D(`.${Y}-next,.${Y}-prev`,this.element)!==null}cycle(){const{element:t,options:s,isPaused:n,index:o}=this;p.clear(t,Ht),n&&(p.clear(t,wt),m(t,wt)),p.set(t,()=>{this.element&&!this.isPaused&&!this.isTouch&&_n(t)&&this.to(o+1)},s.interval,Ht)}pause(){const{element:t,options:s}=this;!this.isPaused&&s.interval&&(h(t,wt),p.set(t,()=>{},1,wt))}next(){this.isAnimating||this.to(this.index+1)}prev(){this.isAnimating||this.to(this.index-1)}to(t){const{element:s,slides:n,options:o}=this,i=Ge(this),r=yt(s);let a=t;if(!this.isAnimating&&i!==a&&!p.get(s,bt)){ia||i===n.length-1&&a===0)&&(this.direction=r?"left":"right");const{direction:c}=this;a<0?a=n.length-1:a>=n.length&&(a=0);const l=c==="left"?"next":"prev",d=c==="left"?"start":"end",g={relatedTarget:n[a],from:i,to:a,direction:c};ct(_e,g),ct(Ze,g),b(s,_e),_e.defaultPrevented||(this.index=a,Me(this,a),ie(n[a])&&f(s,"slide")?p.set(s,()=>{h(n[a],`${Y}-${l}`),Ot(n[a]),h(n[a],`${Y}-${d}`),h(n[i],`${Y}-${d}`),A(n[a],()=>this.slides&&this.slides.length&&Fs(this))},0,bt):(h(n[a],y),m(n[i],y),p.set(s,()=>{p.clear(s,bt),s&&o.interval&&!this.isPaused&&this.cycle(),b(s,Ze)},0,bt)))}}_toggleEventListeners=t=>{const{element:s,options:n,slides:o,controls:i,indicators:r}=this,{touch:a,pause:c,interval:l,keyboard:d}=n,g=t?M:B;c&&l&&(g(s,we,mi),g(s,rs,vi)),a&&o.length>2&&(g(s,No,Ti,Jt),g(s,as,Ws,{passive:!1}),g(s,Bo,Ws,{passive:!1})),i.length&&i.forEach($=>{$&&g($,O,Ei)}),r.length&&r.forEach($=>{g($,O,bi)}),d&&g(E(s),Ee,wi)};dispose(){const{isAnimating:t}=this,s={...this,isAnimating:t};this._toggleEventListeners(),super.dispose(),s.isAnimating&&A(s.slides[s.index],()=>{Fs(s)})}}const It="collapsing",K="collapse",jn="Collapse",Ci=`.${K}`,zn=`[${ot}="${K}"]`,Si={parent:null},ge=e=>W(e,jn),xi=e=>new gs(e),Vs=w(`show.bs.${K}`),Di=w(`shown.bs.${K}`),js=w(`hide.bs.${K}`),Hi=w(`hidden.bs.${K}`),Ai=e=>{const{element:t,parent:s,triggers:n}=e;b(t,Vs),Vs.defaultPrevented||(p.set(t,ve,17),s&&p.set(s,ve,17),h(t,It),m(t,K),P(t,{height:`${t.scrollHeight}px`}),A(t,()=>{p.clear(t),s&&p.clear(s),n.forEach(o=>k(o,me,"true")),m(t,It),h(t,K),h(t,u),P(t,{height:""}),b(t,Di)}))},zs=e=>{const{element:t,parent:s,triggers:n}=e;b(t,js),js.defaultPrevented||(p.set(t,ve,17),s&&p.set(s,ve,17),P(t,{height:`${t.scrollHeight}px`}),m(t,K),m(t,u),h(t,It),Ot(t),P(t,{height:"0px"}),A(t,()=>{p.clear(t),s&&p.clear(s),n.forEach(o=>k(o,me,"false")),m(t,It),h(t,K),P(t,{height:""}),b(t,Hi)}))},Pi=e=>{const{target:t}=e,s=t&&N(t,zn),n=s&&U(s),o=n&&ge(n);o&&o.toggle(),s&&s.tagName==="A"&&e.preventDefault()};class gs extends st{static selector=Ci;static init=xi;static getInstance=ge;constructor(t,s){super(t,s);const{element:n,options:o}=this,i=E(n);this.triggers=[...Z(zn,i)].filter(r=>U(r)===n),this.parent=T(o.parent)?o.parent:oe(o.parent)?U(n)||D(o.parent,i):null,this._toggleEventListeners(!0)}get name(){return jn}get defaults(){return Si}hide(){const{triggers:t,element:s}=this;p.get(s)||(zs(this),t.length&&t.forEach(n=>h(n,`${K}d`)))}show(){const{element:t,parent:s,triggers:n}=this;let o,i;s&&(o=[...Z(`.${K}.${u}`,s)].find(r=>ge(r)),i=o&&ge(o)),(!s||!p.get(s))&&!p.get(t)&&(i&&o!==t&&(zs(i),i.triggers.forEach(r=>{h(r,`${K}d`)})),Ai(this),n.length&&n.forEach(r=>m(r,`${K}d`)))}toggle(){f(this.element,u)?this.hide():this.show()}_toggleEventListeners=t=>{const s=t?M:B,{triggers:n}=this;n.length&&n.forEach(o=>s(o,O,Pi))};dispose(){this._toggleEventListeners(),super.dispose()}}const Lt=["dropdown","dropup","dropstart","dropend"],Kn="Dropdown",Un="dropdown-menu",Xn=e=>{const t=N(e,"A");return e.tagName==="A"&&Gt(e,"href")&&et(e,"href").slice(-1)==="#"||t&&Gt(t,"href")&&et(t,"href").slice(-1)==="#"},[tt,Je,Qe,ts]=Lt,qn=`[${ot}="${tt}"]`,Vt=e=>W(e,Kn),Ii=e=>new ps(e),Li=`${Un}-end`,Ks=[tt,Je],Us=[Qe,ts],Xs=["A","BUTTON"],Oi={offset:5,display:"dynamic"},Be=w(`show.bs.${tt}`),qs=w(`shown.bs.${tt}`),Re=w(`hide.bs.${tt}`),Ys=w(`hidden.bs.${tt}`),Yn=w(`updated.bs.${tt}`),Zn=e=>{const{element:t,menu:s,parentElement:n,options:o}=e,{offset:i}=o;if(z(s,"position")!=="static"){const r=yt(t),a=f(s,Li);["margin","top","bottom","left","right"].forEach(L=>{const gt={};gt[L]="",P(s,gt)});let l=Lt.find(L=>f(n,L))||tt;const d={dropdown:[i,0,0],dropup:[0,0,i],dropstart:r?[-1,0,0,i]:[-1,i,0],dropend:r?[-1,i,0]:[-1,0,0,i]},g={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:r?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:r?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:r?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:r?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:$,offsetHeight:S}=s,{clientWidth:R,clientHeight:v}=dt(t),{left:V,top:X,width:Nt,height:it}=re(t),C=V-$-i<0,Q=V+$+Nt+i>=R,nt=X+S+i>=v,F=X+S+it+i>=v,j=X-S-i<0,x=(!r&&a||r&&!a)&&V+Nt-$<0,_t=(r&&a||!r&&!a)&&V+$>=R;if(Us.includes(l)&&C&&Q&&(l=tt),l===Qe&&(r?Q:C)&&(l=ts),l===ts&&(r?C:Q)&&(l=Qe),l===Je&&j&&!F&&(l=tt),l===tt&&F&&!j&&(l=Je),Us.includes(l)&&nt&&ct(g[l],{top:"auto",bottom:0}),Ks.includes(l)&&(x||_t)){let L={left:"auto",right:"auto"};!x&&_t&&!r&&(L={left:"auto",right:0}),x&&!_t&&r&&(L={left:0,right:"auto"}),L&&ct(g[l],L)}const ft=d[l];P(s,{...g[l],margin:`${ft.map(L=>L&&`${L}px`).join(" ")}`}),Ks.includes(l)&&a&&a&&P(s,g[!r&&x||r&&_t?"menuStart":"menuEnd"]),b(n,Yn)}},ki=e=>[...e.children].map(t=>{if(t&&Xs.includes(t.tagName))return t;const{firstElementChild:s}=t;return s&&Xs.includes(s.tagName)?s:null}).filter(t=>t),Zs=e=>{const{element:t,options:s,menu:n}=e,o=e.open?M:B,i=E(t);o(i,O,Gs),o(i,os,Gs),o(i,Ee,_i),o(i,Oo,Mi),s.display==="dynamic"&&(e.open?e._observer.observe(n):e._observer.disconnect())},Ce=e=>{const t=[...Lt,"btn-group","input-group"].map(s=>rt(`${s} ${u}`,E(e))).find(s=>s.length);if(t&&t.length)return[...t[0].children].find(s=>Lt.some(n=>n===et(s,ot)))},Gs=e=>{const{target:t,type:s}=e;if(t&&T(t)){const n=Ce(t),o=n&&Vt(n);if(o){const{parentElement:i,menu:r}=o,a=i&&i.contains(t)&&(t.tagName==="form"||N(t,"form")!==null);[O,In].includes(s)&&Xn(t)&&e.preventDefault(),!a&&s!==os&&t!==n&&t!==r&&o.hide()}}},Ni=e=>{const{target:t}=e,s=t&&N(t,qn),n=s&&Vt(s);n&&(e.stopPropagation(),n.toggle(),s&&Xn(s)&&e.preventDefault())},_i=e=>{[ze,Ke].includes(e.code)&&e.preventDefault()};function Mi(e){const{code:t}=e,s=Ce(this),n=s&&Vt(s),{activeElement:o}=s&&E(s);if(n&&o){const{menu:i,open:r}=n,a=ki(i);if(a&&a.length&&[ze,Ke].includes(t)){let c=a.indexOf(o);o===s?c=0:t===Ke?c=c>1?c-1:0:t===ze&&(c=cBi(i.target),{threshold:1}),this._toggleEventListeners(!0))}get name(){return Kn}get defaults(){return Oi}toggle(){this.open?this.hide():this.show()}show(){const{element:t,open:s,menu:n,parentElement:o}=this;if(!s){const i=Ce(t),r=i&&Vt(i);r&&r.hide(),[Be,qs,Yn].forEach(a=>{a.relatedTarget=t}),b(o,Be),Be.defaultPrevented||(h(n,u),h(o,u),k(t,me,"true"),Zn(this),this.open=!s,lt(t),Zs(this),b(o,qs))}}hide(){const{element:t,open:s,menu:n,parentElement:o}=this;s&&([Re,Ys].forEach(i=>{i.relatedTarget=t}),b(o,Re),Re.defaultPrevented||(m(n,u),m(o,u),k(t,me,"false"),this.open=!s,Zs(this),b(o,Ys)))}_toggleEventListeners=t=>{(t?M:B)(this.element,O,Ni)};dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}const q="modal",us="Modal",ms="Offcanvas",Ri="fixed-top",Fi="fixed-bottom",Gn="sticky-top",Jn="position-sticky",Qn=e=>[...rt(Ri,e),...rt(Fi,e),...rt(Gn,e),...rt(Jn,e),...rt("is-fixed",e)],Wi=e=>{const t=$t(e);P(t,{paddingRight:"",overflow:""});const s=Qn(t);s.length&&s.forEach(n=>{P(n,{paddingRight:"",marginRight:""})})},to=e=>{const{clientWidth:t}=dt(e),{innerWidth:s}=Jo(e);return Math.abs(s-t)},eo=(e,t)=>{const s=$t(e),n=parseInt(z(s,"paddingRight"),10),i=z(s,"overflow")==="hidden"&&n?0:to(e),r=Qn(s);t&&(P(s,{overflow:"hidden",paddingRight:`${n+i}px`}),r.length&&r.forEach(a=>{const c=z(a,"paddingRight");if(a.style.paddingRight=`${parseInt(c,10)+i}px`,[Gn,Jn].some(l=>f(a,l))){const l=z(a,"marginRight");a.style.marginRight=`${parseInt(l,10)-i}px`}}))},G="offcanvas",Tt=Et({tagName:"div",className:"popup-container"}),so=(e,t)=>{const s=H(t)&&t.nodeName==="BODY",n=H(t)&&!s?t:Tt,o=s?t:$t(e);H(e)&&(n===Tt&&o.append(Tt),n.append(e))},no=(e,t)=>{const s=H(t)&&t.nodeName==="BODY",n=H(t)&&!s?t:Tt;H(e)&&(e.remove(),n===Tt&&!Tt.children.length&&Tt.remove())},vs=(e,t)=>{const s=H(t)&&t.nodeName!=="BODY"?t:Tt;return H(e)&&s.contains(e)},oo="backdrop",Js=`${q}-${oo}`,Qs=`${G}-${oo}`,io=`.${q}.${u}`,bs=`.${G}.${u}`,I=Et("div"),kt=e=>D(`${io},${bs}`,E(e)),Es=e=>{const t=e?Js:Qs;[Js,Qs].forEach(s=>{m(I,s)}),h(I,t)},ro=(e,t,s)=>{Es(s),so(I,$t(e)),t&&h(I,_)},ao=()=>{f(I,u)||(h(I,u),Ot(I))},Se=()=>{m(I,u)},co=e=>{kt(e)||(m(I,_),no(I,$t(e)),Wi(e))},lo=e=>T(e)&&z(e,"visibility")!=="hidden"&&e.offsetParent!==null,Vi=`.${q}`,ho=`[${ot}="${q}"]`,ji=`[${ye}="${q}"]`,fo=`${q}-static`,zi={backdrop:!0,keyboard:!0},Qt=e=>W(e,us),Ki=e=>new ws(e),pe=w(`show.bs.${q}`),tn=w(`shown.bs.${q}`),Fe=w(`hide.bs.${q}`),en=w(`hidden.bs.${q}`),go=e=>{const{element:t}=e,s=to(t),{clientHeight:n,scrollHeight:o}=dt(t),{clientHeight:i,scrollHeight:r}=t,a=i!==r;if(!a&&s){const l={[yt(t)?"paddingLeft":"paddingRight"]:`${s}px`};P(t,l)}eo(t,a||n!==o)},po=(e,t)=>{const s=t?M:B,{element:n}=e;s(n,O,qi),s(E(n),Ee,Xi),t?e._observer.observe(n):e._observer.disconnect()},sn=e=>{const{triggers:t,element:s,relatedTarget:n}=e;co(s),P(s,{paddingRight:"",display:""}),po(e);const o=pe.relatedTarget||t.find(lo);o&<(o),en.relatedTarget=n,b(s,en),Te(s)},nn=e=>{const{element:t,relatedTarget:s}=e;lt(t),po(e,!0),tn.relatedTarget=s,b(t,tn),Te(t)},on=e=>{const{element:t,hasFade:s}=e;P(t,{display:"block"}),go(e),kt(t)||P($t(t),{overflow:"hidden"}),h(t,u),Pt(t,se),k(t,be,"true"),s?A(t,()=>nn(e)):nn(e)},rn=e=>{const{element:t,options:s,hasFade:n}=e;s.backdrop&&n&&f(I,u)&&!kt(t)?(Se(),A(I,()=>sn(e))):sn(e)},Ui=e=>{const{target:t}=e,s=t&&N(t,ho),n=s&&U(s),o=n&&Qt(n);o&&(s&&s.tagName==="A"&&e.preventDefault(),o.relatedTarget=s,o.toggle())},Xi=({code:e,target:t})=>{const s=D(io,E(t)),n=s&&Qt(s);if(n){const{options:o}=n;o.keyboard&&e===cs&&f(s,u)&&(n.relatedTarget=null,n.hide())}},qi=e=>{const{currentTarget:t}=e,s=t&&Qt(t);if(s&&t&&!p.get(t)){const{options:n,isStatic:o,modalDialog:i}=s,{backdrop:r}=n,{target:a}=e,c=E(t)?.getSelection()?.toString().length,l=i.contains(a),d=a&&N(a,ji);o&&!l?p.set(t,()=>{h(t,fo),A(i,()=>Yi(s))},17):(d||!c&&!o&&!l&&r)&&(s.relatedTarget=d||null,s.hide(),e.preventDefault())}},Yi=e=>{const{element:t,modalDialog:s}=e,n=(ie(s)||0)+17;m(t,fo),p.set(t,()=>p.clear(t),n)};class ws extends st{static selector=Vi;static init=Ki;static getInstance=Qt;constructor(t,s){super(t,s);const{element:n}=this,o=D(`.${q}-dialog`,n);o&&(this.modalDialog=o,this.triggers=[...Z(ho,E(n))].filter(i=>U(i)===n),this.isStatic=this.options.backdrop==="static",this.hasFade=f(n,_),this.relatedTarget=null,this._observer=new ResizeObserver(()=>this.update()),this._toggleEventListeners(!0))}get name(){return us}get defaults(){return zi}toggle(){f(this.element,u)?this.hide():this.show()}show(){const{element:t,options:s,hasFade:n,relatedTarget:o}=this,{backdrop:i}=s;let r=0;if(!f(t,u)&&(pe.relatedTarget=o||void 0,b(t,pe),!pe.defaultPrevented)){const a=kt(t);if(a&&a!==t){const c=Qt(a)||W(a,ms);c&&c.hide()}i?(vs(I)?Es(!0):ro(t,n,!0),r=ie(I),ao(),setTimeout(()=>on(this),r)):(on(this),a&&f(I,u)&&Se())}}hide(){const{element:t,hasFade:s,relatedTarget:n}=this;f(t,u)&&(Fe.relatedTarget=n||void 0,b(t,Fe),Fe.defaultPrevented||(m(t,u),k(t,se,"true"),Pt(t,be),s?A(t,()=>rn(this)):rn(this)))}update=()=>{f(this.element,u)&&go(this)};_toggleEventListeners=t=>{const s=t?M:B,{triggers:n}=this;n.length&&n.forEach(o=>s(o,O,Ui))};dispose(){const t={...this},{modalDialog:s,hasFade:n}=t,o=()=>setTimeout(()=>super.dispose(),17);this.hide(),this._toggleEventListeners(),n?A(s,o):o()}}const Zi=`.${G}`,Ts=`[${ot}="${G}"]`,Gi=`[${ye}="${G}"]`,xe=`${G}-toggling`,Ji={backdrop:!0,keyboard:!0,scroll:!1},te=e=>W(e,ms),Qi=e=>new ys(e),ue=w(`show.bs.${G}`),uo=w(`shown.bs.${G}`),We=w(`hide.bs.${G}`),mo=w(`hidden.bs.${G}`),tr=e=>{const{element:t}=e,{clientHeight:s,scrollHeight:n}=dt(t);eo(t,s!==n)},vo=(e,t)=>{const s=t?M:B,n=E(e.element);s(n,Ee,or),s(n,O,nr)},an=e=>{const{element:t,options:s}=e;s.scroll||(tr(e),P($t(t),{overflow:"hidden"})),h(t,xe),h(t,u),P(t,{visibility:"visible"}),A(t,()=>ir(e))},er=e=>{const{element:t,options:s}=e,n=kt(t);t.blur(),!n&&s.backdrop&&f(I,u)&&Se(),A(t,()=>rr(e))},sr=e=>{const t=N(e.target,Ts),s=t&&U(t),n=s&&te(s);n&&(n.relatedTarget=t,n.toggle(),t&&t.tagName==="A"&&e.preventDefault())},nr=e=>{const{target:t}=e,s=D(bs,E(t)),n=D(Gi,s),o=s&&te(s);if(o){const{options:i,triggers:r}=o,{backdrop:a}=i,c=N(t,Ts),l=E(s).getSelection();(!I.contains(t)||a!=="static")&&(!(l&&l.toString().length)&&(!s.contains(t)&&a&&(!c||r.includes(t))||n&&n.contains(t))&&(o.relatedTarget=n&&n.contains(t)?n:null,o.hide()),c&&c.tagName==="A"&&e.preventDefault())}},or=({code:e,target:t})=>{const s=D(bs,E(t)),n=s&&te(s);n&&n.options.keyboard&&e===cs&&(n.relatedTarget=null,n.hide())},ir=e=>{const{element:t}=e;m(t,xe),Pt(t,se),k(t,be,"true"),k(t,"role","dialog"),b(t,uo),vo(e,!0),lt(t),Te(t)},rr=e=>{const{element:t,triggers:s}=e;k(t,se,"true"),Pt(t,be),Pt(t,"role"),P(t,{visibility:""});const n=ue.relatedTarget||s.find(lo);n&<(n),co(t),b(t,mo),m(t,xe),Te(t),kt(t)||vo(e)};class ys extends st{static selector=Zi;static init=Qi;static getInstance=te;constructor(t,s){super(t,s);const{element:n}=this;this.triggers=[...Z(Ts,E(n))].filter(o=>U(o)===n),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return ms}get defaults(){return Ji}toggle(){f(this.element,u)?this.hide():this.show()}show(){const{element:t,options:s,relatedTarget:n}=this;let o=0;if(!f(t,u)&&(ue.relatedTarget=n||void 0,uo.relatedTarget=n||void 0,b(t,ue),!ue.defaultPrevented)){const i=kt(t);if(i&&i!==t){const r=te(i)||W(i,us);r&&r.hide()}s.backdrop?(vs(I)?Es():ro(t,!0),o=ie(I),ao(),setTimeout(()=>an(this),o)):(an(this),i&&f(I,u)&&Se())}}hide(){const{element:t,relatedTarget:s}=this;f(t,u)&&(We.relatedTarget=s||void 0,mo.relatedTarget=s||void 0,b(t,We),We.defaultPrevented||(h(t,xe),m(t,u),er(this)))}_toggleEventListeners=t=>{const s=t?M:B;this.triggers.forEach(n=>s(n,O,sr))};dispose(){const{element:t}=this,s=f(t,u),n=()=>setTimeout(()=>super.dispose(),1);this.hide(),this._toggleEventListeners(),s?A(t,n):n()}}const At="popover",De="Popover",at="tooltip",bo=e=>{const t=e===at,s=t?`${e}-inner`:`${e}-body`,n=t?"":`

`,o=`
`,i=`
`;return`
${n+o+i}
`},Eo={top:"top",bottom:"bottom",left:"start",right:"end"},es=e=>{const t=/\b(top|bottom|start|end)+/,{element:s,tooltip:n,container:o,options:i,arrow:r}=e;if(n){const a={...Eo},c=yt(s);P(n,{top:"",left:"",right:"",bottom:""});const l=e.name===De,{offsetWidth:d,offsetHeight:g}=n,{clientWidth:$,clientHeight:S,offsetWidth:R}=dt(s);let{placement:v}=i;const{clientWidth:V,offsetWidth:X}=o,it=z(o,"position")==="fixed",C=Math.abs(it?V-X:$-R),Q=c&&it?C:0,nt=$-(c?0:C)-1,{width:F,height:j,left:x,right:_t,top:ft}=re(s,!0),{x:L,y:gt}={x,y:ft};P(r,{top:"",left:"",right:"",bottom:""});let Ct=0,zt="",pt=0,Ae="",Mt="",le="",Pe="";const St=r.offsetWidth||0,ut=r.offsetHeight||0,Ie=St/2;let Kt=ft-g-ut<0,Ut=ft+g+j+ut>=S,Xt=x-d-St=nt;const de=["left","right"],Le=["top","bottom"];Kt=de.includes(v)?ft+j/2-g/2-ut<0:Kt,Ut=de.includes(v)?ft+g/2+j/2+ut>=S:Ut,Xt=Le.includes(v)?x+F/2-d/2=nt:qt,v=de.includes(v)&&Xt&&qt?"top":v,v=v==="top"&&Kt?"bottom":v,v=v==="bottom"&&Ut?"top":v,v=v==="left"&&Xt?"right":v,v=v==="right"&&qt?"left":v,n.className.includes(v)||(n.className=n.className.replace(t,a[v])),de.includes(v)?(v==="left"?pt=L-d-(l?St:0):pt=L+F+(l?St:0),Kt&&Ut?(Ct=0,zt=0,Mt=ft+j/2-ut/2):Kt?(Ct=gt,zt="",Mt=j/2-St):Ut?(Ct=gt-g+j,zt="",Mt=g-j/2-St):(Ct=gt-g/2+j/2,Mt=g/2-ut/2)):Le.includes(v)&&(v==="top"?Ct=gt-g-(l?ut:0):Ct=gt+j+(l?ut:0),Xt?(pt=0,le=L+F/2-Ie):qt?(pt="auto",Ae=0,Pe=F/2+nt-_t-Ie):(pt=L-d/2+F/2,le=d/2-Ie)),P(n,{top:`${Ct}px`,bottom:zt===""?"":`${zt}px`,left:pt==="auto"?pt:`${pt}px`,right:Ae!==""?`${Ae}px`:""}),T(r)&&(Mt!==""&&(r.style.top=`${Mt}px`),le!==""?r.style.left=`${le}px`:Pe!==""&&(r.style.right=`${Pe}px`));const Lo=w(`updated.bs.${Wt(e.name)}`);b(s,Lo)}},ss={template:bo(at),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},ar=e=>e!=null&&typeof e=="object"||!1,cr=e=>ar(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,cn=e=>cr(e)&&e.nodeType===1||!1,lr=e=>typeof e=="function"||!1,ln="PositionObserver Error";class wo{entries;_tick;_root;_callback;constructor(t,s){if(!lr(t))throw new Error(`${ln}: ${t} is not a function.`);this.entries=[],this._callback=t,this._root=cn(s?.root)?s.root:document?.documentElement,this._tick=0}observe=t=>{if(!cn(t))throw new Error(`${ln}: ${t} is not an instance of HTMLElement.`);if(!this._root.contains(t))return;const{clientWidth:s,clientHeight:n}=this._root,o=t.getBoundingClientRect(),{left:i,top:r,bottom:a,right:c,width:l,height:d}=o,g=r>1-d&&i>1-l&&a<=n+d-1&&c<=s+l-1;this.entries.push({target:t,boundingBox:o,isVisible:g}),this._tick||(this._tick=requestAnimationFrame(this._runCallback))};unobserve=t=>{const s=this.entries.findIndex(n=>n.target===t);this.entries.splice(s,1)};_runCallback=()=>{if(!this.entries.length)return;const t=[],{clientWidth:s,clientHeight:n}=this._root;this.entries.forEach((o,i)=>{const{target:r,boundingBox:a}=o,c=r.getBoundingClientRect(),{left:l,top:d,bottom:g,right:$,width:S,height:R}=c;if(a.left!==l||a.top!==d||a.right!==$||a.bottom!==g){const v=d>1-R&&l>1-S&&g<=n+R-1&&$<=s+S-1;this.entries[i].boundingBox=c,this.entries[i].isVisible=v,t.push({target:r,boundingBox:c,isVisible:v})}}),t.length&&this._callback(t),requestAnimationFrame(this._runCallback)};disconnect=()=>{cancelAnimationFrame(this._tick),this.entries.length=0,this._tick=0}}const To="data-original-title",xt="Tooltip",vt=(e,t,s)=>{if(oe(t)&&t.length){let n=t.trim();ti(s)&&(n=s(n));const i=new DOMParser().parseFromString(n,"text/html");e.append(...i.body.childNodes)}else T(t)?e.append(t):(ei(t)||Qo(t)&&t.every(H))&&e.append(...t)},dr=e=>{const t=e.name===xt,{id:s,element:n,options:o}=e,{title:i,placement:r,template:a,animation:c,customClass:l,sanitizeFn:d,dismissible:g,content:$,btnClose:S}=o,R=t?at:At,v={...Eo};let V=[],X=[];yt(n)&&(v.left="end",v.right="start");const Nt=`bs-${R}-${v[r]}`;let it;if(T(a))it=a;else{const Q=Et("div");vt(Q,a,d),it=Q.firstChild}e.tooltip=T(it)?it.cloneNode(!0):void 0;const{tooltip:C}=e;if(C){k(C,"id",s),k(C,"role",at);const Q=t?`${at}-inner`:`${At}-body`,nt=t?null:D(`.${At}-header`,C),F=D(`.${Q}`,C);e.arrow=D(`.${R}-arrow`,C);const{arrow:j}=e;if(T(i))V=[i.cloneNode(!0)];else{const x=Et("div");vt(x,i,d),V=[...x.childNodes]}if(T($))X=[$.cloneNode(!0)];else{const x=Et("div");vt(x,$,d),X=[...x.childNodes]}if(g)if(i)if(T(S))V=[...V,S.cloneNode(!0)];else{const x=Et("div");vt(x,S,d),V=[...V,x.firstChild]}else if(nt&&nt.remove(),T(S))X=[...X,S.cloneNode(!0)];else{const x=Et("div");vt(x,S,d),X=[...X,x.firstChild]}t?i&&F&&vt(F,i,d):(i&&nt&&vt(nt,V,d),$&&F&&vt(F,X,d),e.btn=D(".btn-close",C)||void 0),h(C,"position-fixed"),h(j,"position-absolute"),f(C,R)||h(C,R),c&&!f(C,_)&&h(C,_),l&&!f(C,l)&&h(C,l),f(C,Nt)||h(C,Nt)}},hr=e=>{const t=["HTML","BODY"],s=[];let{parentNode:n}=e;for(;n&&!t.includes(n.nodeName);)n=Go(n),kn(n)||si(n)||s.push(n);return s.find((o,i)=>z(o,"position")!=="relative"&&s.slice(i+1).every(r=>z(r,"position")==="static")?o:null)||E(e).body},fr=`[${ot}="${at}"],[data-tip="${at}"]`,yo="title";let dn=e=>W(e,xt);const gr=e=>new He(e),pr=e=>{const{element:t,tooltip:s,container:n,offsetParent:o}=e;Pt(t,An),no(s,n===o?n:o)},Yt=e=>{const{tooltip:t,container:s,offsetParent:n}=e;return t&&vs(t,s===n?s:n)},ur=(e,t)=>{const{element:s}=e;e._toggleEventListeners(),Gt(s,To)&&e.name===xt&&Co(e),t&&t()},$o=(e,t)=>{const s=t?M:B,{element:n}=e;s(E(n),as,e.handleTouch,Jt)},hn=e=>{const{element:t}=e,s=w(`shown.bs.${Wt(e.name)}`);$o(e,!0),b(t,s),p.clear(t,"in")},fn=e=>{const{element:t}=e,s=w(`hidden.bs.${Wt(e.name)}`);$o(e),pr(e),b(t,s),p.clear(t,"out")},gn=(e,t)=>{const s=t?M:B,{element:n}=e,o=N(n,`.${q}`),i=N(n,`.${G}`);t?e._observer.observe(e.element):e._observer.disconnect(),o&&s(o,`hide.bs.${q}`,e.handleHide),i&&s(i,`hide.bs.${G}`,e.handleHide)},Co=(e,t)=>{const s=[To,yo],{element:n}=e;k(n,s[t?0:1],t||et(n,s[0])||""),Pt(n,s[t?1:0])};class He extends st{static selector=fr;static init=gr;static getInstance=dn;static styleTip=es;constructor(t,s){super(t,s);const{element:n}=this,o=this.name===xt,i=o?at:At,r=o?xt:De;dn=c=>W(c,r),this.enabled=!0,this.id=`${i}-${Nn(n,i)}`;const{options:a}=this;!a.title&&o||!o&&!a.content||(ct(ss,{titleAttr:""}),Gt(n,yo)&&o&&typeof a.title=="string"&&Co(this,a.title),this.container=hr(n),this.offsetParent=["sticky","fixed"].some(c=>z(this.container,"position")===c)?this.container:E(this.element).body,dr(this),this._observer=new wo(()=>this.update()),this._toggleEventListeners(!0))}get name(){return xt}get defaults(){return ss}handleFocus=()=>lt(this.element);handleShow=()=>this.show();show(){const{options:t,tooltip:s,element:n,container:o,offsetParent:i,id:r}=this,{animation:a}=t,c=p.get(n,"out"),l=o===i?o:i;p.clear(n,"out"),s&&!c&&!Yt(this)&&p.set(n,()=>{const d=w(`show.bs.${Wt(this.name)}`);b(n,d),d.defaultPrevented||(so(s,l),k(n,An,`#${r}`),this.update(),gn(this,!0),f(s,u)||h(s,u),a?A(s,()=>hn(this)):hn(this))},17,"in")}handleHide=()=>this.hide();hide(){const{options:t,tooltip:s,element:n}=this,{animation:o,delay:i}=t;p.clear(n,"in"),s&&Yt(this)&&p.set(n,()=>{const r=w(`hide.bs.${Wt(this.name)}`);b(n,r),r.defaultPrevented||(this.update(),m(s,u),gn(this),o?A(s,()=>fn(this)):fn(this))},i+17,"out")}update=()=>{es(this)};toggle=()=>{const{tooltip:t}=this;t&&!Yt(this)?this.show():this.hide()};enable(){const{enabled:t}=this;t||(this._toggleEventListeners(!0),this.enabled=!t)}disable(){const{tooltip:t,enabled:s}=this;s&&(t&&Yt(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!s)}toggleEnabled(){this.enabled?this.disable():this.enable()}handleTouch=({target:t})=>{const{tooltip:s,element:n}=this;s&&s.contains(t)||t===n||t&&n.contains(t)||this.hide()};_toggleEventListeners=t=>{const s=t?M:B,{element:n,options:o,btn:i}=this,{trigger:r}=o,c=!!(this.name!==xt&&o.dismissible);r.includes("manual")||(this.enabled=!!t,r.split(" ").forEach(d=>{d===ko?(s(n,In,this.handleShow),s(n,we,this.handleShow),c||(s(n,rs,this.handleHide),s(E(n),as,this.handleTouch,Jt))):d===O?s(n,d,c?this.handleShow:this.toggle):d===os&&(s(n,is,this.handleShow),c||s(n,Pn,this.handleHide),Vo()&&s(n,O,this.handleFocus)),c&&i&&s(i,O,this.handleHide)}))};dispose(){const{tooltip:t,options:s}=this,n={...this,name:this.name},o=()=>setTimeout(()=>ur(n,()=>super.dispose()),17);s.animation&&Yt(n)?(this.options.delay=0,this.hide(),A(t,o)):o()}}const mr=`[${ot}="${At}"],[data-tip="${At}"]`,vr=ct({},ss,{template:bo(At),content:"",dismissible:!1,btnClose:''}),br=e=>W(e,De),Er=e=>new $s(e);class $s extends He{static selector=mr;static init=Er;static getInstance=br;static styleTip=es;constructor(t,s){super(t,s)}get name(){return De}get defaults(){return vr}show=()=>{super.show();const{options:t,btn:s}=this;t.dismissible&&s&&setTimeout(()=>lt(s),17)}}const wr="scrollspy",So="ScrollSpy",Tr='[data-bs-spy="scroll"]',yr={offset:10,target:null},$r=e=>W(e,So),Cr=e=>new Cs(e),pn=w(`activate.bs.${wr}`),Sr=e=>{const{target:t,scrollTarget:s,options:n,itemsLength:o,scrollHeight:i,element:r}=e,{offset:a}=n,c=s!==r,l=t&&ls("A",t),d=E(r),g=s.scrollHeight;if(e.scrollTop=s.scrollTop,l&&(g!==i||o!==l.length)){let $,S,R;e.items=[],e.targets=[],e.offsets=[],e.scrollHeight=g,e.maxScroll=e.scrollHeight-Dr(e),Array.from(l).forEach(v=>{$=et(v,"href"),S=$&&$.charAt(0)==="#"&&$.slice(-1)!=="#"&&D($,d),S&&(e.items.push(v),e.targets.push(S),R=re(S),e.offsets.push((c?R.top+e.scrollTop:S.offsetTop)-a))}),e.itemsLength=e.items.length}},un=({targets:e,scrollTarget:t,element:s,_observer:n},o)=>{o?t===s?e.forEach(i=>n.observe(i)):n.observe(s):n.disconnect()},xr=e=>e.scrollHeight,Dr=({element:e,scrollTarget:t})=>t!==e?t.clientHeight:re(e).height,xo=e=>{[...ls("A",e)].forEach(t=>{f(t,y)&&m(t,y)})},mn=(e,t)=>{const{target:s,element:n}=e;T(s)&&xo(s),e.activeItem=t,h(t,y);const o=[];let i=t;for(;i!==$t(n);)i=i.parentElement,(f(i,"nav")||f(i,"dropdown-menu"))&&o.push(i);o.forEach(r=>{const a=r.previousElementSibling;a&&!f(a,y)&&h(a,y)}),pn.relatedTarget=t,b(n,pn)};class Cs extends st{static selector=Tr;static init=Cr;static getInstance=$r;constructor(t,s){super(t,s);const{element:n,options:o}=this;this.target=D(o.target,E(n)),this.target&&(this.scrollTarget=n.clientHeightthis.refresh(),{root:this.scrollTarget}),un(this,!0))}get name(){return So}get defaults(){return yr}refresh=()=>{const{target:t}=this;if(T(t)&&t.offsetHeight>0){Sr(this);const{scrollTop:s,maxScroll:n,itemsLength:o,items:i,activeItem:r}=this;if(s>=n){const c=i[o-1];r!==c&&mn(this,c);return}const{offsets:a}=this;if(r&&s0){this.activeItem=null,t&&xo(t);return}i.forEach((c,l)=>{r!==c&&s>=a[l]&&(typeof a[l+1]>"u"||sW(e,Do),Hr=e=>new Ss(e),Ve=w(`show.bs.${ce}`),bn=w(`shown.bs.${ce}`),je=w(`hide.bs.${ce}`),En=w(`hidden.bs.${ce}`),ee=new Map,wn=e=>{const{tabContent:t,nav:s}=e;t&&f(t,It)&&(t.style.height="",m(t,It)),s&&p.clear(s)},Tn=e=>{const{element:t,tabContent:s,content:n,nav:o}=e,{tab:i}=T(o)&&ee.get(o)||{tab:null};if(s&&n&&f(n,_)){const{currentHeight:r,nextHeight:a}=ee.get(t)||{currentHeight:0,nextHeight:0};r!==a?setTimeout(()=>{s.style.height=`${a}px`,Ot(s),A(s,()=>wn(e))},50):wn(e)}else o&&p.clear(o);bn.relatedTarget=i,b(t,bn)},yn=e=>{const{element:t,content:s,tabContent:n,nav:o}=e,{tab:i,content:r}=o&&ee.get(o)||{tab:null,content:null};let a=0;if(n&&s&&f(s,_)&&([r,s].forEach(c=>{T(c)&&h(c,"overflow-hidden")}),a=T(r)?r.scrollHeight:0),Ve.relatedTarget=i,En.relatedTarget=t,b(t,Ve),!Ve.defaultPrevented){if(s&&h(s,y),r&&m(r,y),n&&s&&f(s,_)){const c=s.scrollHeight;ee.set(t,{currentHeight:a,nextHeight:c,tab:null,content:null}),h(n,It),n.style.height=`${a}px`,Ot(n),[r,s].forEach(l=>{l&&m(l,"overflow-hidden")})}s&&s&&f(s,_)?setTimeout(()=>{h(s,u),A(s,()=>{Tn(e)})},1):(s&&h(s,u),Tn(e)),i&&b(i,En)}},$n=e=>{const{nav:t}=e;if(!T(t))return{tab:null,content:null};const s=rt(y,t);let n=null;s.length===1&&!Lt.some(i=>f(s[0].parentElement,i))?[n]=s:s.length>1&&(n=s[s.length-1]);const o=T(n)?U(n):null;return{tab:n,content:o}},Cn=e=>{if(!T(e))return null;const t=N(e,`.${Lt.join(",.")}`);return t?D(`.${Lt[0]}-toggle`,t):null},Ar=e=>{const t=Ho(e.target);t&&(e.preventDefault(),t.show())};class Ss extends st{static selector=vn;static init=Hr;static getInstance=Ho;constructor(t){super(t);const{element:s}=this,n=U(s);if(n){const o=N(s,".nav"),i=N(n,".tab-content");this.nav=o,this.content=n,this.tabContent=i,this.dropdown=Cn(s);const{tab:r}=$n(this);if(o&&!r){const a=D(vn,o),c=a&&U(a);c&&(h(a,y),h(c,u),h(c,y),k(s,Oe,"true"))}this._toggleEventListeners(!0)}}get name(){return Do}show(){const{element:t,content:s,nav:n,dropdown:o}=this;if(!(n&&p.get(n))&&!f(t,y)){const{tab:i,content:r}=$n(this);if(n&&ee.set(n,{tab:i,content:r,currentHeight:0,nextHeight:0}),je.relatedTarget=t,T(i)&&(b(i,je),!je.defaultPrevented)){h(t,y),k(t,Oe,"true");const a=T(i)&&Cn(i);if(a&&f(a,y)&&m(a,y),n){const c=()=>{i&&(m(i,y),k(i,Oe,"false")),o&&!f(o,y)&&h(o,y)};r&&(f(r,_)||s&&f(s,_))?p.set(n,c,1):c()}r&&(m(r,u),f(r,_)?A(r,()=>yn(this)):yn(this))}}}_toggleEventListeners=t=>{(t?M:B)(this.element,O,Ar)};dispose(){this._toggleEventListeners(),super.dispose()}}const J="toast",Ao="Toast",Pr=`.${J}`,Ir=`[${ye}="${J}"]`,Po=`[${ot}="${J}"]`,jt="showing",Io="hide",Lr={animation:!0,autohide:!0,delay:5e3},xs=e=>W(e,Ao),Or=e=>new Ds(e),Sn=w(`show.bs.${J}`),kr=w(`shown.bs.${J}`),xn=w(`hide.bs.${J}`),Nr=w(`hidden.bs.${J}`),Dn=e=>{const{element:t,options:s}=e;m(t,jt),p.clear(t,jt),b(t,kr),s.autohide&&p.set(t,()=>e.hide(),s.delay,J)},Hn=e=>{const{element:t}=e;m(t,jt),m(t,u),h(t,Io),p.clear(t,J),b(t,Nr)},_r=e=>{const{element:t,options:s}=e;h(t,jt),s.animation?(Ot(t),A(t,()=>Hn(e))):Hn(e)},Mr=e=>{const{element:t,options:s}=e;p.set(t,()=>{m(t,Io),Ot(t),h(t,u),h(t,jt),s.animation?A(t,()=>Dn(e)):Dn(e)},17,jt)},Br=e=>{const{target:t}=e,s=t&&N(t,Po),n=s&&U(s),o=n&&xs(n);o&&(s&&s.tagName==="A"&&e.preventDefault(),o.relatedTarget=s,o.show())},Rr=e=>{const t=e.target,s=xs(t),{type:n,relatedTarget:o}=e;s&&t!==o&&!t.contains(o)&&([we,is].includes(n)?p.clear(t,J):p.set(t,()=>s.hide(),s.options.delay,J))};class Ds extends st{static selector=Pr;static init=Or;static getInstance=xs;constructor(t,s){super(t,s);const{element:n,options:o}=this;o.animation&&!f(n,_)?h(n,_):!o.animation&&f(n,_)&&m(n,_),this.dismiss=D(Ir,n),this.triggers=[...Z(Po,E(n))].filter(i=>U(i)===n),this._toggleEventListeners(!0)}get name(){return Ao}get defaults(){return Lr}get isShown(){return f(this.element,u)}show=()=>{const{element:t,isShown:s}=this;t&&!s&&(b(t,Sn),Sn.defaultPrevented||Mr(this))};hide=()=>{const{element:t,isShown:s}=this;t&&s&&(b(t,xn),xn.defaultPrevented||_r(this))};_toggleEventListeners=t=>{const s=t?M:B,{element:n,triggers:o,dismiss:i,options:r,hide:a}=this;i&&s(i,O,a),r.autohide&&[is,Pn,we,rs].forEach(c=>s(n,c,Rr)),o.length&&o.forEach(c=>s(c,O,Br))};dispose(){const{element:t,isShown:s}=this;this._toggleEventListeners(),p.clear(t,J),s&&m(t,u),super.dispose()}}const Hs=new Map;[ds,hs,fs,gs,ps,ws,ys,$s,Cs,Ss,Ds,He].forEach(e=>Hs.set(e.prototype.name,e));const Fr=(e,t)=>{[...t].forEach(s=>e(s))},Wr=(e,t)=>{const s=Dt.getAllFor(e);s&&[...s].forEach(([n,o])=>{t.contains(n)&&o.dispose()})},ns=e=>{const t=e&&e.nodeName?e:document,s=[...ls("*",t)];Hs.forEach(n=>{const{init:o,selector:i}=n;Fr(o,s.filter(r=>Mn(r,i)))})},Vr=e=>{const t=e&&e.nodeName?e:document;Hs.forEach(s=>{Wr(s.prototype.name,t)})};document.body?ns():M(document,"DOMContentLoaded",()=>ns(),{once:!0});exports.Alert=ds;exports.Button=hs;exports.Carousel=fs;exports.Collapse=gs;exports.Dropdown=ps;exports.Modal=ws;exports.Offcanvas=ys;exports.Popover=$s;exports.ScrollSpy=Cs;exports.Tab=Ss;exports.Toast=Ds;exports.Tooltip=He;exports.initCallback=ns;exports.removeDataAPI=Vr; //# sourceMappingURL=bootstrap-native.cjs.map diff --git a/dist/bootstrap-native.cjs.map b/dist/bootstrap-native.cjs.map index 4dfaaafd..918ec2a2 100644 --- a/dist/bootstrap-native.cjs.map +++ b/dist/bootstrap-native.cjs.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.cjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.6/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.2/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Te = \"aria-labelledby\", Me = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", _ = \"blur\", $ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Tt = \"move\", Mt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: _,\n change: $,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Tt,\n orientationchange: Mt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", _e = \"Backspace\", $e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(\n (t) => V.test(t.brand)\n) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some(\n (t) => t in N.style\n), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(\n e,\n n,\n s\n );\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(\n e,\n n,\n s\n );\n}, _t = (t, e, n, o) => {\n const s = (c) => {\n // istanbul ignore else @preserve\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, $t = () => {\n}, Tn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n _t(document, P, $t, e);\n } catch {\n }\n return t;\n})(), Mn = [\"webkitTransform\", \"transform\"].some(\n (t) => t in N.style\n), kn = \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some(\n (t) => t in N.style\n), Cn = [\"webkitTransition\", \"transition\"].some(\n (t) => t in N.style\n), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (e) => t.nodeType === e\n) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), T = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : globalThis.document, M = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (T(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, M(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (T(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, M(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(\n /[A-Z]/g,\n (J) => ae(J)\n ) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), _n = (t) => Object.values(t), $n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && M(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && T(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, M(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next @preserve */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [\n ...ue(qt, this)\n ].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next @preserve */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(\n t,\n o && fe(e)\n ), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => t ? G(t) ? t.defaultView : i(t) ? t?.ownerDocument?.defaultView : t : window, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!T(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (e) => t.constructor.name.includes(e)\n) || !1, To = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, Mo = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(\n t\n), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), xo = (t, e) => t.matches(e), zo = \"2.0.6\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n M as ObjectAssign,\n w as ObjectEntries,\n $n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n _n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Te as ariaLabelledBy,\n Me as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n _ as blurEvent,\n $ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n To as isNodeList,\n ie as isNumber,\n v as isObject,\n Mo as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n T as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n _e as keyBackspace,\n $e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Tt as moveEvent,\n xe as nativeEvents,\n $t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n _t as one,\n Mt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Tn as supportPassive,\n kn as supportTouch,\n Mn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n this._toggleEventListeners(true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n if (add) {\n if (this.scrollTarget === this.element) {\n this.targets.forEach((targetItem) =>\n this._observer.observe(targetItem)\n );\n } else {\n this._observer.observe(this.element);\n }\n } else this._observer.disconnect();\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Me","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","_t","c","$t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","T","q","G","d","M","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","_a","ge","vo","ho","To","Mo","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","getWindow","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","$","O","D","_","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isWin","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"wPAAK,MAA+CA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0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AC,CAAC,CAC5C,EAQMkmB,GAAyB,CAAIC,EAAmBC,IAAwB,CACtE,MAAAC,EAAW3jB,GAAK,UAAUyjB,CAAS,EAErCE,GACD,CAAA,GAAGA,CAAQ,EAAE,QAAQ,CAAC,CAAChkB,EAASikB,CAAQ,IAAM,CACzCF,EAAQ,SAAS/jB,CAAO,GACzBikB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOaC,GAAgBH,GAAyB,CACpD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SACjDK,EAAiB,CAAC,GAAGnF,GAAqB,IAAKkF,CAAM,CAAC,EAE7CT,GAAA,QAASW,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAC,CAAA,EAAaF,EAC3BV,GACEW,EACAF,EAAe,OAAQ1E,GAAShY,GAAQgY,EAAM6E,CAAQ,CAAC,CACzD,CAAA,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAExCL,GAAA,QAASe,GAAS,CACRZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGI,SAAS,KAAmBD,GAAA,EAE9BxiB,EAAY,SAAU,mBAAoB,IAAMwiB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1,52]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.cjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.7/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.3/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const ariaChecked = \"aria-checked\", ariaDescription = \"aria-description\", ariaDescribedBy = \"aria-describedby\", ariaExpanded = \"aria-expanded\", ariaHasPopup = \"aria-haspopup\", ariaHidden = \"aria-hidden\", ariaLabel = \"aria-label\", ariaLabelledBy = \"aria-labelledby\", ariaModal = \"aria-modal\", ariaPressed = \"aria-pressed\", ariaSelected = \"aria-selected\", ariaValueMin = \"aria-valuemin\", ariaValueMax = \"aria-valuemax\", ariaValueNow = \"aria-valuenow\", ariaValueText = \"aria-valuetext\", abortEvent = \"abort\", beforeunloadEvent = \"beforeunload\", blurEvent = \"blur\", changeEvent = \"change\", contextmenuEvent = \"contextmenu\", DOMContentLoadedEvent = \"DOMContentLoaded\", DOMMouseScrollEvent = \"DOMMouseScroll\", errorEvent = \"error\", focusEvent = \"focus\", focusinEvent = \"focusin\", focusoutEvent = \"focusout\", gesturechangeEvent = \"gesturechange\", gestureendEvent = \"gestureend\", gesturestartEvent = \"gesturestart\", keydownEvent = \"keydown\", keypressEvent = \"keypress\", keyupEvent = \"keyup\", loadEvent = \"load\", mouseclickEvent = \"click\", mousedblclickEvent = \"dblclick\", mousedownEvent = \"mousedown\", mouseupEvent = \"mouseup\", mousehoverEvent = \"hover\", mouseenterEvent = \"mouseenter\", mouseleaveEvent = \"mouseleave\", mouseinEvent = \"mousein\", mouseoutEvent = \"mouseout\", mouseoverEvent = \"mouseover\", mousemoveEvent = \"mousemove\", mousewheelEvent = \"mousewheel\", moveEvent = \"move\", orientationchangeEvent = \"orientationchange\", pointercancelEvent = \"pointercancel\", pointerdownEvent = \"pointerdown\", pointerleaveEvent = \"pointerleave\", pointermoveEvent = \"pointermove\", pointerupEvent = \"pointerup\", readystatechangeEvent = \"readystatechange\", resetEvent = \"reset\", resizeEvent = \"resize\", selectEvent = \"select\", selectendEvent = \"selectend\", selectstartEvent = \"selectstart\", scrollEvent = \"scroll\", submitEvent = \"submit\", touchstartEvent = \"touchstart\", touchmoveEvent = \"touchmove\", touchcancelEvent = \"touchcancel\", touchendEvent = \"touchend\", unloadEvent = \"unload\", nativeEvents = {\n DOMContentLoaded: DOMContentLoadedEvent,\n DOMMouseScroll: DOMMouseScrollEvent,\n abort: abortEvent,\n beforeunload: beforeunloadEvent,\n blur: blurEvent,\n change: changeEvent,\n click: mouseclickEvent,\n contextmenu: contextmenuEvent,\n dblclick: mousedblclickEvent,\n error: errorEvent,\n focus: focusEvent,\n focusin: focusinEvent,\n focusout: focusoutEvent,\n gesturechange: gesturechangeEvent,\n gestureend: gestureendEvent,\n gesturestart: gesturestartEvent,\n hover: mousehoverEvent,\n keydown: keydownEvent,\n keypress: keypressEvent,\n keyup: keyupEvent,\n load: loadEvent,\n mousedown: mousedownEvent,\n mousemove: mousemoveEvent,\n mousein: mouseinEvent,\n mouseout: mouseoutEvent,\n mouseenter: mouseenterEvent,\n mouseleave: mouseleaveEvent,\n mouseover: mouseoverEvent,\n mouseup: mouseupEvent,\n mousewheel: mousewheelEvent,\n move: moveEvent,\n orientationchange: orientationchangeEvent,\n pointercancel: pointercancelEvent,\n pointerdown: pointerdownEvent,\n pointerleave: pointerleaveEvent,\n pointermove: pointermoveEvent,\n pointerup: pointerupEvent,\n readystatechange: readystatechangeEvent,\n reset: resetEvent,\n resize: resizeEvent,\n scroll: scrollEvent,\n select: selectEvent,\n selectend: selectendEvent,\n selectstart: selectstartEvent,\n submit: submitEvent,\n touchcancel: touchcancelEvent,\n touchend: touchendEvent,\n touchmove: touchmoveEvent,\n touchstart: touchstartEvent,\n unload: unloadEvent\n}, dragEvent = \"drag\", dragstartEvent = \"dragstart\", dragenterEvent = \"dragenter\", dragleaveEvent = \"dragleave\", dragoverEvent = \"dragover\", dragendEvent = \"dragend\", loadstartEvent = \"loadstart\", mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" }, mouseHoverEvents = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, focusEvents = { in: \"focusin\", out: \"focusout\" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', keyboardEventKeys = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, keyAlt = \"Alt\", keyArrowDown = \"ArrowDown\", keyArrowUp = \"ArrowUp\", keyArrowLeft = \"ArrowLeft\", keyArrowRight = \"ArrowRight\", keyBackspace = \"Backspace\", keyCapsLock = \"CapsLock\", keyControl = \"Control\", keyDelete = \"Delete\", keyEnter = \"Enter\", keyNumpadEnter = \"NumpadEnter\", keyEscape = \"Escape\", keyInsert = \"Insert\", keyMeta = \"Meta\", keyPause = \"Pause\", keyScrollLock = \"ScrollLock\", keyShift = \"Shift\", keySpace = \"Space\", keyTab = \"Tab\", animationDuration = \"animationDuration\", animationDelay = \"animationDelay\", animationName = \"animationName\", animationEndEvent = \"animationend\", transitionDuration = \"transitionDuration\", transitionDelay = \"transitionDelay\", transitionEndEvent = \"transitionend\", transitionProperty = \"transitionProperty\", addEventListener = \"addEventListener\", removeEventListener = \"removeEventListener\", bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, offsetHeight = \"offsetHeight\", offsetWidth = \"offsetWidth\", scrollHeight = \"scrollHeight\", scrollWidth = \"scrollWidth\", tabindex = \"tabindex\", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (x) => mobileBrands.test(x.brand)\n ) || mobileBrands.test(navigator?.userAgent) || !1;\n}, isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (x) => appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent\n ) || !1;\n}, isFirefox = () => navigator?.userAgent?.includes(\"Firefox\") || /* istanbul ignore next @preserve */\n!1, support3DTransform = () => [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style), noop = () => {\n}, on = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.addEventListener(\n eventName,\n listener,\n ops\n );\n}, off = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.removeEventListener(\n eventName,\n listener,\n ops\n );\n}, one = (element, eventName, listener, options) => {\n const handlerWrapper = (e) => {\n (e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));\n };\n on(element, eventName, handlerWrapper, options);\n}, supportPassive = () => {\n let result = !1;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => (result = !0, result)\n });\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch {\n }\n return result;\n}, supportTransform = () => [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style), supportTouch = () => \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, supportAnimation = () => [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style), supportTransition = () => [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {\n element.classList.add(...classNAME);\n}, removeClass = (element, ...classNAME) => {\n element.classList.remove(...classNAME);\n}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == \"object\" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (x) => node.nodeType === x\n) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component) => componentData.get(component) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n return element && instanceMap && instanceMap.get(element) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = Data.getAllFor(component);\n !instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));\n }\n}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == \"string\" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === \"Window\" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {\n if (!param) return;\n if (isString(param))\n return getDocument().createElement(param);\n const { tagName } = param, newElement = createElement(tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, createElementNS = (ns, param) => {\n if (!ns || !param) return;\n if (isString(param))\n return getDocument().createElementNS(ns, param);\n const { tagName } = param, newElement = createElementNS(ns, tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {\n const computedStyle = getComputedStyle(element), prop = property.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return computedStyle.getPropertyValue(prop);\n}, getElementAnimationDelay = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementAnimationDuration = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateAnimationEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);\n if (duration) {\n const animationEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);\n };\n element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, getElementTransitionDelay = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(delayValue) * delayScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementTransitionDuration = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateTransitionEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);\n if (duration) {\n const transitionEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => [\"true\", !0].includes(value) ? !0 : [\"false\", !1].includes(value) ? !1 : [\"null\", \"\", null, void 0].includes(value) ? null : value !== \"\" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {\n const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = \"title\";\n return ObjectEntries(data).forEach(([k, v]) => {\n const key = ns && typeof k == \"string\" && k.includes(ns) ? k.replace(ns, \"\").replace(\n /[A-Z]/g,\n (match) => toLowerCase(match)\n ) : (\n /* istanbul ignore next @preserve */\n k\n );\n dataOps[key] = normalizeValue(v);\n }), ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v);\n }), ObjectEntries(defaultOps).forEach(([k, v]) => {\n k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;\n }), normalOps;\n}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: !0,\n bubbles: !0\n });\n return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;\n}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key) && key.includes(\"--\"))\n element.style.setProperty(key, value);\n else {\n const propObject = {};\n propObject[key] = value, ObjectAssign(element.style, propObject);\n }\n });\n}, isMap = (obj) => isObject(obj) && obj.constructor.name === \"Map\" || !1, isNumber = (num) => typeof num == \"number\" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (element, callback, delay, key) => {\n isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */\n null : isNumber(keyTimers) ? keyTimers : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n const keyTimers = TimeCache.get(element);\n key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));\n }\n}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();\nfunction handleKeyboardNavigation(event) {\n const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [\n ...querySelectorAll(focusableSelector, this)\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden)\n );\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];\n code === \"Tab\" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));\n}\nconst hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {\n const isCurrentlyTrapped = hasFocusTrap(target);\n (isCurrentlyTrapped ? off : on)(target, \"keydown\", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);\n}, getBoundingClientRect = (element, includeScale) => {\n const { width, height, top, right, bottom, left } = element.getBoundingClientRect();\n let scaleX = 1, scaleY = 1;\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (\n /* istanbul ignore next @preserve */\n 1\n ), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY\n };\n}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {\n const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;\n return { x, y };\n}, isShadowRoot = (element) => isNode(element) && element.constructor.name === \"ShadowRoot\" || !1, getParentNode = (node) => node.nodeName === \"HTML\" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\nisNode(node) && node.parentNode || // DOM Element detected\nisShadowRoot(node) && node.host || // ShadowRoot detected\ngetDocumentElement(node), isScaledElement = (element) => {\n if (!isHTMLElement(element)) return !1;\n const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;\n}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {\n const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent)\n ), offsets = { x: 0, y: 0 };\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, !0);\n offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height\n };\n};\nlet elementUID = 0, elementMapUID = 0;\nconst elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {\n let result = key ? elementUID : elementMapUID;\n if (key) {\n const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();\n elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);\n } else {\n const elkey = element.id || element;\n elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);\n }\n return result;\n}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === \"CANVAS\" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {\n if (!isNode(element)) return !1;\n const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n}, isElementInViewport = (element) => {\n if (!isNode(element)) return !1;\n const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);\n return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;\n}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == \"function\" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === \"HTMLCollection\" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === \"IMG\" || !1, isJSON = (str) => {\n if (!isString(str)) return !1;\n try {\n JSON.parse(str);\n } catch {\n return !1;\n }\n return !0;\n}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === \"WeakMap\" || !1, isMedia = (element) => isNode(element) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (s) => element.constructor.name.includes(s)\n) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === \"NodeList\" || !1, isRTL = (node) => getDocumentElement(node).dir === \"rtl\", isSVGElement = (element) => isNode(element) && element.constructor.name.includes(\"SVG\") || !1, isTableElement = (element) => isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`\nclosest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(\n selector\n), getCustomElements = (parent) => [...getElementsByTagName(\"*\", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(\n selector\n), matches = (target, selector) => target.matches(selector), version = \"2.0.7\";\nexport {\n ArrayFrom,\n DOMContentLoadedEvent,\n DOMMouseScrollEvent,\n Data,\n Float32ArrayFrom,\n Float64ArrayFrom,\n ObjectAssign,\n ObjectEntries,\n ObjectFromEntries,\n ObjectHasOwn,\n ObjectKeys,\n ObjectValues,\n Timer,\n abortEvent,\n addClass,\n addEventListener,\n animationDelay,\n animationDuration,\n animationEndEvent,\n animationName,\n ariaChecked,\n ariaDescribedBy,\n ariaDescription,\n ariaExpanded,\n ariaHasPopup,\n ariaHidden,\n ariaLabel,\n ariaLabelledBy,\n ariaModal,\n ariaPressed,\n ariaSelected,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n ariaValueText,\n beforeunloadEvent,\n bezierEasings,\n blurEvent,\n changeEvent,\n closest,\n contextmenuEvent,\n createCustomEvent,\n createElement,\n createElementNS,\n dispatchEvent,\n distinct,\n documentBody,\n documentElement,\n documentHead,\n dragEvent,\n dragendEvent,\n dragenterEvent,\n dragleaveEvent,\n dragoverEvent,\n dragstartEvent,\n emulateAnimationEnd,\n emulateTransitionEnd,\n errorEvent,\n focus,\n focusEvent,\n focusEvents,\n focusableSelector,\n focusinEvent,\n focusoutEvent,\n gesturechangeEvent,\n gestureendEvent,\n gesturestartEvent,\n getAttribute,\n getAttributeNS,\n getBoundingClientRect,\n getCustomElements,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getDocumentHead,\n getElementAnimationDelay,\n getElementAnimationDuration,\n getElementById,\n getElementStyle,\n getElementTransitionDelay,\n getElementTransitionDuration,\n getElementsByClassName,\n getElementsByTagName,\n getInstance,\n getNodeScroll,\n getParentNode,\n getRectRelativeToOffsetParent,\n getUID,\n getWindow,\n hasAttribute,\n hasAttributeNS,\n hasClass,\n hasFocusTrap,\n isApple,\n isArray,\n isCanvas,\n isCustomElement,\n isDocument,\n isElement,\n isElementInScrollRange,\n isElementInViewport,\n isElementsArray,\n isFirefox,\n isFunction,\n isHTMLCollection,\n isHTMLElement,\n isHTMLImageElement,\n isJSON,\n isMap,\n isMedia,\n isMobile,\n isNode,\n isNodeList,\n isNumber,\n isObject,\n isRTL,\n isSVGElement,\n isScaledElement,\n isShadowRoot,\n isString,\n isTableElement,\n isWeakMap,\n isWindow,\n keyAlt,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keyBackspace,\n keyCapsLock,\n keyControl,\n keyDelete,\n keyEnter,\n keyEscape,\n keyInsert,\n keyMeta,\n keyNumpadEnter,\n keyPause,\n keyScrollLock,\n keyShift,\n keySpace,\n keyTab,\n keyboardEventKeys,\n keydownEvent,\n keypressEvent,\n keyupEvent,\n loadEvent,\n loadstartEvent,\n matches,\n mouseClickEvents,\n mouseHoverEvents,\n mouseSwipeEvents,\n mouseclickEvent,\n mousedblclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseinEvent,\n mouseleaveEvent,\n mousemoveEvent,\n mouseoutEvent,\n mouseoverEvent,\n mouseupEvent,\n mousewheelEvent,\n moveEvent,\n nativeEvents,\n noop,\n normalizeOptions,\n normalizeValue,\n off,\n offsetHeight,\n offsetWidth,\n on,\n one,\n orientationchangeEvent,\n passiveHandler,\n pointercancelEvent,\n pointerdownEvent,\n pointerleaveEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n querySelectorAll,\n readystatechangeEvent,\n reflow,\n removeAttribute,\n removeAttributeNS,\n removeClass,\n removeEventListener,\n resetEvent,\n resizeEvent,\n scrollEvent,\n scrollHeight,\n scrollWidth,\n selectEvent,\n selectendEvent,\n selectstartEvent,\n setAttribute,\n setAttributeNS,\n setElementStyle,\n submitEvent,\n support3DTransform,\n supportAnimation,\n supportPassive,\n supportTouch,\n supportTransform,\n supportTransition,\n tabindex,\n toLowerCase,\n toUpperCase,\n toggleFocusTrap,\n touchEvents,\n touchcancelEvent,\n touchendEvent,\n touchmoveEvent,\n touchstartEvent,\n transitionDelay,\n transitionDuration,\n transitionEndEvent,\n transitionProperty,\n unloadEvent,\n userAgent,\n userAgentData,\n version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isRoot = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget.scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isRoot ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Toggles on/off the component observer.\n *\n * @param self the ScrollSpy instance\n * @param add when `true`, listener is added\n */\nconst toggleObservers = (\n { targets, scrollTarget, element, _observer }: ScrollSpy,\n add?: boolean,\n) => {\n if (add) {\n if (scrollTarget === element) {\n targets.forEach((targetItem) => _observer.observe(targetItem));\n } else {\n _observer.observe(element);\n }\n } else _observer.disconnect();\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: HTMLElement) => {\n return scrollTarget.scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n toggleObservers(this, true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n const clone = { ...this };\n toggleObservers(clone);\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["ariaDescribedBy","ariaExpanded","ariaHidden","ariaModal","ariaPressed","ariaSelected","focusEvent","focusinEvent","focusoutEvent","keydownEvent","keyupEvent","mouseclickEvent","mousedownEvent","mousehoverEvent","mouseenterEvent","mouseleaveEvent","pointerdownEvent","pointermoveEvent","pointerupEvent","touchstartEvent","dragstartEvent","focusableSelector","keyArrowDown","keyArrowUp","keyArrowLeft","keyArrowRight","keyEscape","transitionDuration","transitionDelay","transitionEndEvent","transitionProperty","isApple","appleBrands","x","noop","on","element","eventName","listener","options","ops","off","getAttribute","att","hasAttribute","setAttribute","value","removeAttribute","addClass","classNAME","removeClass","hasClass","isObject","obj","isNode","node","isHTMLElement","componentData","Data","component","instance","instanceMap","getInstance","target","isString","str","isWindow","isDocument","getDocument","ObjectAssign","source","createElement","param","tagName","newElement","attr","dispatchEvent","event","getElementStyle","property","computedStyle","prop","getElementTransitionDelay","propertyValue","delayValue","delayScale","duration","getElementTransitionDuration","durationValue","durationScale","emulateTransitionEnd","handler","called","endEvent","delay","transitionEndWrapper","e","focus","normalizeValue","ObjectEntries","toLowerCase","normalizeOptions","defaultOps","inputOps","ns","INPUT","data","normalOps","dataOps","title","k","v","key","match","ObjectKeys","createCustomEvent","eventType","config","OriginalCustomEvent","passiveHandler","reflow","setElementStyle","styles","propObject","isMap","isNumber","num","TimeCache","Timer","callback","keyTimers","querySelectorAll","selector","parent","focusTrapMap","handleKeyboardNavigation","shiftKey","code","doc","focusableElements","el","firstFocusable","lastFocusable","hasFocusTrap","toggleFocusTrap","isCurrentlyTrapped","getBoundingClientRect","includeScale","width","height","top","right","bottom","left","scaleX","scaleY","offsetWidth2","offsetHeight2","getDocumentBody","getDocumentElement","isShadowRoot","getParentNode","elementUID","elementMapUID","elementIDMap","getUID","result","elID","elMap","elkey","getWindow","isArray","isElementInScrollRange","clientHeight","isFunction","fn","isNodeList","isRTL","isTableElement","closest","querySelector","getElementsByTagName","getElementsByClassName","matches","f","t","c","i","s","o","a","r","E","d","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","prevInstance","alertSelector","alertDismissSelector","getAlertInstance","alertInitCallback","Alert","closeAlertEvent","closedAlertEvent","alertTransitionEnd","self","add","action","addListener","removeListener","dismiss","close","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","attValue","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","activeItem","getActiveIndex","orientation","directionClass","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","RTL","carouselDragHandler","carouselPointerDownHandler","controls","indicators","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","activeIndex","transitionItem","ar","isPaused","idx","next","eventProperties","touch","pause","interval","keyboard","arrow","indicator","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","triggers","btn","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","menuEnd","p","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","targetLeft","targetTop","targetWidth","targetHeight","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","dropdownPreventScroll","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","dropdownClickHandler","activeElement","open","menuItems","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","appendPopup","customContainer","containerIsBody","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","afterModalShow","beforeModalShow","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","overlayDelay","currentOpen","that","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","tooltipDefaults","_","B","m","n","h","l","u","b","g","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","tempDocument","createTip","id","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tipComponent","elem","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","hideTooltipEvent","enabled","tr","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isRoot","links","scrollHEIGHT","href","targetItem","rect","getOffsetHeight","link","toggleObservers","targets","_observer","getScrollHeight","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","context","compData","initCallback","lookUp","elemCollection","cs","init","removeDataAPI","comp"],"mappings":"gFAAK,MAAqEA,GAAkB,mBAAoBC,GAAe,gBAAiDC,GAAa,cAA6EC,GAAY,aAAcC,GAAc,eAAgBC,GAAe,gBAAqYC,GAAa,QAASC,GAAe,UAAWC,GAAgB,WAAsHC,GAAe,UAAuCC,GAAa,QAA6BC,EAAkB,QAA0CC,GAAiB,YAAuCC,GAAkB,QAASC,GAAkB,aAAcC,GAAkB,aAAwQC,GAAmB,cAAmDC,GAAmB,cAAeC,GAAiB,YAA+OC,GAAkB,aAmDxxDC,GAAiB,YAaaC,GAAoB,oFAuCtDC,GAAe,YAAaC,GAAa,UAAWC,GAAe,YAAaC,G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GAAWA,EAAQ,SAAWA,EAAU,SACjDI,EAAiB,CAAC,GAAGtgB,GAAqB,IAAKqgB,CAAM,CAAC,EAE7CP,GAAA,QAASS,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAzjB,CAAA,EAAawjB,EAC3BR,GACES,EACAF,EAAe,OAAQvE,GAAS7b,GAAQ6b,EAAMhf,CAAQ,CAAC,CACzD,CAAA,CACD,CACH,EAOa0jB,GAAiBP,GAAyB,CACrD,MAAMG,EAASH,GAAWA,EAAQ,SAAWA,EAAU,SAExCJ,GAAA,QAASY,GAAS,CACRT,GAAAS,EAAK,UAAU,KAAML,CAAM,CAAA,CACnD,CACH,EAGI,SAAS,KAAmBD,GAAA,EAE9Bne,EAAY,SAAU,mBAAoB,IAAMme,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1,52]} \ No newline at end of file diff --git a/dist/bootstrap-native.d.ts b/dist/bootstrap-native.d.ts index 87756c08..98ac520c 100644 --- a/dist/bootstrap-native.d.ts +++ b/dist/bootstrap-native.d.ts @@ -1,558 +1,575 @@ -import PositionObserver$1 from '@thednp/position-observer'; - -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -/** Creates a new Alert instance. */ -export declare class Alert extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Alert; - static getInstance: (element: HTMLElement) => Alert | null; - dismiss: HTMLElement | null; - constructor(target: HTMLElement | string); - /** Returns component name string. */ - get name(): string; - /** - * Public method that hides the `.alert` element from the user, - * disposes the instance once animation is complete, then - * removes the element from the DOM. - */ - close: () => void; - /** - * Toggle on / off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Remove the component from target element. */ - dispose(): void; -} -/** Creates a new `Button` instance. */ -export declare class Button extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Button; - static getInstance: (element: HTMLElement) => Button | null; - isActive: boolean; - /** - * @param target usually a `.btn` element - */ - constructor(target: HTMLElement | string); - /** - * Returns component name string. - */ - get name(): string; - /** - * Toggles the state of the target button. - * - * @param e usually `click` Event object - */ - toggle: (e?: Event) => void; - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Button` component from the target element. */ - dispose(): void; -} -export interface CarouselOptions extends BaseOptions { - pause: boolean | "hover"; - keyboard: boolean; - touch: boolean; - interval: number | boolean; -} -/** Creates a new `Carousel` instance. */ -export declare class Carousel extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Carousel; - static getInstance: (element: HTMLElement) => Carousel | null; - options: CarouselOptions; - direction: "right" | "left"; - index: number; - isTouch: boolean; - slides: HTMLCollectionOf; - controls: HTMLElement[]; - indicator: HTMLElement | null; - indicators: HTMLElement[]; - /** - * @param target mostly a `.carousel` element - * @param config instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): CarouselOptions; - /** - * Check if instance is paused. - */ - get isPaused(): boolean; - /** - * Check if instance is animating. - */ - get isAnimating(): boolean; - /** Slide automatically through items. */ - cycle(): void; - /** Pause the automatic cycle. */ - pause(): void; - /** Slide to the next item. */ - next(): void; - /** Slide to the previous item. */ - prev(): void; - /** - * Jump to the item with the `idx` index. - * - * @param idx the index of the item to jump to - */ - to(idx: number): void; - /** - * Toggles all event listeners for the `Carousel` instance. - * - * @param add when `TRUE` event listeners are added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Remove `Carousel` component from target. */ - dispose(): void; -} -export interface CollapseOptions extends BaseOptions { - parent: string | HTMLElement | null; -} -/** Returns a new `Colapse` instance. */ -export declare class Collapse extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Collapse; - static getInstance: (element: HTMLElement) => Collapse | null; - options: CollapseOptions; - parent: HTMLElement | null; - triggers: HTMLElement[]; - /** - * @param target and `Element` that matches the selector - * @param config instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): { - parent: null; - }; - /** Hides the collapse. */ - hide(): void; - /** Shows the collapse. */ - show(): void; - /** Toggles the visibility of the collapse. */ - toggle(): void; - /** - * Toggles on/off the event listener(s) of the `Collapse` instance. - * - * @param add when `true`, the event listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Remove the `Collapse` component from the target `Element`. */ - dispose(): void; -} -export interface DropdownOptions extends BaseOptions { - offset: number; - display: string | "dynamic" | "static"; -} -/** Returns a new Dropdown instance. */ -export declare class Dropdown extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Dropdown; - static getInstance: (element: HTMLElement) => Dropdown | null; - options: DropdownOptions; - open: boolean; - parentElement: HTMLElement; - menu: HTMLElement; - _observer: IntersectionObserver; - /** - * @param target Element or string selector - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): { - offset: number; - display: string; - }; - /** Shows/hides the dropdown menu to the user. */ - toggle(): void; - /** Shows the dropdown menu to the user. */ - show(): void; - /** Hides the dropdown menu from the user. */ - hide(): void; - /** - * Toggles on/off the `click` event listener of the `Dropdown`. - * - * @param add when `true`, it will add the event listener - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Dropdown` component from the target element. */ - dispose(): void; -} -export interface ModalOptions extends BaseOptions { - backdrop: boolean | "static"; - keyboard: boolean; -} -/** Returns a new `Modal` instance. */ -export declare class Modal extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Modal; - static getInstance: (element: HTMLElement) => Modal | null; - options: ModalOptions; - modalDialog: HTMLElement; - triggers: HTMLElement[]; - isStatic: boolean; - hasFade: boolean; - relatedTarget: HTMLElement | null; - _observer: ResizeObserver; - /** - * @param target usually the `.modal` element - * @param config instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): { - backdrop: boolean; - keyboard: boolean; - }; - /** Toggles the visibility of the modal. */ - toggle(): void; - /** Shows the modal to the user. */ - show(): void; - /** Hide the modal from the user. */ - hide(): void; - /** - * Updates the modal layout. - */ - update: () => void; - /** - * Toggles on/off the `click` event listener of the `Modal` instance. - * - * @param add when `true`, event listener(s) is/are added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Modal` component from target element. */ - dispose(): void; -} -export interface OffcanvasOptions extends BaseOptions { - backdrop: boolean | "static"; - keyboard: boolean; -} -/** Returns a new `Offcanvas` instance. */ -export declare class Offcanvas extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Offcanvas; - static getInstance: (element: HTMLElement) => Offcanvas | null; - options: OffcanvasOptions; - triggers: HTMLElement[]; - relatedTarget: HTMLElement | null; - /** - * @param target usually an `.offcanvas` element - * @param config instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): { - backdrop: boolean; - keyboard: boolean; - scroll: boolean; - }; - /** Shows or hides the offcanvas from the user. */ - toggle(): void; - /** Shows the offcanvas to the user. */ - show(): void; - /** Hides the offcanvas from the user. */ - hide(): void; - /** - * Toggles on/off the `click` event listeners. - * - * @param self the `Offcanvas` instance - * @param add when *true*, listeners are added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Offcanvas` from the target element. */ - dispose(): void; -} -export interface TooltipOptions extends BaseOptions { - template: string | HTMLElement; - title: string | HTMLElement; - customClass: string; - trigger: string; - placement: "top" | "bottom" | "left" | "right"; - sanitizeFn?: (str: string) => string; - animation: boolean; - delay: number; - content: string | HTMLElement; - dismissible: boolean; - btnClose: string | HTMLElement; -} -/** Creates a new `Tooltip` instance. */ -export declare class Tooltip extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Tooltip; - static getInstance: (element: HTMLElement) => Tooltip | null; - static styleTip: (self: T) => void; - options: TooltipOptions; - btn?: HTMLElement; - tooltip?: HTMLElement; - container: ParentNode; - arrow?: HTMLElement; - offsetParent?: HTMLElement; - enabled: boolean; - id: string; - _observer: PositionObserver$1; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): TooltipOptions; - /** Handles the focus event on iOS. */ - handleFocus: () => void; - /** Shows the tooltip. */ - handleShow: () => void; - show(): void; - /** Hides the tooltip. */ - handleHide: () => void; - hide(): void; - /** Updates the tooltip position. */ - update: () => void; - /** Toggles the tooltip visibility. */ - toggle: () => void; - /** Enables the tooltip. */ - enable(): void; - /** Disables the tooltip. */ - disable(): void; - /** Toggles the `disabled` property. */ - toggleEnabled(): void; - /** - * Handles the `touchstart` event listener for `Tooltip` - * - * @this {Tooltip} - * @param {TouchEvent} e the `Event` object - */ - handleTouch: ({ target }: TouchEvent) => void; - /** - * Toggles on/off the `Tooltip` event listeners. - * - * @param add when `true`, event listeners are added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Tooltip` from the target element. */ - dispose(): void; -} -export interface PopoverOptions extends TooltipOptions { - title: string | HTMLElement; - content: string | HTMLElement; - btnClose: string | HTMLElement; - dismissible: boolean; -} -/** Returns a new `Popover` instance. */ -export declare class Popover extends Tooltip { - static selector: string; - static init: (element: HTMLElement) => Popover; - static getInstance: (element: HTMLElement) => Popover | null; - static styleTip: (self: T) => void; - options: PopoverOptions; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): PopoverOptions; - show: () => void; -} -export interface ScrollSpyOptions extends BaseOptions { - offset: number; - target: HTMLElement | string | null; -} -/** Returns a new `ScrollSpy` instance. */ -export declare class ScrollSpy extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => ScrollSpy; - static getInstance: (element: HTMLElement) => ScrollSpy | null; - options: ScrollSpyOptions; - target: HTMLElement | null; - scrollTarget: HTMLElement; - scrollTop: number; - maxScroll: number; - scrollHeight: number; - activeItem: HTMLElement | null; - items: HTMLElement[]; - targets: HTMLElement[]; - itemsLength: number; - offsets: number[]; - _observer: PositionObserver$1; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): ScrollSpyOptions; - /** Updates all items. */ - refresh: () => void; - /** - * Toggles on/off the component event listener. - * - * @param add when `true`, listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes `ScrollSpy` from the target element. */ - dispose(): void; -} -/** Creates a new `Tab` instance. */ -export declare class Tab extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Tab; - static getInstance: (element: HTMLElement) => Tab | null; - nav: HTMLElement | null; - content: HTMLElement | null; - tabContent: HTMLElement | null; - nextContent: HTMLElement | null; - dropdown: HTMLElement | null; - /** @param target the target element */ - constructor(target: HTMLElement | string); - /** - * Returns component name string. - */ - get name(): string; - /** Shows the tab to the user. */ - show(): void; - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Tab` component from the target element. */ - dispose(): void; -} -export interface ToastOptions extends BaseOptions { - animation: boolean; - autohide: boolean; - delay: number; -} -/** Creates a new `Toast` instance. */ -export declare class Toast extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Toast; - static getInstance: (element: HTMLElement) => Toast | null; - options: ToastOptions; - dismiss: HTMLElement | null; - triggers: HTMLElement[]; - relatedTarget: HTMLElement | null; - /** - * @param target the target `.toast` element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): { - animation: boolean; - autohide: boolean; - delay: number; - }; - /** - * Returns *true* when toast is visible. - */ - get isShown(): boolean; - /** Shows the toast. */ - show: () => void; - /** Hides the toast. */ - hide: () => void; - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, it will add the listener - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Toast` component from the target element. */ - dispose(): void; -} -/** - * Initialize all BSN components for a target container. - * - * @param context parent `Node` - */ -export declare const initCallback: (context?: ParentNode) => void; -/** - * Remove all BSN components for a target container. - * - * @param context parent `Node` - */ -export declare const removeDataAPI: (context?: ParentNode) => void; - -export as namespace BSN; - -export {}; +import { default as default_2 } from '@thednp/position-observer'; + +/** Creates a new Alert instance. */ +export declare class Alert extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Alert; + static getInstance: (element: HTMLElement) => Alert | null; + dismiss: HTMLElement | null; + constructor(target: HTMLElement | string); + /** Returns component name string. */ + get name(): string; + /** + * Public method that hides the `.alert` element from the user, + * disposes the instance once animation is complete, then + * removes the element from the DOM. + */ + close: () => void; + /** + * Toggle on / off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Remove the component from target element. */ + dispose(): void; +} + +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +/** Creates a new `Button` instance. */ +export declare class Button extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Button; + static getInstance: (element: HTMLElement) => Button | null; + isActive: boolean; + /** + * @param target usually a `.btn` element + */ + constructor(target: HTMLElement | string); + /** + * Returns component name string. + */ + get name(): string; + /** + * Toggles the state of the target button. + * + * @param e usually `click` Event object + */ + toggle: (e?: Event) => void; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Button` component from the target element. */ + dispose(): void; +} + +/** Creates a new `Carousel` instance. */ +export declare class Carousel extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Carousel; + static getInstance: (element: HTMLElement) => Carousel | null; + options: CarouselOptions; + direction: "right" | "left"; + index: number; + isTouch: boolean; + slides: HTMLCollectionOf; + controls: HTMLElement[]; + indicator: HTMLElement | null; + indicators: HTMLElement[]; + /** + * @param target mostly a `.carousel` element + * @param config instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): CarouselOptions; + /** + * Check if instance is paused. + */ + get isPaused(): boolean; + /** + * Check if instance is animating. + */ + get isAnimating(): boolean; + /** Slide automatically through items. */ + cycle(): void; + /** Pause the automatic cycle. */ + pause(): void; + /** Slide to the next item. */ + next(): void; + /** Slide to the previous item. */ + prev(): void; + /** + * Jump to the item with the `idx` index. + * + * @param idx the index of the item to jump to + */ + to(idx: number): void; + /** + * Toggles all event listeners for the `Carousel` instance. + * + * @param add when `TRUE` event listeners are added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Remove `Carousel` component from target. */ + dispose(): void; +} + +declare interface CarouselOptions extends BaseOptions { + pause: boolean | "hover"; + keyboard: boolean; + touch: boolean; + interval: number | boolean; +} + +/** Returns a new `Colapse` instance. */ +export declare class Collapse extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Collapse; + static getInstance: (element: HTMLElement) => Collapse | null; + options: CollapseOptions; + parent: HTMLElement | null; + triggers: HTMLElement[]; + /** + * @param target and `Element` that matches the selector + * @param config instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): { + parent: null; + }; + /** Hides the collapse. */ + hide(): void; + /** Shows the collapse. */ + show(): void; + /** Toggles the visibility of the collapse. */ + toggle(): void; + /** + * Toggles on/off the event listener(s) of the `Collapse` instance. + * + * @param add when `true`, the event listener is added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Remove the `Collapse` component from the target `Element`. */ + dispose(): void; +} + +declare interface CollapseOptions extends BaseOptions { + parent: string | HTMLElement | null; +} + +/** Returns a new Dropdown instance. */ +export declare class Dropdown extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Dropdown; + static getInstance: (element: HTMLElement) => Dropdown | null; + options: DropdownOptions; + open: boolean; + parentElement: HTMLElement; + menu: HTMLElement; + _observer: IntersectionObserver; + /** + * @param target Element or string selector + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): { + offset: number; + display: string; + }; + /** Shows/hides the dropdown menu to the user. */ + toggle(): void; + /** Shows the dropdown menu to the user. */ + show(): void; + /** Hides the dropdown menu from the user. */ + hide(): void; + /** + * Toggles on/off the `click` event listener of the `Dropdown`. + * + * @param add when `true`, it will add the event listener + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Dropdown` component from the target element. */ + dispose(): void; +} + +declare interface DropdownOptions extends BaseOptions { + offset: number; + display: string | "dynamic" | "static"; +} + +/** + * Initialize all BSN components for a target container. + * + * @param context parent `Node` + */ +export declare const initCallback: (context?: ParentNode) => void; + +/** Returns a new `Modal` instance. */ +export declare class Modal extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Modal; + static getInstance: (element: HTMLElement) => Modal | null; + options: ModalOptions; + modalDialog: HTMLElement; + triggers: HTMLElement[]; + isStatic: boolean; + hasFade: boolean; + relatedTarget: HTMLElement | null; + _observer: ResizeObserver; + /** + * @param target usually the `.modal` element + * @param config instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): { + backdrop: boolean; + keyboard: boolean; + }; + /** Toggles the visibility of the modal. */ + toggle(): void; + /** Shows the modal to the user. */ + show(): void; + /** Hide the modal from the user. */ + hide(): void; + /** + * Updates the modal layout. + */ + update: () => void; + /** + * Toggles on/off the `click` event listener of the `Modal` instance. + * + * @param add when `true`, event listener(s) is/are added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Modal` component from target element. */ + dispose(): void; +} + +declare interface ModalOptions extends BaseOptions { + backdrop: boolean | "static"; + keyboard: boolean; +} + +/** Returns a new `Offcanvas` instance. */ +export declare class Offcanvas extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Offcanvas; + static getInstance: (element: HTMLElement) => Offcanvas | null; + options: OffcanvasOptions; + triggers: HTMLElement[]; + relatedTarget: HTMLElement | null; + /** + * @param target usually an `.offcanvas` element + * @param config instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): { + backdrop: boolean; + keyboard: boolean; + scroll: boolean; + }; + /** Shows or hides the offcanvas from the user. */ + toggle(): void; + /** Shows the offcanvas to the user. */ + show(): void; + /** Hides the offcanvas from the user. */ + hide(): void; + /** + * Toggles on/off the `click` event listeners. + * + * @param self the `Offcanvas` instance + * @param add when *true*, listeners are added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Offcanvas` from the target element. */ + dispose(): void; +} + +declare interface OffcanvasOptions extends BaseOptions { + backdrop: boolean | "static"; + keyboard: boolean; +} + +/** Returns a new `Popover` instance. */ +export declare class Popover extends Tooltip { + static selector: string; + static init: (element: HTMLElement) => Popover; + static getInstance: (element: HTMLElement) => Popover | null; + static styleTip: (self: T) => void; + options: PopoverOptions; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): PopoverOptions; + show: () => void; +} + +declare interface PopoverOptions extends TooltipOptions { + title: string | HTMLElement; + content: string | HTMLElement; + btnClose: string | HTMLElement; + dismissible: boolean; +} + +/** + * Remove all BSN components for a target container. + * + * @param context parent `Node` + */ +export declare const removeDataAPI: (context?: ParentNode) => void; + +/** Returns a new `ScrollSpy` instance. */ +export declare class ScrollSpy extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => ScrollSpy; + static getInstance: (element: HTMLElement) => ScrollSpy | null; + options: ScrollSpyOptions; + target: HTMLElement | null; + scrollTarget: HTMLElement; + scrollTop: number; + maxScroll: number; + scrollHeight: number; + activeItem: HTMLElement | null; + items: HTMLElement[]; + targets: HTMLElement[]; + itemsLength: number; + offsets: number[]; + _observer: default_2; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): ScrollSpyOptions; + /** Updates all items. */ + refresh: () => void; + /** Removes `ScrollSpy` from the target element. */ + dispose(): void; +} + +declare interface ScrollSpyOptions extends BaseOptions { + offset: number; + target: HTMLElement | string | null; +} + +/** Creates a new `Tab` instance. */ +export declare class Tab extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Tab; + static getInstance: (element: HTMLElement) => Tab | null; + nav: HTMLElement | null; + content: HTMLElement | null; + tabContent: HTMLElement | null; + nextContent: HTMLElement | null; + dropdown: HTMLElement | null; + /** @param target the target element */ + constructor(target: HTMLElement | string); + /** + * Returns component name string. + */ + get name(): string; + /** Shows the tab to the user. */ + show(): void; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Tab` component from the target element. */ + dispose(): void; +} + +/** Creates a new `Toast` instance. */ +export declare class Toast extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Toast; + static getInstance: (element: HTMLElement) => Toast | null; + options: ToastOptions; + dismiss: HTMLElement | null; + triggers: HTMLElement[]; + relatedTarget: HTMLElement | null; + /** + * @param target the target `.toast` element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): { + animation: boolean; + autohide: boolean; + delay: number; + }; + /** + * Returns *true* when toast is visible. + */ + get isShown(): boolean; + /** Shows the toast. */ + show: () => void; + /** Hides the toast. */ + hide: () => void; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, it will add the listener + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Toast` component from the target element. */ + dispose(): void; +} + +declare interface ToastOptions extends BaseOptions { + animation: boolean; + autohide: boolean; + delay: number; +} + +/** Creates a new `Tooltip` instance. */ +export declare class Tooltip extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Tooltip; + static getInstance: (element: HTMLElement) => Tooltip | null; + static styleTip: (self: T) => void; + options: TooltipOptions; + btn?: HTMLElement; + tooltip?: HTMLElement; + container: ParentNode; + arrow?: HTMLElement; + offsetParent?: HTMLElement; + enabled: boolean; + id: string; + _observer: default_2; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): TooltipOptions; + /** Handles the focus event on iOS. */ + handleFocus: () => void; + /** Shows the tooltip. */ + handleShow: () => void; + show(): void; + /** Hides the tooltip. */ + handleHide: () => void; + hide(): void; + /** Updates the tooltip position. */ + update: () => void; + /** Toggles the tooltip visibility. */ + toggle: () => void; + /** Enables the tooltip. */ + enable(): void; + /** Disables the tooltip. */ + disable(): void; + /** Toggles the `disabled` property. */ + toggleEnabled(): void; + /** + * Handles the `touchstart` event listener for `Tooltip` + * + * @this {Tooltip} + * @param {TouchEvent} e the `Event` object + */ + handleTouch: ({ target }: TouchEvent) => void; + /** + * Toggles on/off the `Tooltip` event listeners. + * + * @param add when `true`, event listeners are added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Tooltip` from the target element. */ + dispose(): void; +} + +declare interface TooltipOptions extends BaseOptions { + template: string | HTMLElement; + title: string | HTMLElement; + customClass: string; + trigger: string; + placement: "top" | "bottom" | "left" | "right"; + sanitizeFn?: (str: string) => string; + animation: boolean; + delay: number; + content: string | HTMLElement; + dismissible: boolean; + btnClose: string | HTMLElement; +} + +export { } diff --git a/dist/bootstrap-native.js b/dist/bootstrap-native.js index 4406b1e7..bff96e7d 100644 --- a/dist/bootstrap-native.js +++ b/dist/bootstrap-native.js @@ -1,187 +1,2 @@ -var BSN=function(H){"use strict";var pr=Object.defineProperty;var ur=(H,it,lt)=>it in H?pr(H,it,{enumerable:!0,configurable:!0,writable:!0,value:lt}):H[it]=lt;var d=(H,it,lt)=>ur(H,typeof it!="symbol"?it+"":it,lt);const it="aria-describedby",lt="aria-expanded",re="aria-hidden",He="aria-modal",Fs="aria-pressed",Ze="aria-selected",qo="DOMContentLoaded",Je="focus",Ge="focusin",Rs="focusout",xe="keydown",Yo="keyup",_="click",Ws="mousedown",Uo="hover",Ae="mouseenter",Qe="mouseleave",Zo="pointerdown",Jo="pointermove",Go="pointerup",ts="touchstart",Qo="dragstart",ti='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',es="ArrowDown",ss="ArrowUp",js="ArrowLeft",Vs="ArrowRight",ns="Escape",ei="transitionDuration",si="transitionDelay",os="transitionend",zs="transitionProperty",ni=navigator.userAgentData,De=ni,{userAgent:oi}=navigator,ke=oi,Xs=/iPhone|iPad|iPod|Android/i;// istanbul ignore else @preserve -De?De.brands.some(t=>Xs.test(t.brand)):Xs.test(ke);const Ks=/(iPhone|iPod|iPad)/,ii=De?De.brands.some(t=>Ks.test(t.brand)):Ks.test(ke);ke&&ke.includes("Firefox");const{head:Ie}=document;["webkitPerspective","perspective"].some(t=>t in Ie.style);const qs=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},Ys=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},ci=(t,s,e,n)=>{const o=i=>{// istanbul ignore else @preserve -(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),Ys(t,s,o,n))};qs(t,s,o,n)},ae=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});// istanbul ignore next @preserve -ci(document,qo,ae,s)}catch{}return t})(),["webkitTransform","transform"].some(t=>t in Ie.style),["webkitAnimation","animation"].some(t=>t in Ie.style),["webkitTransition","transition"].some(t=>t in Ie.style);const et=(t,s)=>t.getAttribute(s),le=(t,s)=>t.hasAttribute(s),O=(t,s,e)=>t.setAttribute(s,e),Dt=(t,s)=>t.removeAttribute(s),f=(t,...s)=>{t.classList.add(...s)},b=(t,...s)=>{t.classList.remove(...s)},g=(t,s)=>t.classList.contains(s),de=t=>t!=null&&typeof t=="object"||!1,D=t=>de(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,y=t=>D(t)&&t.nodeType===1||!1,jt=new Map,kt={data:jt,set:(t,s,e)=>{if(!y(t))return;// istanbul ignore else @preserve -jt.has(s)||jt.set(s,new Map),jt.get(s).set(t,e)},getAllFor:t=>jt.get(t)||null,get:(t,s)=>{if(!y(t)||!s)return null;const e=kt.getAllFor(s);return t&&e&&e.get(t)||null},remove:(t,s)=>{const e=kt.getAllFor(s);if(!e||!y(t))return;e.delete(t);// istanbul ignore else @preserve -e.size===0&&jt.delete(s)}},V=(t,s)=>kt.get(t,s),he=t=>typeof t=="string"||!1,ri=t=>de(t)&&t.constructor.name==="Window"||!1,Us=t=>D(t)&&t.nodeType===9||!1,$=t=>ri(t)?t.document:Us(t)?t:D(t)?t.ownerDocument:globalThis.document,dt=(t,...s)=>Object.assign(t,...s),mt=t=>{if(!t)return;if(he(t))return $().createElement(t);const{tagName:s}=t,e=mt(s);if(!e)return;const n={...t};return delete n.tagName,dt(e,n)},E=(t,s)=>t.dispatchEvent(s),K=(t,s)=>{const e=getComputedStyle(t),n=s.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return e.getPropertyValue(n)},ai=t=>{const s=K(t,zs),e=K(t,si),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},fe=t=>{const s=K(t,zs),e=K(t,ei),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},k=(t,s)=>{let e=0;const n=new Event(os),o=fe(t),i=ai(t);if(o){const c=r=>{// istanbul ignore else @preserve -r.target===t&&(s.apply(t,[r]),t.removeEventListener(os,c),e=1)};t.addEventListener(os,c),setTimeout(()=>{// istanbul ignore next @preserve -e||E(t,n)},o+i+17)}else s.apply(t,[n])},ht=(t,s)=>t.focus(s),Zs=t=>["true",!0].includes(t)?!0:["false",!1].includes(t)?!1:["null","",null,void 0].includes(t)?null:t!==""&&!Number.isNaN(+t)?+t:t,Le=t=>Object.entries(t),Vt=t=>t.toLowerCase(),li=(t,s,e,n)=>{const o={...e},i={...t.dataset},c={...s},r={},l="title";return Le(i).forEach(([a,h])=>{const p=typeof a=="string"&&a.includes(n)?a.replace(n,"").replace(/[A-Z]/g,u=>Vt(u)):a;r[p]=Zs(h)}),Le(o).forEach(([a,h])=>{o[a]=Zs(h)}),Le(s).forEach(([a,h])=>{// istanbul ignore else @preserve -a in o?c[a]=o[a]:a in r?c[a]=r[a]:c[a]=a===l?et(t,l):h}),c},Js=t=>Object.keys(t),T=(t,s)=>{const e=new CustomEvent(t,{cancelable:!0,bubbles:!0});// istanbul ignore else @preserve -return de(s)&&dt(e,s),e},ge={passive:!0},It=t=>t.offsetHeight,I=(t,s)=>{Le(s).forEach(([e,n])=>{if(n&&he(e)&&e.includes("--"))t.style.setProperty(e,n);else{const o={};o[e]=n,dt(t.style,o)}})},is=t=>de(t)&&t.constructor.name==="Map"||!1,di=t=>typeof t=="number"||!1,vt=new Map,m={set:(t,s,e,n)=>{if(!y(t))return;// istanbul ignore else @preserve -if(n&&n.length){// istanbul ignore else @preserve -vt.has(t)||vt.set(t,new Map),vt.get(t).set(n,setTimeout(s,e))}else vt.set(t,setTimeout(s,e))},get:(t,s)=>{if(!y(t))return null;const e=vt.get(t);return s&&e&&is(e)?e.get(s)||null:di(e)?e:null},clear:(t,s)=>{if(!y(t))return;const e=vt.get(t);if(s&&s.length&&is(e)){clearTimeout(e.get(s)),e.delete(s);// istanbul ignore else @preserve -e.size===0&&vt.delete(t)}else clearTimeout(e),vt.delete(t)}},J=(t,s)=>(D(s)?s:$()).querySelectorAll(t),cs=new Map;function hi(t){const{shiftKey:s,code:e}=t,n=$(this),o=[...J(ti,this)].filter(r=>!le(r,"disabled")&&!et(r,re));if(!o.length)return;const i=o[0],c=o[o.length-1];// istanbul ignore else @preserve -e==="Tab"&&(s&&n.activeElement===i?(c.focus(),t.preventDefault()):!s&&n.activeElement===c&&(i.focus(),t.preventDefault()))}const fi=t=>cs.has(t)===!0,_e=t=>{const s=fi(t);(s?Ys:qs)(t,"keydown",hi),s?cs.delete(t):cs.set(t,!0)},pe=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:c,left:r}=t.getBoundingClientRect();let l=1,a=1;if(s&&y(t)){const{offsetWidth:h,offsetHeight:p}=t;l=h>0?Math.round(e)/h:1,a=p>0?Math.round(n)/p:1}return{width:e/l,height:n/a,top:o/a,right:i/l,bottom:c/a,left:r/l,x:r/l,y:o/a}},bt=t=>$(t).body,ct=t=>$(t).documentElement,Gs=t=>D(t)&&t.constructor.name==="ShadowRoot"||!1,gi=t=>t.nodeName==="HTML"?t:y(t)&&t.assignedSlot||D(t)&&t.parentNode||Gs(t)&&t.host||ct(t);let Qs=0,tn=0;const zt=new Map,en=(t,s)=>{let e=s?Qs:tn;if(s){const n=en(t),o=zt.get(n)||new Map;zt.has(n)||zt.set(n,o),is(o)&&!o.has(s)?(o.set(s,e),Qs+=1):e=o.get(s)}else{const n=t.id||t;zt.has(n)?e=zt.get(n):(zt.set(n,e),tn+=1)}return e},pi=t=>{var s;return t?Us(t)?t.defaultView:D(t)?(s=t==null?void 0:t.ownerDocument)==null?void 0:s.defaultView:t:window},ui=t=>Array.isArray(t)||!1,sn=t=>{if(!D(t))return!1;const{top:s,bottom:e}=pe(t),{clientHeight:n}=ct(t);return s<=n&&e>=0},mi=t=>typeof t=="function"||!1,vi=t=>de(t)&&t.constructor.name==="NodeList"||!1,wt=t=>ct(t).dir==="rtl",bi=t=>D(t)&&["TABLE","TD","TH"].includes(t.nodeName)||!1,N=(t,s)=>t?t.closest(s)||N(t.getRootNode().host,s):null,x=(t,s)=>y(t)?t:(D(s)?s:$()).querySelector(t),rs=(t,s)=>(D(s)?s:$()).getElementsByTagName(t),ft=(t,s)=>(s&&D(s)?s:$()).getElementsByClassName(t),nn=(t,s)=>t.matches(s),Xt={},on=t=>{const{type:s,currentTarget:e}=t;[...Xt[s]].forEach(([n,o])=>{/* istanbul ignore else @preserve */e===n&&[...o].forEach(([i,c])=>{i.apply(n,[t]),typeof c=="object"&&c.once&&F(n,s,i,c)})})},B=(t,s,e,n)=>{/* istanbul ignore else @preserve */Xt[s]||(Xt[s]=new Map);const o=Xt[s];/* istanbul ignore else @preserve */o.has(t)||o.set(t,new Map);const i=o.get(t),{size:c}=i;i.set(e,n);/* istanbul ignore else @preserve */c||t.addEventListener(s,on,n)},F=(t,s,e,n)=>{const o=Xt[s],i=o&&o.get(t),c=i&&i.get(e),r=c!==void 0?c:n;/* istanbul ignore else @preserve */i&&i.has(e)&&i.delete(e);/* istanbul ignore else @preserve */o&&(!i||!i.size)&&o.delete(t);/* istanbul ignore else @preserve */(!o||!o.size)&&delete Xt[s];/* istanbul ignore else @preserve */(!i||!i.size)&&t.removeEventListener(s,on,r)},R="fade",v="show",Oe="data-bs-dismiss",Ne="alert",cn="Alert",wi="5.0.15";class st{constructor(s,e){d(this,"_toggleEventListeners",()=>{});let n;try{if(y(s))n=s;else if(he(s)){n=x(s);// istanbul ignore else @preserve -if(!n)throw Error(`"${s}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(i){throw Error(`${this.name} Error: ${i.message}`)}const o=kt.get(n,this.name);// istanbul ignore else @preserve -o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Js(this.defaults).length?li(n,this.defaults,e||{},"bs"):{},kt.set(n,this.name,this)}get version(){return wi}get name(){return"BaseComponent"}get defaults(){return{}}dispose(){kt.remove(this.element,this.name),Js(this).forEach(s=>{delete this[s]})}}const $i=`.${Ne}`,Ei=`[${Oe}="${Ne}"]`,Ti=t=>V(t,cn),yi=t=>new Kt(t),rn=T(`close.bs.${Ne}`),Ci=T(`closed.bs.${Ne}`),an=t=>{const{element:s}=t;E(s,Ci),t._toggleEventListeners(),t.dispose(),s.remove()};class Kt extends st{constructor(e){super(e);d(this,"dismiss");d(this,"close",()=>{const{element:e}=this;// istanbul ignore else @preserve -e&&g(e,v)&&(E(e,rn),rn.defaultPrevented||(b(e,v),g(e,R)?k(e,()=>an(this)):an(this)))});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{dismiss:o,close:i}=this;// istanbul ignore else @preserve -o&&n(o,_,i)});this.dismiss=x(Ei,this.element),this._toggleEventListeners(!0)}get name(){return cn}dispose(){this._toggleEventListeners(),super.dispose()}}d(Kt,"selector",$i),d(Kt,"init",yi),d(Kt,"getInstance",Ti);const C="active",rt="data-bs-toggle",Si="button",ln="Button",Pi=`[${rt}="${Si}"]`,Hi=t=>V(t,ln),xi=t=>new qt(t);class qt extends st{constructor(e){super(e);d(this,"isActive",!1);d(this,"toggle",e=>{e&&e.preventDefault();const{element:n,isActive:o}=this;!g(n,"disabled")&&!et(n,"disabled")&&((o?b:f)(n,C),O(n,Fs,o?"false":"true"),this.isActive=g(n,C))});d(this,"_toggleEventListeners",e=>{(e?B:F)(this.element,_,this.toggle)});const{element:n}=this;this.isActive=g(n,C),O(n,Fs,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return ln}dispose(){this._toggleEventListeners(),super.dispose()}}d(qt,"selector",Pi),d(qt,"init",xi),d(qt,"getInstance",Hi);const as="data-bs-target",Lt="carousel",dn="Carousel",hn="data-bs-parent",Ai="data-bs-container",q=t=>{const s=[as,hn,Ai,"href"],e=$(t);return s.map(n=>{const o=et(t,n);return o?n===hn?N(t,o):x(o,e):null}).filter(n=>n)[0]},ue=`[data-bs-ride="${Lt}"]`,G=`${Lt}-item`,ls="data-bs-slide-to",$t="data-bs-slide",Et="paused",fn={pause:"hover",keyboard:!1,touch:!0,interval:5e3},gt=t=>V(t,dn),Di=t=>new Yt(t);let me=0,Me=0,ds=0;const hs=T(`slide.bs.${Lt}`),fs=T(`slid.bs.${Lt}`),gn=t=>{const{index:s,direction:e,element:n,slides:o,options:i}=t;// istanbul ignore else @preserve -if(t.isAnimating){const c=ps(t),r=e==="left"?"next":"prev",l=e==="left"?"start":"end";f(o[s],C),b(o[s],`${G}-${r}`),b(o[s],`${G}-${l}`),b(o[c],C),b(o[c],`${G}-${l}`),E(n,fs),m.clear(n,$t),t.cycle&&!$(n).hidden&&i.interval&&!t.isPaused&&t.cycle()}};function ki(){const t=gt(this);// istanbul ignore else @preserve -t&&!t.isPaused&&!m.get(this,Et)&&f(this,Et)}function Ii(){const t=gt(this);// istanbul ignore else @preserve -t&&t.isPaused&&!m.get(this,Et)&&t.cycle()}function Li(t){t.preventDefault();const s=N(this,ue)||q(this),e=gt(s);// istanbul ignore else @preserve -if(e&&!e.isAnimating){const n=+(et(this,ls)||0);// istanbul ignore else @preserve -this&&!g(this,C)&&!Number.isNaN(n)&&e.to(n)}}function _i(t){t.preventDefault();const s=N(this,ue)||q(this),e=gt(s);// istanbul ignore else @preserve -if(e&&!e.isAnimating){const n=et(this,$t);// istanbul ignore else @preserve -n==="next"?e.next():n==="prev"&&e.prev()}}const Oi=({code:t,target:s})=>{const e=$(s),[n]=[...J(ue,e)].filter(i=>sn(i)),o=gt(n);// istanbul ignore next @preserve -if(o&&!o.isAnimating&&!/textarea|input/i.test(s.nodeName)){const i=wt(n),c=i?js:Vs,r=i?Vs:js;// istanbul ignore else @preserve -t===r?o.prev():t===c&&o.next()}};function pn(t){const{target:s}=t,e=gt(this);// istanbul ignore next @preserve -e&&e.isTouch&&(e.indicator&&!e.indicator.contains(s)||!e.controls.includes(s))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())}function Ni(t){const{target:s}=t,e=gt(this);// istanbul ignore else @preserve -if(e&&!e.isAnimating&&!e.isTouch){const{controls:n,indicators:o}=e;// istanbul ignore else @preserve -if(![...n,...o].every(i=>i===s||i.contains(s))){me=t.pageX;// istanbul ignore else @preserve -this.contains(s)&&(e.isTouch=!0,un(e,!0))}}}const Mi=t=>{Me=t.pageX},Bi=t=>{var o;const{target:s}=t,e=$(s),n=[...J(ue,e)].map(i=>gt(i)).find(i=>i.isTouch);// istanbul ignore else @preserve -if(n){const{element:i,index:c}=n,r=wt(i);if(ds=t.pageX,n.isTouch=!1,un(n),!((o=e.getSelection())!=null&&o.toString().length)&&i.contains(s)&&Math.abs(me-ds)>120){// istanbul ignore else @preserve -Meme&&n.to(c+(r?1:-1))}me=0,Me=0,ds=0}},gs=(t,s)=>{const{indicators:e}=t;[...e].forEach(n=>b(n,C));// istanbul ignore else @preserve -t.indicators[s]&&f(e[s],C)},un=(t,s)=>{const{element:e}=t,n=s?B:F;n($(e),Jo,Mi,ge),n($(e),Go,Bi,ge)},ps=t=>{const{slides:s,element:e}=t,n=x(`.${G}.${C}`,e);return y(n)?[...s].indexOf(n):-1};class Yt extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const{element:n,options:o,slides:i,controls:c,indicators:r}=this,{touch:l,pause:a,interval:h,keyboard:p}=o,u=e?B:F;a&&h&&(u(n,Ae,ki),u(n,Qe,Ii)),l&&i.length>2&&(u(n,Zo,Ni,ge),u(n,ts,pn,{passive:!1}),u(n,Qo,pn,{passive:!1}));// istanbul ignore else @preserve -c.length&&c.forEach(S=>{// istanbul ignore else @preserve -S&&u(S,_,_i)});// istanbul ignore else @preserve -r.length&&r.forEach(S=>{u(S,_,Li)}),p&&u($(n),xe,Oi)});const{element:o}=this;this.direction=wt(o)?"right":"left",this.isTouch=!1,this.slides=ft(G,o);const{slides:i}=this;if(i.length>=2){const c=ps(this),r=[...i].find(h=>nn(h,`.${G}-next,.${G}-next`));this.index=c;const l=$(o);this.controls=[...J(`[${$t}]`,o),...J(`[${$t}][${as}="#${o.id}"]`,l)].filter((h,p,u)=>p===u.indexOf(h)),this.indicator=x(`.${Lt}-indicators`,o),this.indicators=[...this.indicator?J(`[${ls}]`,this.indicator):[],...J(`[${ls}][${as}="#${o.id}"]`,l)].filter((h,p,u)=>p===u.indexOf(h));const{options:a}=this;this.options.interval=a.interval===!0?fn.interval:a.interval;// istanbul ignore next @preserve - impossible to test -r?this.index=[...i].indexOf(r):c<0&&(this.index=0,f(i[0],C),this.indicators.length&&gs(this,0));// istanbul ignore else @preserve -this.indicators.length&&gs(this,this.index),this._toggleEventListeners(!0),a.interval&&this.cycle()}}get name(){return dn}get defaults(){return fn}get isPaused(){return g(this.element,Et)}get isAnimating(){return x(`.${G}-next,.${G}-prev`,this.element)!==null}cycle(){const{element:e,options:n,isPaused:o,index:i}=this;m.clear(e,Lt),o&&(m.clear(e,Et),b(e,Et)),m.set(e,()=>{// istanbul ignore else @preserve -this.element&&!this.isPaused&&!this.isTouch&&sn(e)&&this.to(i+1)},n.interval,Lt)}pause(){const{element:e,options:n}=this;// istanbul ignore else @preserve -!this.isPaused&&n.interval&&(f(e,Et),m.set(e,()=>{},1,Et))}next(){// istanbul ignore else @preserve -this.isAnimating||this.to(this.index+1)}prev(){// istanbul ignore else @preserve -this.isAnimating||this.to(this.index-1)}to(e){const{element:n,slides:o,options:i}=this,c=ps(this),r=wt(n);let l=e;if(!this.isAnimating&&c!==l&&!m.get(n,$t)){// istanbul ignore else @preserve -cl||c===o.length-1&&l===0)&&(this.direction=r?"left":"right");const{direction:a}=this;l<0?l=o.length-1:l>=o.length&&(l=0);const h=a==="left"?"next":"prev",p=a==="left"?"start":"end",u={relatedTarget:o[l],from:c,to:l,direction:a};dt(hs,u),dt(fs,u),E(n,hs),hs.defaultPrevented||(this.index=l,gs(this,l),fe(o[l])&&g(n,"slide")?m.set(n,()=>{f(o[l],`${G}-${h}`),It(o[l]),f(o[l],`${G}-${p}`),f(o[c],`${G}-${p}`),k(o[l],()=>this.slides&&this.slides.length&&gn(this))},0,$t):(f(o[l],C),b(o[c],C),m.set(n,()=>{m.clear(n,$t);// istanbul ignore else @preserve -n&&i.interval&&!this.isPaused&&this.cycle(),E(n,fs)},0,$t)))}}dispose(){const{isAnimating:e}=this,n={...this,isAnimating:e};this._toggleEventListeners(),super.dispose();// istanbul ignore next @preserve - impossible to test in playwright -n.isAnimating&&k(n.slides[n.index],()=>{gn(n)})}}d(Yt,"selector",ue),d(Yt,"init",Di),d(Yt,"getInstance",gt);const _t="collapsing",Y="collapse",mn="Collapse",Fi=`.${Y}`,vn=`[${rt}="${Y}"]`,Ri={parent:null},Be=t=>V(t,mn),Wi=t=>new Ut(t),bn=T(`show.bs.${Y}`),ji=T(`shown.bs.${Y}`),wn=T(`hide.bs.${Y}`),Vi=T(`hidden.bs.${Y}`),zi=t=>{const{element:s,parent:e,triggers:n}=t;E(s,bn),bn.defaultPrevented||(m.set(s,ae,17),e&&m.set(e,ae,17),f(s,_t),b(s,Y),I(s,{height:`${s.scrollHeight}px`}),k(s,()=>{m.clear(s),e&&m.clear(e),n.forEach(o=>O(o,lt,"true")),b(s,_t),f(s,Y),f(s,v),I(s,{height:""}),E(s,ji)}))},$n=t=>{const{element:s,parent:e,triggers:n}=t;E(s,wn),wn.defaultPrevented||(m.set(s,ae,17),e&&m.set(e,ae,17),I(s,{height:`${s.scrollHeight}px`}),b(s,Y),b(s,v),f(s,_t),It(s),I(s,{height:"0px"}),k(s,()=>{m.clear(s);// istanbul ignore else @preserve -e&&m.clear(e),n.forEach(o=>O(o,lt,"false")),b(s,_t),f(s,Y),I(s,{height:""}),E(s,Vi)}))},Xi=t=>{const{target:s}=t,e=s&&N(s,vn),n=e&&q(e),o=n&&Be(n);// istanbul ignore else @preserve -o&&o.toggle(),e&&e.tagName==="A"&&t.preventDefault()};class Ut extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?B:F,{triggers:o}=this;// istanbul ignore else @preserve -o.length&&o.forEach(i=>n(i,_,Xi))});const{element:o,options:i}=this,c=$(o);this.triggers=[...J(vn,c)].filter(r=>q(r)===o),this.parent=y(i.parent)?i.parent:he(i.parent)?q(o)||x(i.parent,c):null,this._toggleEventListeners(!0)}get name(){return mn}get defaults(){return Ri}hide(){const{triggers:e,element:n}=this;// istanbul ignore else @preserve -if(!m.get(n)){$n(this);// istanbul ignore else @preserve -e.length&&e.forEach(o=>f(o,`${Y}d`))}}show(){const{element:e,parent:n,triggers:o}=this;let i,c;if(n&&(i=[...J(`.${Y}.${v}`,n)].find(r=>Be(r)),c=i&&Be(i)),(!n||!m.get(n))&&!m.get(e)){c&&i!==e&&($n(c),c.triggers.forEach(r=>{f(r,`${Y}d`)})),zi(this);// istanbul ignore else @preserve -o.length&&o.forEach(r=>b(r,`${Y}d`))}}toggle(){g(this.element,v)?this.hide():this.show()}dispose(){this._toggleEventListeners(),super.dispose()}}d(Ut,"selector",Fi),d(Ut,"init",Wi),d(Ut,"getInstance",Be);const Ot=["dropdown","dropup","dropstart","dropend"],En="Dropdown",Tn="dropdown-menu",yn=t=>{const s=N(t,"A");return t.tagName==="A"&&le(t,"href")&&et(t,"href").slice(-1)==="#"||s&&le(s,"href")&&et(s,"href").slice(-1)==="#"},[nt,us,ms,vs]=Ot,Cn=`[${rt}="${nt}"]`,Zt=t=>V(t,En),Ki=t=>new Jt(t),qi=`${Tn}-end`,Sn=[nt,us],Pn=[ms,vs],Hn=["A","BUTTON"],Yi={offset:5,display:"dynamic"},bs=T(`show.bs.${nt}`),xn=T(`shown.bs.${nt}`),ws=T(`hide.bs.${nt}`),An=T(`hidden.bs.${nt}`),Dn=T(`updated.bs.${nt}`),kn=t=>{const{element:s,menu:e,parentElement:n,options:o}=t,{offset:i}=o;// istanbul ignore else @preserve: this test requires a navbar -if(K(e,"position")!=="static"){const c=wt(s),r=g(e,qi);["margin","top","bottom","left","right"].forEach(M=>{const Ht={};Ht[M]="",I(e,Ht)});let a=Ot.find(M=>g(n,M))||nt;const h={dropdown:[i,0,0],dropup:[0,0,i],dropstart:c?[-1,0,0,i]:[-1,i,0],dropend:c?[-1,i,0]:[-1,0,0,i]},p={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:c?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:c?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:c?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:c?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:u,offsetHeight:S}=e,{clientWidth:z,clientHeight:w}=ct(s),{left:W,top:j,width:oe,height:ut}=pe(s),P=W-u-i<0,ot=W+u+oe+i>=z,at=j+S+i>=w,X=j+S+ut+i>=w,U=j-S-i<0,A=(!c&&r||c&&!r)&&W+oe-u<0,ie=(c&&r||!c&&!r)&&W+u>=z;if(Pn.includes(a)&&P&&ot&&(a=nt),a===ms&&(c?ot:P)&&(a=vs),a===vs&&(c?P:ot)&&(a=ms),a===us&&U&&!X&&(a=nt),a===nt&&X&&!U&&(a=us),Pn.includes(a)&&at&&dt(p[a],{top:"auto",bottom:0}),Sn.includes(a)&&(A||ie)){let M={left:"auto",right:"auto"};// istanbul ignore else @preserve -!A&&ie&&!c&&(M={left:"auto",right:0});// istanbul ignore else @preserve -A&&!ie&&c&&(M={left:0,right:"auto"});// istanbul ignore else @preserve -M&&dt(p[a],M)}const Pt=h[a];if(I(e,{...p[a],margin:`${Pt.map(M=>M&&`${M}px`).join(" ")}`}),Sn.includes(a)&&r){// istanbul ignore else @preserve -r&&I(e,p[!c&&A||c&&ie?"menuStart":"menuEnd"])}E(n,Dn)}},Ui=t=>[...t.children].map(s=>{if(s&&Hn.includes(s.tagName))return s;const{firstElementChild:e}=s;return e&&Hn.includes(e.tagName)?e:null}).filter(s=>s),In=t=>{const{element:s,options:e,menu:n}=t,o=t.open?B:F,i=$(s);o(i,_,Ln),o(i,Je,Ln),o(i,xe,Ji),o(i,Yo,Gi);// istanbul ignore else @preserve -e.display==="dynamic"&&(t.open?t._observer.observe(n):t._observer.disconnect())},Fe=t=>{const s=[...Ot,"btn-group","input-group"].map(e=>ft(`${e} ${v}`,$(t))).find(e=>e.length);if(s&&s.length)return[...s[0].children].find(e=>Ot.some(n=>n===et(e,rt)))},Ln=t=>{const{target:s,type:e}=t;// istanbul ignore else @preserve -if(s&&y(s)){const n=Fe(s),o=n&&Zt(n);// istanbul ignore else @preserve -if(o){const{parentElement:i,menu:c}=o,r=i&&i.contains(s)&&(s.tagName==="form"||N(s,"form")!==null);[_,Ws].includes(e)&&yn(s)&&t.preventDefault();// istanbul ignore else @preserve -!r&&e!==Je&&s!==n&&s!==c&&o.hide()}}},Zi=t=>{const{target:s}=t,e=s&&N(s,Cn),n=e&&Zt(e);// istanbul ignore else @preserve -if(n){t.stopPropagation(),n.toggle();// istanbul ignore else @preserve -e&&yn(e)&&t.preventDefault()}},Ji=t=>{// istanbul ignore else @preserve -[es,ss].includes(t.code)&&t.preventDefault()};function Gi(t){const{code:s}=t,e=Fe(this),n=e&&Zt(e),{activeElement:o}=e&&$(e);// istanbul ignore else @preserve -if(n&&o){const{menu:i,open:c}=n,r=Ui(i);if(r&&r.length&&[es,ss].includes(s)){let l=r.indexOf(o);// istanbul ignore else @preserve -o===e?l=0:s===ss?l=l>1?l-1:0:s===es&&(l=l{(e?B:F)(this.element,_,Zi)});const{parentElement:o}=this.element,[i]=ft(Tn,o);i&&(this.parentElement=o,this.menu=i,this._observer=new IntersectionObserver(([c])=>Qi(c.target),{threshold:1}),this._toggleEventListeners(!0))}get name(){return En}get defaults(){return Yi}toggle(){this.open?this.hide():this.show()}show(){const{element:e,open:n,menu:o,parentElement:i}=this;// istanbul ignore else @preserve -if(!n){const c=Fe(e),r=c&&Zt(c);r&&r.hide(),[bs,xn,Dn].forEach(l=>{l.relatedTarget=e}),E(i,bs),bs.defaultPrevented||(f(o,v),f(i,v),O(e,lt,"true"),kn(this),this.open=!n,ht(e),In(this),E(i,xn))}}hide(){const{element:e,open:n,menu:o,parentElement:i}=this;// istanbul ignore else @preserve -n&&([ws,An].forEach(c=>{c.relatedTarget=e}),E(i,ws),ws.defaultPrevented||(b(o,v),b(i,v),O(e,lt,"false"),this.open=!n,In(this),E(i,An)))}dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}d(Jt,"selector",Cn),d(Jt,"init",Ki),d(Jt,"getInstance",Zt);const Z="modal",$s="Modal",Es="Offcanvas",tc="fixed-top",ec="fixed-bottom",_n="sticky-top",On="position-sticky",Nn=t=>[...ft(tc,t),...ft(ec,t),...ft(_n,t),...ft(On,t),...ft("is-fixed",t)],sc=t=>{const s=bt(t);I(s,{paddingRight:"",overflow:""});const e=Nn(s);// istanbul ignore else @preserve -e.length&&e.forEach(n=>{I(n,{paddingRight:"",marginRight:""})})},Mn=t=>{const{clientWidth:s}=ct(t),{innerWidth:e}=pi(t);return Math.abs(e-s)},Bn=(t,s)=>{const e=bt(t),n=parseInt(K(e,"paddingRight"),10),i=K(e,"overflow")==="hidden"&&n?0:Mn(t),c=Nn(e);// istanbul ignore else @preserve -if(s){I(e,{overflow:"hidden",paddingRight:`${n+i}px`});// istanbul ignore else @preserve -c.length&&c.forEach(r=>{const l=K(r,"paddingRight");r.style.paddingRight=`${parseInt(l,10)+i}px`;// istanbul ignore else @preserve -if([_n,On].some(a=>g(r,a))){const a=K(r,"marginRight");r.style.marginRight=`${parseInt(a,10)-i}px`}})}},Q="offcanvas",Tt=mt({tagName:"div",className:"popup-container"}),Fn=(t,s)=>{const e=D(s)&&s.nodeName==="BODY",n=D(s)&&!e?s:Tt,o=e?s:bt(t);// istanbul ignore else @preserve -D(t)&&(n===Tt&&o.append(Tt),n.append(t))},Rn=(t,s)=>{const e=D(s)&&s.nodeName==="BODY",n=D(s)&&!e?s:Tt;// istanbul ignore else @preserve -D(t)&&(t.remove(),n===Tt&&!Tt.children.length&&Tt.remove())},Ts=(t,s)=>{const e=D(s)&&s.nodeName!=="BODY"?s:Tt;return D(t)&&e.contains(t)},Wn="backdrop",jn=`${Z}-${Wn}`,Vn=`${Q}-${Wn}`,zn=`.${Z}.${v}`,ys=`.${Q}.${v}`,L=mt("div"),Nt=t=>x(`${zn},${ys}`,$(t)),Cs=t=>{const s=t?jn:Vn;[jn,Vn].forEach(e=>{b(L,e)}),f(L,s)},Xn=(t,s,e)=>{Cs(e),Fn(L,bt(t)),s&&f(L,R)},Kn=()=>{g(L,v)||(f(L,v),It(L))},Re=()=>{b(L,v)},qn=t=>{Nt(t)||(b(L,R),Rn(L,bt(t)),sc(t))},Yn=t=>y(t)&&K(t,"visibility")!=="hidden"&&t.offsetParent!==null,nc=`.${Z}`,Un=`[${rt}="${Z}"]`,oc=`[${Oe}="${Z}"]`,Zn=`${Z}-static`,ic={backdrop:!0,keyboard:!0},ve=t=>V(t,$s),cc=t=>new Gt(t),We=T(`show.bs.${Z}`),Jn=T(`shown.bs.${Z}`),Ss=T(`hide.bs.${Z}`),Gn=T(`hidden.bs.${Z}`),Qn=t=>{const{element:s}=t,e=Mn(s),{clientHeight:n,scrollHeight:o}=ct(s),{clientHeight:i,scrollHeight:c}=s,r=i!==c;// istanbul ignore next @preserve: impossible to test? -if(!r&&e){const a={[wt(s)?"paddingLeft":"paddingRight"]:`${e}px`};I(s,a)}Bn(s,r||n!==o)},to=(t,s)=>{const e=s?B:F,{element:n}=t;e(n,_,lc),e($(n),xe,ac),s?t._observer.observe(n):t._observer.disconnect()},eo=t=>{const{triggers:s,element:e,relatedTarget:n}=t;qn(e),I(e,{paddingRight:"",display:""}),to(t);const o=We.relatedTarget||s.find(Yn);// istanbul ignore else @preserve -o&&ht(o),Gn.relatedTarget=n,E(e,Gn),_e(e)},so=t=>{const{element:s,relatedTarget:e}=t;ht(s),to(t,!0),Jn.relatedTarget=e,E(s,Jn),_e(s)},no=t=>{const{element:s,hasFade:e}=t;I(s,{display:"block"}),Qn(t);// istanbul ignore else @preserve -Nt(s)||I(bt(s),{overflow:"hidden"}),f(s,v),Dt(s,re),O(s,He,"true"),e?k(s,()=>so(t)):so(t)},oo=t=>{const{element:s,options:e,hasFade:n}=t;e.backdrop&&n&&g(L,v)&&!Nt(s)?(Re(),k(L,()=>eo(t))):eo(t)},rc=t=>{const{target:s}=t,e=s&&N(s,Un),n=e&&q(e),o=n&&ve(n);// istanbul ignore else @preserve -if(o){// istanbul ignore else @preserve -e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.toggle()}},ac=({code:t,target:s})=>{const e=x(zn,$(s)),n=e&&ve(e);// istanbul ignore else @preserve -if(n){const{options:o}=n;// istanbul ignore else @preserve -o.keyboard&&t===ns&&g(e,v)&&(n.relatedTarget=null,n.hide())}},lc=t=>{var n,o;const{currentTarget:s}=t,e=s&&ve(s);// istanbul ignore else @preserve -if(e&&s&&!m.get(s)){const{options:i,isStatic:c,modalDialog:r}=e,{backdrop:l}=i,{target:a}=t,h=(o=(n=$(s))==null?void 0:n.getSelection())==null?void 0:o.toString().length,p=r.contains(a),u=a&&N(a,oc);// istanbul ignore else @preserve -c&&!p?m.set(s,()=>{f(s,Zn),k(r,()=>dc(e))},17):(u||!h&&!c&&!p&&l)&&(e.relatedTarget=u||null,e.hide(),t.preventDefault())}},dc=t=>{const{element:s,modalDialog:e}=t,n=(fe(e)||0)+17;b(s,Zn),m.set(s,()=>m.clear(s),n)};class Gt extends st{constructor(e,n){super(e,n);d(this,"update",()=>{// istanbul ignore else @preserve -g(this.element,v)&&Qn(this)});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{triggers:o}=this;// istanbul ignore else @preserve -o.length&&o.forEach(i=>n(i,_,rc))});const{element:o}=this,i=x(`.${Z}-dialog`,o);// istanbul ignore else @preserve -i&&(this.modalDialog=i,this.triggers=[...J(Un,$(o))].filter(c=>q(c)===o),this.isStatic=this.options.backdrop==="static",this.hasFade=g(o,R),this.relatedTarget=null,this._observer=new ResizeObserver(()=>this.update()),this._toggleEventListeners(!0))}get name(){return $s}get defaults(){return ic}toggle(){g(this.element,v)?this.hide():this.show()}show(){const{element:e,options:n,hasFade:o,relatedTarget:i}=this,{backdrop:c}=n;let r=0;// istanbul ignore else @preserve -if(!g(e,v)&&(We.relatedTarget=i||void 0,E(e,We),!We.defaultPrevented)){const l=Nt(e);// istanbul ignore else @preserve -if(l&&l!==e){const a=ve(l)||V(l,Es);// istanbul ignore else @preserve -a&&a.hide()}if(c)Ts(L)?Cs(!0):Xn(e,o,!0),r=fe(L),Kn(),setTimeout(()=>no(this),r);else{no(this);// istanbul ignore else @preserve -l&&g(L,v)&&Re()}}}hide(){const{element:e,hasFade:n,relatedTarget:o}=this;// istanbul ignore else @preserve -if(g(e,v)){Ss.relatedTarget=o||void 0,E(e,Ss);// istanbul ignore else @preserve -Ss.defaultPrevented||(b(e,v),O(e,re,"true"),Dt(e,He),n?k(e,()=>oo(this)):oo(this))}}dispose(){const e={...this},{modalDialog:n,hasFade:o}=e,i=()=>setTimeout(()=>super.dispose(),17);this.hide(),this._toggleEventListeners(),o?k(n,i):i()}}d(Gt,"selector",nc),d(Gt,"init",cc),d(Gt,"getInstance",ve);const hc=`.${Q}`,Ps=`[${rt}="${Q}"]`,fc=`[${Oe}="${Q}"]`,je=`${Q}-toggling`,gc={backdrop:!0,keyboard:!0,scroll:!1},be=t=>V(t,Es),pc=t=>new Qt(t),Ve=T(`show.bs.${Q}`),io=T(`shown.bs.${Q}`),Hs=T(`hide.bs.${Q}`),co=T(`hidden.bs.${Q}`),uc=t=>{const{element:s}=t,{clientHeight:e,scrollHeight:n}=ct(s);Bn(s,e!==n)},ro=(t,s)=>{const e=s?B:F,n=$(t.element);e(n,xe,wc),e(n,_,bc)},ao=t=>{const{element:s,options:e}=t;// istanbul ignore else @preserve -e.scroll||(uc(t),I(bt(s),{overflow:"hidden"})),f(s,je),f(s,v),I(s,{visibility:"visible"}),k(s,()=>$c(t))},mc=t=>{const{element:s,options:e}=t,n=Nt(s);s.blur(),!n&&e.backdrop&&g(L,v)&&Re(),k(s,()=>Ec(t))},vc=t=>{const s=N(t.target,Ps),e=s&&q(s),n=e&&be(e);// istanbul ignore else @preserve -if(n){n.relatedTarget=s,n.toggle();// istanbul ignore else @preserve -s&&s.tagName==="A"&&t.preventDefault()}},bc=t=>{const{target:s}=t,e=x(ys,$(s)),n=x(fc,e),o=e&&be(e);// istanbul ignore else @preserve -if(o){const{options:i,triggers:c}=o,{backdrop:r}=i,l=N(s,Ps),a=$(e).getSelection();// istanbul ignore else: a filter is required here @preserve -if(!L.contains(s)||r!=="static"){// istanbul ignore else @preserve -!(a&&a.toString().length)&&(!e.contains(s)&&r&&(!l||c.includes(s))||n&&n.contains(s))&&(o.relatedTarget=n&&n.contains(s)?n:null,o.hide());// istanbul ignore next @preserve -l&&l.tagName==="A"&&t.preventDefault()}}},wc=({code:t,target:s})=>{const e=x(ys,$(s)),n=e&&be(e);// istanbul ignore else @preserve -if(n){// istanbul ignore else @preserve -n.options.keyboard&&t===ns&&(n.relatedTarget=null,n.hide())}},$c=t=>{const{element:s}=t;b(s,je),Dt(s,re),O(s,He,"true"),O(s,"role","dialog"),E(s,io),ro(t,!0),ht(s),_e(s)},Ec=t=>{const{element:s,triggers:e}=t;O(s,re,"true"),Dt(s,He),Dt(s,"role"),I(s,{visibility:""});const n=Ve.relatedTarget||e.find(Yn);// istanbul ignore else @preserve -n&&ht(n),qn(s),E(s,co),b(s,je),_e(s),Nt(s)||ro(t)};class Qt extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?B:F;this.triggers.forEach(o=>n(o,_,vc))});const{element:o}=this;this.triggers=[...J(Ps,$(o))].filter(i=>q(i)===o),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return Es}get defaults(){return gc}toggle(){g(this.element,v)?this.hide():this.show()}show(){const{element:e,options:n,relatedTarget:o}=this;let i=0;if(!g(e,v)&&(Ve.relatedTarget=o||void 0,io.relatedTarget=o||void 0,E(e,Ve),!Ve.defaultPrevented)){const c=Nt(e);if(c&&c!==e){const r=be(c)||V(c,$s);// istanbul ignore else @preserve -r&&r.hide()}if(n.backdrop)Ts(L)?Cs():Xn(e,!0),i=fe(L),Kn(),setTimeout(()=>ao(this),i);else{ao(this);// istanbul ignore next @preserve - this test was done on Modal -c&&g(L,v)&&Re()}}}hide(){const{element:e,relatedTarget:n}=this;g(e,v)&&(Hs.relatedTarget=n||void 0,co.relatedTarget=n||void 0,E(e,Hs),Hs.defaultPrevented||(f(e,je),b(e,v),mc(this)))}dispose(){const{element:e}=this,n=g(e,v),o=()=>setTimeout(()=>super.dispose(),1);if(this.hide(),this._toggleEventListeners(),n){k(e,o);// istanbul ignore next @preserve -}else o()}}d(Qt,"selector",hc),d(Qt,"init",pc),d(Qt,"getInstance",be);const Mt="popover",ze="Popover",pt="tooltip",lo=t=>{const s=t===pt,e=s?`${t}-inner`:`${t}-body`,n=s?"":`

`,o=`
`,i=`
`;return`
${n+o+i}
`},ho={top:"top",bottom:"bottom",left:"start",right:"end"},xs=t=>{const s=/\b(top|bottom|start|end)+/,{element:e,tooltip:n,container:o,options:i,arrow:c}=t;// istanbul ignore else @preserve -if(n){const r={...ho},l=wt(e);I(n,{top:"",left:"",right:"",bottom:""});const a=t.name===ze,{offsetWidth:h,offsetHeight:p}=n,{clientWidth:u,clientHeight:S,offsetWidth:z}=ct(e);let{placement:w}=i;const{clientWidth:W,offsetWidth:j}=o,ut=K(o,"position")==="fixed",P=Math.abs(ut?W-j:u-z),ot=l&&ut?P:0,at=u-(l?0:P)-1,{width:X,height:U,left:A,right:ie,top:Pt}=pe(e,!0),{x:M,y:Ht}={x:A,y:Pt};I(c,{top:"",left:"",right:"",bottom:""});let Rt=0,Te="",xt=0,Os="",ce="",Ye="",Ns="";const Wt=c.offsetWidth||0,At=c.offsetHeight||0,Ms=Wt/2;let ye=Pt-p-At<0,Ce=Pt+p+U+At>=S,Se=A-h-Wt=at;const Ue=["left","right"],Bs=["top","bottom"];ye=Ue.includes(w)?Pt+U/2-p/2-At<0:ye,Ce=Ue.includes(w)?Pt+p/2+U/2+At>=S:Ce,Se=Bs.includes(w)?A+X/2-h/2=at:Pe,w=Ue.includes(w)&&Se&&Pe?"top":w,w=w==="top"&&ye?"bottom":w,w=w==="bottom"&&Ce?"top":w,w=w==="left"&&Se?"right":w,w=w==="right"&&Pe?"left":w,n.className.includes(w)||(n.className=n.className.replace(s,r[w]));// istanbul ignore else @preserve -Ue.includes(w)?(w==="left"?xt=M-h-(a?Wt:0):xt=M+X+(a?Wt:0),ye&&Ce?(Rt=0,Te=0,ce=Pt+U/2-At/2):ye?(Rt=Ht,Te="",ce=U/2-Wt):Ce?(Rt=Ht-p+U,Te="",ce=p-U/2-Wt):(Rt=Ht-p/2+U/2,ce=p/2-At/2)):Bs.includes(w)&&(w==="top"?Rt=Ht-p-(a?At:0):Rt=Ht+U+(a?At:0),Se?(xt=0,Ye=M+X/2-Ms):Pe?(xt="auto",Os=0,Ns=X/2+at-ie-Ms):(xt=M-h/2+X/2,Ye=h/2-Ms)),I(n,{top:`${Rt}px`,bottom:Te===""?"":`${Te}px`,left:xt==="auto"?xt:`${xt}px`,right:Os!==""?`${Os}px`:""});// istanbul ignore else @preserve -y(c)&&(ce!==""&&(c.style.top=`${ce}px`),Ye!==""?c.style.left=`${Ye}px`:Ns!==""&&(c.style.right=`${Ns}px`));const gr=T(`updated.bs.${Vt(t.name)}`);E(e,gr)}},As={template:lo(pt),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""};var Tc=Object.defineProperty,yc=(t,s,e)=>s in t?Tc(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,yt=(t,s,e)=>yc(t,typeof s!="symbol"?s+"":s,e);const Cc="DOMContentLoaded",Sc=navigator.userAgentData,Xe=Sc,{userAgent:Pc}=navigator,Ke=Pc,fo=/iPhone|iPad|iPod|Android/i;// istanbul ignore else @preserve -Xe?Xe.brands.some(t=>fo.test(t.brand)):fo.test(Ke);const go=/(iPhone|iPod|iPad)/;Xe?Xe.brands.some(t=>go.test(t.brand)):go.test(Ke),Ke&&Ke.includes("Firefox");const{head:qe}=document;["webkitPerspective","perspective"].some(t=>t in qe.style);const Hc=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},xc=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},Ac=(t,s,e,n)=>{const o=i=>{// istanbul ignore else @preserve -(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),xc(t,s,o,n))};Hc(t,s,o,n)},Dc=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});// istanbul ignore next @preserve -Ac(document,Cc,Dc,s)}catch{}return t})(),["webkitTransform","transform"].some(t=>t in qe.style),["webkitAnimation","animation"].some(t=>t in qe.style),["webkitTransition","transition"].some(t=>t in qe.style);const kc=t=>t!=null&&typeof t=="object"||!1,Ic=t=>kc(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,Lc=t=>Ic(t)&&t.nodeType===1||!1,po=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:c,left:r}=t.getBoundingClientRect();let l=1,a=1;return{width:e/l,height:n/a,top:o/a,right:i/l,bottom:c/a,left:r/l,x:r/l,y:o/a}},_c=t=>typeof t=="function"||!1,uo="PositionObserver Error";class mo{constructor(s,e){if(yt(this,"entries"),yt(this,"_tick"),yt(this,"_root"),yt(this,"_callback"),yt(this,"observe",n=>{if(!Lc(n))throw new Error(`${uo}: ${n} is not an instance of HTMLElement.`);const{clientWidth:o,clientHeight:i}=this._root,c=po(n),{left:r,top:l,bottom:a,right:h,width:p,height:u}=c,S=l>1-u&&r>1-p&&a<=i+u-1&&h<=o+p-1;this.entries.push({target:n,boundingBox:c,isVisible:S}),this._tick=requestAnimationFrame(this._runCallback)}),yt(this,"unobserve",n=>{const o=this.entries.findIndex(i=>i.target===n);this.entries.splice(o,1)}),yt(this,"_runCallback",()=>{/* istanbul ignore if @preserve - a guard must be set */if(!this.entries.length)return;const n=[],{clientWidth:o,clientHeight:i}=this._root;this.entries.forEach((c,r)=>{const{target:l,boundingBox:a}=c,h=po(l),{left:p,top:u,bottom:S,right:z,width:w,height:W}=h;if(a.left!==p||a.top!==u||a.right!==z||a.bottom!==S){const j=u>1-W&&p>1-w&&S<=i+W-1&&z<=o+w-1;this.entries[r].boundingBox=h,this.entries[r].isVisible=j,n.push({target:l,boundingBox:h,isVisible:j})}}),n.length&&this._callback(n),requestAnimationFrame(this._runCallback)}),yt(this,"disconnect",()=>{cancelAnimationFrame(this._tick),this.entries.length=0,this._tick=0}),!_c(s))throw new Error(`${uo}: ${s} is not a function.`);this.entries=[],this._callback=s,this._root=(e==null?void 0:e.root)||(document==null?void 0:document.documentElement),this._tick=0}}const vo="data-original-title",Bt="Tooltip",Ct=(t,s,e)=>{// istanbul ignore else @preserve -if(he(s)&&s.length){let n=s.trim();mi(e)&&(n=e(n));const i=new DOMParser().parseFromString(n,"text/html");t.append(...i.body.childNodes)}else y(s)?t.append(s):(vi(s)||ui(s)&&s.every(D))&&t.append(...s)},Oc=t=>{const s=t.name===Bt,{id:e,element:n,options:o}=t,{title:i,placement:c,template:r,animation:l,customClass:a,sanitizeFn:h,dismissible:p,content:u,btnClose:S}=o,z=s?pt:Mt,w={...ho};let W=[],j=[];wt(n)&&(w.left="end",w.right="start");const oe=`bs-${z}-${w[c]}`;let ut;if(y(r))ut=r;else{const ot=mt("div");Ct(ot,r,h),ut=ot.firstChild}t.tooltip=y(ut)?ut.cloneNode(!0):void 0;const{tooltip:P}=t;// istanbul ignore else @preserve -if(P){O(P,"id",e),O(P,"role",pt);const ot=s?`${pt}-inner`:`${Mt}-body`,at=s?null:x(`.${Mt}-header`,P),X=x(`.${ot}`,P);t.arrow=x(`.${z}-arrow`,P);const{arrow:U}=t;if(y(i))W=[i.cloneNode(!0)];else{const A=mt("div");Ct(A,i,h),W=[...A.childNodes]}if(y(u))j=[u.cloneNode(!0)];else{const A=mt("div");Ct(A,u,h),j=[...A.childNodes]}if(p)if(i)if(y(S))W=[...W,S.cloneNode(!0)];else{const A=mt("div");Ct(A,S,h),W=[...W,A.firstChild]}else{// istanbul ignore else @preserve -if(at&&at.remove(),y(S))j=[...j,S.cloneNode(!0)];else{const A=mt("div");Ct(A,S,h),j=[...j,A.firstChild]}}// istanbul ignore else @preserve -if(s)i&&X&&Ct(X,i,h);else{// istanbul ignore else @preserve -i&&at&&Ct(at,W,h);// istanbul ignore else @preserve -u&&X&&Ct(X,j,h),t.btn=x(".btn-close",P)||void 0}f(P,"position-fixed"),f(U,"position-absolute");// istanbul ignore else @preserve -g(P,z)||f(P,z);// istanbul ignore else @preserve -l&&!g(P,R)&&f(P,R);// istanbul ignore else @preserve -a&&!g(P,a)&&f(P,a);// istanbul ignore else @preserve -g(P,oe)||f(P,oe)}},Nc=t=>{const s=["HTML","BODY"],e=[];let{parentNode:n}=t;for(;n&&!s.includes(n.nodeName);){n=gi(n);// istanbul ignore else @preserve -Gs(n)||bi(n)||e.push(n)}return e.find((o,i)=>K(o,"position")!=="relative"&&e.slice(i+1).every(c=>K(c,"position")==="static")?o:null)||$(t).body},Mc=`[${rt}="${pt}"],[data-tip="${pt}"]`,bo="title";let wo=t=>V(t,Bt);const Bc=t=>new St(t),Fc=t=>{const{element:s,tooltip:e,container:n,offsetParent:o}=t;Dt(s,it),Rn(e,n===o?n:o)},we=t=>{const{tooltip:s,container:e,offsetParent:n}=t;return s&&Ts(s,e===n?e:n)},Rc=(t,s)=>{const{element:e}=t;t._toggleEventListeners();// istanbul ignore else @preserve -le(e,vo)&&t.name===Bt&&Co(t);// istanbul ignore else @preserve -s&&s()},$o=(t,s)=>{const e=s?B:F,{element:n}=t;e($(n),ts,t.handleTouch,ge)},Eo=t=>{const{element:s}=t,e=T(`shown.bs.${Vt(t.name)}`);$o(t,!0),E(s,e),m.clear(s,"in")},To=t=>{const{element:s}=t,e=T(`hidden.bs.${Vt(t.name)}`);$o(t),Fc(t),E(s,e),m.clear(s,"out")},yo=(t,s)=>{const e=s?B:F,{element:n}=t,o=N(n,`.${Z}`),i=N(n,`.${Q}`);s?t._observer.observe(t.element):t._observer.disconnect(),o&&e(o,`hide.bs.${Z}`,t.handleHide),i&&e(i,`hide.bs.${Q}`,t.handleHide)},Co=(t,s)=>{const e=[vo,bo],{element:n}=t;O(n,e[s?0:1],s||et(n,e[0])||""),Dt(n,e[s?1:0])};class St extends st{constructor(e,n){super(e,n);d(this,"handleFocus",()=>ht(this.element));d(this,"handleShow",()=>this.show());d(this,"handleHide",()=>this.hide());d(this,"update",()=>{xs(this)});d(this,"toggle",()=>{const{tooltip:e}=this;e&&!we(this)?this.show():this.hide()});d(this,"handleTouch",({target:e})=>{const{tooltip:n,element:o}=this;// istanbul ignore if @preserve -n&&n.contains(e)||e===o||e&&o.contains(e)||this.hide()});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{element:o,options:i,btn:c}=this,{trigger:r}=i,a=!!(this.name!==Bt&&i.dismissible);// istanbul ignore else @preserve -r.includes("manual")||(this.enabled=!!e,r.split(" ").forEach(p=>{// istanbul ignore else @preserve -if(p===Uo){n(o,Ws,this.handleShow),n(o,Ae,this.handleShow);// istanbul ignore else @preserve -a||(n(o,Qe,this.handleHide),n($(o),ts,this.handleTouch,ge))}else if(p===_)n(o,p,a?this.handleShow:this.toggle);else if(p===Je){n(o,Ge,this.handleShow);// istanbul ignore else @preserve -a||n(o,Rs,this.handleHide);// istanbul ignore else @preserve -ii&&n(o,_,this.handleFocus)}// istanbul ignore else @preserve -a&&c&&n(c,_,this.handleHide)}))});const{element:o}=this,i=this.name===Bt,c=i?pt:Mt,r=i?Bt:ze;// istanbul ignore next @preserve: this is to set Popover too -wo=a=>V(a,r),this.enabled=!0,this.id=`${c}-${en(o,c)}`;const{options:l}=this;if(!(!l.title&&i||!i&&!l.content)){dt(As,{titleAttr:""});// istanbul ignore else @preserve -le(o,bo)&&i&&typeof l.title=="string"&&Co(this,l.title),this.container=Nc(o),this.offsetParent=["sticky","fixed"].some(a=>K(this.container,"position")===a)?this.container:$(this.element).body,Oc(this),this._observer=new mo(()=>this.update()),this._toggleEventListeners(!0)}}get name(){return Bt}get defaults(){return As}show(){const{options:e,tooltip:n,element:o,container:i,offsetParent:c,id:r}=this,{animation:l}=e,a=m.get(o,"out"),h=i===c?i:c;m.clear(o,"out"),n&&!a&&!we(this)&&m.set(o,()=>{const p=T(`show.bs.${Vt(this.name)}`);E(o,p);// istanbul ignore else @preserve -if(!p.defaultPrevented){Fn(n,h),O(o,it,`#${r}`),this.update(),yo(this,!0);// istanbul ignore else @preserve -g(n,v)||f(n,v);// istanbul ignore else @preserve -l?k(n,()=>Eo(this)):Eo(this)}},17,"in")}hide(){const{options:e,tooltip:n,element:o}=this,{animation:i,delay:c}=e;m.clear(o,"in");// istanbul ignore else @preserve -n&&we(this)&&m.set(o,()=>{const r=T(`hide.bs.${Vt(this.name)}`);E(o,r);// istanbul ignore else @preserve -if(!r.defaultPrevented){this.update(),b(n,v),yo(this);// istanbul ignore else @preserve -i?k(n,()=>To(this)):To(this)}},c+17,"out")}enable(){const{enabled:e}=this;// istanbul ignore else @preserve -e||(this._toggleEventListeners(!0),this.enabled=!e)}disable(){const{tooltip:e,enabled:n}=this;// istanbul ignore else @preserve -n&&(e&&we(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!n)}toggleEnabled(){this.enabled?this.disable():this.enable()}dispose(){const{tooltip:e,options:n}=this,o={...this,name:this.name},i=()=>setTimeout(()=>Rc(o,()=>super.dispose()),17);n.animation&&we(o)?(this.options.delay=0,this.hide(),k(e,i)):i()}}d(St,"selector",Mc),d(St,"init",Bc),d(St,"getInstance",wo),d(St,"styleTip",xs);const Wc=`[${rt}="${Mt}"],[data-tip="${Mt}"]`,jc=dt({},As,{template:lo(Mt),content:"",dismissible:!1,btnClose:''}),Vc=t=>V(t,ze),zc=t=>new Ft(t);class Ft extends St{constructor(e,n){super(e,n);d(this,"show",()=>{super.show();const{options:e,btn:n}=this;// istanbul ignore else @preserve -e.dismissible&&n&&setTimeout(()=>ht(n),17)})}get name(){return ze}get defaults(){return jc}}d(Ft,"selector",Wc),d(Ft,"init",zc),d(Ft,"getInstance",Vc),d(Ft,"styleTip",xs);const Xc="scrollspy",So="ScrollSpy",Kc='[data-bs-spy="scroll"]',qc={offset:10,target:null},Yc=t=>V(t,So),Uc=t=>new te(t),Po=T(`activate.bs.${Xc}`),Zc=t=>{const{target:s,scrollTarget:e,options:n,itemsLength:o,scrollHeight:i,element:c}=t,{offset:r}=n,l=e!==c,a=s&&rs("A",s),h=$(c),p=e?Ho(e):i;t.scrollTop=e.scrollTop;// istanbul ignore else @preserve -if(a&&(p!==i||o!==a.length)){let u,S,z;t.items=[],t.targets=[],t.offsets=[],t.scrollHeight=p,t.maxScroll=t.scrollHeight-Jc(t),Array.from(a).forEach(w=>{u=et(w,"href"),S=u&&u.charAt(0)==="#"&&u.slice(-1)!=="#"&&x(u,h),S&&(t.items.push(w),t.targets.push(S),z=pe(S),t.offsets.push((l?z.top+t.scrollTop:S.offsetTop)-r))}),t.itemsLength=t.items.length}},Ho=t=>y(t)?t.scrollHeight:ct(t).scrollHeight,Jc=({element:t,scrollTarget:s})=>s!==t?s.clientHeight:pe(t).height,xo=t=>{[...rs("A",t)].forEach(s=>{g(s,C)&&b(s,C)})},Ao=(t,s)=>{const{target:e,element:n}=t;// istanbul ignore else @preserve -y(e)&&xo(e),t.activeItem=s,f(s,C);const o=[];let i=s;for(;i!==bt(n);)i=i.parentElement,(g(i,"nav")||g(i,"dropdown-menu"))&&o.push(i);o.forEach(c=>{const r=c.previousElementSibling;// istanbul ignore else @preserve -r&&!g(r,C)&&f(r,C)}),Po.relatedTarget=s,E(n,Po)};class te extends st{constructor(e,n){super(e,n);d(this,"refresh",()=>{const{target:e}=this;// istanbul ignore else @preserve -if(y(e)&&e.offsetHeight>0){Zc(this);const{scrollTop:n,maxScroll:o,itemsLength:i,items:c,activeItem:r}=this;if(n>=o){const a=c[i-1];// istanbul ignore else @preserve -r!==a&&Ao(this,a);return}const{offsets:l}=this;// istanbul ignore else @preserve -if(r&&n0){this.activeItem=null;// istanbul ignore else @preserve -e&&xo(e);return}c.forEach((a,h)=>{r!==a&&n>=l[h]&&(typeof l[h+1]>"u"||n{e?this.scrollTarget===this.element?this.targets.forEach(n=>this._observer.observe(n)):this._observer.observe(this.element):this._observer.disconnect()});const{element:o,options:i}=this;this.target=x(i.target,$(o)),this.target&&(this.scrollTarget=o.clientHeightthis.refresh(),{root:this.scrollTarget}),this._toggleEventListeners(!0))}get name(){return So}get defaults(){return qc}dispose(){this._toggleEventListeners(),super.dispose()}}d(te,"selector",Kc),d(te,"init",Uc),d(te,"getInstance",Yc);const $e="tab",Do="Tab",ko=`[${rt}="${$e}"]`,Io=t=>V(t,Do),Gc=t=>new ee(t),Ds=T(`show.bs.${$e}`),Lo=T(`shown.bs.${$e}`),ks=T(`hide.bs.${$e}`),_o=T(`hidden.bs.${$e}`),Ee=new Map,Oo=t=>{const{tabContent:s,nav:e}=t;// istanbul ignore else @preserve -s&&g(s,_t)&&(s.style.height="",b(s,_t));// istanbul ignore else @preserve -e&&m.clear(e)},No=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=y(o)&&Ee.get(o)||{tab:null};// istanbul ignore else @preserve -if(e&&n&&g(n,R)){const{currentHeight:c,nextHeight:r}=Ee.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch -c!==r?setTimeout(()=>{e.style.height=`${r}px`,It(e),k(e,()=>Oo(t))},50):Oo(t)}else o&&m.clear(o);Lo.relatedTarget=i,E(s,Lo)},Mo=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:c}=o&&Ee.get(o)||{tab:null,content:null};let r=0;// istanbul ignore else @preserve -n&&e&&g(e,R)&&([c,e].forEach(l=>{// istanbul ignore else @preserve -y(l)&&f(l,"overflow-hidden")}),r=y(c)?c.scrollHeight:0),Ds.relatedTarget=i,_o.relatedTarget=s,E(s,Ds);// istanbul ignore else @preserve -if(!Ds.defaultPrevented){// istanbul ignore else @preserve -e&&f(e,C);// istanbul ignore else @preserve -c&&b(c,C);// istanbul ignore else @preserve -if(n&&e&&g(e,R)){const l=e.scrollHeight;Ee.set(s,{currentHeight:r,nextHeight:l,tab:null,content:null}),f(n,_t),n.style.height=`${r}px`,It(n),[c,e].forEach(a=>{// istanbul ignore else @preserve -a&&b(a,"overflow-hidden")})}if(e&&e&&g(e,R))setTimeout(()=>{f(e,v),k(e,()=>{No(t)})},1);else{// istanbul ignore else @preserve -e&&f(e,v),No(t)}// istanbul ignore else @preserve -i&&E(i,_o)}},Bo=t=>{const{nav:s}=t;// istanbul ignore next @preserve -if(!y(s))return{tab:null,content:null};const e=ft(C,s);let n=null;// istanbul ignore else @preserve -e.length===1&&!Ot.some(i=>g(e[0].parentElement,i))?[n]=e:e.length>1&&(n=e[e.length-1]);const o=y(n)?q(n):null;return{tab:n,content:o}},Fo=t=>{// istanbul ignore next @preserve -if(!y(t))return null;const s=N(t,`.${Ot.join(",.")}`);return s?x(`.${Ot[0]}-toggle`,s):null},Qc=t=>{const s=Io(t.target);// istanbul ignore else @preserve -s&&(t.preventDefault(),s.show())};class ee extends st{constructor(e){super(e);d(this,"_toggleEventListeners",e=>{(e?B:F)(this.element,_,Qc)});const{element:n}=this,o=q(n);// istanbul ignore else @preserve -if(o){const i=N(n,".nav"),c=N(o,".tab-content");this.nav=i,this.content=o,this.tabContent=c,this.dropdown=Fo(n);const{tab:r}=Bo(this);if(i&&!r){const l=x(ko,i),a=l&&q(l);// istanbul ignore else @preserve -a&&(f(l,C),f(a,v),f(a,C),O(n,Ze,"true"))}this._toggleEventListeners(!0)}}get name(){return Do}show(){const{element:e,content:n,nav:o,dropdown:i}=this;// istanbul ignore else @preserve -if(!(o&&m.get(o))&&!g(e,C)){const{tab:c,content:r}=Bo(this);// istanbul ignore else @preserve -o&&Ee.set(o,{tab:c,content:r,currentHeight:0,nextHeight:0}),ks.relatedTarget=e;// istanbul ignore else @preserve -if(y(c)){E(c,ks);// istanbul ignore else @preserve -if(!ks.defaultPrevented){f(e,C),O(e,Ze,"true");const l=y(c)&&Fo(c);l&&g(l,C)&&b(l,C);// istanbul ignore else @preserve -if(o){const a=()=>{// istanbul ignore else @preserve -c&&(b(c,C),O(c,Ze,"false")),i&&!g(i,C)&&f(i,C)};r&&(g(r,R)||n&&g(n,R))?m.set(o,a,1):a()}// istanbul ignore else @preserve -r&&(b(r,v),g(r,R)?k(r,()=>Mo(this)):Mo(this))}}}}dispose(){this._toggleEventListeners(),super.dispose()}}d(ee,"selector",ko),d(ee,"init",Gc),d(ee,"getInstance",Io);const tt="toast",Ro="Toast",tr=`.${tt}`,er=`[${Oe}="${tt}"]`,Wo=`[${rt}="${tt}"]`,se="showing",jo="hide",sr={animation:!0,autohide:!0,delay:5e3},Is=t=>V(t,Ro),nr=t=>new ne(t),Vo=T(`show.bs.${tt}`),or=T(`shown.bs.${tt}`),zo=T(`hide.bs.${tt}`),ir=T(`hidden.bs.${tt}`),Xo=t=>{const{element:s,options:e}=t;b(s,se),m.clear(s,se),E(s,or);// istanbul ignore else @preserve -e.autohide&&m.set(s,()=>t.hide(),e.delay,tt)},Ko=t=>{const{element:s}=t;b(s,se),b(s,v),f(s,jo),m.clear(s,tt),E(s,ir)},cr=t=>{const{element:s,options:e}=t;f(s,se),e.animation?(It(s),k(s,()=>Ko(t))):Ko(t)},rr=t=>{const{element:s,options:e}=t;m.set(s,()=>{b(s,jo),It(s),f(s,v),f(s,se),e.animation?k(s,()=>Xo(t)):Xo(t)},17,se)},ar=t=>{const{target:s}=t,e=s&&N(s,Wo),n=e&&q(e),o=n&&Is(n);// istanbul ignore else @preserve -if(o){// istanbul ignore else @preserve -e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.show()}},lr=t=>{const s=t.target,e=Is(s),{type:n,relatedTarget:o}=t;// istanbul ignore else @preserve: a solid filter is required -e&&s!==o&&!s.contains(o)&&([Ae,Ge].includes(n)?m.clear(s,tt):m.set(s,()=>e.hide(),e.options.delay,tt))};class ne extends st{constructor(e,n){super(e,n);d(this,"show",()=>{const{element:e,isShown:n}=this;// istanbul ignore else @preserve -e&&!n&&(E(e,Vo),Vo.defaultPrevented||rr(this))});d(this,"hide",()=>{const{element:e,isShown:n}=this;// istanbul ignore else @preserve -e&&n&&(E(e,zo),zo.defaultPrevented||cr(this))});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{element:o,triggers:i,dismiss:c,options:r,hide:l}=this;// istanbul ignore else @preserve -c&&n(c,_,l);// istanbul ignore else @preserve -r.autohide&&[Ge,Rs,Ae,Qe].forEach(a=>n(o,a,lr));// istanbul ignore else @preserve -i.length&&i.forEach(a=>n(a,_,ar))});const{element:o,options:i}=this;i.animation&&!g(o,R)?f(o,R):!i.animation&&g(o,R)&&b(o,R),this.dismiss=x(er,o),this.triggers=[...J(Wo,$(o))].filter(c=>q(c)===o),this._toggleEventListeners(!0)}get name(){return Ro}get defaults(){return sr}get isShown(){return g(this.element,v)}dispose(){const{element:e,isShown:n}=this;this._toggleEventListeners(),m.clear(e,tt),n&&b(e,v),super.dispose()}}d(ne,"selector",tr),d(ne,"init",nr),d(ne,"getInstance",Is);const Ls=new Map;[Kt,qt,Yt,Ut,Jt,Gt,Qt,Ft,te,ee,ne,St].forEach(t=>Ls.set(t.prototype.name,t));const dr=(t,s)=>{[...s].forEach(e=>t(e))},hr=(t,s)=>{const e=kt.getAllFor(t);e&&[...e].forEach(([n,o])=>{s.contains(n)&&o.dispose()})},_s=t=>{const s=t&&t.nodeName?t:document,e=[...rs("*",s)];Ls.forEach(n=>{const{init:o,selector:i}=n;dr(o,e.filter(c=>nn(c,i)))})},fr=t=>{const s=t&&t.nodeName?t:document;Ls.forEach(e=>{hr(e.prototype.name,s)})};return document.body?_s():B(document,"DOMContentLoaded",()=>_s(),{once:!0}),H.Alert=Kt,H.Button=qt,H.Carousel=Yt,H.Collapse=Ut,H.Dropdown=Jt,H.Modal=Gt,H.Offcanvas=Qt,H.Popover=Ft,H.ScrollSpy=te,H.Tab=ee,H.Toast=ne,H.Tooltip=St,H.initCallback=_s,H.removeDataAPI=fr,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),H}({}); +var BSN=function(R){"use strict";const xs="aria-describedby",de="aria-expanded",Kt="aria-hidden",he="aria-modal",Is="aria-pressed",xe="aria-selected",Ie="focus",Le="focusin",Ls="focusout",fe="keydown",Oo="keyup",L="click",Os="mousedown",No="hover",ge="mouseenter",Oe="mouseleave",ko="pointerdown",_o="pointermove",Mo="pointerup",Ne="touchstart",Bo="dragstart",Ro='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',ke="ArrowDown",_e="ArrowUp",Ns="ArrowLeft",ks="ArrowRight",Me="Escape",Fo="transitionDuration",Wo="transitionDelay",Be="transitionend",_s="transitionProperty",Vo=()=>{const e=/(iPhone|iPod|iPad)/;return navigator?.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(navigator?.userAgent)||!1},pe=()=>{},jo=(e,t,s,n)=>{const o=n||!1;e.addEventListener(t,s,o)},zo=(e,t,s,n)=>{const o=n||!1;e.removeEventListener(t,s,o)},tt=(e,t)=>e.getAttribute(t),Ut=(e,t)=>e.hasAttribute(t),O=(e,t,s)=>e.setAttribute(t,s),St=(e,t)=>e.removeAttribute(t),h=(e,...t)=>{e.classList.add(...t)},m=(e,...t)=>{e.classList.remove(...t)},f=(e,t)=>e.classList.contains(t),Xt=e=>e!=null&&typeof e=="object"||!1,A=e=>Xt(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,T=e=>A(e)&&e.nodeType===1||!1,_t=new Map,Dt={data:_t,set:(e,t,s)=>{T(e)&&(_t.has(t)||_t.set(t,new Map),_t.get(t).set(e,s))},getAllFor:e=>_t.get(e)||null,get:(e,t)=>{if(!T(e)||!t)return null;const s=Dt.getAllFor(t);return e&&s&&s.get(e)||null},remove:(e,t)=>{const s=Dt.getAllFor(t);!s||!T(e)||(s.delete(e),s.size===0&&_t.delete(t))}},F=(e,t)=>Dt.get(e,t),qt=e=>typeof e=="string"||!1,Ko=e=>Xt(e)&&e.constructor.name==="Window"||!1,Ms=e=>A(e)&&e.nodeType===9||!1,b=e=>Ko(e)?e.document:Ms(e)?e:A(e)?e.ownerDocument:globalThis.document,at=(e,...t)=>Object.assign(e,...t),gt=e=>{if(!e)return;if(qt(e))return b().createElement(e);const{tagName:t}=e,s=gt(t);if(!s)return;const n={...e};return delete n.tagName,at(s,n)},E=(e,t)=>e.dispatchEvent(t),j=(e,t)=>{const s=getComputedStyle(e),n=t.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return s.getPropertyValue(n)},Uo=e=>{const t=j(e,_s),s=j(e,Wo),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},Yt=e=>{const t=j(e,_s),s=j(e,Fo),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},P=(e,t)=>{let s=0;const n=new Event(Be),o=Yt(e),i=Uo(e);if(o){const a=r=>{r.target===e&&(t.apply(e,[r]),e.removeEventListener(Be,a),s=1)};e.addEventListener(Be,a),setTimeout(()=>{s||E(e,n)},o+i+17)}else t.apply(e,[n])},rt=(e,t)=>e.focus(t),Bs=e=>["true",!0].includes(e)?!0:["false",!1].includes(e)?!1:["null","",null,void 0].includes(e)?null:e!==""&&!Number.isNaN(+e)?+e:e,ue=e=>Object.entries(e),Mt=e=>e.toLowerCase(),Xo=(e,t,s,n)=>{const o={...s},i={...e.dataset},a={...t},r={},c="title";return ue(i).forEach(([l,d])=>{const g=typeof l=="string"&&l.includes(n)?l.replace(n,"").replace(/[A-Z]/g,$=>Mt($)):l;r[g]=Bs(d)}),ue(o).forEach(([l,d])=>{o[l]=Bs(d)}),ue(t).forEach(([l,d])=>{l in o?a[l]=o[l]:l in r?a[l]=r[l]:a[l]=l===c?tt(e,c):d}),a},Rs=e=>Object.keys(e),w=(e,t)=>{const s=new CustomEvent(e,{cancelable:!0,bubbles:!0});return Xt(t)&&at(s,t),s},Zt={passive:!0},Ht=e=>e.offsetHeight,x=(e,t)=>{ue(t).forEach(([s,n])=>{if(n&&qt(s)&&s.includes("--"))e.style.setProperty(s,n);else{const o={};o[s]=n,at(e.style,o)}})},Re=e=>Xt(e)&&e.constructor.name==="Map"||!1,qo=e=>typeof e=="number"||!1,pt=new Map,p={set:(e,t,s,n)=>{T(e)&&(n&&n.length?(pt.has(e)||pt.set(e,new Map),pt.get(e).set(n,setTimeout(t,s))):pt.set(e,setTimeout(t,s)))},get:(e,t)=>{if(!T(e))return null;const s=pt.get(e);return t&&s&&Re(s)?s.get(t)||null:qo(s)?s:null},clear:(e,t)=>{if(!T(e))return;const s=pt.get(e);t&&t.length&&Re(s)?(clearTimeout(s.get(t)),s.delete(t),s.size===0&&pt.delete(e)):(clearTimeout(s),pt.delete(e))}},Z=(e,t)=>(A(t)?t:b()).querySelectorAll(e),Fe=new Map;function Yo(e){const{shiftKey:t,code:s}=e,n=b(this),o=[...Z(Ro,this)].filter(r=>!Ut(r,"disabled")&&!tt(r,Kt));if(!o.length)return;const i=o[0],a=o[o.length-1];s==="Tab"&&(t&&n.activeElement===i?(a.focus(),e.preventDefault()):!t&&n.activeElement===a&&(i.focus(),e.preventDefault()))}const Zo=e=>Fe.has(e)===!0,me=e=>{const t=Zo(e);(t?zo:jo)(e,"keydown",Yo),t?Fe.delete(e):Fe.set(e,!0)},Gt=(e,t)=>{const{width:s,height:n,top:o,right:i,bottom:a,left:r}=e.getBoundingClientRect();let c=1,l=1;if(t&&T(e)){const{offsetWidth:d,offsetHeight:g}=e;c=d>0?Math.round(s)/d:1,l=g>0?Math.round(n)/g:1}return{width:s/c,height:n/l,top:o/l,right:i/c,bottom:a/l,left:r/c,x:r/c,y:o/l}},ut=e=>b(e).body,ct=e=>b(e).documentElement,Fs=e=>A(e)&&e.constructor.name==="ShadowRoot"||!1,Go=e=>e.nodeName==="HTML"?e:T(e)&&e.assignedSlot||A(e)&&e.parentNode||Fs(e)&&e.host||ct(e);let Ws=0,Vs=0;const Bt=new Map,js=(e,t)=>{let s=t?Ws:Vs;if(t){const n=js(e),o=Bt.get(n)||new Map;Bt.has(n)||Bt.set(n,o),Re(o)&&!o.has(t)?(o.set(t,s),Ws+=1):s=o.get(t)}else{const n=e.id||e;Bt.has(n)?s=Bt.get(n):(Bt.set(n,s),Vs+=1)}return s},Jo=e=>e?Ms(e)?e.defaultView:A(e)?e?.ownerDocument?.defaultView:e:window,Qo=e=>Array.isArray(e)||!1,zs=e=>{if(!A(e))return!1;const{top:t,bottom:s}=Gt(e),{clientHeight:n}=ct(e);return t<=n&&s>=0},ti=e=>typeof e=="function"||!1,ei=e=>Xt(e)&&e.constructor.name==="NodeList"||!1,mt=e=>ct(e).dir==="rtl",si=e=>A(e)&&["TABLE","TD","TH"].includes(e.nodeName)||!1,N=(e,t)=>e?e.closest(t)||N(e.getRootNode().host,t):null,S=(e,t)=>T(e)?e:(A(t)?t:b()).querySelector(e),We=(e,t)=>(A(t)?t:b()).getElementsByTagName(e),lt=(e,t)=>(t&&A(t)?t:b()).getElementsByClassName(e),Ks=(e,t)=>e.matches(t),Rt={},Us=e=>{const{type:t,currentTarget:s}=e;[...Rt[t]].forEach(([n,o])=>{s===n&&[...o].forEach(([i,a])=>{i.apply(n,[e]),typeof a=="object"&&a.once&&M(n,t,i,a)})})},_=(e,t,s,n)=>{Rt[t]||(Rt[t]=new Map);const o=Rt[t];o.has(e)||o.set(e,new Map);const i=o.get(e),{size:a}=i;i.set(s,n);a||e.addEventListener(t,Us,n)},M=(e,t,s,n)=>{const o=Rt[t],i=o&&o.get(e),a=i&&i.get(s),r=a!==void 0?a:n;i&&i.has(s)&&i.delete(s);o&&(!i||!i.size)&&o.delete(e);(!o||!o.size)&&delete Rt[t];(!i||!i.size)&&e.removeEventListener(t,Us,r)},B="fade",u="show",ve="data-bs-dismiss",be="alert",Xs="Alert",ni="5.1.0";class et{constructor(t,s){let n;try{if(T(t))n=t;else if(qt(t)){if(n=S(t),!n)throw Error(`"${t}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(i){throw Error(`${this.name} Error: ${i.message}`)}const o=Dt.get(n,this.name);o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Rs(this.defaults).length?Xo(n,this.defaults,s||{},"bs"):{},Dt.set(n,this.name,this)}get version(){return ni}get name(){return"BaseComponent"}get defaults(){return{}}_toggleEventListeners=()=>{};dispose(){Dt.remove(this.element,this.name),Rs(this).forEach(t=>{delete this[t]})}}const oi=`.${be}`,ii=`[${ve}="${be}"]`,ai=e=>F(e,Xs),ri=e=>new Ve(e),qs=w(`close.bs.${be}`),ci=w(`closed.bs.${be}`),Ys=e=>{const{element:t}=e;E(t,ci),e._toggleEventListeners(),e.dispose(),t.remove()};class Ve extends et{static selector=oi;static init=ri;static getInstance=ai;dismiss;constructor(t){super(t),this.dismiss=S(ii,this.element),this._toggleEventListeners(!0)}get name(){return Xs}close=()=>{const{element:t}=this;t&&f(t,u)&&(E(t,qs),qs.defaultPrevented||(m(t,u),f(t,B)?P(t,()=>Ys(this)):Ys(this)))};_toggleEventListeners=t=>{const s=t?_:M,{dismiss:n,close:o}=this;n&&s(n,L,o)};dispose(){this._toggleEventListeners(),super.dispose()}}const y="active",ot="data-bs-toggle",li="button",Zs="Button",di=`[${ot}="${li}"]`,hi=e=>F(e,Zs),fi=e=>new je(e);class je extends et{static selector=di;static init=fi;static getInstance=hi;isActive=!1;constructor(t){super(t);const{element:s}=this;this.isActive=f(s,y),O(s,Is,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return Zs}toggle=t=>{t&&t.preventDefault();const{element:s,isActive:n}=this;!f(s,"disabled")&&!tt(s,"disabled")&&((n?m:h)(s,y),O(s,Is,n?"false":"true"),this.isActive=f(s,y))};_toggleEventListeners=t=>{(t?_:M)(this.element,L,this.toggle)};dispose(){this._toggleEventListeners(),super.dispose()}}const ze="data-bs-target",At="carousel",Gs="Carousel",Js="data-bs-parent",gi="data-bs-container",z=e=>{const t=[ze,Js,gi,"href"],s=b(e);return t.map(n=>{const o=tt(e,n);return o?n===Js?N(e,o):S(o,s):null}).filter(n=>n)[0]},Jt=`[data-bs-ride="${At}"]`,G=`${At}-item`,Ke="data-bs-slide-to",vt="data-bs-slide",bt="paused",Qs={pause:"hover",keyboard:!1,touch:!0,interval:5e3},dt=e=>F(e,Gs),pi=e=>new Ge(e);let Qt=0,Ee=0,Ue=0;const Xe=w(`slide.bs.${At}`),qe=w(`slid.bs.${At}`),tn=e=>{const{index:t,direction:s,element:n,slides:o,options:i}=e;if(e.isAnimating){const a=Ze(e),r=s==="left"?"next":"prev",c=s==="left"?"start":"end";h(o[t],y),m(o[t],`${G}-${r}`),m(o[t],`${G}-${c}`),m(o[a],y),m(o[a],`${G}-${c}`),E(n,qe),p.clear(n,vt),e.cycle&&!b(n).hidden&&i.interval&&!e.isPaused&&e.cycle()}};function ui(){const e=dt(this);e&&!e.isPaused&&!p.get(this,bt)&&h(this,bt)}function mi(){const e=dt(this);e&&e.isPaused&&!p.get(this,bt)&&e.cycle()}function vi(e){e.preventDefault();const t=N(this,Jt)||z(this),s=dt(t);if(s&&!s.isAnimating){const n=+(tt(this,Ke)||0);this&&!f(this,y)&&!Number.isNaN(n)&&s.to(n)}}function bi(e){e.preventDefault();const t=N(this,Jt)||z(this),s=dt(t);if(s&&!s.isAnimating){const n=tt(this,vt);n==="next"?s.next():n==="prev"&&s.prev()}}const Ei=({code:e,target:t})=>{const s=b(t),[n]=[...Z(Jt,s)].filter(i=>zs(i)),o=dt(n);if(o&&!o.isAnimating&&!/textarea|input/i.test(t.nodeName)){const i=mt(n);e===(i?ks:Ns)?o.prev():e===(i?Ns:ks)&&o.next()}};function en(e){const{target:t}=e,s=dt(this);s&&s.isTouch&&(s.indicator&&!s.indicator.contains(t)||!s.controls.includes(t))&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}function wi(e){const{target:t}=e,s=dt(this);if(s&&!s.isAnimating&&!s.isTouch){const{controls:n,indicators:o}=s;[...n,...o].every(i=>i===t||i.contains(t))||(Qt=e.pageX,this.contains(t)&&(s.isTouch=!0,sn(s,!0)))}}const Ti=e=>{Ee=e.pageX},yi=e=>{const{target:t}=e,s=b(t),n=[...Z(Jt,s)].map(o=>dt(o)).find(o=>o.isTouch);if(n){const{element:o,index:i}=n,a=mt(o);Ue=e.pageX,n.isTouch=!1,sn(n),!s.getSelection()?.toString().length&&o.contains(t)&&Math.abs(Qt-Ue)>120&&(EeQt&&n.to(i+(a?1:-1))),Qt=0,Ee=0,Ue=0}},Ye=(e,t)=>{const{indicators:s}=e;[...s].forEach(n=>m(n,y)),e.indicators[t]&&h(s[t],y)},sn=(e,t)=>{const{element:s}=e,n=t?_:M;n(b(s),_o,Ti,Zt),n(b(s),Mo,yi,Zt)},Ze=e=>{const{slides:t,element:s}=e,n=S(`.${G}.${y}`,s);return T(n)?[...t].indexOf(n):-1};class Ge extends et{static selector=Jt;static init=pi;static getInstance=dt;constructor(t,s){super(t,s);const{element:n}=this;this.direction=mt(n)?"right":"left",this.isTouch=!1,this.slides=lt(G,n);const{slides:o}=this;if(o.length>=2){const i=Ze(this),a=[...o].find(l=>Ks(l,`.${G}-next,.${G}-next`));this.index=i;const r=b(n);this.controls=[...Z(`[${vt}]`,n),...Z(`[${vt}][${ze}="#${n.id}"]`,r)].filter((l,d,g)=>d===g.indexOf(l)),this.indicator=S(`.${At}-indicators`,n),this.indicators=[...this.indicator?Z(`[${Ke}]`,this.indicator):[],...Z(`[${Ke}][${ze}="#${n.id}"]`,r)].filter((l,d,g)=>d===g.indexOf(l));const{options:c}=this;this.options.interval=c.interval===!0?Qs.interval:c.interval,a?this.index=[...o].indexOf(a):i<0&&(this.index=0,h(o[0],y),this.indicators.length&&Ye(this,0)),this.indicators.length&&Ye(this,this.index),this._toggleEventListeners(!0),c.interval&&this.cycle()}}get name(){return Gs}get defaults(){return Qs}get isPaused(){return f(this.element,bt)}get isAnimating(){return S(`.${G}-next,.${G}-prev`,this.element)!==null}cycle(){const{element:t,options:s,isPaused:n,index:o}=this;p.clear(t,At),n&&(p.clear(t,bt),m(t,bt)),p.set(t,()=>{this.element&&!this.isPaused&&!this.isTouch&&zs(t)&&this.to(o+1)},s.interval,At)}pause(){const{element:t,options:s}=this;!this.isPaused&&s.interval&&(h(t,bt),p.set(t,()=>{},1,bt))}next(){this.isAnimating||this.to(this.index+1)}prev(){this.isAnimating||this.to(this.index-1)}to(t){const{element:s,slides:n,options:o}=this,i=Ze(this),a=mt(s);let r=t;if(!this.isAnimating&&i!==r&&!p.get(s,vt)){ir||i===n.length-1&&r===0)&&(this.direction=a?"left":"right");const{direction:c}=this;r<0?r=n.length-1:r>=n.length&&(r=0);const l=c==="left"?"next":"prev",d=c==="left"?"start":"end",g={relatedTarget:n[r],from:i,to:r,direction:c};at(Xe,g),at(qe,g),E(s,Xe),Xe.defaultPrevented||(this.index=r,Ye(this,r),Yt(n[r])&&f(s,"slide")?p.set(s,()=>{h(n[r],`${G}-${l}`),Ht(n[r]),h(n[r],`${G}-${d}`),h(n[i],`${G}-${d}`),P(n[r],()=>this.slides&&this.slides.length&&tn(this))},0,vt):(h(n[r],y),m(n[i],y),p.set(s,()=>{p.clear(s,vt),s&&o.interval&&!this.isPaused&&this.cycle(),E(s,qe)},0,vt)))}}_toggleEventListeners=t=>{const{element:s,options:n,slides:o,controls:i,indicators:a}=this,{touch:r,pause:c,interval:l,keyboard:d}=n,g=t?_:M;c&&l&&(g(s,ge,ui),g(s,Oe,mi)),r&&o.length>2&&(g(s,ko,wi,Zt),g(s,Ne,en,{passive:!1}),g(s,Bo,en,{passive:!1})),i.length&&i.forEach($=>{$&&g($,L,bi)}),a.length&&a.forEach($=>{g($,L,vi)}),d&&g(b(s),fe,Ei)};dispose(){const{isAnimating:t}=this,s={...this,isAnimating:t};this._toggleEventListeners(),super.dispose(),s.isAnimating&&P(s.slides[s.index],()=>{tn(s)})}}const Pt="collapsing",K="collapse",nn="Collapse",$i=`.${K}`,on=`[${ot}="${K}"]`,Ci={parent:null},we=e=>F(e,nn),Si=e=>new Je(e),an=w(`show.bs.${K}`),Di=w(`shown.bs.${K}`),rn=w(`hide.bs.${K}`),Hi=w(`hidden.bs.${K}`),Ai=e=>{const{element:t,parent:s,triggers:n}=e;E(t,an),an.defaultPrevented||(p.set(t,pe,17),s&&p.set(s,pe,17),h(t,Pt),m(t,K),x(t,{height:`${t.scrollHeight}px`}),P(t,()=>{p.clear(t),s&&p.clear(s),n.forEach(o=>O(o,de,"true")),m(t,Pt),h(t,K),h(t,u),x(t,{height:""}),E(t,Di)}))},cn=e=>{const{element:t,parent:s,triggers:n}=e;E(t,rn),rn.defaultPrevented||(p.set(t,pe,17),s&&p.set(s,pe,17),x(t,{height:`${t.scrollHeight}px`}),m(t,K),m(t,u),h(t,Pt),Ht(t),x(t,{height:"0px"}),P(t,()=>{p.clear(t),s&&p.clear(s),n.forEach(o=>O(o,de,"false")),m(t,Pt),h(t,K),x(t,{height:""}),E(t,Hi)}))},Pi=e=>{const{target:t}=e,s=t&&N(t,on),n=s&&z(s),o=n&&we(n);o&&o.toggle(),s&&s.tagName==="A"&&e.preventDefault()};class Je extends et{static selector=$i;static init=Si;static getInstance=we;constructor(t,s){super(t,s);const{element:n,options:o}=this,i=b(n);this.triggers=[...Z(on,i)].filter(a=>z(a)===n),this.parent=T(o.parent)?o.parent:qt(o.parent)?z(n)||S(o.parent,i):null,this._toggleEventListeners(!0)}get name(){return nn}get defaults(){return Ci}hide(){const{triggers:t,element:s}=this;p.get(s)||(cn(this),t.length&&t.forEach(n=>h(n,`${K}d`)))}show(){const{element:t,parent:s,triggers:n}=this;let o,i;s&&(o=[...Z(`.${K}.${u}`,s)].find(a=>we(a)),i=o&&we(o)),(!s||!p.get(s))&&!p.get(t)&&(i&&o!==t&&(cn(i),i.triggers.forEach(a=>{h(a,`${K}d`)})),Ai(this),n.length&&n.forEach(a=>m(a,`${K}d`)))}toggle(){f(this.element,u)?this.hide():this.show()}_toggleEventListeners=t=>{const s=t?_:M,{triggers:n}=this;n.length&&n.forEach(o=>s(o,L,Pi))};dispose(){this._toggleEventListeners(),super.dispose()}}const xt=["dropdown","dropup","dropstart","dropend"],ln="Dropdown",dn="dropdown-menu",hn=e=>{const t=N(e,"A");return e.tagName==="A"&&Ut(e,"href")&&tt(e,"href").slice(-1)==="#"||t&&Ut(t,"href")&&tt(t,"href").slice(-1)==="#"},[st,Qe,ts,es]=xt,fn=`[${ot}="${st}"]`,Ft=e=>F(e,ln),xi=e=>new os(e),Ii=`${dn}-end`,gn=[st,Qe],pn=[ts,es],un=["A","BUTTON"],Li={offset:5,display:"dynamic"},ss=w(`show.bs.${st}`),mn=w(`shown.bs.${st}`),ns=w(`hide.bs.${st}`),vn=w(`hidden.bs.${st}`),bn=w(`updated.bs.${st}`),En=e=>{const{element:t,menu:s,parentElement:n,options:o}=e,{offset:i}=o;if(j(s,"position")!=="static"){const a=mt(t),r=f(s,Ii);["margin","top","bottom","left","right"].forEach(k=>{const yt={};yt[k]="",x(s,yt)});let l=xt.find(k=>f(n,k))||st;const d={dropdown:[i,0,0],dropup:[0,0,i],dropstart:a?[-1,0,0,i]:[-1,i,0],dropend:a?[-1,i,0]:[-1,0,0,i]},g={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:a?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:a?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:a?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:a?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:$,offsetHeight:D}=s,{clientWidth:W,clientHeight:v}=ct(t),{left:U,top:Y,width:Vt,height:ft}=Gt(t),C=U-$-i<0,nt=U+$+Vt+i>=W,it=Y+D+i>=v,V=Y+D+ft+i>=v,X=Y-D-i<0,H=(!a&&r||a&&!r)&&U+Vt-$<0,jt=(a&&r||!a&&!r)&&U+$>=W;if(pn.includes(l)&&C&&nt&&(l=st),l===ts&&(a?nt:C)&&(l=es),l===es&&(a?C:nt)&&(l=ts),l===Qe&&X&&!V&&(l=st),l===st&&V&&!X&&(l=Qe),pn.includes(l)&&it&&at(g[l],{top:"auto",bottom:0}),gn.includes(l)&&(H||jt)){let k={left:"auto",right:"auto"};!H&&jt&&!a&&(k={left:"auto",right:0}),H&&!jt&&a&&(k={left:0,right:"auto"}),k&&at(g[l],k)}const Tt=d[l];x(s,{...g[l],margin:`${Tt.map(k=>k&&`${k}px`).join(" ")}`}),gn.includes(l)&&r&&r&&x(s,g[!a&&H||a&&jt?"menuStart":"menuEnd"]),E(n,bn)}},Oi=e=>[...e.children].map(t=>{if(t&&un.includes(t.tagName))return t;const{firstElementChild:s}=t;return s&&un.includes(s.tagName)?s:null}).filter(t=>t),wn=e=>{const{element:t,options:s,menu:n}=e,o=e.open?_:M,i=b(t);o(i,L,Tn),o(i,Ie,Tn),o(i,fe,ki),o(i,Oo,_i),s.display==="dynamic"&&(e.open?e._observer.observe(n):e._observer.disconnect())},Te=e=>{const t=[...xt,"btn-group","input-group"].map(s=>lt(`${s} ${u}`,b(e))).find(s=>s.length);if(t&&t.length)return[...t[0].children].find(s=>xt.some(n=>n===tt(s,ot)))},Tn=e=>{const{target:t,type:s}=e;if(t&&T(t)){const n=Te(t),o=n&&Ft(n);if(o){const{parentElement:i,menu:a}=o,r=i&&i.contains(t)&&(t.tagName==="form"||N(t,"form")!==null);[L,Os].includes(s)&&hn(t)&&e.preventDefault(),!r&&s!==Ie&&t!==n&&t!==a&&o.hide()}}},Ni=e=>{const{target:t}=e,s=t&&N(t,fn),n=s&&Ft(s);n&&(e.stopPropagation(),n.toggle(),s&&hn(s)&&e.preventDefault())},ki=e=>{[ke,_e].includes(e.code)&&e.preventDefault()};function _i(e){const{code:t}=e,s=Te(this),n=s&&Ft(s),{activeElement:o}=s&&b(s);if(n&&o){const{menu:i,open:a}=n,r=Oi(i);if(r&&r.length&&[ke,_e].includes(t)){let c=r.indexOf(o);o===s?c=0:t===_e?c=c>1?c-1:0:t===ke&&(c=cMi(i.target),{threshold:1}),this._toggleEventListeners(!0))}get name(){return ln}get defaults(){return Li}toggle(){this.open?this.hide():this.show()}show(){const{element:t,open:s,menu:n,parentElement:o}=this;if(!s){const i=Te(t),a=i&&Ft(i);a&&a.hide(),[ss,mn,bn].forEach(r=>{r.relatedTarget=t}),E(o,ss),ss.defaultPrevented||(h(n,u),h(o,u),O(t,de,"true"),En(this),this.open=!s,rt(t),wn(this),E(o,mn))}}hide(){const{element:t,open:s,menu:n,parentElement:o}=this;s&&([ns,vn].forEach(i=>{i.relatedTarget=t}),E(o,ns),ns.defaultPrevented||(m(n,u),m(o,u),O(t,de,"false"),this.open=!s,wn(this),E(o,vn)))}_toggleEventListeners=t=>{(t?_:M)(this.element,L,Ni)};dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}const q="modal",is="Modal",as="Offcanvas",Bi="fixed-top",Ri="fixed-bottom",yn="sticky-top",$n="position-sticky",Cn=e=>[...lt(Bi,e),...lt(Ri,e),...lt(yn,e),...lt($n,e),...lt("is-fixed",e)],Fi=e=>{const t=ut(e);x(t,{paddingRight:"",overflow:""});const s=Cn(t);s.length&&s.forEach(n=>{x(n,{paddingRight:"",marginRight:""})})},Sn=e=>{const{clientWidth:t}=ct(e),{innerWidth:s}=Jo(e);return Math.abs(s-t)},Dn=(e,t)=>{const s=ut(e),n=parseInt(j(s,"paddingRight"),10),i=j(s,"overflow")==="hidden"&&n?0:Sn(e),a=Cn(s);t&&(x(s,{overflow:"hidden",paddingRight:`${n+i}px`}),a.length&&a.forEach(r=>{const c=j(r,"paddingRight");if(r.style.paddingRight=`${parseInt(c,10)+i}px`,[yn,$n].some(l=>f(r,l))){const l=j(r,"marginRight");r.style.marginRight=`${parseInt(l,10)-i}px`}}))},J="offcanvas",Et=gt({tagName:"div",className:"popup-container"}),Hn=(e,t)=>{const s=A(t)&&t.nodeName==="BODY",n=A(t)&&!s?t:Et,o=s?t:ut(e);A(e)&&(n===Et&&o.append(Et),n.append(e))},An=(e,t)=>{const s=A(t)&&t.nodeName==="BODY",n=A(t)&&!s?t:Et;A(e)&&(e.remove(),n===Et&&!Et.children.length&&Et.remove())},rs=(e,t)=>{const s=A(t)&&t.nodeName!=="BODY"?t:Et;return A(e)&&s.contains(e)},Pn="backdrop",xn=`${q}-${Pn}`,In=`${J}-${Pn}`,Ln=`.${q}.${u}`,cs=`.${J}.${u}`,I=gt("div"),It=e=>S(`${Ln},${cs}`,b(e)),ls=e=>{const t=e?xn:In;[xn,In].forEach(s=>{m(I,s)}),h(I,t)},On=(e,t,s)=>{ls(s),Hn(I,ut(e)),t&&h(I,B)},Nn=()=>{f(I,u)||(h(I,u),Ht(I))},ye=()=>{m(I,u)},kn=e=>{It(e)||(m(I,B),An(I,ut(e)),Fi(e))},_n=e=>T(e)&&j(e,"visibility")!=="hidden"&&e.offsetParent!==null,Wi=`.${q}`,Mn=`[${ot}="${q}"]`,Vi=`[${ve}="${q}"]`,Bn=`${q}-static`,ji={backdrop:!0,keyboard:!0},te=e=>F(e,is),zi=e=>new hs(e),$e=w(`show.bs.${q}`),Rn=w(`shown.bs.${q}`),ds=w(`hide.bs.${q}`),Fn=w(`hidden.bs.${q}`),Wn=e=>{const{element:t}=e,s=Sn(t),{clientHeight:n,scrollHeight:o}=ct(t),{clientHeight:i,scrollHeight:a}=t,r=i!==a;if(!r&&s){const l={[mt(t)?"paddingLeft":"paddingRight"]:`${s}px`};x(t,l)}Dn(t,r||n!==o)},Vn=(e,t)=>{const s=t?_:M,{element:n}=e;s(n,L,Xi),s(b(n),fe,Ui),t?e._observer.observe(n):e._observer.disconnect()},jn=e=>{const{triggers:t,element:s,relatedTarget:n}=e;kn(s),x(s,{paddingRight:"",display:""}),Vn(e);const o=$e.relatedTarget||t.find(_n);o&&rt(o),Fn.relatedTarget=n,E(s,Fn),me(s)},zn=e=>{const{element:t,relatedTarget:s}=e;rt(t),Vn(e,!0),Rn.relatedTarget=s,E(t,Rn),me(t)},Kn=e=>{const{element:t,hasFade:s}=e;x(t,{display:"block"}),Wn(e),It(t)||x(ut(t),{overflow:"hidden"}),h(t,u),St(t,Kt),O(t,he,"true"),s?P(t,()=>zn(e)):zn(e)},Un=e=>{const{element:t,options:s,hasFade:n}=e;s.backdrop&&n&&f(I,u)&&!It(t)?(ye(),P(I,()=>jn(e))):jn(e)},Ki=e=>{const{target:t}=e,s=t&&N(t,Mn),n=s&&z(s),o=n&&te(n);o&&(s&&s.tagName==="A"&&e.preventDefault(),o.relatedTarget=s,o.toggle())},Ui=({code:e,target:t})=>{const s=S(Ln,b(t)),n=s&&te(s);if(n){const{options:o}=n;o.keyboard&&e===Me&&f(s,u)&&(n.relatedTarget=null,n.hide())}},Xi=e=>{const{currentTarget:t}=e,s=t&&te(t);if(s&&t&&!p.get(t)){const{options:n,isStatic:o,modalDialog:i}=s,{backdrop:a}=n,{target:r}=e,c=b(t)?.getSelection()?.toString().length,l=i.contains(r),d=r&&N(r,Vi);o&&!l?p.set(t,()=>{h(t,Bn),P(i,()=>qi(s))},17):(d||!c&&!o&&!l&&a)&&(s.relatedTarget=d||null,s.hide(),e.preventDefault())}},qi=e=>{const{element:t,modalDialog:s}=e,n=(Yt(s)||0)+17;m(t,Bn),p.set(t,()=>p.clear(t),n)};class hs extends et{static selector=Wi;static init=zi;static getInstance=te;constructor(t,s){super(t,s);const{element:n}=this,o=S(`.${q}-dialog`,n);o&&(this.modalDialog=o,this.triggers=[...Z(Mn,b(n))].filter(i=>z(i)===n),this.isStatic=this.options.backdrop==="static",this.hasFade=f(n,B),this.relatedTarget=null,this._observer=new ResizeObserver(()=>this.update()),this._toggleEventListeners(!0))}get name(){return is}get defaults(){return ji}toggle(){f(this.element,u)?this.hide():this.show()}show(){const{element:t,options:s,hasFade:n,relatedTarget:o}=this,{backdrop:i}=s;let a=0;if(!f(t,u)&&($e.relatedTarget=o||void 0,E(t,$e),!$e.defaultPrevented)){const r=It(t);if(r&&r!==t){const c=te(r)||F(r,as);c&&c.hide()}i?(rs(I)?ls(!0):On(t,n,!0),a=Yt(I),Nn(),setTimeout(()=>Kn(this),a)):(Kn(this),r&&f(I,u)&&ye())}}hide(){const{element:t,hasFade:s,relatedTarget:n}=this;f(t,u)&&(ds.relatedTarget=n||void 0,E(t,ds),ds.defaultPrevented||(m(t,u),O(t,Kt,"true"),St(t,he),s?P(t,()=>Un(this)):Un(this)))}update=()=>{f(this.element,u)&&Wn(this)};_toggleEventListeners=t=>{const s=t?_:M,{triggers:n}=this;n.length&&n.forEach(o=>s(o,L,Ki))};dispose(){const t={...this},{modalDialog:s,hasFade:n}=t,o=()=>setTimeout(()=>super.dispose(),17);this.hide(),this._toggleEventListeners(),n?P(s,o):o()}}const Yi=`.${J}`,fs=`[${ot}="${J}"]`,Zi=`[${ve}="${J}"]`,Ce=`${J}-toggling`,Gi={backdrop:!0,keyboard:!0,scroll:!1},ee=e=>F(e,as),Ji=e=>new ps(e),Se=w(`show.bs.${J}`),Xn=w(`shown.bs.${J}`),gs=w(`hide.bs.${J}`),qn=w(`hidden.bs.${J}`),Qi=e=>{const{element:t}=e,{clientHeight:s,scrollHeight:n}=ct(t);Dn(t,s!==n)},Yn=(e,t)=>{const s=t?_:M,n=b(e.element);s(n,fe,na),s(n,L,sa)},Zn=e=>{const{element:t,options:s}=e;s.scroll||(Qi(e),x(ut(t),{overflow:"hidden"})),h(t,Ce),h(t,u),x(t,{visibility:"visible"}),P(t,()=>oa(e))},ta=e=>{const{element:t,options:s}=e,n=It(t);t.blur(),!n&&s.backdrop&&f(I,u)&&ye(),P(t,()=>ia(e))},ea=e=>{const t=N(e.target,fs),s=t&&z(t),n=s&&ee(s);n&&(n.relatedTarget=t,n.toggle(),t&&t.tagName==="A"&&e.preventDefault())},sa=e=>{const{target:t}=e,s=S(cs,b(t)),n=S(Zi,s),o=s&&ee(s);if(o){const{options:i,triggers:a}=o,{backdrop:r}=i,c=N(t,fs),l=b(s).getSelection();(!I.contains(t)||r!=="static")&&(!(l&&l.toString().length)&&(!s.contains(t)&&r&&(!c||a.includes(t))||n&&n.contains(t))&&(o.relatedTarget=n&&n.contains(t)?n:null,o.hide()),c&&c.tagName==="A"&&e.preventDefault())}},na=({code:e,target:t})=>{const s=S(cs,b(t)),n=s&&ee(s);n&&n.options.keyboard&&e===Me&&(n.relatedTarget=null,n.hide())},oa=e=>{const{element:t}=e;m(t,Ce),St(t,Kt),O(t,he,"true"),O(t,"role","dialog"),E(t,Xn),Yn(e,!0),rt(t),me(t)},ia=e=>{const{element:t,triggers:s}=e;O(t,Kt,"true"),St(t,he),St(t,"role"),x(t,{visibility:""});const n=Se.relatedTarget||s.find(_n);n&&rt(n),kn(t),E(t,qn),m(t,Ce),me(t),It(t)||Yn(e)};class ps extends et{static selector=Yi;static init=Ji;static getInstance=ee;constructor(t,s){super(t,s);const{element:n}=this;this.triggers=[...Z(fs,b(n))].filter(o=>z(o)===n),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return as}get defaults(){return Gi}toggle(){f(this.element,u)?this.hide():this.show()}show(){const{element:t,options:s,relatedTarget:n}=this;let o=0;if(!f(t,u)&&(Se.relatedTarget=n||void 0,Xn.relatedTarget=n||void 0,E(t,Se),!Se.defaultPrevented)){const i=It(t);if(i&&i!==t){const a=ee(i)||F(i,is);a&&a.hide()}s.backdrop?(rs(I)?ls():On(t,!0),o=Yt(I),Nn(),setTimeout(()=>Zn(this),o)):(Zn(this),i&&f(I,u)&&ye())}}hide(){const{element:t,relatedTarget:s}=this;f(t,u)&&(gs.relatedTarget=s||void 0,qn.relatedTarget=s||void 0,E(t,gs),gs.defaultPrevented||(h(t,Ce),m(t,u),ta(this)))}_toggleEventListeners=t=>{const s=t?_:M;this.triggers.forEach(n=>s(n,L,ea))};dispose(){const{element:t}=this,s=f(t,u),n=()=>setTimeout(()=>super.dispose(),1);this.hide(),this._toggleEventListeners(),s?P(t,n):n()}}const Lt="popover",De="Popover",ht="tooltip",Gn=e=>{const t=e===ht,s=t?`${e}-inner`:`${e}-body`,n=t?"":`

`,o=`
`,i=`
`;return`
${n+o+i}
`},Jn={top:"top",bottom:"bottom",left:"start",right:"end"},us=e=>{const t=/\b(top|bottom|start|end)+/,{element:s,tooltip:n,container:o,options:i,arrow:a}=e;if(n){const r={...Jn},c=mt(s);x(n,{top:"",left:"",right:"",bottom:""});const l=e.name===De,{offsetWidth:d,offsetHeight:g}=n,{clientWidth:$,clientHeight:D,offsetWidth:W}=ct(s);let{placement:v}=i;const{clientWidth:U,offsetWidth:Y}=o,ft=j(o,"position")==="fixed",C=Math.abs(ft?U-Y:$-W),nt=c&&ft?C:0,it=$-(c?0:C)-1,{width:V,height:X,left:H,right:jt,top:Tt}=Gt(s,!0),{x:k,y:yt}={x:H,y:Tt};x(a,{top:"",left:"",right:"",bottom:""});let Nt=0,ie="",$t=0,Ds="",zt="",Ae="",Hs="";const kt=a.offsetWidth||0,Ct=a.offsetHeight||0,As=kt/2;let ae=Tt-g-Ct<0,re=Tt+g+X+Ct>=D,ce=H-d-kt=it;const Pe=["left","right"],Ps=["top","bottom"];ae=Pe.includes(v)?Tt+X/2-g/2-Ct<0:ae,re=Pe.includes(v)?Tt+g/2+X/2+Ct>=D:re,ce=Ps.includes(v)?H+V/2-d/2=it:le,v=Pe.includes(v)&&ce&&le?"top":v,v=v==="top"&&ae?"bottom":v,v=v==="bottom"&&re?"top":v,v=v==="left"&&ce?"right":v,v=v==="right"&&le?"left":v,n.className.includes(v)||(n.className=n.className.replace(t,r[v])),Pe.includes(v)?(v==="left"?$t=k-d-(l?kt:0):$t=k+V+(l?kt:0),ae&&re?(Nt=0,ie=0,zt=Tt+X/2-Ct/2):ae?(Nt=yt,ie="",zt=X/2-kt):re?(Nt=yt-g+X,ie="",zt=g-X/2-kt):(Nt=yt-g/2+X/2,zt=g/2-Ct/2)):Ps.includes(v)&&(v==="top"?Nt=yt-g-(l?Ct:0):Nt=yt+X+(l?Ct:0),ce?($t=0,Ae=k+V/2-As):le?($t="auto",Ds=0,Hs=V/2+it-jt-As):($t=k-d/2+V/2,Ae=d/2-As)),x(n,{top:`${Nt}px`,bottom:ie===""?"":`${ie}px`,left:$t==="auto"?$t:`${$t}px`,right:Ds!==""?`${Ds}px`:""}),T(a)&&(zt!==""&&(a.style.top=`${zt}px`),Ae!==""?a.style.left=`${Ae}px`:Hs!==""&&(a.style.right=`${Hs}px`));const Va=w(`updated.bs.${Mt(e.name)}`);E(s,Va)}},ms={template:Gn(ht),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},aa=e=>e!=null&&typeof e=="object"||!1,ra=e=>aa(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,Qn=e=>ra(e)&&e.nodeType===1||!1,ca=e=>typeof e=="function"||!1,to="PositionObserver Error";class eo{entries;_tick;_root;_callback;constructor(t,s){if(!ca(t))throw new Error(`${to}: ${t} is not a function.`);this.entries=[],this._callback=t,this._root=Qn(s?.root)?s.root:document?.documentElement,this._tick=0}observe=t=>{if(!Qn(t))throw new Error(`${to}: ${t} is not an instance of HTMLElement.`);if(!this._root.contains(t))return;const{clientWidth:s,clientHeight:n}=this._root,o=t.getBoundingClientRect(),{left:i,top:a,bottom:r,right:c,width:l,height:d}=o,g=a>1-d&&i>1-l&&r<=n+d-1&&c<=s+l-1;this.entries.push({target:t,boundingBox:o,isVisible:g}),this._tick||(this._tick=requestAnimationFrame(this._runCallback))};unobserve=t=>{const s=this.entries.findIndex(n=>n.target===t);this.entries.splice(s,1)};_runCallback=()=>{if(!this.entries.length)return;const t=[],{clientWidth:s,clientHeight:n}=this._root;this.entries.forEach((o,i)=>{const{target:a,boundingBox:r}=o,c=a.getBoundingClientRect(),{left:l,top:d,bottom:g,right:$,width:D,height:W}=c;if(r.left!==l||r.top!==d||r.right!==$||r.bottom!==g){const v=d>1-W&&l>1-D&&g<=n+W-1&&$<=s+D-1;this.entries[i].boundingBox=c,this.entries[i].isVisible=v,t.push({target:a,boundingBox:c,isVisible:v})}}),t.length&&this._callback(t),requestAnimationFrame(this._runCallback)};disconnect=()=>{cancelAnimationFrame(this._tick),this.entries.length=0,this._tick=0}}const so="data-original-title",Ot="Tooltip",wt=(e,t,s)=>{if(qt(t)&&t.length){let n=t.trim();ti(s)&&(n=s(n));const i=new DOMParser().parseFromString(n,"text/html");e.append(...i.body.childNodes)}else T(t)?e.append(t):(ei(t)||Qo(t)&&t.every(A))&&e.append(...t)},la=e=>{const t=e.name===Ot,{id:s,element:n,options:o}=e,{title:i,placement:a,template:r,animation:c,customClass:l,sanitizeFn:d,dismissible:g,content:$,btnClose:D}=o,W=t?ht:Lt,v={...Jn};let U=[],Y=[];mt(n)&&(v.left="end",v.right="start");const Vt=`bs-${W}-${v[a]}`;let ft;if(T(r))ft=r;else{const nt=gt("div");wt(nt,r,d),ft=nt.firstChild}e.tooltip=T(ft)?ft.cloneNode(!0):void 0;const{tooltip:C}=e;if(C){O(C,"id",s),O(C,"role",ht);const nt=t?`${ht}-inner`:`${Lt}-body`,it=t?null:S(`.${Lt}-header`,C),V=S(`.${nt}`,C);e.arrow=S(`.${W}-arrow`,C);const{arrow:X}=e;if(T(i))U=[i.cloneNode(!0)];else{const H=gt("div");wt(H,i,d),U=[...H.childNodes]}if(T($))Y=[$.cloneNode(!0)];else{const H=gt("div");wt(H,$,d),Y=[...H.childNodes]}if(g)if(i)if(T(D))U=[...U,D.cloneNode(!0)];else{const H=gt("div");wt(H,D,d),U=[...U,H.firstChild]}else if(it&&it.remove(),T(D))Y=[...Y,D.cloneNode(!0)];else{const H=gt("div");wt(H,D,d),Y=[...Y,H.firstChild]}t?i&&V&&wt(V,i,d):(i&&it&&wt(it,U,d),$&&V&&wt(V,Y,d),e.btn=S(".btn-close",C)||void 0),h(C,"position-fixed"),h(X,"position-absolute"),f(C,W)||h(C,W),c&&!f(C,B)&&h(C,B),l&&!f(C,l)&&h(C,l),f(C,Vt)||h(C,Vt)}},da=e=>{const t=["HTML","BODY"],s=[];let{parentNode:n}=e;for(;n&&!t.includes(n.nodeName);)n=Go(n),Fs(n)||si(n)||s.push(n);return s.find((o,i)=>j(o,"position")!=="relative"&&s.slice(i+1).every(a=>j(a,"position")==="static")?o:null)||b(e).body},ha=`[${ot}="${ht}"],[data-tip="${ht}"]`,no="title";let oo=e=>F(e,Ot);const fa=e=>new He(e),ga=e=>{const{element:t,tooltip:s,container:n,offsetParent:o}=e;St(t,xs),An(s,n===o?n:o)},se=e=>{const{tooltip:t,container:s,offsetParent:n}=e;return t&&rs(t,s===n?s:n)},pa=(e,t)=>{const{element:s}=e;e._toggleEventListeners(),Ut(s,so)&&e.name===Ot&&lo(e),t&&t()},io=(e,t)=>{const s=t?_:M,{element:n}=e;s(b(n),Ne,e.handleTouch,Zt)},ao=e=>{const{element:t}=e,s=w(`shown.bs.${Mt(e.name)}`);io(e,!0),E(t,s),p.clear(t,"in")},ro=e=>{const{element:t}=e,s=w(`hidden.bs.${Mt(e.name)}`);io(e),ga(e),E(t,s),p.clear(t,"out")},co=(e,t)=>{const s=t?_:M,{element:n}=e,o=N(n,`.${q}`),i=N(n,`.${J}`);t?e._observer.observe(e.element):e._observer.disconnect(),o&&s(o,`hide.bs.${q}`,e.handleHide),i&&s(i,`hide.bs.${J}`,e.handleHide)},lo=(e,t)=>{const s=[so,no],{element:n}=e;O(n,s[t?0:1],t||tt(n,s[0])||""),St(n,s[t?1:0])};class He extends et{static selector=ha;static init=fa;static getInstance=oo;static styleTip=us;constructor(t,s){super(t,s);const{element:n}=this,o=this.name===Ot,i=o?ht:Lt,a=o?Ot:De;oo=c=>F(c,a),this.enabled=!0,this.id=`${i}-${js(n,i)}`;const{options:r}=this;!r.title&&o||!o&&!r.content||(at(ms,{titleAttr:""}),Ut(n,no)&&o&&typeof r.title=="string"&&lo(this,r.title),this.container=da(n),this.offsetParent=["sticky","fixed"].some(c=>j(this.container,"position")===c)?this.container:b(this.element).body,la(this),this._observer=new eo(()=>this.update()),this._toggleEventListeners(!0))}get name(){return Ot}get defaults(){return ms}handleFocus=()=>rt(this.element);handleShow=()=>this.show();show(){const{options:t,tooltip:s,element:n,container:o,offsetParent:i,id:a}=this,{animation:r}=t,c=p.get(n,"out"),l=o===i?o:i;p.clear(n,"out"),s&&!c&&!se(this)&&p.set(n,()=>{const d=w(`show.bs.${Mt(this.name)}`);E(n,d),d.defaultPrevented||(Hn(s,l),O(n,xs,`#${a}`),this.update(),co(this,!0),f(s,u)||h(s,u),r?P(s,()=>ao(this)):ao(this))},17,"in")}handleHide=()=>this.hide();hide(){const{options:t,tooltip:s,element:n}=this,{animation:o,delay:i}=t;p.clear(n,"in"),s&&se(this)&&p.set(n,()=>{const a=w(`hide.bs.${Mt(this.name)}`);E(n,a),a.defaultPrevented||(this.update(),m(s,u),co(this),o?P(s,()=>ro(this)):ro(this))},i+17,"out")}update=()=>{us(this)};toggle=()=>{const{tooltip:t}=this;t&&!se(this)?this.show():this.hide()};enable(){const{enabled:t}=this;t||(this._toggleEventListeners(!0),this.enabled=!t)}disable(){const{tooltip:t,enabled:s}=this;s&&(t&&se(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!s)}toggleEnabled(){this.enabled?this.disable():this.enable()}handleTouch=({target:t})=>{const{tooltip:s,element:n}=this;s&&s.contains(t)||t===n||t&&n.contains(t)||this.hide()};_toggleEventListeners=t=>{const s=t?_:M,{element:n,options:o,btn:i}=this,{trigger:a}=o,c=!!(this.name!==Ot&&o.dismissible);a.includes("manual")||(this.enabled=!!t,a.split(" ").forEach(d=>{d===No?(s(n,Os,this.handleShow),s(n,ge,this.handleShow),c||(s(n,Oe,this.handleHide),s(b(n),Ne,this.handleTouch,Zt))):d===L?s(n,d,c?this.handleShow:this.toggle):d===Ie&&(s(n,Le,this.handleShow),c||s(n,Ls,this.handleHide),Vo()&&s(n,L,this.handleFocus)),c&&i&&s(i,L,this.handleHide)}))};dispose(){const{tooltip:t,options:s}=this,n={...this,name:this.name},o=()=>setTimeout(()=>pa(n,()=>super.dispose()),17);s.animation&&se(n)?(this.options.delay=0,this.hide(),P(t,o)):o()}}const ua=`[${ot}="${Lt}"],[data-tip="${Lt}"]`,ma=at({},ms,{template:Gn(Lt),content:"",dismissible:!1,btnClose:''}),va=e=>F(e,De),ba=e=>new vs(e);class vs extends He{static selector=ua;static init=ba;static getInstance=va;static styleTip=us;constructor(t,s){super(t,s)}get name(){return De}get defaults(){return ma}show=()=>{super.show();const{options:t,btn:s}=this;t.dismissible&&s&&setTimeout(()=>rt(s),17)}}const Ea="scrollspy",ho="ScrollSpy",wa='[data-bs-spy="scroll"]',Ta={offset:10,target:null},ya=e=>F(e,ho),$a=e=>new bs(e),fo=w(`activate.bs.${Ea}`),Ca=e=>{const{target:t,scrollTarget:s,options:n,itemsLength:o,scrollHeight:i,element:a}=e,{offset:r}=n,c=s!==a,l=t&&We("A",t),d=b(a),g=s.scrollHeight;if(e.scrollTop=s.scrollTop,l&&(g!==i||o!==l.length)){let $,D,W;e.items=[],e.targets=[],e.offsets=[],e.scrollHeight=g,e.maxScroll=e.scrollHeight-Da(e),Array.from(l).forEach(v=>{$=tt(v,"href"),D=$&&$.charAt(0)==="#"&&$.slice(-1)!=="#"&&S($,d),D&&(e.items.push(v),e.targets.push(D),W=Gt(D),e.offsets.push((c?W.top+e.scrollTop:D.offsetTop)-r))}),e.itemsLength=e.items.length}},go=({targets:e,scrollTarget:t,element:s,_observer:n},o)=>{o?t===s?e.forEach(i=>n.observe(i)):n.observe(s):n.disconnect()},Sa=e=>e.scrollHeight,Da=({element:e,scrollTarget:t})=>t!==e?t.clientHeight:Gt(e).height,po=e=>{[...We("A",e)].forEach(t=>{f(t,y)&&m(t,y)})},uo=(e,t)=>{const{target:s,element:n}=e;T(s)&&po(s),e.activeItem=t,h(t,y);const o=[];let i=t;for(;i!==ut(n);)i=i.parentElement,(f(i,"nav")||f(i,"dropdown-menu"))&&o.push(i);o.forEach(a=>{const r=a.previousElementSibling;r&&!f(r,y)&&h(r,y)}),fo.relatedTarget=t,E(n,fo)};class bs extends et{static selector=wa;static init=$a;static getInstance=ya;constructor(t,s){super(t,s);const{element:n,options:o}=this;this.target=S(o.target,b(n)),this.target&&(this.scrollTarget=n.clientHeightthis.refresh(),{root:this.scrollTarget}),go(this,!0))}get name(){return ho}get defaults(){return Ta}refresh=()=>{const{target:t}=this;if(T(t)&&t.offsetHeight>0){Ca(this);const{scrollTop:s,maxScroll:n,itemsLength:o,items:i,activeItem:a}=this;if(s>=n){const c=i[o-1];a!==c&&uo(this,c);return}const{offsets:r}=this;if(a&&s0){this.activeItem=null,t&&po(t);return}i.forEach((c,l)=>{a!==c&&s>=r[l]&&(typeof r[l+1]>"u"||sF(e,mo),Ha=e=>new Ts(e),Es=w(`show.bs.${ne}`),Eo=w(`shown.bs.${ne}`),ws=w(`hide.bs.${ne}`),wo=w(`hidden.bs.${ne}`),oe=new Map,To=e=>{const{tabContent:t,nav:s}=e;t&&f(t,Pt)&&(t.style.height="",m(t,Pt)),s&&p.clear(s)},yo=e=>{const{element:t,tabContent:s,content:n,nav:o}=e,{tab:i}=T(o)&&oe.get(o)||{tab:null};if(s&&n&&f(n,B)){const{currentHeight:a,nextHeight:r}=oe.get(t)||{currentHeight:0,nextHeight:0};a!==r?setTimeout(()=>{s.style.height=`${r}px`,Ht(s),P(s,()=>To(e))},50):To(e)}else o&&p.clear(o);Eo.relatedTarget=i,E(t,Eo)},$o=e=>{const{element:t,content:s,tabContent:n,nav:o}=e,{tab:i,content:a}=o&&oe.get(o)||{tab:null,content:null};let r=0;if(n&&s&&f(s,B)&&([a,s].forEach(c=>{T(c)&&h(c,"overflow-hidden")}),r=T(a)?a.scrollHeight:0),Es.relatedTarget=i,wo.relatedTarget=t,E(t,Es),!Es.defaultPrevented){if(s&&h(s,y),a&&m(a,y),n&&s&&f(s,B)){const c=s.scrollHeight;oe.set(t,{currentHeight:r,nextHeight:c,tab:null,content:null}),h(n,Pt),n.style.height=`${r}px`,Ht(n),[a,s].forEach(l=>{l&&m(l,"overflow-hidden")})}s&&s&&f(s,B)?setTimeout(()=>{h(s,u),P(s,()=>{yo(e)})},1):(s&&h(s,u),yo(e)),i&&E(i,wo)}},Co=e=>{const{nav:t}=e;if(!T(t))return{tab:null,content:null};const s=lt(y,t);let n=null;s.length===1&&!xt.some(i=>f(s[0].parentElement,i))?[n]=s:s.length>1&&(n=s[s.length-1]);const o=T(n)?z(n):null;return{tab:n,content:o}},So=e=>{if(!T(e))return null;const t=N(e,`.${xt.join(",.")}`);return t?S(`.${xt[0]}-toggle`,t):null},Aa=e=>{const t=bo(e.target);t&&(e.preventDefault(),t.show())};class Ts extends et{static selector=vo;static init=Ha;static getInstance=bo;constructor(t){super(t);const{element:s}=this,n=z(s);if(n){const o=N(s,".nav"),i=N(n,".tab-content");this.nav=o,this.content=n,this.tabContent=i,this.dropdown=So(s);const{tab:a}=Co(this);if(o&&!a){const r=S(vo,o),c=r&&z(r);c&&(h(r,y),h(c,u),h(c,y),O(s,xe,"true"))}this._toggleEventListeners(!0)}}get name(){return mo}show(){const{element:t,content:s,nav:n,dropdown:o}=this;if(!(n&&p.get(n))&&!f(t,y)){const{tab:i,content:a}=Co(this);if(n&&oe.set(n,{tab:i,content:a,currentHeight:0,nextHeight:0}),ws.relatedTarget=t,T(i)&&(E(i,ws),!ws.defaultPrevented)){h(t,y),O(t,xe,"true");const r=T(i)&&So(i);if(r&&f(r,y)&&m(r,y),n){const c=()=>{i&&(m(i,y),O(i,xe,"false")),o&&!f(o,y)&&h(o,y)};a&&(f(a,B)||s&&f(s,B))?p.set(n,c,1):c()}a&&(m(a,u),f(a,B)?P(a,()=>$o(this)):$o(this))}}}_toggleEventListeners=t=>{(t?_:M)(this.element,L,Aa)};dispose(){this._toggleEventListeners(),super.dispose()}}const Q="toast",Do="Toast",Pa=`.${Q}`,xa=`[${ve}="${Q}"]`,Ho=`[${ot}="${Q}"]`,Wt="showing",Ao="hide",Ia={animation:!0,autohide:!0,delay:5e3},ys=e=>F(e,Do),La=e=>new $s(e),Po=w(`show.bs.${Q}`),Oa=w(`shown.bs.${Q}`),xo=w(`hide.bs.${Q}`),Na=w(`hidden.bs.${Q}`),Io=e=>{const{element:t,options:s}=e;m(t,Wt),p.clear(t,Wt),E(t,Oa),s.autohide&&p.set(t,()=>e.hide(),s.delay,Q)},Lo=e=>{const{element:t}=e;m(t,Wt),m(t,u),h(t,Ao),p.clear(t,Q),E(t,Na)},ka=e=>{const{element:t,options:s}=e;h(t,Wt),s.animation?(Ht(t),P(t,()=>Lo(e))):Lo(e)},_a=e=>{const{element:t,options:s}=e;p.set(t,()=>{m(t,Ao),Ht(t),h(t,u),h(t,Wt),s.animation?P(t,()=>Io(e)):Io(e)},17,Wt)},Ma=e=>{const{target:t}=e,s=t&&N(t,Ho),n=s&&z(s),o=n&&ys(n);o&&(s&&s.tagName==="A"&&e.preventDefault(),o.relatedTarget=s,o.show())},Ba=e=>{const t=e.target,s=ys(t),{type:n,relatedTarget:o}=e;s&&t!==o&&!t.contains(o)&&([ge,Le].includes(n)?p.clear(t,Q):p.set(t,()=>s.hide(),s.options.delay,Q))};class $s extends et{static selector=Pa;static init=La;static getInstance=ys;constructor(t,s){super(t,s);const{element:n,options:o}=this;o.animation&&!f(n,B)?h(n,B):!o.animation&&f(n,B)&&m(n,B),this.dismiss=S(xa,n),this.triggers=[...Z(Ho,b(n))].filter(i=>z(i)===n),this._toggleEventListeners(!0)}get name(){return Do}get defaults(){return Ia}get isShown(){return f(this.element,u)}show=()=>{const{element:t,isShown:s}=this;t&&!s&&(E(t,Po),Po.defaultPrevented||_a(this))};hide=()=>{const{element:t,isShown:s}=this;t&&s&&(E(t,xo),xo.defaultPrevented||ka(this))};_toggleEventListeners=t=>{const s=t?_:M,{element:n,triggers:o,dismiss:i,options:a,hide:r}=this;i&&s(i,L,r),a.autohide&&[Le,Ls,ge,Oe].forEach(c=>s(n,c,Ba)),o.length&&o.forEach(c=>s(c,L,Ma))};dispose(){const{element:t,isShown:s}=this;this._toggleEventListeners(),p.clear(t,Q),s&&m(t,u),super.dispose()}}const Cs=new Map;[Ve,je,Ge,Je,os,hs,ps,vs,bs,Ts,$s,He].forEach(e=>Cs.set(e.prototype.name,e));const Ra=(e,t)=>{[...t].forEach(s=>e(s))},Fa=(e,t)=>{const s=Dt.getAllFor(e);s&&[...s].forEach(([n,o])=>{t.contains(n)&&o.dispose()})},Ss=e=>{const t=e&&e.nodeName?e:document,s=[...We("*",t)];Cs.forEach(n=>{const{init:o,selector:i}=n;Ra(o,s.filter(a=>Ks(a,i)))})},Wa=e=>{const t=e&&e.nodeName?e:document;Cs.forEach(s=>{Fa(s.prototype.name,t)})};return document.body?Ss():_(document,"DOMContentLoaded",()=>Ss(),{once:!0}),R.Alert=Ve,R.Button=je,R.Carousel=Ge,R.Collapse=Je,R.Dropdown=os,R.Modal=hs,R.Offcanvas=ps,R.Popover=vs,R.ScrollSpy=bs,R.Tab=Ts,R.Toast=$s,R.Tooltip=He,R.initCallback=Ss,R.removeDataAPI=Wa,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({}); //# sourceMappingURL=bootstrap-native.js.map diff --git a/dist/bootstrap-native.js.map b/dist/bootstrap-native.js.map index a074d6e8..f2e9413e 100644 --- a/dist/bootstrap-native.js.map +++ b/dist/bootstrap-native.js.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.6/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.2/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Te = \"aria-labelledby\", Me = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", _ = \"blur\", $ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Tt = \"move\", Mt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: _,\n change: $,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Tt,\n orientationchange: Mt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", _e = \"Backspace\", $e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(\n (t) => V.test(t.brand)\n) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some(\n (t) => t in N.style\n), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(\n e,\n n,\n s\n );\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(\n e,\n n,\n s\n );\n}, _t = (t, e, n, o) => {\n const s = (c) => {\n // istanbul ignore else @preserve\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, $t = () => {\n}, Tn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n _t(document, P, $t, e);\n } catch {\n }\n return t;\n})(), Mn = [\"webkitTransform\", \"transform\"].some(\n (t) => t in N.style\n), kn = \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some(\n (t) => t in N.style\n), Cn = [\"webkitTransition\", \"transition\"].some(\n (t) => t in N.style\n), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (e) => t.nodeType === e\n) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), T = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : globalThis.document, M = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (T(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, M(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (T(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, M(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(\n /[A-Z]/g,\n (J) => ae(J)\n ) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), _n = (t) => Object.values(t), $n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && M(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && T(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, M(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next @preserve */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [\n ...ue(qt, this)\n ].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next @preserve */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(\n t,\n o && fe(e)\n ), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => t ? G(t) ? t.defaultView : i(t) ? t?.ownerDocument?.defaultView : t : window, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!T(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (e) => t.constructor.name.includes(e)\n) || !1, To = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, Mo = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(\n t\n), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), xo = (t, e) => t.matches(e), zo = \"2.0.6\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n M as ObjectAssign,\n w as ObjectEntries,\n $n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n _n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Te as ariaLabelledBy,\n Me as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n _ as blurEvent,\n $ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n To as isNodeList,\n ie as isNumber,\n v as isObject,\n Mo as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n T as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n _e as keyBackspace,\n $e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Tt as moveEvent,\n xe as nativeEvents,\n $t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n _t as one,\n Mt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Tn as supportPassive,\n kn as supportTouch,\n Mn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n this._toggleEventListeners(true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n if (add) {\n if (this.scrollTarget === this.element) {\n this.targets.forEach((targetItem) =>\n this._observer.observe(targetItem)\n );\n } else {\n this._observer.observe(this.element);\n }\n } else this._observer.disconnect();\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Me","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","A$1","V","An","N","R","e","n","o","s","Q","_t","c","$t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","T","q","G","d","M","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","k$1","F","H","b","me","fo","_a","ge","vo","ho","To","Mo","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","getWindow","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","$","O","D","_","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isWin","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"sNAAK,MAA+CA,GAAK,mBAAoBC,GAAK,gBAAuCC,GAAI,cAA0DC,GAAK,aAAcC,GAAK,eAAgBC,GAAK,gBAAyLC,GAAI,mBAAyDC,GAAK,QAASC,GAAK,UAAWC,GAAK,WAA0EC,GAAK,UAA4BC,GAAK,QAAsBC,EAAK,QAA0BC,GAAK,YAA6BC,GAAK,QAASC,GAAK,aAAcC,GAAK,aAAmKC,GAAK,cAAoCC,GAAK,cAAeC,GAAK,YAAsJC,GAAK,aAmD1lCC,GAAK,YAauBC,GAAK,oFAuClCC,GAAK,YAAaC,GAAK,UAAWC,GAAK,YAAaC,GAAK,aAAkHC,GAAK,SAAyMC,GAAK,qBAAsBC,GAAK,kBAAmBC,GAAI,gBAAiBC,GAAI,qBA0B9WC,GAAK,UAAU,cAAeC,GAAID,GAAI,CAAE,UAAWE,EAAE,EAAK,UAAWC,GAAID,GAAIE,GAAI,4BAEvL;AACCC,GAAOJ,GAAE,OAAO,KAAM,GAAMG,GAAE,KAAK,EAAE,KAAK,CAAC,EAAQA,GAAE,KAAKD,EAAC,EACvD,MAASG,GAAI,qBAAsBC,GAAKN,GAAIA,GAAE,OAAO,KACvD,GAAMK,GAAE,KAAK,EAAE,KAAK,CACvB,EAEEA,GAAE,KAAKH,EAAC,EACFA,IAAIA,GAAE,SAAS,SAAS,EAG7B,KAAA,CAAE,KAAMK,EAAG,EAAG,SAAe,CAAC,oBAAqB,aAAa,EAAE,KAClE,GAAM,KAAKA,GAAE,KAChB,EAAE,MAACC,GAAI,CAAC,EAAGC,EAAGC,EAAGC,IAAM,CACrB,MAAMC,EAAID,GAAK,GACf,EAAE,iBACAF,EACAC,EACAE,CACD,CACH,EAAGC,GAAI,CAAC,EAAGJ,EAAGC,EAAGC,IAAM,CACrB,MAAMC,EAAID,GAAK,GACf,EAAE,oBACAF,EACAC,EACAE,C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ACA6E,GACA+B,GACAyH,GACA6C,GACAiJ,GACAO,GACAgC,GACAmC,GACA9G,EACF,EAAE,QAASphB,GAAM+oB,GAAe,IAAI/oB,EAAE,UAAU,KAAMA,CAAC,CAAC,EAQxD,MAAMgpB,GAAuB,CAC3BjP,EACAkP,IACG,CACF,CAAA,GAAGA,CAAU,EAAE,QAASjmB,GAAM+W,EAAS/W,CAAC,CAAC,CAC5C,EAQMkmB,GAAyB,CAAIC,EAAmBC,IAAwB,CACtE,MAAAC,EAAW3jB,GAAK,UAAUyjB,CAAS,EAErCE,GACD,CAAA,GAAGA,CAAQ,EAAE,QAAQ,CAAC,CAAChkB,EAASikB,CAAQ,IAAM,CACzCF,EAAQ,SAAS/jB,CAAO,GACzBikB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOaC,GAAgBH,GAAyB,CACpD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SACjDK,EAAiB,CAAC,GAAGnF,GAAqB,IAAKkF,CAAM,CAAC,EAE7CT,GAAA,QAASW,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAC,CAAA,EAAaF,EAC3BV,GACEW,EACAF,EAAe,OAAQ1E,GAAShY,GAAQgY,EAAM6E,CAAQ,CAAC,CACzD,CAAA,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAExCL,GAAA,QAASe,GAAS,CACRZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,GAAA,EAE9BxiB,EAAY,SAAU,mBAAoB,IAAMwiB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1,52]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.7/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.3/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const ariaChecked = \"aria-checked\", ariaDescription = \"aria-description\", ariaDescribedBy = \"aria-describedby\", ariaExpanded = \"aria-expanded\", ariaHasPopup = \"aria-haspopup\", ariaHidden = \"aria-hidden\", ariaLabel = \"aria-label\", ariaLabelledBy = \"aria-labelledby\", ariaModal = \"aria-modal\", ariaPressed = \"aria-pressed\", ariaSelected = \"aria-selected\", ariaValueMin = \"aria-valuemin\", ariaValueMax = \"aria-valuemax\", ariaValueNow = \"aria-valuenow\", ariaValueText = \"aria-valuetext\", abortEvent = \"abort\", beforeunloadEvent = \"beforeunload\", blurEvent = \"blur\", changeEvent = \"change\", contextmenuEvent = \"contextmenu\", DOMContentLoadedEvent = \"DOMContentLoaded\", DOMMouseScrollEvent = \"DOMMouseScroll\", errorEvent = \"error\", focusEvent = \"focus\", focusinEvent = \"focusin\", focusoutEvent = \"focusout\", gesturechangeEvent = \"gesturechange\", gestureendEvent = \"gestureend\", gesturestartEvent = \"gesturestart\", keydownEvent = \"keydown\", keypressEvent = \"keypress\", keyupEvent = \"keyup\", loadEvent = \"load\", mouseclickEvent = \"click\", mousedblclickEvent = \"dblclick\", mousedownEvent = \"mousedown\", mouseupEvent = \"mouseup\", mousehoverEvent = \"hover\", mouseenterEvent = \"mouseenter\", mouseleaveEvent = \"mouseleave\", mouseinEvent = \"mousein\", mouseoutEvent = \"mouseout\", mouseoverEvent = \"mouseover\", mousemoveEvent = \"mousemove\", mousewheelEvent = \"mousewheel\", moveEvent = \"move\", orientationchangeEvent = \"orientationchange\", pointercancelEvent = \"pointercancel\", pointerdownEvent = \"pointerdown\", pointerleaveEvent = \"pointerleave\", pointermoveEvent = \"pointermove\", pointerupEvent = \"pointerup\", readystatechangeEvent = \"readystatechange\", resetEvent = \"reset\", resizeEvent = \"resize\", selectEvent = \"select\", selectendEvent = \"selectend\", selectstartEvent = \"selectstart\", scrollEvent = \"scroll\", submitEvent = \"submit\", touchstartEvent = \"touchstart\", touchmoveEvent = \"touchmove\", touchcancelEvent = \"touchcancel\", touchendEvent = \"touchend\", unloadEvent = \"unload\", nativeEvents = {\n DOMContentLoaded: DOMContentLoadedEvent,\n DOMMouseScroll: DOMMouseScrollEvent,\n abort: abortEvent,\n beforeunload: beforeunloadEvent,\n blur: blurEvent,\n change: changeEvent,\n click: mouseclickEvent,\n contextmenu: contextmenuEvent,\n dblclick: mousedblclickEvent,\n error: errorEvent,\n focus: focusEvent,\n focusin: focusinEvent,\n focusout: focusoutEvent,\n gesturechange: gesturechangeEvent,\n gestureend: gestureendEvent,\n gesturestart: gesturestartEvent,\n hover: mousehoverEvent,\n keydown: keydownEvent,\n keypress: keypressEvent,\n keyup: keyupEvent,\n load: loadEvent,\n mousedown: mousedownEvent,\n mousemove: mousemoveEvent,\n mousein: mouseinEvent,\n mouseout: mouseoutEvent,\n mouseenter: mouseenterEvent,\n mouseleave: mouseleaveEvent,\n mouseover: mouseoverEvent,\n mouseup: mouseupEvent,\n mousewheel: mousewheelEvent,\n move: moveEvent,\n orientationchange: orientationchangeEvent,\n pointercancel: pointercancelEvent,\n pointerdown: pointerdownEvent,\n pointerleave: pointerleaveEvent,\n pointermove: pointermoveEvent,\n pointerup: pointerupEvent,\n readystatechange: readystatechangeEvent,\n reset: resetEvent,\n resize: resizeEvent,\n scroll: scrollEvent,\n select: selectEvent,\n selectend: selectendEvent,\n selectstart: selectstartEvent,\n submit: submitEvent,\n touchcancel: touchcancelEvent,\n touchend: touchendEvent,\n touchmove: touchmoveEvent,\n touchstart: touchstartEvent,\n unload: unloadEvent\n}, dragEvent = \"drag\", dragstartEvent = \"dragstart\", dragenterEvent = \"dragenter\", dragleaveEvent = \"dragleave\", dragoverEvent = \"dragover\", dragendEvent = \"dragend\", loadstartEvent = \"loadstart\", mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" }, mouseHoverEvents = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, focusEvents = { in: \"focusin\", out: \"focusout\" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', keyboardEventKeys = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, keyAlt = \"Alt\", keyArrowDown = \"ArrowDown\", keyArrowUp = \"ArrowUp\", keyArrowLeft = \"ArrowLeft\", keyArrowRight = \"ArrowRight\", keyBackspace = \"Backspace\", keyCapsLock = \"CapsLock\", keyControl = \"Control\", keyDelete = \"Delete\", keyEnter = \"Enter\", keyNumpadEnter = \"NumpadEnter\", keyEscape = \"Escape\", keyInsert = \"Insert\", keyMeta = \"Meta\", keyPause = \"Pause\", keyScrollLock = \"ScrollLock\", keyShift = \"Shift\", keySpace = \"Space\", keyTab = \"Tab\", animationDuration = \"animationDuration\", animationDelay = \"animationDelay\", animationName = \"animationName\", animationEndEvent = \"animationend\", transitionDuration = \"transitionDuration\", transitionDelay = \"transitionDelay\", transitionEndEvent = \"transitionend\", transitionProperty = \"transitionProperty\", addEventListener = \"addEventListener\", removeEventListener = \"removeEventListener\", bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, offsetHeight = \"offsetHeight\", offsetWidth = \"offsetWidth\", scrollHeight = \"scrollHeight\", scrollWidth = \"scrollWidth\", tabindex = \"tabindex\", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (x) => mobileBrands.test(x.brand)\n ) || mobileBrands.test(navigator?.userAgent) || !1;\n}, isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (x) => appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent\n ) || !1;\n}, isFirefox = () => navigator?.userAgent?.includes(\"Firefox\") || /* istanbul ignore next @preserve */\n!1, support3DTransform = () => [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style), noop = () => {\n}, on = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.addEventListener(\n eventName,\n listener,\n ops\n );\n}, off = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.removeEventListener(\n eventName,\n listener,\n ops\n );\n}, one = (element, eventName, listener, options) => {\n const handlerWrapper = (e) => {\n (e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));\n };\n on(element, eventName, handlerWrapper, options);\n}, supportPassive = () => {\n let result = !1;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => (result = !0, result)\n });\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch {\n }\n return result;\n}, supportTransform = () => [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style), supportTouch = () => \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, supportAnimation = () => [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style), supportTransition = () => [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {\n element.classList.add(...classNAME);\n}, removeClass = (element, ...classNAME) => {\n element.classList.remove(...classNAME);\n}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == \"object\" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (x) => node.nodeType === x\n) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component) => componentData.get(component) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n return element && instanceMap && instanceMap.get(element) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = Data.getAllFor(component);\n !instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));\n }\n}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == \"string\" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === \"Window\" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {\n if (!param) return;\n if (isString(param))\n return getDocument().createElement(param);\n const { tagName } = param, newElement = createElement(tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, createElementNS = (ns, param) => {\n if (!ns || !param) return;\n if (isString(param))\n return getDocument().createElementNS(ns, param);\n const { tagName } = param, newElement = createElementNS(ns, tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {\n const computedStyle = getComputedStyle(element), prop = property.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return computedStyle.getPropertyValue(prop);\n}, getElementAnimationDelay = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementAnimationDuration = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateAnimationEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);\n if (duration) {\n const animationEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);\n };\n element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, getElementTransitionDelay = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(delayValue) * delayScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementTransitionDuration = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateTransitionEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);\n if (duration) {\n const transitionEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => [\"true\", !0].includes(value) ? !0 : [\"false\", !1].includes(value) ? !1 : [\"null\", \"\", null, void 0].includes(value) ? null : value !== \"\" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {\n const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = \"title\";\n return ObjectEntries(data).forEach(([k, v]) => {\n const key = ns && typeof k == \"string\" && k.includes(ns) ? k.replace(ns, \"\").replace(\n /[A-Z]/g,\n (match) => toLowerCase(match)\n ) : (\n /* istanbul ignore next @preserve */\n k\n );\n dataOps[key] = normalizeValue(v);\n }), ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v);\n }), ObjectEntries(defaultOps).forEach(([k, v]) => {\n k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;\n }), normalOps;\n}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: !0,\n bubbles: !0\n });\n return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;\n}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key) && key.includes(\"--\"))\n element.style.setProperty(key, value);\n else {\n const propObject = {};\n propObject[key] = value, ObjectAssign(element.style, propObject);\n }\n });\n}, isMap = (obj) => isObject(obj) && obj.constructor.name === \"Map\" || !1, isNumber = (num) => typeof num == \"number\" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (element, callback, delay, key) => {\n isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */\n null : isNumber(keyTimers) ? keyTimers : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n const keyTimers = TimeCache.get(element);\n key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));\n }\n}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();\nfunction handleKeyboardNavigation(event) {\n const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [\n ...querySelectorAll(focusableSelector, this)\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden)\n );\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];\n code === \"Tab\" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));\n}\nconst hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {\n const isCurrentlyTrapped = hasFocusTrap(target);\n (isCurrentlyTrapped ? off : on)(target, \"keydown\", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);\n}, getBoundingClientRect = (element, includeScale) => {\n const { width, height, top, right, bottom, left } = element.getBoundingClientRect();\n let scaleX = 1, scaleY = 1;\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (\n /* istanbul ignore next @preserve */\n 1\n ), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY\n };\n}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {\n const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;\n return { x, y };\n}, isShadowRoot = (element) => isNode(element) && element.constructor.name === \"ShadowRoot\" || !1, getParentNode = (node) => node.nodeName === \"HTML\" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\nisNode(node) && node.parentNode || // DOM Element detected\nisShadowRoot(node) && node.host || // ShadowRoot detected\ngetDocumentElement(node), isScaledElement = (element) => {\n if (!isHTMLElement(element)) return !1;\n const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;\n}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {\n const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent)\n ), offsets = { x: 0, y: 0 };\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, !0);\n offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height\n };\n};\nlet elementUID = 0, elementMapUID = 0;\nconst elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {\n let result = key ? elementUID : elementMapUID;\n if (key) {\n const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();\n elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);\n } else {\n const elkey = element.id || element;\n elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);\n }\n return result;\n}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === \"CANVAS\" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {\n if (!isNode(element)) return !1;\n const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n}, isElementInViewport = (element) => {\n if (!isNode(element)) return !1;\n const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);\n return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;\n}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == \"function\" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === \"HTMLCollection\" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === \"IMG\" || !1, isJSON = (str) => {\n if (!isString(str)) return !1;\n try {\n JSON.parse(str);\n } catch {\n return !1;\n }\n return !0;\n}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === \"WeakMap\" || !1, isMedia = (element) => isNode(element) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (s) => element.constructor.name.includes(s)\n) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === \"NodeList\" || !1, isRTL = (node) => getDocumentElement(node).dir === \"rtl\", isSVGElement = (element) => isNode(element) && element.constructor.name.includes(\"SVG\") || !1, isTableElement = (element) => isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`\nclosest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(\n selector\n), getCustomElements = (parent) => [...getElementsByTagName(\"*\", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(\n selector\n), matches = (target, selector) => target.matches(selector), version = \"2.0.7\";\nexport {\n ArrayFrom,\n DOMContentLoadedEvent,\n DOMMouseScrollEvent,\n Data,\n Float32ArrayFrom,\n Float64ArrayFrom,\n ObjectAssign,\n ObjectEntries,\n ObjectFromEntries,\n ObjectHasOwn,\n ObjectKeys,\n ObjectValues,\n Timer,\n abortEvent,\n addClass,\n addEventListener,\n animationDelay,\n animationDuration,\n animationEndEvent,\n animationName,\n ariaChecked,\n ariaDescribedBy,\n ariaDescription,\n ariaExpanded,\n ariaHasPopup,\n ariaHidden,\n ariaLabel,\n ariaLabelledBy,\n ariaModal,\n ariaPressed,\n ariaSelected,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n ariaValueText,\n beforeunloadEvent,\n bezierEasings,\n blurEvent,\n changeEvent,\n closest,\n contextmenuEvent,\n createCustomEvent,\n createElement,\n createElementNS,\n dispatchEvent,\n distinct,\n documentBody,\n documentElement,\n documentHead,\n dragEvent,\n dragendEvent,\n dragenterEvent,\n dragleaveEvent,\n dragoverEvent,\n dragstartEvent,\n emulateAnimationEnd,\n emulateTransitionEnd,\n errorEvent,\n focus,\n focusEvent,\n focusEvents,\n focusableSelector,\n focusinEvent,\n focusoutEvent,\n gesturechangeEvent,\n gestureendEvent,\n gesturestartEvent,\n getAttribute,\n getAttributeNS,\n getBoundingClientRect,\n getCustomElements,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getDocumentHead,\n getElementAnimationDelay,\n getElementAnimationDuration,\n getElementById,\n getElementStyle,\n getElementTransitionDelay,\n getElementTransitionDuration,\n getElementsByClassName,\n getElementsByTagName,\n getInstance,\n getNodeScroll,\n getParentNode,\n getRectRelativeToOffsetParent,\n getUID,\n getWindow,\n hasAttribute,\n hasAttributeNS,\n hasClass,\n hasFocusTrap,\n isApple,\n isArray,\n isCanvas,\n isCustomElement,\n isDocument,\n isElement,\n isElementInScrollRange,\n isElementInViewport,\n isElementsArray,\n isFirefox,\n isFunction,\n isHTMLCollection,\n isHTMLElement,\n isHTMLImageElement,\n isJSON,\n isMap,\n isMedia,\n isMobile,\n isNode,\n isNodeList,\n isNumber,\n isObject,\n isRTL,\n isSVGElement,\n isScaledElement,\n isShadowRoot,\n isString,\n isTableElement,\n isWeakMap,\n isWindow,\n keyAlt,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keyBackspace,\n keyCapsLock,\n keyControl,\n keyDelete,\n keyEnter,\n keyEscape,\n keyInsert,\n keyMeta,\n keyNumpadEnter,\n keyPause,\n keyScrollLock,\n keyShift,\n keySpace,\n keyTab,\n keyboardEventKeys,\n keydownEvent,\n keypressEvent,\n keyupEvent,\n loadEvent,\n loadstartEvent,\n matches,\n mouseClickEvents,\n mouseHoverEvents,\n mouseSwipeEvents,\n mouseclickEvent,\n mousedblclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseinEvent,\n mouseleaveEvent,\n mousemoveEvent,\n mouseoutEvent,\n mouseoverEvent,\n mouseupEvent,\n mousewheelEvent,\n moveEvent,\n nativeEvents,\n noop,\n normalizeOptions,\n normalizeValue,\n off,\n offsetHeight,\n offsetWidth,\n on,\n one,\n orientationchangeEvent,\n passiveHandler,\n pointercancelEvent,\n pointerdownEvent,\n pointerleaveEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n querySelectorAll,\n readystatechangeEvent,\n reflow,\n removeAttribute,\n removeAttributeNS,\n removeClass,\n removeEventListener,\n resetEvent,\n resizeEvent,\n scrollEvent,\n scrollHeight,\n scrollWidth,\n selectEvent,\n selectendEvent,\n selectstartEvent,\n setAttribute,\n setAttributeNS,\n setElementStyle,\n submitEvent,\n support3DTransform,\n supportAnimation,\n supportPassive,\n supportTouch,\n supportTransform,\n supportTransition,\n tabindex,\n toLowerCase,\n toUpperCase,\n toggleFocusTrap,\n touchEvents,\n touchcancelEvent,\n touchendEvent,\n touchmoveEvent,\n touchstartEvent,\n transitionDelay,\n transitionDuration,\n transitionEndEvent,\n transitionProperty,\n unloadEvent,\n userAgent,\n userAgentData,\n version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isRoot = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget.scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isRoot ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Toggles on/off the component observer.\n *\n * @param self the ScrollSpy instance\n * @param add when `true`, listener is added\n */\nconst toggleObservers = (\n { targets, scrollTarget, element, _observer }: ScrollSpy,\n add?: boolean,\n) => {\n if (add) {\n if (scrollTarget === element) {\n targets.forEach((targetItem) => _observer.observe(targetItem));\n } else {\n _observer.observe(element);\n }\n } else _observer.disconnect();\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: HTMLElement) => {\n return scrollTarget.scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n toggleObservers(this, true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n const clone = { ...this };\n toggleObservers(clone);\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["ariaDescribedBy","ariaExpanded","ariaHidden","ariaModal","ariaPressed","ariaSelected","focusEvent","focusinEvent","focusoutEvent","keydownEvent","keyupEvent","mouseclickEvent","mousedownEvent","mousehoverEvent","mouseenterEvent","mouseleaveEvent","pointerdownEvent","pointermoveEvent","pointerupEvent","touchstartEvent","dragstartEvent","focusableSelector","keyArrowDown","keyArrowUp","keyArrowLeft","keyArrowRight","keyEscape","transitionDuration","transitionDelay","transitionEndEvent","transitionProperty","isApple","appleBrands","x","noop","on","element","eventName","listener","options","ops","off","getAttribute","att","hasAttribute","setAttribute","value","removeAttribute","addClass","classNAME","removeClass","hasClass","isObject","obj","isNode","node","isHTMLElement","componentData","Data","component","instance","instanceMap","getInstance","target","isString","str","isWindow","isDocument","getDocument","ObjectAssign","source","createElement","param","tagName","newElement","attr","dispatchEvent","event","getElementStyle","property","computedStyle","prop","getElementTransitionDelay","propertyValue","delayValue","delayScale","duration","getElementTransitionDuration","durationValue","durationScale","emulateTransitionEnd","handler","called","endEvent","delay","transitionEndWrapper","e","focus","normalizeValue","ObjectEntries","toLowerCase","normalizeOptions","defaultOps","inputOps","ns","INPUT","data","normalOps","dataOps","title","k","v","key","match","ObjectKeys","createCustomEvent","eventType","config","OriginalCustomEvent","passiveHandler","reflow","setElementStyle","styles","propObject","isMap","isNumber","num","TimeCache","Timer","callback","keyTimers","querySelectorAll","selector","parent","focusTrapMap","handleKeyboardNavigation","shiftKey","code","doc","focusableElements","el","firstFocusable","lastFocusable","hasFocusTrap","toggleFocusTrap","isCurrentlyTrapped","getBoundingClientRect","includeScale","width","height","top","right","bottom","left","scaleX","scaleY","offsetWidth2","offsetHeight2","getDocumentBody","getDocumentElement","isShadowRoot","getParentNode","elementUID","elementMapUID","elementIDMap","getUID","result","elID","elMap","elkey","getWindow","isArray","isElementInScrollRange","clientHeight","isFunction","fn","isNodeList","isRTL","isTableElement","closest","querySelector","getElementsByTagName","getElementsByClassName","matches","f","t","c","i","s","o","r","E","d","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","prevInstance","alertSelector","alertDismissSelector","getAlertInstance","alertInitCallback","Alert","closeAlertEvent","closedAlertEvent","alertTransitionEnd","self","add","action","addListener","removeListener","dismiss","close","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","attValue","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","activeItem","getActiveIndex","orientation","directionClass","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","RTL","carouselDragHandler","carouselPointerDownHandler","controls","indicators","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","activeIndex","transitionItem","ar","isPaused","idx","next","eventProperties","touch","pause","interval","keyboard","arrow","indicator","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","triggers","btn","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","menuEnd","p","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","targetLeft","targetTop","targetWidth","targetHeight","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","dropdownPreventScroll","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","dropdownClickHandler","activeElement","open","menuItems","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","appendPopup","customContainer","containerIsBody","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","afterModalShow","beforeModalShow","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","overlayDelay","currentOpen","that","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","tooltipDefaults","_","B","m","n","h","l","u","a","b","g","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","tempDocument","createTip","id","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tipComponent","elem","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","hideTooltipEvent","enabled","tr","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isRoot","links","scrollHEIGHT","href","targetItem","rect","getOffsetHeight","link","toggleObservers","targets","_observer","getScrollHeight","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","context","compData","initCallback","lookUp","elemCollection","cs","init","removeDataAPI","comp"],"mappings":"iCAAK,MAAqEA,GAAkB,mBAAoBC,GAAe,gBAAiDC,GAAa,cAA6EC,GAAY,aAAcC,GAAc,eAAgBC,GAAe,gBAAqYC,GAAa,QAASC,GAAe,UAAWC,GAAgB,WAAsH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AAC,EAAW7nB,GAAK,UAAUC,CAAS,EAErC4nB,GACD,CAAA,GAAGA,CAAQ,EAAE,QAAQ,CAAC,CAACnpB,EAASwB,CAAQ,IAAM,CACzC0nB,EAAQ,SAASlpB,CAAO,GACzBwB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOa4nB,GAAgBF,GAAyB,CACpD,MAAMG,EAASH,GAAWA,EAAQ,SAAWA,EAAU,SACjDI,EAAiB,CAAC,GAAGrgB,GAAqB,IAAKogB,CAAM,CAAC,EAE7CP,GAAA,QAASS,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAxjB,CAAA,EAAaujB,EAC3BR,GACES,EACAF,EAAe,OAAQvE,GAAS5b,GAAQ4b,EAAM/e,CAAQ,CAAC,CACzD,CAAA,CACD,CACH,EAOayjB,GAAiBP,GAAyB,CACrD,MAAMG,EAASH,GAAWA,EAAQ,SAAWA,EAAU,SAExCJ,GAAA,QAASY,GAAS,CACRT,GAAAS,EAAK,UAAU,KAAML,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,GAAA,EAE9Bpe,EAAY,SAAU,mBAAoB,IAAMoe,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1,52]} \ No newline at end of file diff --git a/dist/bootstrap-native.mjs b/dist/bootstrap-native.mjs index 846a6b9d..0ce1c9e8 100644 --- a/dist/bootstrap-native.mjs +++ b/dist/bootstrap-native.mjs @@ -1,71 +1,34 @@ -var qo = Object.defineProperty; -var Yo = (t, s, e) => s in t ? qo(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e; -var d = (t, s, e) => Yo(t, typeof s != "symbol" ? s + "" : s, e); -const Rn = "aria-describedby", ke = "aria-expanded", ve = "aria-hidden", Ne = "aria-modal", Ns = "aria-pressed", Ge = "aria-selected", Uo = "DOMContentLoaded", Ts = "focus", ys = "focusin", Wn = "focusout", Me = "keydown", Zo = "keyup", _ = "click", jn = "mousedown", Jo = "hover", Be = "mouseenter", Cs = "mouseleave", Go = "pointerdown", Qo = "pointermove", ti = "pointerup", xs = "touchstart", ei = "dragstart", si = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]', ls = "ArrowDown", ds = "ArrowUp", Ms = "ArrowLeft", Bs = "ArrowRight", Hs = "Escape", ni = "transitionDuration", oi = "transitionDelay", Qe = "transitionend", Vn = "transitionProperty", ii = navigator.userAgentData, Le = ii, { userAgent: ri } = navigator, Ie = ri, Fs = /iPhone|iPad|iPod|Android/i; -// istanbul ignore else @preserve -Le ? Le.brands.some((t) => Fs.test(t.brand)) : Fs.test(Ie); -const Rs = /(iPhone|iPod|iPad)/, ci = Le ? Le.brands.some( - (t) => Rs.test(t.brand) -) : ( - /* istanbul ignore next @preserve */ - Rs.test(Ie) -); -Ie && Ie.includes("Firefox"); -const { head: Fe } = document; -["webkitPerspective", "perspective"].some( - (t) => t in Fe.style -); -const zn = (t, s, e, n) => { +const bn = "aria-describedby", me = "aria-expanded", se = "aria-hidden", be = "aria-modal", vs = "aria-pressed", Le = "aria-selected", ss = "focus", ns = "focusin", En = "focusout", Ee = "keydown", No = "keyup", N = "click", wn = "mousedown", Oo = "hover", we = "mouseenter", os = "mouseleave", ko = "pointerdown", _o = "pointermove", Mo = "pointerup", is = "touchstart", Bo = "dragstart", Ro = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]', je = "ArrowDown", ze = "ArrowUp", bs = "ArrowLeft", Es = "ArrowRight", rs = "Escape", Fo = "transitionDuration", Wo = "transitionDelay", Ne = "transitionend", Tn = "transitionProperty", Vo = () => { + const e = /(iPhone|iPod|iPad)/; + return navigator?.userAgentData?.brands.some( + (t) => e.test(t.brand) + ) || /* istanbul ignore next @preserve */ + e.test( + navigator?.userAgent + ) || !1; +}, ve = () => { +}, jo = (e, t, s, n) => { const o = n || !1; - t.addEventListener( + e.addEventListener( + t, s, - e, o ); -}, Xn = (t, s, e, n) => { +}, zo = (e, t, s, n) => { const o = n || !1; - t.removeEventListener( + e.removeEventListener( + t, s, - e, o ); -}, ai = (t, s, e, n) => { - const o = (i) => { - // istanbul ignore else @preserve - (i.target === t || i.currentTarget === t) && (e.apply(t, [i]), Xn(t, s, o, n)); - }; - zn(t, s, o, n); -}, he = () => { -}; -(() => { - let t = !1; - try { - const s = Object.defineProperty({}, "passive", { - get: () => (t = !0, t) - }); - // istanbul ignore next @preserve - ai(document, Uo, he, s); - } catch { - } - return t; -})(); -["webkitTransform", "transform"].some( - (t) => t in Fe.style -); -["webkitAnimation", "animation"].some( - (t) => t in Fe.style -); -["webkitTransition", "transition"].some( - (t) => t in Fe.style -); -const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t, s, e) => t.setAttribute(s, e), It = (t, s) => t.removeAttribute(s), f = (t, ...s) => { - t.classList.add(...s); -}, b = (t, ...s) => { - t.classList.remove(...s); -}, g = (t, s) => t.classList.contains(s), be = (t) => t != null && typeof t == "object" || !1, A = (t) => be(t) && typeof t.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some( - (s) => t.nodeType === s -) || !1, y = (t) => A(t) && t.nodeType === 1 || !1, Wt = /* @__PURE__ */ new Map(), Dt = { - data: Wt, +}, et = (e, t) => e.getAttribute(t), Gt = (e, t) => e.hasAttribute(t), O = (e, t, s) => e.setAttribute(t, s), Pt = (e, t) => e.removeAttribute(t), h = (e, ...t) => { + e.classList.add(...t); +}, m = (e, ...t) => { + e.classList.remove(...t); +}, f = (e, t) => e.classList.contains(t), ne = (e) => e != null && typeof e == "object" || !1, H = (e) => ne(e) && typeof e.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some( + (t) => e.nodeType === t +) || !1, T = (e) => H(e) && e.nodeType === 1 || !1, Bt = /* @__PURE__ */ new Map(), Dt = { + data: Bt, /** * Sets web components data. * @@ -73,10 +36,8 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param component the component's name or a unique key * @param instance the component instance */ - set: (t, s, e) => { - if (!y(t)) return; - // istanbul ignore else @preserve - Wt.has(s) || Wt.set(s, /* @__PURE__ */ new Map()), Wt.get(s).set(t, e); + set: (e, t, s) => { + T(e) && (Bt.has(t) || Bt.set(t, /* @__PURE__ */ new Map()), Bt.get(t).set(e, s)); }, /** * Returns all instances for specified component. @@ -84,7 +45,7 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param component the component's name or a unique key * @returns all the component instances */ - getAllFor: (t) => Wt.get(t) || null, + getAllFor: (e) => Bt.get(e) || null, /** * Returns the instance associated with the target. * @@ -92,10 +53,10 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param component the component's name or a unique key * @returns the instance */ - get: (t, s) => { - if (!y(t) || !s) return null; - const e = Dt.getAllFor(s); - return t && e && e.get(t) || null; + get: (e, t) => { + if (!T(e) || !t) return null; + const s = Dt.getAllFor(t); + return e && s && s.get(e) || null; }, /** * Removes web components data. @@ -103,29 +64,26 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param element target element * @param component the component's name or a unique key */ - remove: (t, s) => { - const e = Dt.getAllFor(s); - if (!e || !y(t)) return; - e.delete(t); - // istanbul ignore else @preserve - e.size === 0 && Wt.delete(s); - } -}, z = (t, s) => Dt.get(t, s), we = (t) => typeof t == "string" || !1, li = (t) => be(t) && t.constructor.name === "Window" || !1, Kn = (t) => A(t) && t.nodeType === 9 || !1, E = (t) => li(t) ? t.document : Kn(t) ? t : A(t) ? t.ownerDocument : globalThis.document, dt = (t, ...s) => Object.assign(t, ...s), Et = (t) => { - if (!t) return; - if (we(t)) - return E().createElement(t); - const { tagName: s } = t, e = Et(s); + remove: (e, t) => { + const s = Dt.getAllFor(t); + !s || !T(e) || (s.delete(e), s.size === 0 && Bt.delete(t)); + } +}, W = (e, t) => Dt.get(e, t), oe = (e) => typeof e == "string" || !1, Ko = (e) => ne(e) && e.constructor.name === "Window" || !1, $n = (e) => H(e) && e.nodeType === 9 || !1, E = (e) => Ko(e) ? e.document : $n(e) ? e : H(e) ? e.ownerDocument : globalThis.document, ct = (e, ...t) => Object.assign(e, ...t), Et = (e) => { if (!e) return; - const n = { ...t }; - return delete n.tagName, dt(e, n); -}, $ = (t, s) => t.dispatchEvent(s), K = (t, s) => { - const e = getComputedStyle(t), n = s.replace("webkit", "Webkit").replace(/([A-Z])/g, "-$1").toLowerCase(); - return e.getPropertyValue(n); -}, di = (t) => { - const s = K(t, Vn), e = K(t, oi), n = e.includes("ms") ? ( + if (oe(e)) + return E().createElement(e); + const { tagName: t } = e, s = Et(t); + if (!s) return; + const n = { ...e }; + return delete n.tagName, ct(s, n); +}, b = (e, t) => e.dispatchEvent(t), z = (e, t) => { + const s = getComputedStyle(e), n = t.replace("webkit", "Webkit").replace(/([A-Z])/g, "-$1").toLowerCase(); + return s.getPropertyValue(n); +}, Uo = (e) => { + const t = z(e, Tn), s = z(e, Wo), n = s.includes("ms") ? ( /* istanbul ignore next */ 1 - ) : 1e3, o = s && s !== "none" ? parseFloat(e) * n : ( + ) : 1e3, o = t && t !== "none" ? parseFloat(s) * n : ( /* istanbul ignore next */ 0 ); @@ -133,11 +91,11 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t /* istanbul ignore next */ 0 ) : o; -}, $e = (t) => { - const s = K(t, Vn), e = K(t, ni), n = e.includes("ms") ? ( +}, ie = (e) => { + const t = z(e, Tn), s = z(e, Fo), n = s.includes("ms") ? ( /* istanbul ignore next */ 1 - ) : 1e3, o = s && s !== "none" ? parseFloat(e) * n : ( + ) : 1e3, o = t && t !== "none" ? parseFloat(s) * n : ( /* istanbul ignore next */ 0 ); @@ -145,54 +103,50 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t /* istanbul ignore next */ 0 ) : o; -}, D = (t, s) => { - let e = 0; - const n = new Event(Qe), o = $e(t), i = di(t); +}, A = (e, t) => { + let s = 0; + const n = new Event(Ne), o = ie(e), i = Uo(e); if (o) { - const r = (c) => { - // istanbul ignore else @preserve - c.target === t && (s.apply(t, [c]), t.removeEventListener(Qe, r), e = 1); + const r = (a) => { + a.target === e && (t.apply(e, [a]), e.removeEventListener(Ne, r), s = 1); }; - t.addEventListener(Qe, r), setTimeout(() => { - // istanbul ignore next @preserve - e || $(t, n); + e.addEventListener(Ne, r), setTimeout(() => { + s || b(e, n); }, o + i + 17); } else - s.apply(t, [n]); -}, ht = (t, s) => t.focus(s), Ws = (t) => ["true", !0].includes(t) ? !0 : ["false", !1].includes(t) ? !1 : ["null", "", null, void 0].includes(t) ? null : t !== "" && !Number.isNaN(+t) ? +t : t, He = (t) => Object.entries(t), Xt = (t) => t.toLowerCase(), hi = (t, s, e, n) => { - const o = { ...e }, i = { ...t.dataset }, r = { ...s }, c = {}, l = "title"; - return He(i).forEach(([a, h]) => { - const p = typeof a == "string" && a.includes(n) ? a.replace(n, "").replace( + t.apply(e, [n]); +}, lt = (e, t) => e.focus(t), ws = (e) => ["true", !0].includes(e) ? !0 : ["false", !1].includes(e) ? !1 : ["null", "", null, void 0].includes(e) ? null : e !== "" && !Number.isNaN(+e) ? +e : e, he = (e) => Object.entries(e), Wt = (e) => e.toLowerCase(), Xo = (e, t, s, n) => { + const o = { ...s }, i = { ...e.dataset }, r = { ...t }, a = {}, c = "title"; + return he(i).forEach(([l, d]) => { + const g = typeof l == "string" && l.includes(n) ? l.replace(n, "").replace( /[A-Z]/g, - (u) => Xt(u) + (y) => Wt(y) ) : ( /* istanbul ignore next @preserve */ - a + l ); - c[p] = Ws(h); - }), He(o).forEach(([a, h]) => { - o[a] = Ws(h); - }), He(s).forEach(([a, h]) => { - // istanbul ignore else @preserve - a in o ? r[a] = o[a] : a in c ? r[a] = c[a] : r[a] = a === l ? st(t, l) : h; + a[g] = ws(d); + }), he(o).forEach(([l, d]) => { + o[l] = ws(d); + }), he(t).forEach(([l, d]) => { + l in o ? r[l] = o[l] : l in a ? r[l] = a[l] : r[l] = l === c ? et(e, c) : d; }), r; -}, js = (t) => Object.keys(t), T = (t, s) => { - const e = new CustomEvent(t, { +}, Ts = (e) => Object.keys(e), w = (e, t) => { + const s = new CustomEvent(e, { cancelable: !0, bubbles: !0 }); - // istanbul ignore else @preserve - return be(s) && dt(e, s), e; -}, ge = { passive: !0 }, Nt = (t) => t.offsetHeight, k = (t, s) => { - He(s).forEach(([e, n]) => { - if (n && we(e) && e.includes("--")) - t.style.setProperty(e, n); + return ne(t) && ct(s, t), s; +}, Jt = { passive: !0 }, Nt = (e) => e.offsetHeight, P = (e, t) => { + he(t).forEach(([s, n]) => { + if (n && oe(s) && s.includes("--")) + e.style.setProperty(s, n); else { const o = {}; - o[e] = n, dt(t.style, o); + o[s] = n, ct(e.style, o); } }); -}, hs = (t) => be(t) && t.constructor.name === "Map" || !1, fi = (t) => typeof t == "number" || !1, vt = /* @__PURE__ */ new Map(), m = { +}, Ke = (e) => ne(e) && e.constructor.name === "Map" || !1, qo = (e) => typeof e == "number" || !1, mt = /* @__PURE__ */ new Map(), p = { /** * Sets a new timeout timer for an element, or element -> key association. * @@ -201,14 +155,8 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param delay the execution delay * @param key a unique key */ - set: (t, s, e, n) => { - if (!y(t)) return; - // istanbul ignore else @preserve - if (n && n.length) { - // istanbul ignore else @preserve - vt.has(t) || vt.set(t, /* @__PURE__ */ new Map()), vt.get(t).set(n, setTimeout(s, e)); - } else - vt.set(t, setTimeout(s, e)); + set: (e, t, s, n) => { + T(e) && (n && n.length ? (mt.has(e) || mt.set(e, /* @__PURE__ */ new Map()), mt.get(e).set(n, setTimeout(t, s))) : mt.set(e, setTimeout(t, s))); }, /** * Returns the timer associated with the target. @@ -217,11 +165,11 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param key a unique * @returns the timer */ - get: (t, s) => { - if (!y(t)) return null; - const e = vt.get(t); - return s && e && hs(e) ? e.get(s) || /* istanbul ignore next @preserve */ - null : fi(e) ? e : null; + get: (e, t) => { + if (!T(e)) return null; + const s = mt.get(e); + return t && s && Ke(s) ? s.get(t) || /* istanbul ignore next @preserve */ + null : qo(s) ? s : null; }, /** * Clears the element's timer. @@ -229,144 +177,120 @@ const st = (t, s) => t.getAttribute(s), fe = (t, s) => t.hasAttribute(s), O = (t * @param element target element * @param key a unique key */ - clear: (t, s) => { - if (!y(t)) return; - const e = vt.get(t); - if (s && s.length && hs(e)) { - clearTimeout(e.get(s)), e.delete(s); - // istanbul ignore else @preserve - e.size === 0 && vt.delete(t); - } else - clearTimeout(e), vt.delete(t); - } -}, J = (t, s) => (A(s) ? s : E()).querySelectorAll(t), fs = /* @__PURE__ */ new Map(); -function gi(t) { - const { shiftKey: s, code: e } = t, n = E(this), o = [ - ...J(si, this) + clear: (e, t) => { + if (!T(e)) return; + const s = mt.get(e); + t && t.length && Ke(s) ? (clearTimeout(s.get(t)), s.delete(t), s.size === 0 && mt.delete(e)) : (clearTimeout(s), mt.delete(e)); + } +}, Z = (e, t) => (H(t) ? t : E()).querySelectorAll(e), Ue = /* @__PURE__ */ new Map(); +function Yo(e) { + const { shiftKey: t, code: s } = e, n = E(this), o = [ + ...Z(Ro, this) ].filter( - (c) => !fe(c, "disabled") && !st(c, ve) + (a) => !Gt(a, "disabled") && !et(a, se) ); if (!o.length) return; const i = o[0], r = o[o.length - 1]; - // istanbul ignore else @preserve - e === "Tab" && (s && n.activeElement === i ? (r.focus(), t.preventDefault()) : !s && n.activeElement === r && (i.focus(), t.preventDefault())); + s === "Tab" && (t && n.activeElement === i ? (r.focus(), e.preventDefault()) : !t && n.activeElement === r && (i.focus(), e.preventDefault())); } -const pi = (t) => fs.has(t) === !0, Re = (t) => { - const s = pi(t); - (s ? Xn : zn)(t, "keydown", gi), s ? fs.delete(t) : fs.set(t, !0); -}, Ee = (t, s) => { - const { width: e, height: n, top: o, right: i, bottom: r, left: c } = t.getBoundingClientRect(); - let l = 1, a = 1; - if (s && y(t)) { - const { offsetWidth: h, offsetHeight: p } = t; - l = h > 0 ? Math.round(e) / h : ( +const Zo = (e) => Ue.has(e) === !0, Te = (e) => { + const t = Zo(e); + (t ? zo : jo)(e, "keydown", Yo), t ? Ue.delete(e) : Ue.set(e, !0); +}, re = (e, t) => { + const { width: s, height: n, top: o, right: i, bottom: r, left: a } = e.getBoundingClientRect(); + let c = 1, l = 1; + if (t && T(e)) { + const { offsetWidth: d, offsetHeight: g } = e; + c = d > 0 ? Math.round(s) / d : ( /* istanbul ignore next @preserve */ 1 - ), a = p > 0 ? Math.round(n) / p : ( + ), l = g > 0 ? Math.round(n) / g : ( /* istanbul ignore next @preserve */ 1 ); } return { - width: e / l, - height: n / a, - top: o / a, - right: i / l, - bottom: r / a, - left: c / l, - x: c / l, - y: o / a + width: s / c, + height: n / l, + top: o / l, + right: i / c, + bottom: r / l, + left: a / c, + x: a / c, + y: o / l }; -}, xt = (t) => E(t).body, it = (t) => E(t).documentElement, qn = (t) => A(t) && t.constructor.name === "ShadowRoot" || !1, ui = (t) => t.nodeName === "HTML" ? t : y(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node -A(t) && t.parentNode || // DOM Element detected -qn(t) && t.host || // ShadowRoot detected -it(t); -let Vs = 0, zs = 0; -const jt = /* @__PURE__ */ new Map(), Yn = (t, s) => { - let e = s ? Vs : zs; - if (s) { - const n = Yn(t), o = jt.get(n) || /* @__PURE__ */ new Map(); - jt.has(n) || jt.set(n, o), hs(o) && !o.has(s) ? (o.set(s, e), Vs += 1) : e = o.get(s); +}, yt = (e) => E(e).body, dt = (e) => E(e).documentElement, yn = (e) => H(e) && e.constructor.name === "ShadowRoot" || !1, Go = (e) => e.nodeName === "HTML" ? e : T(e) && e.assignedSlot || // step into the shadow DOM of the parent of a slotted node +H(e) && e.parentNode || // DOM Element detected +yn(e) && e.host || // ShadowRoot detected +dt(e); +let $s = 0, ys = 0; +const Rt = /* @__PURE__ */ new Map(), Cn = (e, t) => { + let s = t ? $s : ys; + if (t) { + const n = Cn(e), o = Rt.get(n) || /* @__PURE__ */ new Map(); + Rt.has(n) || Rt.set(n, o), Ke(o) && !o.has(t) ? (o.set(t, s), $s += 1) : s = o.get(t); } else { - const n = t.id || t; - jt.has(n) ? e = jt.get(n) : (jt.set(n, e), zs += 1); - } - return e; -}, mi = (t) => { - var s; - return t ? Kn(t) ? t.defaultView : A(t) ? (s = t == null ? void 0 : t.ownerDocument) == null ? void 0 : s.defaultView : t : window; -}, vi = (t) => Array.isArray(t) || !1, Un = (t) => { - if (!A(t)) return !1; - const { top: s, bottom: e } = Ee(t), { clientHeight: n } = it(t); - return s <= n && e >= 0; -}, bi = (t) => typeof t == "function" || !1, wi = (t) => be(t) && t.constructor.name === "NodeList" || !1, Ct = (t) => it(t).dir === "rtl", $i = (t) => A(t) && ["TABLE", "TD", "TH"].includes(t.nodeName) || !1, N = (t, s) => t ? t.closest(s) || // break out of `ShadowRoot` -N(t.getRootNode().host, s) : null, S = (t, s) => y(t) ? t : (A(s) ? s : E()).querySelector(t), Ps = (t, s) => (A(s) ? s : E()).getElementsByTagName( - t -), at = (t, s) => (s && A(s) ? s : E()).getElementsByClassName( - t -), Zn = (t, s) => t.matches(s), zt = {}, Jn = (t) => { - const { type: s, currentTarget: e } = t; - [...zt[s]].forEach(([n, o]) => { - /* istanbul ignore else @preserve */ - e === n && [...o].forEach(([i, r]) => { - i.apply(n, [t]), typeof r == "object" && r.once && R(n, s, i, r); + const n = e.id || e; + Rt.has(n) ? s = Rt.get(n) : (Rt.set(n, s), ys += 1); + } + return s; +}, Jo = (e) => e ? $n(e) ? e.defaultView : H(e) ? e?.ownerDocument?.defaultView : e : window, Qo = (e) => Array.isArray(e) || !1, Sn = (e) => { + if (!H(e)) return !1; + const { top: t, bottom: s } = re(e), { clientHeight: n } = dt(e); + return t <= n && s >= 0; +}, ti = (e) => typeof e == "function" || !1, ei = (e) => ne(e) && e.constructor.name === "NodeList" || !1, $t = (e) => dt(e).dir === "rtl", si = (e) => H(e) && ["TABLE", "TD", "TH"].includes(e.nodeName) || !1, k = (e, t) => e ? e.closest(t) || // break out of `ShadowRoot` +k(e.getRootNode().host, t) : null, D = (e, t) => T(e) ? e : (H(t) ? t : E()).querySelector(e), as = (e, t) => (H(t) ? t : E()).getElementsByTagName( + e +), rt = (e, t) => (t && H(t) ? t : E()).getElementsByClassName( + e +), xn = (e, t) => e.matches(t), Ft = {}, Dn = (e) => { + const { type: t, currentTarget: s } = e; + [...Ft[t]].forEach(([n, o]) => { + s === n && [...o].forEach(([i, r]) => { + i.apply(n, [e]), typeof r == "object" && r.once && B(n, t, i, r); }); }); -}, F = (t, s, e, n) => { - /* istanbul ignore else @preserve */ - zt[s] || (zt[s] = /* @__PURE__ */ new Map()); - const o = zt[s]; - /* istanbul ignore else @preserve */ - o.has(t) || o.set(t, /* @__PURE__ */ new Map()); - const i = o.get(t), { size: r } = i; - i.set(e, n); - /* istanbul ignore else @preserve */ - r || t.addEventListener(s, Jn, n); -}, R = (t, s, e, n) => { - const o = zt[s], i = o && o.get(t), r = i && i.get(e), c = r !== void 0 ? r : n; - /* istanbul ignore else @preserve */ - i && i.has(e) && i.delete(e); - /* istanbul ignore else @preserve */ - o && (!i || !i.size) && o.delete(t); - /* istanbul ignore else @preserve */ - (!o || !o.size) && delete zt[s]; - /* istanbul ignore else @preserve */ - (!i || !i.size) && t.removeEventListener( - s, - Jn, - c +}, M = (e, t, s, n) => { + Ft[t] || (Ft[t] = /* @__PURE__ */ new Map()); + const o = Ft[t]; + o.has(e) || o.set(e, /* @__PURE__ */ new Map()); + const i = o.get(e), { size: r } = i; + i.set(s, n); + r || e.addEventListener(t, Dn, n); +}, B = (e, t, s, n) => { + const o = Ft[t], i = o && o.get(e), r = i && i.get(s), a = r !== void 0 ? r : n; + i && i.has(s) && i.delete(s); + o && (!i || !i.size) && o.delete(e); + (!o || !o.size) && delete Ft[t]; + (!i || !i.size) && e.removeEventListener( + t, + Dn, + a ); -}, B = "fade", v = "show", We = "data-bs-dismiss", je = "alert", Gn = "Alert", Ei = "5.0.15", Ti = Ei; -class nt { +}, _ = "fade", u = "show", $e = "data-bs-dismiss", ye = "alert", Hn = "Alert", ni = "5.1.0", oi = ni; +class st { /** * @param target `HTMLElement` or selector string * @param config component instance options */ - constructor(s, e) { - /** just to have something to extend from */ - // istanbul ignore next @preserve coverage wise this isn't important - d(this, "_toggleEventListeners", () => { - }); + constructor(t, s) { let n; try { - if (y(s)) - n = s; - else if (we(s)) { - n = S(s); - // istanbul ignore else @preserve - if (!n) throw Error(`"${s}" is not a valid selector.`); + if (T(t)) + n = t; + else if (oe(t)) { + if (n = D(t), !n) throw Error(`"${t}" is not a valid selector.`); } else throw Error("your target is not an instance of HTMLElement."); } catch (i) { throw Error(`${this.name} Error: ${i.message}`); } const o = Dt.get(n, this.name); - // istanbul ignore else @preserve - o && o._toggleEventListeners(), this.element = n, this.options = this.defaults && js(this.defaults).length ? hi(n, this.defaults, e || {}, "bs") : {}, Dt.set(n, this.name, this); + o && o._toggleEventListeners(), this.element = n, this.options = this.defaults && Ts(this.defaults).length ? Xo(n, this.defaults, s || {}, "bs") : {}, Dt.set(n, this.name, this); } // istanbul ignore next @preserve get version() { - return Ti; + return oi; } // istanbul ignore next @preserve get name() { @@ -376,308 +300,265 @@ class nt { get defaults() { return {}; } + /** just to have something to extend from */ + // istanbul ignore next @preserve coverage wise this isn't important + _toggleEventListeners = () => { + }; /** Removes component from target element. */ dispose() { - Dt.remove(this.element, this.name), js(this).forEach((s) => { - delete this[s]; + Dt.remove(this.element, this.name), Ts(this).forEach((t) => { + delete this[t]; }); } } -const yi = `.${je}`, Ci = `[${We}="${je}"]`, xi = (t) => z(t, Gn), Hi = (t) => new ee(t), Xs = T( - `close.bs.${je}` -), Pi = T( - `closed.bs.${je}` -), Ks = (t) => { - const { element: s } = t; - $(s, Pi), t._toggleEventListeners(), t.dispose(), s.remove(); +const ii = `.${ye}`, ri = `[${$e}="${ye}"]`, ai = (e) => W(e, Hn), ci = (e) => new An(e), Cs = w( + `close.bs.${ye}` +), li = w( + `closed.bs.${ye}` +), Ss = (e) => { + const { element: t } = e; + b(t, li), e._toggleEventListeners(), e.dispose(), t.remove(); }; -class ee extends nt { - constructor(e) { - super(e); - d(this, "dismiss"); - // ALERT PUBLIC METHODS - // ==================== - /** - * Public method that hides the `.alert` element from the user, - * disposes the instance once animation is complete, then - * removes the element from the DOM. - */ - d(this, "close", () => { - const { element: e } = this; - // istanbul ignore else @preserve - e && g(e, v) && ($(e, Xs), Xs.defaultPrevented || (b(e, v), g(e, B) ? D(e, () => Ks(this)) : Ks(this))); - }); - /** - * Toggle on / off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - d(this, "_toggleEventListeners", (e) => { - const n = e ? F : R, { dismiss: o, close: i } = this; - // istanbul ignore else @preserve - o && n(o, _, i); - }); - this.dismiss = S(Ci, this.element), this._toggleEventListeners(!0); +class An extends st { + static selector = ii; + static init = ci; + static getInstance = ai; + dismiss; + constructor(t) { + super(t), this.dismiss = D(ri, this.element), this._toggleEventListeners(!0); } /** Returns component name string. */ get name() { - return Gn; + return Hn; } + // ALERT PUBLIC METHODS + // ==================== + /** + * Public method that hides the `.alert` element from the user, + * disposes the instance once animation is complete, then + * removes the element from the DOM. + */ + close = () => { + const { element: t } = this; + t && f(t, u) && (b(t, Cs), Cs.defaultPrevented || (m(t, u), f(t, _) ? A(t, () => Ss(this)) : Ss(this))); + }; + /** + * Toggle on / off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners = (t) => { + const s = t ? M : B, { dismiss: n, close: o } = this; + n && s(n, N, o); + }; /** Remove the component from target element. */ dispose() { this._toggleEventListeners(), super.dispose(); } } -d(ee, "selector", yi), d(ee, "init", Hi), d(ee, "getInstance", xi); -const x = "active", rt = "data-bs-toggle", Si = "button", Qn = "Button", Ai = `[${rt}="${Si}"]`, Di = (t) => z(t, Qn), ki = (t) => new se(t); -class se extends nt { +const $ = "active", ot = "data-bs-toggle", di = "button", Pn = "Button", hi = `[${ot}="${di}"]`, fi = (e) => W(e, Pn), gi = (e) => new In(e); +class In extends st { + static selector = hi; + static init = gi; + static getInstance = fi; + isActive = !1; /** * @param target usually a `.btn` element */ - constructor(e) { - super(e); - d(this, "isActive", !1); - // BUTTON PUBLIC METHODS - // ===================== - /** - * Toggles the state of the target button. - * - * @param e usually `click` Event object - */ - d(this, "toggle", (e) => { - e && e.preventDefault(); - const { element: n, isActive: o } = this; - !g(n, "disabled") && !st(n, "disabled") && ((o ? b : f)(n, x), O(n, Ns, o ? "false" : "true"), this.isActive = g(n, x)); - }); - // BUTTON PRIVATE METHOD - // ===================== - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - d(this, "_toggleEventListeners", (e) => { - (e ? F : R)(this.element, _, this.toggle); - }); - const { element: n } = this; - this.isActive = g(n, x), O(n, Ns, String(!!this.isActive)), this._toggleEventListeners(!0); + constructor(t) { + super(t); + const { element: s } = this; + this.isActive = f(s, $), O(s, vs, String(!!this.isActive)), this._toggleEventListeners(!0); } /** * Returns component name string. */ get name() { - return Qn; + return Pn; } + // BUTTON PUBLIC METHODS + // ===================== + /** + * Toggles the state of the target button. + * + * @param e usually `click` Event object + */ + toggle = (t) => { + t && t.preventDefault(); + const { element: s, isActive: n } = this; + !f(s, "disabled") && !et(s, "disabled") && ((n ? m : h)(s, $), O(s, vs, n ? "false" : "true"), this.isActive = f(s, $)); + }; + // BUTTON PRIVATE METHOD + // ===================== + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners = (t) => { + (t ? M : B)(this.element, N, this.toggle); + }; /** Removes the `Button` component from the target element. */ dispose() { this._toggleEventListeners(), super.dispose(); } } -d(se, "selector", Ai), d(se, "init", ki), d(se, "getInstance", Di); -const gs = "data-bs-target", kt = "carousel", to = "Carousel", qs = "data-bs-parent", Li = "data-bs-container", Y = (t) => { - const s = [gs, qs, Li, "href"], e = E(t); - return s.map((n) => { - const o = st(t, n); - return o ? n === qs ? N(t, o) : S(o, e) : null; +const Xe = "data-bs-target", Ht = "carousel", Ln = "Carousel", xs = "data-bs-parent", pi = "data-bs-container", U = (e) => { + const t = [Xe, xs, pi, "href"], s = E(e); + return t.map((n) => { + const o = et(e, n); + return o ? n === xs ? k(e, o) : D(o, s) : null; }).filter((n) => n)[0]; -}, Te = `[data-bs-ride="${kt}"]`, Z = `${kt}-item`, ps = "data-bs-slide-to", $t = "data-bs-slide", Tt = "paused", Ys = { +}, ae = `[data-bs-ride="${Ht}"]`, Y = `${Ht}-item`, qe = "data-bs-slide-to", bt = "data-bs-slide", wt = "paused", Ds = { pause: "hover", keyboard: !1, touch: !0, interval: 5e3 -}, ft = (t) => z(t, to), Ii = (t) => new ne(t); -let te = 0, Pe = 0, ts = 0; -const es = T(`slide.bs.${kt}`), us = T(`slid.bs.${kt}`), Us = (t) => { - const { index: s, direction: e, element: n, slides: o, options: i } = t; - // istanbul ignore else @preserve - if (t.isAnimating) { - const r = ms(t), c = e === "left" ? "next" : "prev", l = e === "left" ? "start" : "end"; - f(o[s], x), b(o[s], `${Z}-${c}`), b(o[s], `${Z}-${l}`), b(o[r], x), b(o[r], `${Z}-${l}`), $(n, us), m.clear(n, $t), t.cycle && !E(n).hidden && i.interval && !t.isPaused && t.cycle(); +}, ht = (e) => W(e, Ln), ui = (e) => new On(e); +let Zt = 0, fe = 0, Oe = 0; +const ke = w(`slide.bs.${Ht}`), Ye = w(`slid.bs.${Ht}`), Hs = (e) => { + const { index: t, direction: s, element: n, slides: o, options: i } = e; + if (e.isAnimating) { + const r = Ze(e), a = s === "left" ? "next" : "prev", c = s === "left" ? "start" : "end"; + h(o[t], $), m(o[t], `${Y}-${a}`), m(o[t], `${Y}-${c}`), m(o[r], $), m(o[r], `${Y}-${c}`), b(n, Ye), p.clear(n, bt), e.cycle && !E(n).hidden && i.interval && !e.isPaused && e.cycle(); } }; -function _i() { - const t = ft(this); - // istanbul ignore else @preserve - t && !t.isPaused && !m.get(this, Tt) && f(this, Tt); +function mi() { + const e = ht(this); + e && !e.isPaused && !p.get(this, wt) && h(this, wt); } -function Oi() { - const t = ft(this); - // istanbul ignore else @preserve - t && t.isPaused && !m.get(this, Tt) && t.cycle(); +function vi() { + const e = ht(this); + e && e.isPaused && !p.get(this, wt) && e.cycle(); } -function Ni(t) { - t.preventDefault(); - const s = N(this, Te) || Y(this), e = ft(s); - // istanbul ignore else @preserve - if (e && !e.isAnimating) { - const n = +(st(this, ps) || // istanbul ignore next @preserve +function bi(e) { + e.preventDefault(); + const t = k(this, ae) || U(this), s = ht(t); + if (s && !s.isAnimating) { + const n = +(et(this, qe) || // istanbul ignore next @preserve 0); - // istanbul ignore else @preserve - this && !g(this, x) && // event target is not active - !Number.isNaN(n) && e.to(n); + this && !f(this, $) && // event target is not active + !Number.isNaN(n) && s.to(n); } } -function Mi(t) { - t.preventDefault(); - const s = N(this, Te) || Y(this), e = ft(s); - // istanbul ignore else @preserve - if (e && !e.isAnimating) { - const n = st(this, $t); - // istanbul ignore else @preserve - n === "next" ? e.next() : n === "prev" && e.prev(); +function Ei(e) { + e.preventDefault(); + const t = k(this, ae) || U(this), s = ht(t); + if (s && !s.isAnimating) { + const n = et(this, bt); + n === "next" ? s.next() : n === "prev" && s.prev(); } } -const Bi = ({ code: t, target: s }) => { - const e = E(s), [n] = [...J(Te, e)].filter( - (i) => Un(i) - ), o = ft(n); - // istanbul ignore next @preserve - if (o && !o.isAnimating && !/textarea|input/i.test(s.nodeName)) { - const i = Ct(n), r = i ? Ms : Bs, c = i ? Bs : Ms; - // istanbul ignore else @preserve - t === c ? o.prev() : t === r && o.next(); +const wi = ({ code: e, target: t }) => { + const s = E(t), [n] = [...Z(ae, s)].filter( + (i) => Sn(i) + ), o = ht(n); + if (o && !o.isAnimating && !/textarea|input/i.test(t.nodeName)) { + const i = $t(n); + e === (i ? Es : bs) ? o.prev() : e === (i ? bs : Es) && o.next(); } }; -function Zs(t) { - const { target: s } = t, e = ft(this); - // istanbul ignore next @preserve - e && e.isTouch && (e.indicator && !e.indicator.contains(s) || !e.controls.includes(s)) && (t.stopImmediatePropagation(), t.stopPropagation(), t.preventDefault()); +function As(e) { + const { target: t } = e, s = ht(this); + s && s.isTouch && (s.indicator && !s.indicator.contains(t) || !s.controls.includes(t)) && (e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault()); } -function Fi(t) { - const { target: s } = t, e = ft(this); - // istanbul ignore else @preserve - if (e && !e.isAnimating && !e.isTouch) { - const { controls: n, indicators: o } = e; - // istanbul ignore else @preserve - if (![...n, ...o].every( - (i) => i === s || i.contains(s) - )) { - te = t.pageX; - // istanbul ignore else @preserve - this.contains(s) && (e.isTouch = !0, eo(e, !0)); - } +function Ti(e) { + const { target: t } = e, s = ht(this); + if (s && !s.isAnimating && !s.isTouch) { + const { controls: n, indicators: o } = s; + [...n, ...o].every( + (i) => i === t || i.contains(t) + ) || (Zt = e.pageX, this.contains(t) && (s.isTouch = !0, Nn(s, !0))); } } -const Ri = (t) => { - Pe = t.pageX; -}, Wi = (t) => { - var o; - const { target: s } = t, e = E(s), n = [...J(Te, e)].map((i) => ft(i)).find((i) => i.isTouch); - // istanbul ignore else @preserve +const $i = (e) => { + fe = e.pageX; +}, yi = (e) => { + const { target: t } = e, s = E(t), n = [...Z(ae, s)].map((o) => ht(o)).find((o) => o.isTouch); if (n) { - const { element: i, index: r } = n, c = Ct(i); - if (ts = t.pageX, n.isTouch = !1, eo(n), !((o = e.getSelection()) != null && o.toString().length) && i.contains(s) && Math.abs(te - ts) > 120) { - // istanbul ignore else @preserve - Pe < te ? n.to(r + (c ? -1 : 1)) : Pe > te && n.to(r + (c ? 1 : -1)); - } - te = 0, Pe = 0, ts = 0; - } -}, ss = (t, s) => { - const { indicators: e } = t; - [...e].forEach((n) => b(n, x)); - // istanbul ignore else @preserve - t.indicators[s] && f(e[s], x); -}, eo = (t, s) => { - const { element: e } = t, n = s ? F : R; + const { element: o, index: i } = n, r = $t(o); + Oe = e.pageX, n.isTouch = !1, Nn(n), !s.getSelection()?.toString().length && o.contains(t) && Math.abs(Zt - Oe) > 120 && (fe < Zt ? n.to(i + (r ? -1 : 1)) : fe > Zt && n.to(i + (r ? 1 : -1))), Zt = 0, fe = 0, Oe = 0; + } +}, _e = (e, t) => { + const { indicators: s } = e; + [...s].forEach((n) => m(n, $)), e.indicators[t] && h(s[t], $); +}, Nn = (e, t) => { + const { element: s } = e, n = t ? M : B; n( - E(e), - Qo, - Ri, - ge + E(s), + _o, + $i, + Jt ), n( - E(e), - ti, - Wi, - ge + E(s), + Mo, + yi, + Jt ); -}, ms = (t) => { - const { slides: s, element: e } = t, n = S(`.${Z}.${x}`, e); - return y(n) ? [...s].indexOf(n) : -1; +}, Ze = (e) => { + const { slides: t, element: s } = e, n = D(`.${Y}.${$}`, s); + return T(n) ? [...t].indexOf(n) : -1; }; -class ne extends nt { +class On extends st { + static selector = ae; + static init = ui; + static getInstance = ht; /** * @param target mostly a `.carousel` element * @param config instance options */ - constructor(e, n) { - super(e, n); - /** - * Toggles all event listeners for the `Carousel` instance. - * - * @param add when `TRUE` event listeners are added - */ - d(this, "_toggleEventListeners", (e) => { - const { element: n, options: o, slides: i, controls: r, indicators: c } = this, { touch: l, pause: a, interval: h, keyboard: p } = o, u = e ? F : R; - a && h && (u(n, Be, _i), u(n, Cs, Oi)), l && i.length > 2 && (u( - n, - Go, - Fi, - ge - ), u(n, xs, Zs, { passive: !1 }), u(n, ei, Zs, { passive: !1 })); - // istanbul ignore else @preserve - r.length && r.forEach((C) => { - // istanbul ignore else @preserve - C && u(C, _, Mi); - }); - // istanbul ignore else @preserve - c.length && c.forEach((C) => { - u(C, _, Ni); - }), p && u(E(n), Me, Bi); - }); - const { element: o } = this; - this.direction = Ct(o) ? "right" : "left", this.isTouch = !1, this.slides = at(Z, o); - const { slides: i } = this; - if (i.length >= 2) { - const r = ms(this), c = [...i].find( - (h) => Zn(h, `.${Z}-next,.${Z}-next`) + constructor(t, s) { + super(t, s); + const { element: n } = this; + this.direction = $t(n) ? "right" : "left", this.isTouch = !1, this.slides = rt(Y, n); + const { slides: o } = this; + if (o.length >= 2) { + const i = Ze(this), r = [...o].find( + (l) => xn(l, `.${Y}-next,.${Y}-next`) ); - this.index = r; - const l = E(o); + this.index = i; + const a = E(n); this.controls = [ - ...J(`[${$t}]`, o), - ...J( - `[${$t}][${gs}="#${o.id}"]`, - l + ...Z(`[${bt}]`, n), + ...Z( + `[${bt}][${Xe}="#${n.id}"]`, + a ) - ].filter((h, p, u) => p === u.indexOf(h)), this.indicator = S(`.${kt}-indicators`, o), this.indicators = [ - ...this.indicator ? J(`[${ps}]`, this.indicator) : [], - ...J( - `[${ps}][${gs}="#${o.id}"]`, - l + ].filter((l, d, g) => d === g.indexOf(l)), this.indicator = D(`.${Ht}-indicators`, n), this.indicators = [ + ...this.indicator ? Z(`[${qe}]`, this.indicator) : [], + ...Z( + `[${qe}][${Xe}="#${n.id}"]`, + a ) - ].filter((h, p, u) => p === u.indexOf(h)); - const { options: a } = this; - this.options.interval = a.interval === !0 ? Ys.interval : a.interval; - // istanbul ignore next @preserve - impossible to test - c ? this.index = [...i].indexOf(c) : r < 0 && (this.index = 0, f(i[0], x), this.indicators.length && ss(this, 0)); - // istanbul ignore else @preserve - this.indicators.length && ss(this, this.index), this._toggleEventListeners(!0), a.interval && this.cycle(); + ].filter((l, d, g) => d === g.indexOf(l)); + const { options: c } = this; + this.options.interval = c.interval === !0 ? Ds.interval : c.interval, r ? this.index = [...o].indexOf(r) : i < 0 && (this.index = 0, h(o[0], $), this.indicators.length && _e(this, 0)), this.indicators.length && _e(this, this.index), this._toggleEventListeners(!0), c.interval && this.cycle(); } } /** * Returns component name string. */ get name() { - return to; + return Ln; } /** * Returns component default options. */ get defaults() { - return Ys; + return Ds; } /** * Check if instance is paused. */ get isPaused() { - return g(this.element, Tt); + return f(this.element, wt); } /** * Check if instance is animating. */ get isAnimating() { - return S( - `.${Z}-next,.${Z}-prev`, + return D( + `.${Y}-next,.${Y}-prev`, this.element ) !== null; } @@ -685,37 +566,33 @@ class ne extends nt { // ======================= /** Slide automatically through items. */ cycle() { - const { element: e, options: n, isPaused: o, index: i } = this; - m.clear(e, kt), o && (m.clear(e, Tt), b(e, Tt)), m.set( - e, + const { element: t, options: s, isPaused: n, index: o } = this; + p.clear(t, Ht), n && (p.clear(t, wt), m(t, wt)), p.set( + t, () => { - // istanbul ignore else @preserve - this.element && !this.isPaused && !this.isTouch && Un(e) && this.to(i + 1); + this.element && !this.isPaused && !this.isTouch && Sn(t) && this.to(o + 1); }, - n.interval, - kt + s.interval, + Ht ); } /** Pause the automatic cycle. */ pause() { - const { element: e, options: n } = this; - // istanbul ignore else @preserve - !this.isPaused && n.interval && (f(e, Tt), m.set( - e, + const { element: t, options: s } = this; + !this.isPaused && s.interval && (h(t, wt), p.set( + t, () => { }, 1, - Tt + wt )); } /** Slide to the next item. */ next() { - // istanbul ignore else @preserve this.isAnimating || this.to(this.index + 1); } /** Slide to the previous item. */ prev() { - // istanbul ignore else @preserve this.isAnimating || this.to(this.index - 1); } /** @@ -723,297 +600,266 @@ class ne extends nt { * * @param idx the index of the item to jump to */ - to(e) { - const { element: n, slides: o, options: i } = this, r = ms(this), c = Ct(n); - let l = e; - if (!this.isAnimating && r !== l && !m.get(n, $t)) { - // istanbul ignore else @preserve - r < l || r === 0 && l === o.length - 1 ? this.direction = c ? "right" : "left" : (r > l || r === o.length - 1 && l === 0) && (this.direction = c ? "left" : "right"); - const { direction: a } = this; - l < 0 ? l = o.length - 1 : l >= o.length && (l = 0); - const h = a === "left" ? "next" : "prev", p = a === "left" ? "start" : "end", u = { - relatedTarget: o[l], - from: r, - to: l, - direction: a + to(t) { + const { element: s, slides: n, options: o } = this, i = Ze(this), r = $t(s); + let a = t; + if (!this.isAnimating && i !== a && !p.get(s, bt)) { + i < a || i === 0 && a === n.length - 1 ? this.direction = r ? "right" : "left" : (i > a || i === n.length - 1 && a === 0) && (this.direction = r ? "left" : "right"); + const { direction: c } = this; + a < 0 ? a = n.length - 1 : a >= n.length && (a = 0); + const l = c === "left" ? "next" : "prev", d = c === "left" ? "start" : "end", g = { + relatedTarget: n[a], + from: i, + to: a, + direction: c }; - dt(es, u), dt(us, u), $(n, es), es.defaultPrevented || (this.index = l, ss(this, l), $e(o[l]) && g(n, "slide") ? m.set( - n, + ct(ke, g), ct(Ye, g), b(s, ke), ke.defaultPrevented || (this.index = a, _e(this, a), ie(n[a]) && f(s, "slide") ? p.set( + s, () => { - f(o[l], `${Z}-${h}`), Nt(o[l]), f(o[l], `${Z}-${p}`), f(o[r], `${Z}-${p}`), D( - o[l], - () => this.slides && this.slides.length && Us(this) + h(n[a], `${Y}-${l}`), Nt(n[a]), h(n[a], `${Y}-${d}`), h(n[i], `${Y}-${d}`), A( + n[a], + () => this.slides && this.slides.length && Hs(this) ); }, 0, - $t - ) : (f(o[l], x), b(o[r], x), m.set( - n, + bt + ) : (h(n[a], $), m(n[i], $), p.set( + s, () => { - m.clear(n, $t); - // istanbul ignore else @preserve - n && i.interval && !this.isPaused && this.cycle(), $(n, us); + p.clear(s, bt), s && o.interval && !this.isPaused && this.cycle(), b(s, Ye); }, 0, - $t + bt ))); } } + /** + * Toggles all event listeners for the `Carousel` instance. + * + * @param add when `TRUE` event listeners are added + */ + _toggleEventListeners = (t) => { + const { element: s, options: n, slides: o, controls: i, indicators: r } = this, { touch: a, pause: c, interval: l, keyboard: d } = n, g = t ? M : B; + c && l && (g(s, we, mi), g(s, os, vi)), a && o.length > 2 && (g( + s, + ko, + Ti, + Jt + ), g(s, is, As, { passive: !1 }), g(s, Bo, As, { passive: !1 })), i.length && i.forEach((y) => { + y && g(y, N, Ei); + }), r.length && r.forEach((y) => { + g(y, N, bi); + }), d && g(E(s), Ee, wi); + }; /** Remove `Carousel` component from target. */ dispose() { - const { isAnimating: e } = this, n = { + const { isAnimating: t } = this, s = { ...this, - isAnimating: e + isAnimating: t }; - this._toggleEventListeners(), super.dispose(); - // istanbul ignore next @preserve - impossible to test in playwright - n.isAnimating && D(n.slides[n.index], () => { - Us(n); + this._toggleEventListeners(), super.dispose(), s.isAnimating && A(s.slides[s.index], () => { + Hs(s); }); } } -d(ne, "selector", Te), d(ne, "init", Ii), d(ne, "getInstance", ft); -const _t = "collapsing", q = "collapse", so = "Collapse", ji = `.${q}`, no = `[${rt}="${q}"]`, Vi = { parent: null }, Se = (t) => z(t, so), zi = (t) => new oe(t), Js = T(`show.bs.${q}`), Xi = T(`shown.bs.${q}`), Gs = T(`hide.bs.${q}`), Ki = T(`hidden.bs.${q}`), qi = (t) => { - const { element: s, parent: e, triggers: n } = t; - $(s, Js), Js.defaultPrevented || (m.set(s, he, 17), e && m.set(e, he, 17), f(s, _t), b(s, q), k(s, { height: `${s.scrollHeight}px` }), D(s, () => { - m.clear(s), e && m.clear(e), n.forEach((o) => O(o, ke, "true")), b(s, _t), f(s, q), f(s, v), k(s, { height: "" }), $(s, Xi); +const It = "collapsing", K = "collapse", kn = "Collapse", Ci = `.${K}`, _n = `[${ot}="${K}"]`, Si = { parent: null }, ge = (e) => W(e, kn), xi = (e) => new Mn(e), Ps = w(`show.bs.${K}`), Di = w(`shown.bs.${K}`), Is = w(`hide.bs.${K}`), Hi = w(`hidden.bs.${K}`), Ai = (e) => { + const { element: t, parent: s, triggers: n } = e; + b(t, Ps), Ps.defaultPrevented || (p.set(t, ve, 17), s && p.set(s, ve, 17), h(t, It), m(t, K), P(t, { height: `${t.scrollHeight}px` }), A(t, () => { + p.clear(t), s && p.clear(s), n.forEach((o) => O(o, me, "true")), m(t, It), h(t, K), h(t, u), P(t, { height: "" }), b(t, Di); })); -}, Qs = (t) => { - const { element: s, parent: e, triggers: n } = t; - $(s, Gs), Gs.defaultPrevented || (m.set(s, he, 17), e && m.set(e, he, 17), k(s, { height: `${s.scrollHeight}px` }), b(s, q), b(s, v), f(s, _t), Nt(s), k(s, { height: "0px" }), D(s, () => { - m.clear(s); - // istanbul ignore else @preserve - e && m.clear(e), n.forEach((o) => O(o, ke, "false")), b(s, _t), f(s, q), k(s, { height: "" }), $(s, Ki); +}, Ls = (e) => { + const { element: t, parent: s, triggers: n } = e; + b(t, Is), Is.defaultPrevented || (p.set(t, ve, 17), s && p.set(s, ve, 17), P(t, { height: `${t.scrollHeight}px` }), m(t, K), m(t, u), h(t, It), Nt(t), P(t, { height: "0px" }), A(t, () => { + p.clear(t), s && p.clear(s), n.forEach((o) => O(o, me, "false")), m(t, It), h(t, K), P(t, { height: "" }), b(t, Hi); })); -}, Yi = (t) => { - const { target: s } = t, e = s && N(s, no), n = e && Y(e), o = n && Se(n); - // istanbul ignore else @preserve - o && o.toggle(), e && e.tagName === "A" && t.preventDefault(); +}, Pi = (e) => { + const { target: t } = e, s = t && k(t, _n), n = s && U(s), o = n && ge(n); + o && o.toggle(), s && s.tagName === "A" && e.preventDefault(); }; -class oe extends nt { +class Mn extends st { + static selector = Ci; + static init = xi; + static getInstance = ge; /** * @param target and `Element` that matches the selector * @param config instance options */ - constructor(e, n) { - super(e, n); - /** - * Toggles on/off the event listener(s) of the `Collapse` instance. - * - * @param add when `true`, the event listener is added - */ - d(this, "_toggleEventListeners", (e) => { - const n = e ? F : R, { triggers: o } = this; - // istanbul ignore else @preserve - o.length && o.forEach( - (i) => n(i, _, Yi) - ); - }); - const { element: o, options: i } = this, r = E(o); - this.triggers = [...J(no, r)].filter( - (c) => Y(c) === o - ), this.parent = y(i.parent) ? i.parent : we(i.parent) ? Y(o) || S(i.parent, r) : null, this._toggleEventListeners(!0); + constructor(t, s) { + super(t, s); + const { element: n, options: o } = this, i = E(n); + this.triggers = [...Z(_n, i)].filter( + (r) => U(r) === n + ), this.parent = T(o.parent) ? o.parent : oe(o.parent) ? U(n) || D(o.parent, i) : null, this._toggleEventListeners(!0); } /** * Returns component name string. */ get name() { - return so; + return kn; } /** * Returns component default options. */ get defaults() { - return Vi; + return Si; } // COLLAPSE PUBLIC METHODS // ======================= /** Hides the collapse. */ hide() { - const { triggers: e, element: n } = this; - // istanbul ignore else @preserve - if (!m.get(n)) { - Qs(this); - // istanbul ignore else @preserve - e.length && e.forEach((o) => f(o, `${q}d`)); - } + const { triggers: t, element: s } = this; + p.get(s) || (Ls(this), t.length && t.forEach((n) => h(n, `${K}d`))); } /** Shows the collapse. */ show() { - const { element: e, parent: n, triggers: o } = this; - let i, r; - if (n && (i = [ - ...J(`.${q}.${v}`, n) - ].find((c) => Se(c)), r = i && Se(i)), (!n || !m.get(n)) && !m.get(e)) { - r && i !== e && (Qs(r), r.triggers.forEach((c) => { - f(c, `${q}d`); - })), qi(this); - // istanbul ignore else @preserve - o.length && o.forEach((c) => b(c, `${q}d`)); - } + const { element: t, parent: s, triggers: n } = this; + let o, i; + s && (o = [ + ...Z(`.${K}.${u}`, s) + ].find((r) => ge(r)), i = o && ge(o)), (!s || !p.get(s)) && !p.get(t) && (i && o !== t && (Ls(i), i.triggers.forEach((r) => { + h(r, `${K}d`); + })), Ai(this), n.length && n.forEach((r) => m(r, `${K}d`))); } /** Toggles the visibility of the collapse. */ toggle() { - g(this.element, v) ? this.hide() : this.show(); + f(this.element, u) ? this.hide() : this.show(); } + /** + * Toggles on/off the event listener(s) of the `Collapse` instance. + * + * @param add when `true`, the event listener is added + */ + _toggleEventListeners = (t) => { + const s = t ? M : B, { triggers: n } = this; + n.length && n.forEach( + (o) => s(o, N, Pi) + ); + }; /** Remove the `Collapse` component from the target `Element`. */ dispose() { this._toggleEventListeners(), super.dispose(); } } -d(oe, "selector", ji), d(oe, "init", zi), d(oe, "getInstance", Se); -const Ot = ["dropdown", "dropup", "dropstart", "dropend"], oo = "Dropdown", io = "dropdown-menu", ro = (t) => { - const s = N(t, "A"); - return t.tagName === "A" && // anchor href starts with # - fe(t, "href") && st(t, "href").slice(-1) === "#" || // OR a child of an anchor with href starts with # - s && fe(s, "href") && st(s, "href").slice(-1) === "#"; -}, [et, vs, bs, ws] = Ot, co = `[${rt}="${et}"]`, Kt = (t) => z(t, oo), Ui = (t) => new ie(t), Zi = `${io}-end`, tn = [et, vs], en = [bs, ws], sn = ["A", "BUTTON"], Ji = { +const Lt = ["dropdown", "dropup", "dropstart", "dropend"], Bn = "Dropdown", Rn = "dropdown-menu", Fn = (e) => { + const t = k(e, "A"); + return e.tagName === "A" && // anchor href starts with # + Gt(e, "href") && et(e, "href").slice(-1) === "#" || // OR a child of an anchor with href starts with # + t && Gt(t, "href") && et(t, "href").slice(-1) === "#"; +}, [tt, Ge, Je, Qe] = Lt, Wn = `[${ot}="${tt}"]`, Vt = (e) => W(e, Bn), Ii = (e) => new zn(e), Li = `${Rn}-end`, Ns = [tt, Ge], Os = [Je, Qe], ks = ["A", "BUTTON"], Ni = { offset: 5, // [number] 5(px) display: "dynamic" // [dynamic|static] -}, ns = T( - `show.bs.${et}` -), nn = T( - `shown.bs.${et}` -), os = T( - `hide.bs.${et}` -), on = T(`hidden.bs.${et}`), ao = T(`updated.bs.${et}`), lo = (t) => { - const { element: s, menu: e, parentElement: n, options: o } = t, { offset: i } = o; - // istanbul ignore else @preserve: this test requires a navbar - if (K(e, "position") !== "static") { - const r = Ct(s), c = g(e, Zi); - ["margin", "top", "bottom", "left", "right"].forEach((I) => { - const pt = {}; - pt[I] = "", k(e, pt); +}, Me = w( + `show.bs.${tt}` +), _s = w( + `shown.bs.${tt}` +), Be = w( + `hide.bs.${tt}` +), Ms = w(`hidden.bs.${tt}`), Vn = w(`updated.bs.${tt}`), jn = (e) => { + const { element: t, menu: s, parentElement: n, options: o } = e, { offset: i } = o; + if (z(s, "position") !== "static") { + const r = $t(t), a = f(s, Li); + ["margin", "top", "bottom", "left", "right"].forEach((L) => { + const gt = {}; + gt[L] = "", P(s, gt); }); - let a = Ot.find( - (I) => g(n, I) + let l = Lt.find( + (L) => f(n, L) ) || // istanbul ignore next @preserve: fallback position - et; - const h = { + tt; + const d = { dropdown: [i, 0, 0], dropup: [0, 0, i], dropstart: r ? [-1, 0, 0, i] : [-1, i, 0], dropend: r ? [-1, i, 0] : [-1, 0, 0, i] - }, p = { + }, g = { dropdown: { top: "100%" }, dropup: { top: "auto", bottom: "100%" }, dropstart: r ? { left: "100%", right: "auto" } : { left: "auto", right: "100%" }, dropend: r ? { left: "auto", right: "100%" } : { left: "100%", right: "auto" }, menuStart: r ? { right: "0", left: "auto" } : { right: "auto", left: "0" }, menuEnd: r ? { right: "auto", left: "0" } : { right: "0", left: "auto" } - }, { offsetWidth: u, offsetHeight: C } = e, { clientWidth: j, clientHeight: w } = it(s), { - left: M, - top: W, - width: Bt, - height: ct - } = Ee(s), H = M - u - i < 0, tt = M + u + Bt + i >= j, ot = W + C + i >= w, V = W + C + ct + i >= w, X = W - C - i < 0, P = (!r && c || r && !c) && M + Bt - u < 0, Ft = (r && c || !r && !c) && M + u >= j; - if (en.includes(a) && H && tt && (a = et), a === bs && (r ? tt : H) && (a = ws), a === ws && (r ? H : tt) && (a = bs), a === vs && X && !V && (a = et), a === et && V && !X && (a = vs), en.includes(a) && ot && dt(p[a], { + }, { offsetWidth: y, offsetHeight: S } = s, { clientWidth: R, clientHeight: v } = dt(t), { + left: V, + top: X, + width: kt, + height: it + } = re(t), C = V - y - i < 0, Q = V + y + kt + i >= R, nt = X + S + i >= v, F = X + S + it + i >= v, j = X - S - i < 0, x = (!r && a || r && !a) && V + kt - y < 0, _t = (r && a || !r && !a) && V + y >= R; + if (Os.includes(l) && C && Q && (l = tt), l === Je && (r ? Q : C) && (l = Qe), l === Qe && (r ? C : Q) && (l = Je), l === Ge && j && !F && (l = tt), l === tt && F && !j && (l = Ge), Os.includes(l) && nt && ct(g[l], { top: "auto", bottom: 0 - }), tn.includes(a) && (P || Ft)) { - let I = { left: "auto", right: "auto" }; - // istanbul ignore else @preserve - !P && Ft && !r && (I = { left: "auto", right: 0 }); - // istanbul ignore else @preserve - P && !Ft && r && (I = { left: 0, right: "auto" }); - // istanbul ignore else @preserve - I && dt(p[a], I); + }), Ns.includes(l) && (x || _t)) { + let L = { left: "auto", right: "auto" }; + !x && _t && !r && (L = { left: "auto", right: 0 }), x && !_t && r && (L = { left: 0, right: "auto" }), L && ct(g[l], L); } - const gt = h[a]; - if (k(e, { - ...p[a], - margin: `${gt.map((I) => I && `${I}px`).join(" ")}` - }), tn.includes(a) && c) { - // istanbul ignore else @preserve - c && k(e, p[!r && P || r && Ft ? "menuStart" : "menuEnd"]); - } - $(n, ao); - } -}, Gi = (t) => [...t.children].map((s) => { - if (s && sn.includes(s.tagName)) return s; - const { firstElementChild: e } = s; - return e && sn.includes(e.tagName) ? e : null; -}).filter((s) => s), rn = (t) => { - const { element: s, options: e, menu: n } = t, o = t.open ? F : R, i = E(s); - o(i, _, cn), o(i, Ts, cn), o(i, Me, tr), o(i, Zo, er); - // istanbul ignore else @preserve - e.display === "dynamic" && (t.open ? t._observer.observe(n) : t._observer.disconnect()); -}, Ve = (t) => { - const s = [...Ot, "btn-group", "input-group"].map( - (e) => at(`${e} ${v}`, E(t)) - ).find((e) => e.length); - if (s && s.length) - return [...s[0].children].find( - (e) => Ot.some((n) => n === st(e, rt)) + const ft = d[l]; + P(s, { + ...g[l], + margin: `${ft.map((L) => L && `${L}px`).join(" ")}` + }), Ns.includes(l) && a && a && P(s, g[!r && x || r && _t ? "menuStart" : "menuEnd"]), b(n, Vn); + } +}, Oi = (e) => [...e.children].map((t) => { + if (t && ks.includes(t.tagName)) return t; + const { firstElementChild: s } = t; + return s && ks.includes(s.tagName) ? s : null; +}).filter((t) => t), Bs = (e) => { + const { element: t, options: s, menu: n } = e, o = e.open ? M : B, i = E(t); + o(i, N, Rs), o(i, ss, Rs), o(i, Ee, _i), o(i, No, Mi), s.display === "dynamic" && (e.open ? e._observer.observe(n) : e._observer.disconnect()); +}, Ce = (e) => { + const t = [...Lt, "btn-group", "input-group"].map( + (s) => rt(`${s} ${u}`, E(e)) + ).find((s) => s.length); + if (t && t.length) + return [...t[0].children].find( + (s) => Lt.some((n) => n === et(s, ot)) ); -}, cn = (t) => { - const { target: s, type: e } = t; - // istanbul ignore else @preserve - if (s && y(s)) { - const n = Ve(s), o = n && Kt(n); - // istanbul ignore else @preserve +}, Rs = (e) => { + const { target: t, type: s } = e; + if (t && T(t)) { + const n = Ce(t), o = n && Vt(n); if (o) { - const { parentElement: i, menu: r } = o, c = i && i.contains(s) && (s.tagName === "form" || N(s, "form") !== null); - [_, jn].includes(e) && ro(s) && t.preventDefault(); - // istanbul ignore else @preserve - !c && e !== Ts && s !== n && s !== r && o.hide(); + const { parentElement: i, menu: r } = o, a = i && i.contains(t) && (t.tagName === "form" || k(t, "form") !== null); + [N, wn].includes(s) && Fn(t) && e.preventDefault(), !a && s !== ss && t !== n && t !== r && o.hide(); } } -}, Qi = (t) => { - const { target: s } = t, e = s && N(s, co), n = e && Kt(e); - // istanbul ignore else @preserve - if (n) { - t.stopPropagation(), n.toggle(); - // istanbul ignore else @preserve - e && ro(e) && t.preventDefault(); - } -}, tr = (t) => { - // istanbul ignore else @preserve - [ls, ds].includes(t.code) && t.preventDefault(); +}, ki = (e) => { + const { target: t } = e, s = t && k(t, Wn), n = s && Vt(s); + n && (e.stopPropagation(), n.toggle(), s && Fn(s) && e.preventDefault()); +}, _i = (e) => { + [je, ze].includes(e.code) && e.preventDefault(); }; -function er(t) { - const { code: s } = t, e = Ve(this), n = e && Kt(e), { activeElement: o } = e && E(e); - // istanbul ignore else @preserve +function Mi(e) { + const { code: t } = e, s = Ce(this), n = s && Vt(s), { activeElement: o } = s && E(s); if (n && o) { - const { menu: i, open: r } = n, c = Gi(i); - if (c && c.length && [ls, ds].includes(s)) { - let l = c.indexOf(o); - // istanbul ignore else @preserve - o === e ? l = 0 : s === ds ? l = l > 1 ? l - 1 : 0 : s === ls && (l = l < c.length - 1 ? l + 1 : l); - // istanbul ignore else @preserve - c[l] && ht(c[l]); + const { menu: i, open: r } = n, a = Oi(i); + if (a && a.length && [je, ze].includes(t)) { + let c = a.indexOf(o); + o === s ? c = 0 : t === ze ? c = c > 1 ? c - 1 : 0 : t === je && (c = c < a.length - 1 ? c + 1 : c), a[c] && lt(a[c]); } - Hs === s && r && (n.toggle(), ht(e)); + rs === t && r && (n.toggle(), lt(s)); } } -function sr(t) { - const s = Ve(t), e = s && Kt(s); - // istanbul ignore else @preserve - e && e.open && lo(e); +function Bi(e) { + const t = Ce(e), s = t && Vt(t); + s && s.open && jn(s); } -class ie extends nt { +class zn extends st { + static selector = Wn; + static init = Ii; + static getInstance = Vt; /** * @param target Element or string selector * @param config the instance options */ - constructor(e, n) { - super(e, n); - /** - * Toggles on/off the `click` event listener of the `Dropdown`. - * - * @param add when `true`, it will add the event listener - */ - d(this, "_toggleEventListeners", (e) => { - (e ? F : R)(this.element, _, Qi); - }); - const { parentElement: o } = this.element, [i] = at( - io, - o + constructor(t, s) { + super(t, s); + const { parentElement: n } = this.element, [o] = rt( + Rn, + n ); - i && (this.parentElement = o, this.menu = i, this._observer = new IntersectionObserver( - ([r]) => sr(r.target), + o && (this.parentElement = n, this.menu = o, this._observer = new IntersectionObserver( + ([i]) => Bi(i.target), { threshold: 1 } ), this._toggleEventListeners(!0)); } @@ -1021,13 +867,13 @@ class ie extends nt { * Returns component name string. */ get name() { - return oo; + return Bn; } /** * Returns component default options. */ get defaults() { - return Ji; + return Ni; } // DROPDOWN PUBLIC METHODS // ======================= @@ -1037,489 +883,424 @@ class ie extends nt { } /** Shows the dropdown menu to the user. */ show() { - const { element: e, open: n, menu: o, parentElement: i } = this; - // istanbul ignore else @preserve - if (!n) { - const r = Ve(e), c = r && Kt(r); - c && c.hide(), [ns, nn, ao].forEach( - (l) => { - l.relatedTarget = e; + const { element: t, open: s, menu: n, parentElement: o } = this; + if (!s) { + const i = Ce(t), r = i && Vt(i); + r && r.hide(), [Me, _s, Vn].forEach( + (a) => { + a.relatedTarget = t; } - ), $(i, ns), ns.defaultPrevented || (f(o, v), f(i, v), O(e, ke, "true"), lo(this), this.open = !n, ht(e), rn(this), $(i, nn)); + ), b(o, Me), Me.defaultPrevented || (h(n, u), h(o, u), O(t, me, "true"), jn(this), this.open = !s, lt(t), Bs(this), b(o, _s)); } } /** Hides the dropdown menu from the user. */ hide() { - const { element: e, open: n, menu: o, parentElement: i } = this; - // istanbul ignore else @preserve - n && ([os, on].forEach((r) => { - r.relatedTarget = e; - }), $(i, os), os.defaultPrevented || (b(o, v), b(i, v), O(e, ke, "false"), this.open = !n, rn(this), $(i, on))); + const { element: t, open: s, menu: n, parentElement: o } = this; + s && ([Be, Ms].forEach((i) => { + i.relatedTarget = t; + }), b(o, Be), Be.defaultPrevented || (m(n, u), m(o, u), O(t, me, "false"), this.open = !s, Bs(this), b(o, Ms))); } + /** + * Toggles on/off the `click` event listener of the `Dropdown`. + * + * @param add when `true`, it will add the event listener + */ + _toggleEventListeners = (t) => { + (t ? M : B)(this.element, N, ki); + }; /** Removes the `Dropdown` component from the target element. */ dispose() { this.open && this.hide(), this._toggleEventListeners(), super.dispose(); } } -d(ie, "selector", co), d(ie, "init", Ui), d(ie, "getInstance", Kt); -const U = "modal", Ss = "Modal", As = "Offcanvas", nr = "fixed-top", or = "fixed-bottom", ho = "sticky-top", fo = "position-sticky", go = (t) => [ - ...at(nr, t), - ...at(or, t), - ...at(ho, t), - ...at(fo, t), - ...at("is-fixed", t) -], ir = (t) => { - const s = xt(t); - k(s, { +const q = "modal", cs = "Modal", ls = "Offcanvas", Ri = "fixed-top", Fi = "fixed-bottom", Kn = "sticky-top", Un = "position-sticky", Xn = (e) => [ + ...rt(Ri, e), + ...rt(Fi, e), + ...rt(Kn, e), + ...rt(Un, e), + ...rt("is-fixed", e) +], Wi = (e) => { + const t = yt(e); + P(t, { paddingRight: "", overflow: "" }); - const e = go(s); - // istanbul ignore else @preserve - e.length && e.forEach((n) => { - k(n, { + const s = Xn(t); + s.length && s.forEach((n) => { + P(n, { paddingRight: "", marginRight: "" }); }); -}, po = (t) => { - const { clientWidth: s } = it(t), { innerWidth: e } = mi(t); - return Math.abs(e - s); -}, uo = (t, s) => { - const e = xt(t), n = parseInt(K(e, "paddingRight"), 10), i = K(e, "overflow") === "hidden" && n ? 0 : po(t), r = go(e); - // istanbul ignore else @preserve - if (s) { - k(e, { - overflow: "hidden", - paddingRight: `${n + i}px` - }); - // istanbul ignore else @preserve - r.length && r.forEach((c) => { - const l = K(c, "paddingRight"); - c.style.paddingRight = `${parseInt(l, 10) + i}px`; - // istanbul ignore else @preserve - if ([ho, fo].some((a) => g(c, a))) { - const a = K(c, "marginRight"); - c.style.marginRight = `${parseInt(a, 10) - i}px`; - } - }); - } -}, G = "offcanvas", yt = Et({ +}, qn = (e) => { + const { clientWidth: t } = dt(e), { innerWidth: s } = Jo(e); + return Math.abs(s - t); +}, Yn = (e, t) => { + const s = yt(e), n = parseInt(z(s, "paddingRight"), 10), i = z(s, "overflow") === "hidden" && n ? 0 : qn(e), r = Xn(s); + t && (P(s, { + overflow: "hidden", + paddingRight: `${n + i}px` + }), r.length && r.forEach((a) => { + const c = z(a, "paddingRight"); + if (a.style.paddingRight = `${parseInt(c, 10) + i}px`, [Kn, Un].some((l) => f(a, l))) { + const l = z(a, "marginRight"); + a.style.marginRight = `${parseInt(l, 10) - i}px`; + } + })); +}, G = "offcanvas", Tt = Et({ tagName: "div", className: "popup-container" -}), mo = (t, s) => { - const e = A(s) && s.nodeName === "BODY", n = A(s) && !e ? s : yt, o = e ? s : xt(t); - // istanbul ignore else @preserve - A(t) && (n === yt && o.append(yt), n.append(t)); -}, vo = (t, s) => { - const e = A(s) && s.nodeName === "BODY", n = A(s) && !e ? s : yt; - // istanbul ignore else @preserve - A(t) && (t.remove(), n === yt && !yt.children.length && yt.remove()); -}, Ds = (t, s) => { - const e = A(s) && s.nodeName !== "BODY" ? s : yt; - return A(t) && e.contains(t); -}, bo = "backdrop", an = `${U}-${bo}`, ln = `${G}-${bo}`, wo = `.${U}.${v}`, ks = `.${G}.${v}`, L = Et("div"), Mt = (t) => S( - `${wo},${ks}`, - E(t) -), Ls = (t) => { - const s = t ? an : ln; - [an, ln].forEach((e) => { - b(L, e); - }), f(L, s); -}, $o = (t, s, e) => { - Ls(e), mo(L, xt(t)), s && f(L, B); -}, Eo = () => { - g(L, v) || (f(L, v), Nt(L)); -}, ze = () => { - b(L, v); -}, To = (t) => { - Mt(t) || (b(L, B), vo(L, xt(t)), ir(t)); -}, yo = (t) => y(t) && K(t, "visibility") !== "hidden" && t.offsetParent !== null, rr = `.${U}`, Co = `[${rt}="${U}"]`, cr = `[${We}="${U}"]`, xo = `${U}-static`, ar = { +}), Zn = (e, t) => { + const s = H(t) && t.nodeName === "BODY", n = H(t) && !s ? t : Tt, o = s ? t : yt(e); + H(e) && (n === Tt && o.append(Tt), n.append(e)); +}, Gn = (e, t) => { + const s = H(t) && t.nodeName === "BODY", n = H(t) && !s ? t : Tt; + H(e) && (e.remove(), n === Tt && !Tt.children.length && Tt.remove()); +}, ds = (e, t) => { + const s = H(t) && t.nodeName !== "BODY" ? t : Tt; + return H(e) && s.contains(e); +}, Jn = "backdrop", Fs = `${q}-${Jn}`, Ws = `${G}-${Jn}`, Qn = `.${q}.${u}`, hs = `.${G}.${u}`, I = Et("div"), Ot = (e) => D( + `${Qn},${hs}`, + E(e) +), fs = (e) => { + const t = e ? Fs : Ws; + [Fs, Ws].forEach((s) => { + m(I, s); + }), h(I, t); +}, to = (e, t, s) => { + fs(s), Zn(I, yt(e)), t && h(I, _); +}, eo = () => { + f(I, u) || (h(I, u), Nt(I)); +}, Se = () => { + m(I, u); +}, so = (e) => { + Ot(e) || (m(I, _), Gn(I, yt(e)), Wi(e)); +}, no = (e) => T(e) && z(e, "visibility") !== "hidden" && e.offsetParent !== null, Vi = `.${q}`, oo = `[${ot}="${q}"]`, ji = `[${$e}="${q}"]`, io = `${q}-static`, zi = { backdrop: !0, keyboard: !0 -}, pe = (t) => z(t, Ss), lr = (t) => new re(t), Ae = T( - `show.bs.${U}` -), dn = T( - `shown.bs.${U}` -), is = T( - `hide.bs.${U}` -), hn = T( - `hidden.bs.${U}` -), Ho = (t) => { - const { element: s } = t, e = po(s), { clientHeight: n, scrollHeight: o } = it(s), { clientHeight: i, scrollHeight: r } = s, c = i !== r; - // istanbul ignore next @preserve: impossible to test? - if (!c && e) { - const a = { [Ct(s) ? "paddingLeft" : "paddingRight"]: `${e}px` }; - k(s, a); - } - uo(s, c || n !== o); -}, Po = (t, s) => { - const e = s ? F : R, { element: n } = t; - e(n, _, fr), e(E(n), Me, hr), s ? t._observer.observe(n) : t._observer.disconnect(); -}, fn = (t) => { - const { triggers: s, element: e, relatedTarget: n } = t; - To(e), k(e, { paddingRight: "", display: "" }), Po(t); - const o = Ae.relatedTarget || s.find(yo); - // istanbul ignore else @preserve - o && ht(o), hn.relatedTarget = n, $(e, hn), Re(e); -}, gn = (t) => { - const { element: s, relatedTarget: e } = t; - ht(s), Po(t, !0), dn.relatedTarget = e, $(s, dn), Re(s); -}, pn = (t) => { - const { element: s, hasFade: e } = t; - k(s, { display: "block" }), Ho(t); - // istanbul ignore else @preserve - Mt(s) || k(xt(s), { overflow: "hidden" }), f(s, v), It(s, ve), O(s, Ne, "true"), e ? D(s, () => gn(t)) : gn(t); -}, un = (t) => { - const { element: s, options: e, hasFade: n } = t; - e.backdrop && n && g(L, v) && !Mt(s) ? (ze(), D(L, () => fn(t))) : fn(t); -}, dr = (t) => { - const { target: s } = t, e = s && N(s, Co), n = e && Y(e), o = n && pe(n); - // istanbul ignore else @preserve - if (o) { - // istanbul ignore else @preserve - e && e.tagName === "A" && t.preventDefault(), o.relatedTarget = e, o.toggle(); - } -}, hr = ({ code: t, target: s }) => { - const e = S(wo, E(s)), n = e && pe(e); - // istanbul ignore else @preserve +}, Qt = (e) => W(e, cs), Ki = (e) => new co(e), pe = w( + `show.bs.${q}` +), Vs = w( + `shown.bs.${q}` +), Re = w( + `hide.bs.${q}` +), js = w( + `hidden.bs.${q}` +), ro = (e) => { + const { element: t } = e, s = qn(t), { clientHeight: n, scrollHeight: o } = dt(t), { clientHeight: i, scrollHeight: r } = t, a = i !== r; + if (!a && s) { + const l = { [$t(t) ? "paddingLeft" : "paddingRight"]: `${s}px` }; + P(t, l); + } + Yn(t, a || n !== o); +}, ao = (e, t) => { + const s = t ? M : B, { element: n } = e; + s(n, N, qi), s(E(n), Ee, Xi), t ? e._observer.observe(n) : e._observer.disconnect(); +}, zs = (e) => { + const { triggers: t, element: s, relatedTarget: n } = e; + so(s), P(s, { paddingRight: "", display: "" }), ao(e); + const o = pe.relatedTarget || t.find(no); + o && lt(o), js.relatedTarget = n, b(s, js), Te(s); +}, Ks = (e) => { + const { element: t, relatedTarget: s } = e; + lt(t), ao(e, !0), Vs.relatedTarget = s, b(t, Vs), Te(t); +}, Us = (e) => { + const { element: t, hasFade: s } = e; + P(t, { display: "block" }), ro(e), Ot(t) || P(yt(t), { overflow: "hidden" }), h(t, u), Pt(t, se), O(t, be, "true"), s ? A(t, () => Ks(e)) : Ks(e); +}, Xs = (e) => { + const { element: t, options: s, hasFade: n } = e; + s.backdrop && n && f(I, u) && !Ot(t) ? (Se(), A(I, () => zs(e))) : zs(e); +}, Ui = (e) => { + const { target: t } = e, s = t && k(t, oo), n = s && U(s), o = n && Qt(n); + o && (s && s.tagName === "A" && e.preventDefault(), o.relatedTarget = s, o.toggle()); +}, Xi = ({ code: e, target: t }) => { + const s = D(Qn, E(t)), n = s && Qt(s); if (n) { const { options: o } = n; - // istanbul ignore else @preserve - o.keyboard && t === Hs && // the keyboard option is enabled and the key is 27 - g(e, v) && (n.relatedTarget = null, n.hide()); - } -}, fr = (t) => { - var n, o; - const { currentTarget: s } = t, e = s && pe(s); - // istanbul ignore else @preserve - if (e && s && !m.get(s)) { - const { options: i, isStatic: r, modalDialog: c } = e, { backdrop: l } = i, { target: a } = t, h = (o = (n = E(s)) == null ? void 0 : n.getSelection()) == null ? void 0 : o.toString().length, p = c.contains(a), u = a && N(a, cr); - // istanbul ignore else @preserve - r && !p ? m.set( - s, + o.keyboard && e === rs && // the keyboard option is enabled and the key is 27 + f(s, u) && (n.relatedTarget = null, n.hide()); + } +}, qi = (e) => { + const { currentTarget: t } = e, s = t && Qt(t); + if (s && t && !p.get(t)) { + const { options: n, isStatic: o, modalDialog: i } = s, { backdrop: r } = n, { target: a } = e, c = E(t)?.getSelection()?.toString().length, l = i.contains(a), d = a && k(a, ji); + o && !l ? p.set( + t, () => { - f(s, xo), D(c, () => gr(e)); + h(t, io), A(i, () => Yi(s)); }, 17 - ) : (u || !h && !r && !p && l) && (e.relatedTarget = u || null, e.hide(), t.preventDefault()); + ) : (d || !c && !o && !l && r) && (s.relatedTarget = d || null, s.hide(), e.preventDefault()); } -}, gr = (t) => { - const { element: s, modalDialog: e } = t, n = ($e(e) || 0) + 17; - b(s, xo), m.set(s, () => m.clear(s), n); +}, Yi = (e) => { + const { element: t, modalDialog: s } = e, n = (ie(s) || 0) + 17; + m(t, io), p.set(t, () => p.clear(t), n); }; -class re extends nt { +class co extends st { + static selector = Vi; + static init = Ki; + static getInstance = Qt; /** * @param target usually the `.modal` element * @param config instance options */ - constructor(e, n) { - super(e, n); - /** - * Updates the modal layout. - */ - d(this, "update", () => { - // istanbul ignore else @preserve - g(this.element, v) && Ho(this); - }); - /** - * Toggles on/off the `click` event listener of the `Modal` instance. - * - * @param add when `true`, event listener(s) is/are added - */ - d(this, "_toggleEventListeners", (e) => { - const n = e ? F : R, { triggers: o } = this; - // istanbul ignore else @preserve - o.length && o.forEach( - (i) => n(i, _, dr) - ); - }); - const { element: o } = this, i = S(`.${U}-dialog`, o); - // istanbul ignore else @preserve - i && (this.modalDialog = i, this.triggers = [ - ...J(Co, E(o)) + constructor(t, s) { + super(t, s); + const { element: n } = this, o = D(`.${q}-dialog`, n); + o && (this.modalDialog = o, this.triggers = [ + ...Z(oo, E(n)) ].filter( - (r) => Y(r) === o - ), this.isStatic = this.options.backdrop === "static", this.hasFade = g(o, B), this.relatedTarget = null, this._observer = new ResizeObserver(() => this.update()), this._toggleEventListeners(!0)); + (i) => U(i) === n + ), this.isStatic = this.options.backdrop === "static", this.hasFade = f(n, _), this.relatedTarget = null, this._observer = new ResizeObserver(() => this.update()), this._toggleEventListeners(!0)); } /** * Returns component name string. */ get name() { - return Ss; + return cs; } /** * Returns component default options. */ get defaults() { - return ar; + return zi; } // MODAL PUBLIC METHODS // ==================== /** Toggles the visibility of the modal. */ toggle() { - g(this.element, v) ? this.hide() : this.show(); + f(this.element, u) ? this.hide() : this.show(); } /** Shows the modal to the user. */ show() { - const { element: e, options: n, hasFade: o, relatedTarget: i } = this, { backdrop: r } = n; - let c = 0; - // istanbul ignore else @preserve - if (!g(e, v) && (Ae.relatedTarget = i || void 0, $(e, Ae), !Ae.defaultPrevented)) { - const l = Mt(e); - // istanbul ignore else @preserve - if (l && l !== e) { - const a = pe(l) || // istanbul ignore next @preserve - z( - l, - As + const { element: t, options: s, hasFade: n, relatedTarget: o } = this, { backdrop: i } = s; + let r = 0; + if (!f(t, u) && (pe.relatedTarget = o || void 0, b(t, pe), !pe.defaultPrevented)) { + const a = Ot(t); + if (a && a !== t) { + const c = Qt(a) || // istanbul ignore next @preserve + W( + a, + ls ); - // istanbul ignore else @preserve - a && a.hide(); - } - if (r) - Ds(L) ? Ls(!0) : $o(e, o, !0), c = $e(L), Eo(), setTimeout(() => pn(this), c); - else { - pn(this); - // istanbul ignore else @preserve - l && g(L, v) && ze(); + c && c.hide(); } + i ? (ds(I) ? fs(!0) : to(t, n, !0), r = ie(I), eo(), setTimeout(() => Us(this), r)) : (Us(this), a && f(I, u) && Se()); } } /** Hide the modal from the user. */ hide() { - const { element: e, hasFade: n, relatedTarget: o } = this; - // istanbul ignore else @preserve - if (g(e, v)) { - is.relatedTarget = o || void 0, $(e, is); - // istanbul ignore else @preserve - is.defaultPrevented || (b(e, v), O(e, ve, "true"), It(e, Ne), n ? D(e, () => un(this)) : un(this)); - } + const { element: t, hasFade: s, relatedTarget: n } = this; + f(t, u) && (Re.relatedTarget = n || void 0, b(t, Re), Re.defaultPrevented || (m(t, u), O(t, se, "true"), Pt(t, be), s ? A(t, () => Xs(this)) : Xs(this))); } + /** + * Updates the modal layout. + */ + update = () => { + f(this.element, u) && ro(this); + }; + /** + * Toggles on/off the `click` event listener of the `Modal` instance. + * + * @param add when `true`, event listener(s) is/are added + */ + _toggleEventListeners = (t) => { + const s = t ? M : B, { triggers: n } = this; + n.length && n.forEach( + (o) => s(o, N, Ui) + ); + }; /** Removes the `Modal` component from target element. */ dispose() { - const e = { ...this }, { modalDialog: n, hasFade: o } = e, i = () => setTimeout(() => super.dispose(), 17); - this.hide(), this._toggleEventListeners(), o ? D(n, i) : i(); + const t = { ...this }, { modalDialog: s, hasFade: n } = t, o = () => setTimeout(() => super.dispose(), 17); + this.hide(), this._toggleEventListeners(), n ? A(s, o) : o(); } } -d(re, "selector", rr), d(re, "init", lr), d(re, "getInstance", pe); -const pr = `.${G}`, Is = `[${rt}="${G}"]`, ur = `[${We}="${G}"]`, Xe = `${G}-toggling`, mr = { +const Zi = `.${G}`, gs = `[${ot}="${G}"]`, Gi = `[${$e}="${G}"]`, xe = `${G}-toggling`, Ji = { backdrop: !0, // boolean keyboard: !0, // boolean scroll: !1 // boolean -}, ue = (t) => z(t, As), vr = (t) => new ce(t), De = T(`show.bs.${G}`), So = T(`shown.bs.${G}`), rs = T(`hide.bs.${G}`), Ao = T(`hidden.bs.${G}`), br = (t) => { - const { element: s } = t, { clientHeight: e, scrollHeight: n } = it(s); - uo(s, e !== n); -}, Do = (t, s) => { - const e = s ? F : R, n = E(t.element); - e(n, Me, Tr), e(n, _, Er); -}, mn = (t) => { - const { element: s, options: e } = t; - // istanbul ignore else @preserve - e.scroll || (br(t), k(xt(s), { overflow: "hidden" })), f(s, Xe), f(s, v), k(s, { visibility: "visible" }), D(s, () => yr(t)); -}, wr = (t) => { - const { element: s, options: e } = t, n = Mt(s); - s.blur(), !n && e.backdrop && g(L, v) && ze(), D(s, () => Cr(t)); -}, $r = (t) => { - const s = N(t.target, Is), e = s && Y(s), n = e && ue(e); - // istanbul ignore else @preserve - if (n) { - n.relatedTarget = s, n.toggle(); - // istanbul ignore else @preserve - s && s.tagName === "A" && t.preventDefault(); - } -}, Er = (t) => { - const { target: s } = t, e = S( - ks, - E(s) - ), n = S( - ur, - e - ), o = e && ue(e); - // istanbul ignore else @preserve +}, te = (e) => W(e, ls), Qi = (e) => new go(e), ue = w(`show.bs.${G}`), lo = w(`shown.bs.${G}`), Fe = w(`hide.bs.${G}`), ho = w(`hidden.bs.${G}`), tr = (e) => { + const { element: t } = e, { clientHeight: s, scrollHeight: n } = dt(t); + Yn(t, s !== n); +}, fo = (e, t) => { + const s = t ? M : B, n = E(e.element); + s(n, Ee, or), s(n, N, nr); +}, qs = (e) => { + const { element: t, options: s } = e; + s.scroll || (tr(e), P(yt(t), { overflow: "hidden" })), h(t, xe), h(t, u), P(t, { visibility: "visible" }), A(t, () => ir(e)); +}, er = (e) => { + const { element: t, options: s } = e, n = Ot(t); + t.blur(), !n && s.backdrop && f(I, u) && Se(), A(t, () => rr(e)); +}, sr = (e) => { + const t = k(e.target, gs), s = t && U(t), n = s && te(s); + n && (n.relatedTarget = t, n.toggle(), t && t.tagName === "A" && e.preventDefault()); +}, nr = (e) => { + const { target: t } = e, s = D( + hs, + E(t) + ), n = D( + Gi, + s + ), o = s && te(s); if (o) { - const { options: i, triggers: r } = o, { backdrop: c } = i, l = N(s, Is), a = E(e).getSelection(); - // istanbul ignore else: a filter is required here @preserve - if (!L.contains(s) || c !== "static") { - // istanbul ignore else @preserve - !(a && a.toString().length) && (!e.contains(s) && c && // istanbul ignore next @preserve - (!l || r.includes(s)) || n && n.contains(s)) && (o.relatedTarget = n && n.contains(s) ? n : null, o.hide()); - // istanbul ignore next @preserve - l && l.tagName === "A" && t.preventDefault(); - } - } -}, Tr = ({ code: t, target: s }) => { - const e = S( - ks, - E(s) - ), n = e && ue(e); - // istanbul ignore else @preserve - if (n) { - // istanbul ignore else @preserve - n.options.keyboard && t === Hs && (n.relatedTarget = null, n.hide()); - } -}, yr = (t) => { - const { element: s } = t; - b(s, Xe), It(s, ve), O(s, Ne, "true"), O(s, "role", "dialog"), $(s, So), Do(t, !0), ht(s), Re(s); -}, Cr = (t) => { - const { element: s, triggers: e } = t; - O(s, ve, "true"), It(s, Ne), It(s, "role"), k(s, { visibility: "" }); - const n = De.relatedTarget || e.find(yo); - // istanbul ignore else @preserve - n && ht(n), To(s), $(s, Ao), b(s, Xe), Re(s), Mt(s) || Do(t); + const { options: i, triggers: r } = o, { backdrop: a } = i, c = k(t, gs), l = E(s).getSelection(); + (!I.contains(t) || a !== "static") && (!(l && l.toString().length) && (!s.contains(t) && a && // istanbul ignore next @preserve + (!c || r.includes(t)) || n && n.contains(t)) && (o.relatedTarget = n && n.contains(t) ? n : null, o.hide()), c && c.tagName === "A" && e.preventDefault()); + } +}, or = ({ code: e, target: t }) => { + const s = D( + hs, + E(t) + ), n = s && te(s); + n && n.options.keyboard && e === rs && (n.relatedTarget = null, n.hide()); +}, ir = (e) => { + const { element: t } = e; + m(t, xe), Pt(t, se), O(t, be, "true"), O(t, "role", "dialog"), b(t, lo), fo(e, !0), lt(t), Te(t); +}, rr = (e) => { + const { element: t, triggers: s } = e; + O(t, se, "true"), Pt(t, be), Pt(t, "role"), P(t, { visibility: "" }); + const n = ue.relatedTarget || s.find(no); + n && lt(n), so(t), b(t, ho), m(t, xe), Te(t), Ot(t) || fo(e); }; -class ce extends nt { +class go extends st { + static selector = Zi; + static init = Qi; + static getInstance = te; /** * @param target usually an `.offcanvas` element * @param config instance options */ - constructor(e, n) { - super(e, n); - /** - * Toggles on/off the `click` event listeners. - * - * @param self the `Offcanvas` instance - * @param add when *true*, listeners are added - */ - d(this, "_toggleEventListeners", (e) => { - const n = e ? F : R; - this.triggers.forEach( - (o) => n(o, _, $r) - ); - }); - const { element: o } = this; + constructor(t, s) { + super(t, s); + const { element: n } = this; this.triggers = [ - ...J(Is, E(o)) + ...Z(gs, E(n)) ].filter( - (i) => Y(i) === o + (o) => U(o) === n ), this.relatedTarget = null, this._toggleEventListeners(!0); } /** * Returns component name string. */ get name() { - return As; + return ls; } /** * Returns component default options. */ get defaults() { - return mr; + return Ji; } // OFFCANVAS PUBLIC METHODS // ======================== /** Shows or hides the offcanvas from the user. */ toggle() { - g(this.element, v) ? this.hide() : this.show(); + f(this.element, u) ? this.hide() : this.show(); } /** Shows the offcanvas to the user. */ show() { - const { element: e, options: n, relatedTarget: o } = this; - let i = 0; - if (!g(e, v) && (De.relatedTarget = o || void 0, So.relatedTarget = o || void 0, $(e, De), !De.defaultPrevented)) { - const r = Mt(e); - if (r && r !== e) { - const c = ue(r) || // istanbul ignore next @preserve - z( - r, - Ss + const { element: t, options: s, relatedTarget: n } = this; + let o = 0; + if (!f(t, u) && (ue.relatedTarget = n || void 0, lo.relatedTarget = n || void 0, b(t, ue), !ue.defaultPrevented)) { + const i = Ot(t); + if (i && i !== t) { + const r = te(i) || // istanbul ignore next @preserve + W( + i, + cs ); - // istanbul ignore else @preserve - c && c.hide(); - } - if (n.backdrop) - Ds(L) ? Ls() : $o(e, !0), i = $e(L), Eo(), setTimeout(() => mn(this), i); - else { - mn(this); - // istanbul ignore next @preserve - this test was done on Modal - r && g(L, v) && ze(); + r && r.hide(); } + s.backdrop ? (ds(I) ? fs() : to(t, !0), o = ie(I), eo(), setTimeout(() => qs(this), o)) : (qs(this), i && f(I, u) && Se()); } } /** Hides the offcanvas from the user. */ hide() { - const { element: e, relatedTarget: n } = this; - g(e, v) && (rs.relatedTarget = n || void 0, Ao.relatedTarget = n || void 0, $(e, rs), rs.defaultPrevented || (f(e, Xe), b(e, v), wr(this))); + const { element: t, relatedTarget: s } = this; + f(t, u) && (Fe.relatedTarget = s || void 0, ho.relatedTarget = s || void 0, b(t, Fe), Fe.defaultPrevented || (h(t, xe), m(t, u), er(this))); } + /** + * Toggles on/off the `click` event listeners. + * + * @param self the `Offcanvas` instance + * @param add when *true*, listeners are added + */ + _toggleEventListeners = (t) => { + const s = t ? M : B; + this.triggers.forEach( + (n) => s(n, N, sr) + ); + }; /** Removes the `Offcanvas` from the target element. */ dispose() { - const { element: e } = this, n = g(e, v), o = () => setTimeout(() => super.dispose(), 1); - if (this.hide(), this._toggleEventListeners(), n) { - D(e, o); - // istanbul ignore next @preserve - } else - o(); + const { element: t } = this, s = f(t, u), n = () => setTimeout(() => super.dispose(), 1); + this.hide(), this._toggleEventListeners(), s ? A(t, n) : n(); } } -d(ce, "selector", pr), d(ce, "init", vr), d(ce, "getInstance", ue); -const Lt = "popover", Ke = "Popover", lt = "tooltip", ko = (t) => { - const s = t === lt, e = s ? `${t}-inner` : `${t}-body`, n = s ? "" : `

`, o = `
`, i = `
`; - return `
${n + o + i}
`; -}, Lo = { +const At = "popover", De = "Popover", at = "tooltip", po = (e) => { + const t = e === at, s = t ? `${e}-inner` : `${e}-body`, n = t ? "" : `

`, o = `
`, i = `
`; + return `
${n + o + i}
`; +}, uo = { top: "top", bottom: "bottom", left: "start", right: "end" -}, $s = (t) => { - const s = /\b(top|bottom|start|end)+/, { element: e, tooltip: n, container: o, options: i, arrow: r } = t; - // istanbul ignore else @preserve +}, ts = (e) => { + const t = /\b(top|bottom|start|end)+/, { element: s, tooltip: n, container: o, options: i, arrow: r } = e; if (n) { - const c = { ...Lo }, l = Ct(e); - k(n, { + const a = { ...uo }, c = $t(s); + P(n, { // top: '0px', left: '0px', right: '', bottom: '', top: "", left: "", right: "", bottom: "" }); - const a = t.name === Ke, { offsetWidth: h, offsetHeight: p } = n, { clientWidth: u, clientHeight: C, offsetWidth: j } = it(e); - let { placement: w } = i; - const { clientWidth: M, offsetWidth: W } = o, ct = K( + const l = e.name === De, { offsetWidth: d, offsetHeight: g } = n, { clientWidth: y, clientHeight: S, offsetWidth: R } = dt(s); + let { placement: v } = i; + const { clientWidth: V, offsetWidth: X } = o, it = z( o, "position" - ) === "fixed", H = Math.abs(ct ? M - W : u - j), tt = l && ct ? H : 0, ot = u - (l ? 0 : H) - 1, { - width: V, - height: X, - left: P, - right: Ft, - top: gt - } = Ee(e, !0), { x: I, y: pt } = { - x: P, - y: gt + ) === "fixed", C = Math.abs(it ? V - X : y - R), Q = c && it ? C : 0, nt = y - (c ? 0 : C) - 1, { + width: F, + height: j, + left: x, + right: _t, + top: ft + } = re(s, !0), { x: L, y: gt } = { + x, + y: ft }; - k(r, { + P(r, { top: "", left: "", right: "", bottom: "" }); - let Ht = 0, Yt = "", ut = 0, Ye = "", Rt = "", Ce = "", Ue = ""; - const Pt = r.offsetWidth || 0, mt = r.offsetHeight || 0, Ze = Pt / 2; - let Ut = gt - p - mt < 0, Zt = gt + p + X + mt >= C, Jt = P - h - Pt < tt, Gt = P + h + V + Pt >= ot; - const xe = ["left", "right"], Je = ["top", "bottom"]; - Ut = xe.includes(w) ? gt + X / 2 - p / 2 - mt < 0 : Ut, Zt = xe.includes(w) ? gt + p / 2 + X / 2 + mt >= C : Zt, Jt = Je.includes(w) ? P + V / 2 - h / 2 < tt : Jt, Gt = Je.includes(w) ? P + h / 2 + V / 2 >= ot : Gt, w = xe.includes(w) && Jt && Gt ? "top" : w, w = w === "top" && Ut ? "bottom" : w, w = w === "bottom" && Zt ? "top" : w, w = w === "left" && Jt ? "right" : w, w = w === "right" && Gt ? "left" : w, n.className.includes(w) || (n.className = n.className.replace( - s, - c[w] - )); - // istanbul ignore else @preserve - xe.includes(w) ? (w === "left" ? ut = I - h - (a ? Pt : 0) : ut = I + V + (a ? Pt : 0), Ut && Zt ? (Ht = 0, Yt = 0, Rt = gt + X / 2 - mt / 2) : Ut ? (Ht = pt, Yt = "", Rt = X / 2 - Pt) : Zt ? (Ht = pt - p + X, Yt = "", Rt = p - X / 2 - Pt) : (Ht = pt - p / 2 + X / 2, Rt = p / 2 - mt / 2)) : Je.includes(w) && (w === "top" ? Ht = pt - p - (a ? mt : 0) : Ht = pt + X + (a ? mt : 0), Jt ? (ut = 0, Ce = I + V / 2 - Ze) : Gt ? (ut = "auto", Ye = 0, Ue = V / 2 + ot - Ft - Ze) : (ut = I - h / 2 + V / 2, Ce = h / 2 - Ze)), k(n, { - top: `${Ht}px`, - bottom: Yt === "" ? "" : `${Yt}px`, - left: ut === "auto" ? ut : `${ut}px`, - right: Ye !== "" ? `${Ye}px` : "" - }); - // istanbul ignore else @preserve - y(r) && (Rt !== "" && (r.style.top = `${Rt}px`), Ce !== "" ? r.style.left = `${Ce}px` : Ue !== "" && (r.style.right = `${Ue}px`)); - const Ko = T( - `updated.bs.${Xt(t.name)}` + let Ct = 0, zt = "", pt = 0, He = "", Mt = "", le = "", Ae = ""; + const St = r.offsetWidth || 0, ut = r.offsetHeight || 0, Pe = St / 2; + let Kt = ft - g - ut < 0, Ut = ft + g + j + ut >= S, Xt = x - d - St < Q, qt = x + d + F + St >= nt; + const de = ["left", "right"], Ie = ["top", "bottom"]; + Kt = de.includes(v) ? ft + j / 2 - g / 2 - ut < 0 : Kt, Ut = de.includes(v) ? ft + g / 2 + j / 2 + ut >= S : Ut, Xt = Ie.includes(v) ? x + F / 2 - d / 2 < Q : Xt, qt = Ie.includes(v) ? x + d / 2 + F / 2 >= nt : qt, v = de.includes(v) && Xt && qt ? "top" : v, v = v === "top" && Kt ? "bottom" : v, v = v === "bottom" && Ut ? "top" : v, v = v === "left" && Xt ? "right" : v, v = v === "right" && qt ? "left" : v, n.className.includes(v) || (n.className = n.className.replace( + t, + a[v] + )), de.includes(v) ? (v === "left" ? pt = L - d - (l ? St : 0) : pt = L + F + (l ? St : 0), Kt && Ut ? (Ct = 0, zt = 0, Mt = ft + j / 2 - ut / 2) : Kt ? (Ct = gt, zt = "", Mt = j / 2 - St) : Ut ? (Ct = gt - g + j, zt = "", Mt = g - j / 2 - St) : (Ct = gt - g / 2 + j / 2, Mt = g / 2 - ut / 2)) : Ie.includes(v) && (v === "top" ? Ct = gt - g - (l ? ut : 0) : Ct = gt + j + (l ? ut : 0), Xt ? (pt = 0, le = L + F / 2 - Pe) : qt ? (pt = "auto", He = 0, Ae = F / 2 + nt - _t - Pe) : (pt = L - d / 2 + F / 2, le = d / 2 - Pe)), P(n, { + top: `${Ct}px`, + bottom: zt === "" ? "" : `${zt}px`, + left: pt === "auto" ? pt : `${pt}px`, + right: He !== "" ? `${He}px` : "" + }), T(r) && (Mt !== "" && (r.style.top = `${Mt}px`), le !== "" ? r.style.left = `${le}px` : Ae !== "" && (r.style.right = `${Ae}px`)); + const Lo = w( + `updated.bs.${Wt(e.name)}` ); - $(e, Ko); + b(s, Lo); } -}, Es = { - template: ko(lt), +}, es = { + template: po(at), title: "", customClass: "", trigger: "hover focus", @@ -1531,679 +1312,521 @@ const Lt = "popover", Ke = "Popover", lt = "tooltip", ko = (t) => { content: "", dismissible: !1, btnClose: "" -}; -var xr = Object.defineProperty, Hr = (t, s, e) => s in t ? xr(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e, bt = (t, s, e) => Hr(t, typeof s != "symbol" ? s + "" : s, e); -const Pr = "DOMContentLoaded", Sr = navigator.userAgentData, _e = Sr, { userAgent: Ar } = navigator, Oe = Ar, vn = /iPhone|iPad|iPod|Android/i; -// istanbul ignore else @preserve -_e ? _e.brands.some((t) => vn.test(t.brand)) : vn.test(Oe); -const bn = /(iPhone|iPod|iPad)/; -_e ? _e.brands.some( - (t) => bn.test(t.brand) -) : ( - /* istanbul ignore next @preserve */ - bn.test(Oe) -); -Oe && Oe.includes("Firefox"); -const { head: qe } = document; -["webkitPerspective", "perspective"].some( - (t) => t in qe.style -); -const Dr = (t, s, e, n) => { - const o = n || !1; - t.addEventListener( - s, - e, - o - ); -}, kr = (t, s, e, n) => { - const o = n || !1; - t.removeEventListener( - s, - e, - o - ); -}, Lr = (t, s, e, n) => { - const o = (i) => { - // istanbul ignore else @preserve - (i.target === t || i.currentTarget === t) && (e.apply(t, [i]), kr(t, s, o, n)); - }; - Dr(t, s, o, n); -}, Ir = () => { -}; -(() => { - let t = !1; - try { - const s = Object.defineProperty({}, "passive", { - get: () => (t = !0, t) - }); - // istanbul ignore next @preserve - Lr(document, Pr, Ir, s); - } catch { - } - return t; -})(); -["webkitTransform", "transform"].some( - (t) => t in qe.style -); -["webkitAnimation", "animation"].some( - (t) => t in qe.style -); -["webkitTransition", "transition"].some( - (t) => t in qe.style -); -const _r = (t) => t != null && typeof t == "object" || !1, Or = (t) => _r(t) && typeof t.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some( - (s) => t.nodeType === s -) || !1, Nr = (t) => Or(t) && t.nodeType === 1 || !1, wn = (t, s) => { - const { width: e, height: n, top: o, right: i, bottom: r, left: c } = t.getBoundingClientRect(); - let l = 1, a = 1; - return { - width: e / l, - height: n / a, - top: o / a, - right: i / l, - bottom: r / a, - left: c / l, - x: c / l, - y: o / a - }; -}, Mr = (t) => typeof t == "function" || !1, $n = "PositionObserver Error"; -class Io { +}, ar = (e) => e != null && typeof e == "object" || !1, cr = (e) => ar(e) && typeof e.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some( + (t) => e.nodeType === t +) || !1, Ys = (e) => cr(e) && e.nodeType === 1 || !1, lr = (e) => typeof e == "function" || !1, Zs = "PositionObserver Error"; +class mo { + entries; + _tick; + _root; + _callback; /** - * The constructor takes a single argument, callback, which is called - * whenever the position of an observed element changes. The callback function - * should take an array of `PositionObserverEntry` objects as its only argument. + * The constructor takes two arguments, a `callback`, which is called + * whenever the position of an observed element changes and an `options` object. + * The callback function should take an array of `PositionObserverEntry` objects + * as its only argument, but it's not required. * * @param callback the callback that applies to all targets of this observer + * @param options the options of this observer */ - constructor(s, e) { - if (bt(this, "entries"), bt(this, "_tick"), bt(this, "_root"), bt(this, "_callback"), bt(this, "observe", (n) => { - if (!Nr(n)) - throw new Error( - `${$n}: ${n} is not an instance of HTMLElement.` - ); - const { clientWidth: o, clientHeight: i } = this._root, r = wn(n), { left: c, top: l, bottom: a, right: h, width: p, height: u } = r, C = l > 1 - u && c > 1 - p && a <= i + u - 1 && h <= o + p - 1; - this.entries.push({ target: n, boundingBox: r, isVisible: C }), this._tick = requestAnimationFrame(this._runCallback); - }), bt(this, "unobserve", (n) => { - const o = this.entries.findIndex((i) => i.target === n); - this.entries.splice(o, 1); - }), bt(this, "_runCallback", () => { - /* istanbul ignore if @preserve - a guard must be set */ - if (!this.entries.length) return; - const n = [], { clientWidth: o, clientHeight: i } = this._root; - this.entries.forEach((r, c) => { - const { target: l, boundingBox: a } = r, h = wn(l), { left: p, top: u, bottom: C, right: j, width: w, height: M } = h; - if (a.left !== p || a.top !== u || a.right !== j || a.bottom !== C) { - const W = u > 1 - M && p > 1 - w && C <= i + M - 1 && j <= o + w - 1; - this.entries[c].boundingBox = h, this.entries[c].isVisible = W, n.push({ target: l, boundingBox: h, isVisible: W }); - } - }), n.length && this._callback(n), requestAnimationFrame(this._runCallback); - }), bt(this, "disconnect", () => { - cancelAnimationFrame(this._tick), this.entries.length = 0, this._tick = 0; - }), !Mr(s)) - throw new Error(`${$n}: ${s} is not a function.`); - this.entries = [], this._callback = s, this._root = (e == null ? void 0 : e.root) || (document == null ? void 0 : document.documentElement), this._tick = 0; + constructor(t, s) { + if (!lr(t)) + throw new Error(`${Zs}: ${t} is not a function.`); + this.entries = [], this._callback = t, this._root = Ys(s?.root) ? s.root : document?.documentElement, this._tick = 0; } + /** + * Start observing the position of the specified element. + * If the element is not currently attached to the DOM, + * it will NOT be added to the entries. + * @param target + */ + observe = (t) => { + if (!Ys(t)) + throw new Error( + `${Zs}: ${t} is not an instance of HTMLElement.` + ); + if (!this._root.contains(t)) return; + const { clientWidth: s, clientHeight: n } = this._root, o = t.getBoundingClientRect(), { left: i, top: r, bottom: a, right: c, width: l, height: d } = o, g = r > 1 - d && i > 1 - l && a <= n + d - 1 && c <= s + l - 1; + this.entries.push({ target: t, boundingBox: o, isVisible: g }), this._tick || (this._tick = requestAnimationFrame(this._runCallback)); + }; + /** + * Stop observing the position of the specified element. + * @param target + */ + unobserve = (t) => { + const s = this.entries.findIndex((n) => n.target === t); + this.entries.splice(s, 1); + }; + /** + * Private method responsible for all the heavy duty. + */ + _runCallback = () => { + if (!this.entries.length) return; + const t = [], { clientWidth: s, clientHeight: n } = this._root; + this.entries.forEach((o, i) => { + const { target: r, boundingBox: a } = o, c = r.getBoundingClientRect(), { left: l, top: d, bottom: g, right: y, width: S, height: R } = c; + if (a.left !== l || a.top !== d || a.right !== y || a.bottom !== g) { + const v = d > 1 - R && l > 1 - S && g <= n + R - 1 && y <= s + S - 1; + this.entries[i].boundingBox = c, this.entries[i].isVisible = v, t.push({ target: r, boundingBox: c, isVisible: v }); + } + }), t.length && this._callback(t), requestAnimationFrame(this._runCallback); + }; + /** + * Immediately stop observing all elements. + */ + disconnect = () => { + cancelAnimationFrame(this._tick), this.entries.length = 0, this._tick = 0; + }; } -const _o = "data-original-title", St = "Tooltip", wt = (t, s, e) => { - // istanbul ignore else @preserve - if (we(s) && s.length) { - let n = s.trim(); - bi(e) && (n = e(n)); +const vo = "data-original-title", xt = "Tooltip", vt = (e, t, s) => { + if (oe(t) && t.length) { + let n = t.trim(); + ti(s) && (n = s(n)); const i = new DOMParser().parseFromString(n, "text/html"); - t.append(...i.body.childNodes); - } else y(s) ? t.append(s) : (wi(s) || vi(s) && s.every(A)) && t.append(...s); -}, Br = (t) => { - const s = t.name === St, { id: e, element: n, options: o } = t, { + e.append(...i.body.childNodes); + } else T(t) ? e.append(t) : (ei(t) || Qo(t) && t.every(H)) && e.append(...t); +}, dr = (e) => { + const t = e.name === xt, { id: s, element: n, options: o } = e, { title: i, placement: r, - template: c, - animation: l, - customClass: a, - sanitizeFn: h, - dismissible: p, - content: u, - btnClose: C - } = o, j = s ? lt : Lt, w = { ...Lo }; - let M = [], W = []; - Ct(n) && (w.left = "end", w.right = "start"); - const Bt = `bs-${j}-${w[r]}`; - let ct; - if (y(c)) - ct = c; + template: a, + animation: c, + customClass: l, + sanitizeFn: d, + dismissible: g, + content: y, + btnClose: S + } = o, R = t ? at : At, v = { ...uo }; + let V = [], X = []; + $t(n) && (v.left = "end", v.right = "start"); + const kt = `bs-${R}-${v[r]}`; + let it; + if (T(a)) + it = a; else { - const tt = Et("div"); - wt(tt, c, h), ct = tt.firstChild; - } - t.tooltip = y(ct) ? ct.cloneNode(!0) : void 0; - const { tooltip: H } = t; - // istanbul ignore else @preserve - if (H) { - O(H, "id", e), O(H, "role", lt); - const tt = s ? `${lt}-inner` : `${Lt}-body`, ot = s ? null : S(`.${Lt}-header`, H), V = S(`.${tt}`, H); - t.arrow = S(`.${j}-arrow`, H); - const { arrow: X } = t; - if (y(i)) M = [i.cloneNode(!0)]; + const Q = Et("div"); + vt(Q, a, d), it = Q.firstChild; + } + e.tooltip = T(it) ? it.cloneNode(!0) : void 0; + const { tooltip: C } = e; + if (C) { + O(C, "id", s), O(C, "role", at); + const Q = t ? `${at}-inner` : `${At}-body`, nt = t ? null : D(`.${At}-header`, C), F = D(`.${Q}`, C); + e.arrow = D(`.${R}-arrow`, C); + const { arrow: j } = e; + if (T(i)) V = [i.cloneNode(!0)]; else { - const P = Et("div"); - wt(P, i, h), M = [...P.childNodes]; + const x = Et("div"); + vt(x, i, d), V = [...x.childNodes]; } - if (y(u)) W = [u.cloneNode(!0)]; + if (T(y)) X = [y.cloneNode(!0)]; else { - const P = Et("div"); - wt(P, u, h), W = [...P.childNodes]; + const x = Et("div"); + vt(x, y, d), X = [...x.childNodes]; } - if (p) + if (g) if (i) - if (y(C)) - M = [...M, C.cloneNode(!0)]; + if (T(S)) + V = [...V, S.cloneNode(!0)]; else { - const P = Et("div"); - wt(P, C, h), M = [...M, P.firstChild]; + const x = Et("div"); + vt(x, S, d), V = [...V, x.firstChild]; } + else if (nt && nt.remove(), T(S)) + X = [...X, S.cloneNode(!0)]; else { - // istanbul ignore else @preserve - if (ot && ot.remove(), y(C)) - W = [...W, C.cloneNode(!0)]; - else { - const P = Et("div"); - wt(P, C, h), W = [...W, P.firstChild]; - } + const x = Et("div"); + vt(x, S, d), X = [...X, x.firstChild]; } - // istanbul ignore else @preserve - if (s) - i && V && wt(V, i, h); - else { - // istanbul ignore else @preserve - i && ot && wt(ot, M, h); - // istanbul ignore else @preserve - u && V && wt(V, W, h), t.btn = S(".btn-close", H) || void 0; - } - f(H, "position-fixed"), f(X, "position-absolute"); - // istanbul ignore else @preserve - g(H, j) || f(H, j); - // istanbul ignore else @preserve - l && !g(H, B) && f(H, B); - // istanbul ignore else @preserve - a && !g(H, a) && f(H, a); - // istanbul ignore else @preserve - g(H, Bt) || f(H, Bt); - } -}, Fr = (t) => { - const s = ["HTML", "BODY"], e = []; - let { parentNode: n } = t; - for (; n && !s.includes(n.nodeName); ) { - n = ui(n); - // istanbul ignore else @preserve - qn(n) || $i(n) || e.push(n); - } - return e.find((o, i) => K(o, "position") !== "relative" && e.slice(i + 1).every( - (r) => K(r, "position") === "static" + t ? i && F && vt(F, i, d) : (i && nt && vt(nt, V, d), y && F && vt(F, X, d), e.btn = D(".btn-close", C) || void 0), h(C, "position-fixed"), h(j, "position-absolute"), f(C, R) || h(C, R), c && !f(C, _) && h(C, _), l && !f(C, l) && h(C, l), f(C, kt) || h(C, kt); + } +}, hr = (e) => { + const t = ["HTML", "BODY"], s = []; + let { parentNode: n } = e; + for (; n && !t.includes(n.nodeName); ) + n = Go(n), yn(n) || si(n) || s.push(n); + return s.find((o, i) => z(o, "position") !== "relative" && s.slice(i + 1).every( + (r) => z(r, "position") === "static" ) ? o : null) || // istanbul ignore next: optional guard - E(t).body; -}, Rr = `[${rt}="${lt}"],[data-tip="${lt}"]`, Oo = "title"; -let En = (t) => z(t, St); -const Wr = (t) => new At(t), jr = (t) => { - const { element: s, tooltip: e, container: n, offsetParent: o } = t; - It(s, Rn), vo( - e, + E(e).body; +}, fr = `[${ot}="${at}"],[data-tip="${at}"]`, bo = "title"; +let Gs = (e) => W(e, xt); +const gr = (e) => new ps(e), pr = (e) => { + const { element: t, tooltip: s, container: n, offsetParent: o } = e; + Pt(t, bn), Gn( + s, n === o ? n : o ); -}, Qt = (t) => { - const { tooltip: s, container: e, offsetParent: n } = t; - return s && Ds(s, e === n ? e : n); -}, Vr = (t, s) => { - const { element: e } = t; - t._toggleEventListeners(); - // istanbul ignore else @preserve - fe(e, _o) && t.name === St && Mo(t); - // istanbul ignore else @preserve - s && s(); -}, No = (t, s) => { - const e = s ? F : R, { element: n } = t; - e( +}, Yt = (e) => { + const { tooltip: t, container: s, offsetParent: n } = e; + return t && ds(t, s === n ? s : n); +}, ur = (e, t) => { + const { element: s } = e; + e._toggleEventListeners(), Gt(s, vo) && e.name === xt && wo(e), t && t(); +}, Eo = (e, t) => { + const s = t ? M : B, { element: n } = e; + s( E(n), - xs, - t.handleTouch, - ge + is, + e.handleTouch, + Jt ); -}, Tn = (t) => { - const { element: s } = t, e = T( - `shown.bs.${Xt(t.name)}` +}, Js = (e) => { + const { element: t } = e, s = w( + `shown.bs.${Wt(e.name)}` ); - No(t, !0), $(s, e), m.clear(s, "in"); -}, yn = (t) => { - const { element: s } = t, e = T( - `hidden.bs.${Xt(t.name)}` + Eo(e, !0), b(t, s), p.clear(t, "in"); +}, Qs = (e) => { + const { element: t } = e, s = w( + `hidden.bs.${Wt(e.name)}` ); - No(t), jr(t), $(s, e), m.clear(s, "out"); -}, Cn = (t, s) => { - const e = s ? F : R, { element: n } = t, o = N(n, `.${U}`), i = N(n, `.${G}`); - s ? t._observer.observe(t.element) : t._observer.disconnect(), o && e(o, `hide.bs.${U}`, t.handleHide), i && e(i, `hide.bs.${G}`, t.handleHide); -}, Mo = (t, s) => { - const e = [_o, Oo], { element: n } = t; + Eo(e), pr(e), b(t, s), p.clear(t, "out"); +}, tn = (e, t) => { + const s = t ? M : B, { element: n } = e, o = k(n, `.${q}`), i = k(n, `.${G}`); + t ? e._observer.observe(e.element) : e._observer.disconnect(), o && s(o, `hide.bs.${q}`, e.handleHide), i && s(i, `hide.bs.${G}`, e.handleHide); +}, wo = (e, t) => { + const s = [vo, bo], { element: n } = e; O( n, - e[s ? 0 : 1], - s || st(n, e[0]) || // istanbul ignore next @preserve + s[t ? 0 : 1], + t || et(n, s[0]) || // istanbul ignore next @preserve "" - ), It(n, e[s ? 1 : 0]); + ), Pt(n, s[t ? 1 : 0]); }; -class At extends nt { +class ps extends st { + static selector = fr; + static init = gr; + static getInstance = Gs; + static styleTip = ts; /** * @param target the target element * @param config the instance options */ - constructor(e, n) { - super(e, n); - // TOOLTIP PUBLIC METHODS - // ====================== - /** Handles the focus event on iOS. */ - // istanbul ignore next @preserve - impossible to test without Apple device - d(this, "handleFocus", () => ht(this.element)); - /** Shows the tooltip. */ - d(this, "handleShow", () => this.show()); - /** Hides the tooltip. */ - d(this, "handleHide", () => this.hide()); - /** Updates the tooltip position. */ - d(this, "update", () => { - $s(this); - }); - /** Toggles the tooltip visibility. */ - d(this, "toggle", () => { - const { tooltip: e } = this; - e && !Qt(this) ? this.show() : this.hide(); - }); - /** - * Handles the `touchstart` event listener for `Tooltip` - * - * @this {Tooltip} - * @param {TouchEvent} e the `Event` object - */ - d(this, "handleTouch", ({ target: e }) => { - const { tooltip: n, element: o } = this; - // istanbul ignore if @preserve - n && n.contains(e) || e === o || e && o.contains(e) || this.hide(); - }); - /** - * Toggles on/off the `Tooltip` event listeners. - * - * @param add when `true`, event listeners are added - */ - d(this, "_toggleEventListeners", (e) => { - const n = e ? F : R, { element: o, options: i, btn: r } = this, { trigger: c } = i, a = !!(this.name !== St && i.dismissible); - // istanbul ignore else @preserve - c.includes("manual") || (this.enabled = !!e, c.split(" ").forEach((p) => { - // istanbul ignore else @preserve - if (p === Jo) { - n(o, jn, this.handleShow), n(o, Be, this.handleShow); - // istanbul ignore else @preserve - a || (n(o, Cs, this.handleHide), n( - E(o), - xs, - this.handleTouch, - ge - )); - } else if (p === _) - n(o, p, a ? this.handleShow : this.toggle); - else if (p === Ts) { - n(o, ys, this.handleShow); - // istanbul ignore else @preserve - a || n(o, Wn, this.handleHide); - // istanbul ignore else @preserve - ci && n(o, _, this.handleFocus); - } - // istanbul ignore else @preserve - a && r && n(r, _, this.handleHide); - })); - }); - const { element: o } = this, i = this.name === St, r = i ? lt : Lt, c = i ? St : Ke; - // istanbul ignore next @preserve: this is to set Popover too - En = (a) => z(a, c), this.enabled = !0, this.id = `${r}-${Yn(o, r)}`; - const { options: l } = this; - if (!(!l.title && i || !i && !l.content)) { - dt(Es, { titleAttr: "" }); - // istanbul ignore else @preserve - fe(o, Oo) && i && typeof l.title == "string" && Mo(this, l.title), this.container = Fr(o), this.offsetParent = ["sticky", "fixed"].some( - (a) => K(this.container, "position") === a - ) ? this.container : E(this.element).body, Br(this), this._observer = new Io(() => this.update()), this._toggleEventListeners(!0); - } + constructor(t, s) { + super(t, s); + const { element: n } = this, o = this.name === xt, i = o ? at : At, r = o ? xt : De; + Gs = (c) => W(c, r), this.enabled = !0, this.id = `${i}-${Cn(n, i)}`; + const { options: a } = this; + !a.title && o || !o && !a.content || (ct(es, { titleAttr: "" }), Gt(n, bo) && o && typeof a.title == "string" && wo(this, a.title), this.container = hr(n), this.offsetParent = ["sticky", "fixed"].some( + (c) => z(this.container, "position") === c + ) ? this.container : E(this.element).body, dr(this), this._observer = new mo(() => this.update()), this._toggleEventListeners(!0)); } /** * Returns component name string. */ get name() { - return St; + return xt; } /** * Returns component default options. */ get defaults() { - return Es; - } + return es; + } + // TOOLTIP PUBLIC METHODS + // ====================== + /** Handles the focus event on iOS. */ + // istanbul ignore next @preserve - impossible to test without Apple device + handleFocus = () => lt(this.element); + /** Shows the tooltip. */ + handleShow = () => this.show(); show() { - const { options: e, tooltip: n, element: o, container: i, offsetParent: r, id: c } = this, { animation: l } = e, a = m.get(o, "out"), h = i === r ? i : r; - m.clear(o, "out"), n && !a && !Qt(this) && m.set( - o, + const { options: t, tooltip: s, element: n, container: o, offsetParent: i, id: r } = this, { animation: a } = t, c = p.get(n, "out"), l = o === i ? o : i; + p.clear(n, "out"), s && !c && !Yt(this) && p.set( + n, () => { - const p = T( - `show.bs.${Xt(this.name)}` + const d = w( + `show.bs.${Wt(this.name)}` ); - $(o, p); - // istanbul ignore else @preserve - if (!p.defaultPrevented) { - mo(n, h), O(o, Rn, `#${c}`), this.update(), Cn(this, !0); - // istanbul ignore else @preserve - g(n, v) || f(n, v); - // istanbul ignore else @preserve - l ? D(n, () => Tn(this)) : Tn(this); - } + b(n, d), d.defaultPrevented || (Zn(s, l), O(n, bn, `#${r}`), this.update(), tn(this, !0), f(s, u) || h(s, u), a ? A(s, () => Js(this)) : Js(this)); }, 17, "in" ); } + /** Hides the tooltip. */ + handleHide = () => this.hide(); hide() { - const { options: e, tooltip: n, element: o } = this, { animation: i, delay: r } = e; - m.clear(o, "in"); - // istanbul ignore else @preserve - n && Qt(this) && m.set( - o, + const { options: t, tooltip: s, element: n } = this, { animation: o, delay: i } = t; + p.clear(n, "in"), s && Yt(this) && p.set( + n, () => { - const c = T( - `hide.bs.${Xt(this.name)}` + const r = w( + `hide.bs.${Wt(this.name)}` ); - $(o, c); - // istanbul ignore else @preserve - if (!c.defaultPrevented) { - this.update(), b(n, v), Cn(this); - // istanbul ignore else @preserve - i ? D(n, () => yn(this)) : yn(this); - } + b(n, r), r.defaultPrevented || (this.update(), m(s, u), tn(this), o ? A(s, () => Qs(this)) : Qs(this)); }, - r + 17, + i + 17, "out" ); } + /** Updates the tooltip position. */ + update = () => { + ts(this); + }; + /** Toggles the tooltip visibility. */ + toggle = () => { + const { tooltip: t } = this; + t && !Yt(this) ? this.show() : this.hide(); + }; /** Enables the tooltip. */ enable() { - const { enabled: e } = this; - // istanbul ignore else @preserve - e || (this._toggleEventListeners(!0), this.enabled = !e); + const { enabled: t } = this; + t || (this._toggleEventListeners(!0), this.enabled = !t); } /** Disables the tooltip. */ disable() { - const { tooltip: e, enabled: n } = this; - // istanbul ignore else @preserve - n && (e && Qt(this) && this.hide(), this._toggleEventListeners(), this.enabled = !n); + const { tooltip: t, enabled: s } = this; + s && (t && Yt(this) && this.hide(), this._toggleEventListeners(), this.enabled = !s); } /** Toggles the `disabled` property. */ toggleEnabled() { this.enabled ? this.disable() : this.enable(); } + /** + * Handles the `touchstart` event listener for `Tooltip` + * + * @this {Tooltip} + * @param {TouchEvent} e the `Event` object + */ + handleTouch = ({ target: t }) => { + const { tooltip: s, element: n } = this; + s && s.contains(t) || t === n || t && n.contains(t) || this.hide(); + }; + /** + * Toggles on/off the `Tooltip` event listeners. + * + * @param add when `true`, event listeners are added + */ + _toggleEventListeners = (t) => { + const s = t ? M : B, { element: n, options: o, btn: i } = this, { trigger: r } = o, c = !!(this.name !== xt && o.dismissible); + r.includes("manual") || (this.enabled = !!t, r.split(" ").forEach((d) => { + d === Oo ? (s(n, wn, this.handleShow), s(n, we, this.handleShow), c || (s(n, os, this.handleHide), s( + E(n), + is, + this.handleTouch, + Jt + ))) : d === N ? s(n, d, c ? this.handleShow : this.toggle) : d === ss && (s(n, ns, this.handleShow), c || s(n, En, this.handleHide), Vo() && s(n, N, this.handleFocus)), c && i && s(i, N, this.handleHide); + })); + }; /** Removes the `Tooltip` from the target element. */ dispose() { - const { tooltip: e, options: n } = this, o = { ...this, name: this.name }, i = () => setTimeout( - () => Vr(o, () => super.dispose()), + const { tooltip: t, options: s } = this, n = { ...this, name: this.name }, o = () => setTimeout( + () => ur(n, () => super.dispose()), 17 ); - n.animation && Qt(o) ? (this.options.delay = 0, this.hide(), D(e, i)) : i(); + s.animation && Yt(n) ? (this.options.delay = 0, this.hide(), A(t, o)) : o(); } } -d(At, "selector", Rr), d(At, "init", Wr), d(At, "getInstance", En), d(At, "styleTip", $s); -const zr = `[${rt}="${Lt}"],[data-tip="${Lt}"]`, Xr = dt({}, Es, { - template: ko(Lt), +const mr = `[${ot}="${At}"],[data-tip="${At}"]`, vr = ct({}, es, { + template: po(At), content: "", dismissible: !1, btnClose: '' -}), Kr = (t) => z(t, Ke), qr = (t) => new Vt(t); -class Vt extends At { +}), br = (e) => W(e, De), Er = (e) => new To(e); +class To extends ps { + static selector = mr; + static init = Er; + static getInstance = br; + static styleTip = ts; /** * @param target the target element * @param config the instance options */ - constructor(e, n) { - super(e, n); - /* extend original `show()` */ - d(this, "show", () => { - super.show(); - const { options: e, btn: n } = this; - // istanbul ignore else @preserve - e.dismissible && n && setTimeout(() => ht(n), 17); - }); + constructor(t, s) { + super(t, s); } /** * Returns component name string. */ get name() { - return Ke; + return De; } /** * Returns component default options. */ get defaults() { - return Xr; + return vr; } + /* extend original `show()` */ + show = () => { + super.show(); + const { options: t, btn: s } = this; + t.dismissible && s && setTimeout(() => lt(s), 17); + }; } -d(Vt, "selector", zr), d(Vt, "init", qr), d(Vt, "getInstance", Kr), d(Vt, "styleTip", $s); -const Yr = "scrollspy", Bo = "ScrollSpy", Ur = '[data-bs-spy="scroll"]', Zr = { +const wr = "scrollspy", $o = "ScrollSpy", Tr = '[data-bs-spy="scroll"]', $r = { offset: 10, target: null -}, Jr = (t) => z(t, Bo), Gr = (t) => new ae(t), xn = T(`activate.bs.${Yr}`), Qr = (t) => { - const { target: s, scrollTarget: e, options: n, itemsLength: o, scrollHeight: i, element: r } = t, { offset: c } = n, l = e !== r, a = s && Ps("A", s), h = E(r), p = e ? Fo(e) : i; - t.scrollTop = e.scrollTop; - // istanbul ignore else @preserve - if (a && (p !== i || o !== a.length)) { - let u, C, j; - t.items = [], t.targets = [], t.offsets = [], t.scrollHeight = p, t.maxScroll = t.scrollHeight - tc(t), Array.from(a).forEach((w) => { - u = st(w, "href"), C = u && u.charAt(0) === "#" && u.slice(-1) !== "#" && S(u, h), C && (t.items.push(w), t.targets.push(C), j = Ee(C), t.offsets.push( - (l ? j.top + t.scrollTop : C.offsetTop) - c +}, yr = (e) => W(e, $o), Cr = (e) => new Co(e), en = w(`activate.bs.${wr}`), Sr = (e) => { + const { target: t, scrollTarget: s, options: n, itemsLength: o, scrollHeight: i, element: r } = e, { offset: a } = n, c = s !== r, l = t && as("A", t), d = E(r), g = s.scrollHeight; + if (e.scrollTop = s.scrollTop, l && (g !== i || o !== l.length)) { + let y, S, R; + e.items = [], e.targets = [], e.offsets = [], e.scrollHeight = g, e.maxScroll = e.scrollHeight - Dr(e), Array.from(l).forEach((v) => { + y = et(v, "href"), S = y && y.charAt(0) === "#" && y.slice(-1) !== "#" && D(y, d), S && (e.items.push(v), e.targets.push(S), R = re(S), e.offsets.push( + (c ? R.top + e.scrollTop : S.offsetTop) - a )); - }), t.itemsLength = t.items.length; + }), e.itemsLength = e.items.length; } -}, Fo = (t) => y(t) ? t.scrollHeight : it(t).scrollHeight, tc = ({ element: t, scrollTarget: s }) => s !== t ? s.clientHeight : Ee(t).height, Ro = (t) => { - [...Ps("A", t)].forEach((s) => { - g(s, x) && b(s, x); +}, sn = ({ targets: e, scrollTarget: t, element: s, _observer: n }, o) => { + o ? t === s ? e.forEach((i) => n.observe(i)) : n.observe(s) : n.disconnect(); +}, xr = (e) => e.scrollHeight, Dr = ({ element: e, scrollTarget: t }) => t !== e ? t.clientHeight : re(e).height, yo = (e) => { + [...as("A", e)].forEach((t) => { + f(t, $) && m(t, $); }); -}, Hn = (t, s) => { - const { target: e, element: n } = t; - // istanbul ignore else @preserve - y(e) && Ro(e), t.activeItem = s, f(s, x); +}, nn = (e, t) => { + const { target: s, element: n } = e; + T(s) && yo(s), e.activeItem = t, h(t, $); const o = []; - let i = s; - for (; i !== xt(n); ) - i = i.parentElement, (g(i, "nav") || g(i, "dropdown-menu")) && o.push(i); + let i = t; + for (; i !== yt(n); ) + i = i.parentElement, (f(i, "nav") || f(i, "dropdown-menu")) && o.push(i); o.forEach((r) => { - const c = r.previousElementSibling; - // istanbul ignore else @preserve - c && !g(c, x) && f(c, x); - }), xn.relatedTarget = s, $(n, xn); + const a = r.previousElementSibling; + a && !f(a, $) && h(a, $); + }), en.relatedTarget = t, b(n, en); }; -class ae extends nt { +class Co extends st { + static selector = Tr; + static init = Cr; + static getInstance = yr; /** * @param target the target element * @param config the instance options */ - constructor(e, n) { - super(e, n); - /* eslint-enable */ - // SCROLLSPY PUBLIC METHODS - // ======================== - /** Updates all items. */ - d(this, "refresh", () => { - const { target: e } = this; - // istanbul ignore else @preserve - if (y(e) && e.offsetHeight > 0) { - Qr(this); - const { scrollTop: n, maxScroll: o, itemsLength: i, items: r, activeItem: c } = this; - if (n >= o) { - const a = r[i - 1]; - // istanbul ignore else @preserve - c !== a && Hn(this, a); - return; - } - const { offsets: l } = this; - // istanbul ignore else @preserve - if (c && n < l[0] && l[0] > 0) { - this.activeItem = null; - // istanbul ignore else @preserve - e && Ro(e); - return; - } - r.forEach((a, h) => { - c !== a && n >= l[h] && (typeof l[h + 1] > "u" || n < l[h + 1]) && Hn(this, a); - }); - } - }); - /** - * Toggles on/off the component event listener. - * - * @param add when `true`, listener is added - */ - d(this, "_toggleEventListeners", (e) => { - e ? this.scrollTarget === this.element ? this.targets.forEach( - (n) => this._observer.observe(n) - ) : this._observer.observe(this.element) : this._observer.disconnect(); - }); - const { element: o, options: i } = this; - this.target = S( - i.target, - E(o) - ), this.target && (this.scrollTarget = o.clientHeight < o.scrollHeight ? o : it(o), this.scrollHeight = Fo(this.scrollTarget), this.refresh(), this._observer = new Io(() => this.refresh(), { + constructor(t, s) { + super(t, s); + const { element: n, options: o } = this; + this.target = D( + o.target, + E(n) + ), this.target && (this.scrollTarget = n.clientHeight < n.scrollHeight ? n : dt(n), this.scrollHeight = xr(this.scrollTarget), this.refresh(), this._observer = new mo(() => this.refresh(), { root: this.scrollTarget - }), this._toggleEventListeners(!0)); + }), sn(this, !0)); } /* eslint-disable */ /** * Returns component name string. */ get name() { - return Bo; + return $o; } /** * Returns component default options. */ get defaults() { - return Zr; + return $r; } + /* eslint-enable */ + // SCROLLSPY PUBLIC METHODS + // ======================== + /** Updates all items. */ + refresh = () => { + const { target: t } = this; + if (T(t) && t.offsetHeight > 0) { + Sr(this); + const { scrollTop: s, maxScroll: n, itemsLength: o, items: i, activeItem: r } = this; + if (s >= n) { + const c = i[o - 1]; + r !== c && nn(this, c); + return; + } + const { offsets: a } = this; + if (r && s < a[0] && a[0] > 0) { + this.activeItem = null, t && yo(t); + return; + } + i.forEach((c, l) => { + r !== c && s >= a[l] && (typeof a[l + 1] > "u" || s < a[l + 1]) && nn(this, c); + }); + } + }; /** Removes `ScrollSpy` from the target element. */ dispose() { - this._toggleEventListeners(), super.dispose(); + const t = { ...this }; + sn(t), super.dispose(); } } -d(ae, "selector", Ur), d(ae, "init", Gr), d(ae, "getInstance", Jr); -const ye = "tab", Wo = "Tab", Pn = `[${rt}="${ye}"]`, jo = (t) => z(t, Wo), ec = (t) => new le(t), cs = T( - `show.bs.${ye}` -), Sn = T( - `shown.bs.${ye}` -), as = T( - `hide.bs.${ye}` -), An = T( - `hidden.bs.${ye}` -), me = /* @__PURE__ */ new Map(), Dn = (t) => { - const { tabContent: s, nav: e } = t; - // istanbul ignore else @preserve - s && g(s, _t) && (s.style.height = "", b(s, _t)); - // istanbul ignore else @preserve - e && m.clear(e); -}, kn = (t) => { - const { element: s, tabContent: e, content: n, nav: o } = t, { tab: i } = y(o) && me.get(o) || // istanbul ignore next @preserve +const ce = "tab", So = "Tab", on = `[${ot}="${ce}"]`, xo = (e) => W(e, So), Hr = (e) => new Do(e), We = w( + `show.bs.${ce}` +), rn = w( + `shown.bs.${ce}` +), Ve = w( + `hide.bs.${ce}` +), an = w( + `hidden.bs.${ce}` +), ee = /* @__PURE__ */ new Map(), cn = (e) => { + const { tabContent: t, nav: s } = e; + t && f(t, It) && (t.style.height = "", m(t, It)), s && p.clear(s); +}, ln = (e) => { + const { element: t, tabContent: s, content: n, nav: o } = e, { tab: i } = T(o) && ee.get(o) || // istanbul ignore next @preserve { tab: null }; - // istanbul ignore else @preserve - if (e && n && g(n, B)) { - const { currentHeight: r, nextHeight: c } = me.get(s) || // istanbul ignore next @preserve + if (s && n && f(n, _)) { + const { currentHeight: r, nextHeight: a } = ee.get(t) || // istanbul ignore next @preserve { currentHeight: 0, nextHeight: 0 }; - // istanbul ignore else @preserve: vitest won't validate this branch - r !== c ? setTimeout(() => { - e.style.height = `${c}px`, Nt(e), D(e, () => Dn(t)); - }, 50) : Dn(t); - } else o && m.clear(o); - Sn.relatedTarget = i, $(s, Sn); -}, Ln = (t) => { - const { element: s, content: e, tabContent: n, nav: o } = t, { tab: i, content: r } = o && me.get(o) || // istanbul ignore next @preserve + r !== a ? setTimeout(() => { + s.style.height = `${a}px`, Nt(s), A(s, () => cn(e)); + }, 50) : cn(e); + } else o && p.clear(o); + rn.relatedTarget = i, b(t, rn); +}, dn = (e) => { + const { element: t, content: s, tabContent: n, nav: o } = e, { tab: i, content: r } = o && ee.get(o) || // istanbul ignore next @preserve { tab: null, content: null }; - let c = 0; - // istanbul ignore else @preserve - n && e && g(e, B) && ([r, e].forEach((l) => { - // istanbul ignore else @preserve - y(l) && f(l, "overflow-hidden"); - }), c = y(r) ? r.scrollHeight : 0), cs.relatedTarget = i, An.relatedTarget = s, $(s, cs); - // istanbul ignore else @preserve - if (!cs.defaultPrevented) { - // istanbul ignore else @preserve - e && f(e, x); - // istanbul ignore else @preserve - r && b(r, x); - // istanbul ignore else @preserve - if (n && e && g(e, B)) { - const l = e.scrollHeight; - me.set(s, { - currentHeight: c, - nextHeight: l, + let a = 0; + if (n && s && f(s, _) && ([r, s].forEach((c) => { + T(c) && h(c, "overflow-hidden"); + }), a = T(r) ? r.scrollHeight : 0), We.relatedTarget = i, an.relatedTarget = t, b(t, We), !We.defaultPrevented) { + if (s && h(s, $), r && m(r, $), n && s && f(s, _)) { + const c = s.scrollHeight; + ee.set(t, { + currentHeight: a, + nextHeight: c, tab: null, content: null - }), f(n, _t), n.style.height = `${c}px`, Nt(n), [r, e].forEach((a) => { - // istanbul ignore else @preserve - a && b(a, "overflow-hidden"); + }), h(n, It), n.style.height = `${a}px`, Nt(n), [r, s].forEach((l) => { + l && m(l, "overflow-hidden"); }); } - if (e && e && g(e, B)) - setTimeout(() => { - f(e, v), D(e, () => { - kn(t); - }); - }, 1); - else { - // istanbul ignore else @preserve - e && f(e, v), kn(t); - } - // istanbul ignore else @preserve - i && $(i, An); + s && s && f(s, _) ? setTimeout(() => { + h(s, u), A(s, () => { + ln(e); + }); + }, 1) : (s && h(s, u), ln(e)), i && b(i, an); } -}, In = (t) => { - const { nav: s } = t; - // istanbul ignore next @preserve - if (!y(s)) +}, hn = (e) => { + const { nav: t } = e; + if (!T(t)) return { tab: null, content: null }; - const e = at(x, s); + const s = rt($, t); let n = null; - // istanbul ignore else @preserve - e.length === 1 && !Ot.some( - (i) => g(e[0].parentElement, i) - ) ? [n] = e : e.length > 1 && (n = e[e.length - 1]); - const o = y(n) ? Y(n) : null; + s.length === 1 && !Lt.some( + (i) => f(s[0].parentElement, i) + ) ? [n] = s : s.length > 1 && (n = s[s.length - 1]); + const o = T(n) ? U(n) : null; return { tab: n, content: o }; -}, _n = (t) => { - // istanbul ignore next @preserve - if (!y(t)) return null; - const s = N(t, `.${Ot.join(",.")}`); - return s ? S(`.${Ot[0]}-toggle`, s) : null; -}, sc = (t) => { - const s = jo(t.target); - // istanbul ignore else @preserve - s && (t.preventDefault(), s.show()); +}, fn = (e) => { + if (!T(e)) return null; + const t = k(e, `.${Lt.join(",.")}`); + return t ? D(`.${Lt[0]}-toggle`, t) : null; +}, Ar = (e) => { + const t = xo(e.target); + t && (e.preventDefault(), t.show()); }; -class le extends nt { +class Do extends st { + static selector = on; + static init = Hr; + static getInstance = xo; /** @param target the target element */ - constructor(e) { - super(e); - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - d(this, "_toggleEventListeners", (e) => { - (e ? F : R)(this.element, _, sc); - }); - const { element: n } = this, o = Y(n); - // istanbul ignore else @preserve - if (o) { - const i = N(n, ".nav"), r = N(o, ".tab-content"); - this.nav = i, this.content = o, this.tabContent = r, this.dropdown = _n(n); - const { tab: c } = In(this); - if (i && !c) { - const l = S(Pn, i), a = l && Y(l); - // istanbul ignore else @preserve - a && (f(l, x), f(a, v), f(a, x), O(n, Ge, "true")); + constructor(t) { + super(t); + const { element: s } = this, n = U(s); + if (n) { + const o = k(s, ".nav"), i = k(n, ".tab-content"); + this.nav = o, this.content = n, this.tabContent = i, this.dropdown = fn(s); + const { tab: r } = hn(this); + if (o && !r) { + const a = D(on, o), c = a && U(a); + c && (h(a, $), h(c, u), h(c, $), O(s, Le, "true")); } this._toggleEventListeners(!0); } @@ -2212,216 +1835,199 @@ class le extends nt { * Returns component name string. */ get name() { - return Wo; + return So; } // TAB PUBLIC METHODS // ================== /** Shows the tab to the user. */ show() { - const { element: e, content: n, nav: o, dropdown: i } = this; - // istanbul ignore else @preserve - if (!(o && m.get(o)) && !g(e, x)) { - const { tab: r, content: c } = In(this); - // istanbul ignore else @preserve - o && me.set(o, { tab: r, content: c, currentHeight: 0, nextHeight: 0 }), as.relatedTarget = e; - // istanbul ignore else @preserve - if (y(r)) { - $(r, as); - // istanbul ignore else @preserve - if (!as.defaultPrevented) { - f(e, x), O(e, Ge, "true"); - const l = y(r) && _n(r); - l && g(l, x) && b(l, x); - // istanbul ignore else @preserve - if (o) { - const a = () => { - // istanbul ignore else @preserve - r && (b(r, x), O(r, Ge, "false")), i && !g(i, x) && f(i, x); - }; - c && (g(c, B) || n && g(n, B)) ? m.set(o, a, 1) : a(); - } - // istanbul ignore else @preserve - c && (b(c, v), g(c, B) ? D(c, () => Ln(this)) : Ln(this)); + const { element: t, content: s, nav: n, dropdown: o } = this; + if (!(n && p.get(n)) && !f(t, $)) { + const { tab: i, content: r } = hn(this); + if (n && ee.set(n, { tab: i, content: r, currentHeight: 0, nextHeight: 0 }), Ve.relatedTarget = t, T(i) && (b(i, Ve), !Ve.defaultPrevented)) { + h(t, $), O(t, Le, "true"); + const a = T(i) && fn(i); + if (a && f(a, $) && m(a, $), n) { + const c = () => { + i && (m(i, $), O(i, Le, "false")), o && !f(o, $) && h(o, $); + }; + r && (f(r, _) || s && f(s, _)) ? p.set(n, c, 1) : c(); } + r && (m(r, u), f(r, _) ? A(r, () => dn(this)) : dn(this)); } } } + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners = (t) => { + (t ? M : B)(this.element, N, Ar); + }; /** Removes the `Tab` component from the target element. */ dispose() { this._toggleEventListeners(), super.dispose(); } } -d(le, "selector", Pn), d(le, "init", ec), d(le, "getInstance", jo); -const Q = "toast", Vo = "Toast", nc = `.${Q}`, oc = `[${We}="${Q}"]`, zo = `[${rt}="${Q}"]`, qt = "showing", Xo = "hide", ic = { +const J = "toast", Ho = "Toast", Pr = `.${J}`, Ir = `[${$e}="${J}"]`, Ao = `[${ot}="${J}"]`, jt = "showing", Po = "hide", Lr = { animation: !0, autohide: !0, delay: 5e3 -}, _s = (t) => z(t, Vo), rc = (t) => new de(t), On = T( - `show.bs.${Q}` -), cc = T( - `shown.bs.${Q}` -), Nn = T( - `hide.bs.${Q}` -), ac = T( - `hidden.bs.${Q}` -), Mn = (t) => { - const { element: s, options: e } = t; - b(s, qt), m.clear(s, qt), $(s, cc); - // istanbul ignore else @preserve - e.autohide && m.set(s, () => t.hide(), e.delay, Q); -}, Bn = (t) => { - const { element: s } = t; - b(s, qt), b(s, v), f(s, Xo), m.clear(s, Q), $(s, ac); -}, lc = (t) => { - const { element: s, options: e } = t; - f(s, qt), e.animation ? (Nt(s), D(s, () => Bn(t))) : Bn(t); -}, dc = (t) => { - const { element: s, options: e } = t; - m.set( - s, +}, us = (e) => W(e, Ho), Nr = (e) => new Io(e), gn = w( + `show.bs.${J}` +), Or = w( + `shown.bs.${J}` +), pn = w( + `hide.bs.${J}` +), kr = w( + `hidden.bs.${J}` +), un = (e) => { + const { element: t, options: s } = e; + m(t, jt), p.clear(t, jt), b(t, Or), s.autohide && p.set(t, () => e.hide(), s.delay, J); +}, mn = (e) => { + const { element: t } = e; + m(t, jt), m(t, u), h(t, Po), p.clear(t, J), b(t, kr); +}, _r = (e) => { + const { element: t, options: s } = e; + h(t, jt), s.animation ? (Nt(t), A(t, () => mn(e))) : mn(e); +}, Mr = (e) => { + const { element: t, options: s } = e; + p.set( + t, () => { - b(s, Xo), Nt(s), f(s, v), f(s, qt), e.animation ? D(s, () => Mn(t)) : Mn(t); + m(t, Po), Nt(t), h(t, u), h(t, jt), s.animation ? A(t, () => un(e)) : un(e); }, 17, - qt + jt ); -}, hc = (t) => { - const { target: s } = t, e = s && N(s, zo), n = e && Y(e), o = n && _s(n); - // istanbul ignore else @preserve - if (o) { - // istanbul ignore else @preserve - e && e.tagName === "A" && t.preventDefault(), o.relatedTarget = e, o.show(); - } -}, fc = (t) => { - const s = t.target, e = _s(s), { type: n, relatedTarget: o } = t; - // istanbul ignore else @preserve: a solid filter is required - e && s !== o && !s.contains(o) && ([Be, ys].includes(n) ? m.clear(s, Q) : m.set(s, () => e.hide(), e.options.delay, Q)); +}, Br = (e) => { + const { target: t } = e, s = t && k(t, Ao), n = s && U(s), o = n && us(n); + o && (s && s.tagName === "A" && e.preventDefault(), o.relatedTarget = s, o.show()); +}, Rr = (e) => { + const t = e.target, s = us(t), { type: n, relatedTarget: o } = e; + s && t !== o && !t.contains(o) && ([we, ns].includes(n) ? p.clear(t, J) : p.set(t, () => s.hide(), s.options.delay, J)); }; -class de extends nt { +class Io extends st { + static selector = Pr; + static init = Nr; + static getInstance = us; /** * @param target the target `.toast` element * @param config the instance options */ - constructor(e, n) { - super(e, n); - // TOAST PUBLIC METHODS - // ==================== - /** Shows the toast. */ - d(this, "show", () => { - const { element: e, isShown: n } = this; - // istanbul ignore else @preserve - e && !n && ($(e, On), On.defaultPrevented || dc(this)); - }); - /** Hides the toast. */ - d(this, "hide", () => { - const { element: e, isShown: n } = this; - // istanbul ignore else @preserve - e && n && ($(e, Nn), Nn.defaultPrevented || lc(this)); - }); - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, it will add the listener - */ - d(this, "_toggleEventListeners", (e) => { - const n = e ? F : R, { element: o, triggers: i, dismiss: r, options: c, hide: l } = this; - // istanbul ignore else @preserve - r && n(r, _, l); - // istanbul ignore else @preserve - c.autohide && [ys, Wn, Be, Cs].forEach( - (a) => n(o, a, fc) - ); - // istanbul ignore else @preserve - i.length && i.forEach( - (a) => n(a, _, hc) - ); - }); - const { element: o, options: i } = this; - i.animation && !g(o, B) ? f(o, B) : !i.animation && g(o, B) && b(o, B), this.dismiss = S(oc, o), this.triggers = [ - ...J(zo, E(o)) + constructor(t, s) { + super(t, s); + const { element: n, options: o } = this; + o.animation && !f(n, _) ? h(n, _) : !o.animation && f(n, _) && m(n, _), this.dismiss = D(Ir, n), this.triggers = [ + ...Z(Ao, E(n)) ].filter( - (r) => Y(r) === o + (i) => U(i) === n ), this._toggleEventListeners(!0); } /** * Returns component name string. */ get name() { - return Vo; + return Ho; } /** * Returns component default options. */ get defaults() { - return ic; + return Lr; } /** * Returns *true* when toast is visible. */ get isShown() { - return g(this.element, v); + return f(this.element, u); } + // TOAST PUBLIC METHODS + // ==================== + /** Shows the toast. */ + show = () => { + const { element: t, isShown: s } = this; + t && !s && (b(t, gn), gn.defaultPrevented || Mr(this)); + }; + /** Hides the toast. */ + hide = () => { + const { element: t, isShown: s } = this; + t && s && (b(t, pn), pn.defaultPrevented || _r(this)); + }; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, it will add the listener + */ + _toggleEventListeners = (t) => { + const s = t ? M : B, { element: n, triggers: o, dismiss: i, options: r, hide: a } = this; + i && s(i, N, a), r.autohide && [ns, En, we, os].forEach( + (c) => s(n, c, Rr) + ), o.length && o.forEach( + (c) => s(c, N, Br) + ); + }; /** Removes the `Toast` component from the target element. */ dispose() { - const { element: e, isShown: n } = this; - this._toggleEventListeners(), m.clear(e, Q), n && b(e, v), super.dispose(); + const { element: t, isShown: s } = this; + this._toggleEventListeners(), p.clear(t, J), s && m(t, u), super.dispose(); } } -d(de, "selector", nc), d(de, "init", rc), d(de, "getInstance", _s); -const Os = /* @__PURE__ */ new Map(); +const ms = /* @__PURE__ */ new Map(); [ - ee, - se, - ne, - oe, - ie, - re, - ce, - Vt, - ae, - le, - de, - At -].forEach((t) => Os.set(t.prototype.name, t)); -const gc = (t, s) => { - [...s].forEach((e) => t(e)); -}, pc = (t, s) => { - const e = Dt.getAllFor(t); - e && [...e].forEach(([n, o]) => { - s.contains(n) && o.dispose(); + An, + In, + On, + Mn, + zn, + co, + go, + To, + Co, + Do, + Io, + ps +].forEach((e) => ms.set(e.prototype.name, e)); +const Fr = (e, t) => { + [...t].forEach((s) => e(s)); +}, Wr = (e, t) => { + const s = Dt.getAllFor(e); + s && [...s].forEach(([n, o]) => { + t.contains(n) && o.dispose(); }); -}, Fn = (t) => { - const s = t && t.nodeName ? t : document, e = [...Ps("*", s)]; - Os.forEach((n) => { +}, vn = (e) => { + const t = e && e.nodeName ? e : document, s = [...as("*", t)]; + ms.forEach((n) => { const { init: o, selector: i } = n; - gc( + Fr( o, - e.filter((r) => Zn(r, i)) + s.filter((r) => xn(r, i)) ); }); -}, mc = (t) => { - const s = t && t.nodeName ? t : document; - Os.forEach((e) => { - pc(e.prototype.name, s); +}, Vr = (e) => { + const t = e && e.nodeName ? e : document; + ms.forEach((s) => { + Wr(s.prototype.name, t); }); }; -document.body ? Fn() : F(document, "DOMContentLoaded", () => Fn(), { +document.body ? vn() : M(document, "DOMContentLoaded", () => vn(), { once: !0 }); export { - ee as Alert, - se as Button, - ne as Carousel, - oe as Collapse, - ie as Dropdown, - re as Modal, - ce as Offcanvas, - Vt as Popover, - ae as ScrollSpy, - le as Tab, - de as Toast, - At as Tooltip, - Fn as initCallback, - mc as removeDataAPI + An as Alert, + In as Button, + On as Carousel, + Mn as Collapse, + zn as Dropdown, + co as Modal, + go as Offcanvas, + To as Popover, + Co as ScrollSpy, + Do as Tab, + Io as Toast, + ps as Tooltip, + vn as initCallback, + Vr as removeDataAPI }; //# sourceMappingURL=bootstrap-native.mjs.map diff --git a/dist/bootstrap-native.mjs.map b/dist/bootstrap-native.mjs.map index b158bd4f..c9ea1d2d 100644 --- a/dist/bootstrap-native.mjs.map +++ b/dist/bootstrap-native.mjs.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.mjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.6/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.2/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Te = \"aria-labelledby\", Me = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", _ = \"blur\", $ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Tt = \"move\", Mt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: _,\n change: $,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Tt,\n orientationchange: Mt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", _e = \"Backspace\", $e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(\n (t) => V.test(t.brand)\n) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some(\n (t) => t in N.style\n), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(\n e,\n n,\n s\n );\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(\n e,\n n,\n s\n );\n}, _t = (t, e, n, o) => {\n const s = (c) => {\n // istanbul ignore else @preserve\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, $t = () => {\n}, Tn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n _t(document, P, $t, e);\n } catch {\n }\n return t;\n})(), Mn = [\"webkitTransform\", \"transform\"].some(\n (t) => t in N.style\n), kn = \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some(\n (t) => t in N.style\n), Cn = [\"webkitTransition\", \"transition\"].some(\n (t) => t in N.style\n), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (e) => t.nodeType === e\n) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), T = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : globalThis.document, M = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (T(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, M(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (T(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, M(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(\n /[A-Z]/g,\n (J) => ae(J)\n ) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), _n = (t) => Object.values(t), $n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && M(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && T(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, M(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next @preserve */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [\n ...ue(qt, this)\n ].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next @preserve */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(\n t,\n o && fe(e)\n ), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => t ? G(t) ? t.defaultView : i(t) ? t?.ownerDocument?.defaultView : t : window, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!T(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (e) => t.constructor.name.includes(e)\n) || !1, To = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, Mo = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(\n t\n), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), xo = (t, e) => t.matches(e), zo = \"2.0.6\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n M as ObjectAssign,\n w as ObjectEntries,\n $n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n _n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Te as ariaLabelledBy,\n Me as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n _ as blurEvent,\n $ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n To as isNodeList,\n ie as isNumber,\n v as isObject,\n Mo as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n T as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n _e as keyBackspace,\n $e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Tt as moveEvent,\n xe as nativeEvents,\n $t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n _t as one,\n Mt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Tn as supportPassive,\n kn as supportTouch,\n Mn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n this._toggleEventListeners(true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n if (add) {\n if (this.scrollTarget === this.element) {\n this.targets.forEach((targetItem) =>\n this._observer.observe(targetItem)\n );\n } else {\n this._observer.observe(this.element);\n }\n } else this._observer.disconnect();\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Me","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","V","An","N","R","e","n","o","s","Q","_t","c","$t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","T","q","G","d","M","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","F","H","b","me","fo","_a","ge","vo","ho","To","Mo","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","getWindow","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","_b","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","$","O","D","_","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isWin","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","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B,GAAA,GAAgB;AAAA,EAC9D,MAAM;AAAA,CACP;","x_google_ignoreList":[0,1,52]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.mjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.7/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.3/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const ariaChecked = \"aria-checked\", ariaDescription = \"aria-description\", ariaDescribedBy = \"aria-describedby\", ariaExpanded = \"aria-expanded\", ariaHasPopup = \"aria-haspopup\", ariaHidden = \"aria-hidden\", ariaLabel = \"aria-label\", ariaLabelledBy = \"aria-labelledby\", ariaModal = \"aria-modal\", ariaPressed = \"aria-pressed\", ariaSelected = \"aria-selected\", ariaValueMin = \"aria-valuemin\", ariaValueMax = \"aria-valuemax\", ariaValueNow = \"aria-valuenow\", ariaValueText = \"aria-valuetext\", abortEvent = \"abort\", beforeunloadEvent = \"beforeunload\", blurEvent = \"blur\", changeEvent = \"change\", contextmenuEvent = \"contextmenu\", DOMContentLoadedEvent = \"DOMContentLoaded\", DOMMouseScrollEvent = \"DOMMouseScroll\", errorEvent = \"error\", focusEvent = \"focus\", focusinEvent = \"focusin\", focusoutEvent = \"focusout\", gesturechangeEvent = \"gesturechange\", gestureendEvent = \"gestureend\", gesturestartEvent = \"gesturestart\", keydownEvent = \"keydown\", keypressEvent = \"keypress\", keyupEvent = \"keyup\", loadEvent = \"load\", mouseclickEvent = \"click\", mousedblclickEvent = \"dblclick\", mousedownEvent = \"mousedown\", mouseupEvent = \"mouseup\", mousehoverEvent = \"hover\", mouseenterEvent = \"mouseenter\", mouseleaveEvent = \"mouseleave\", mouseinEvent = \"mousein\", mouseoutEvent = \"mouseout\", mouseoverEvent = \"mouseover\", mousemoveEvent = \"mousemove\", mousewheelEvent = \"mousewheel\", moveEvent = \"move\", orientationchangeEvent = \"orientationchange\", pointercancelEvent = \"pointercancel\", pointerdownEvent = \"pointerdown\", pointerleaveEvent = \"pointerleave\", pointermoveEvent = \"pointermove\", pointerupEvent = \"pointerup\", readystatechangeEvent = \"readystatechange\", resetEvent = \"reset\", resizeEvent = \"resize\", selectEvent = \"select\", selectendEvent = \"selectend\", selectstartEvent = \"selectstart\", scrollEvent = \"scroll\", submitEvent = \"submit\", touchstartEvent = \"touchstart\", touchmoveEvent = \"touchmove\", touchcancelEvent = \"touchcancel\", touchendEvent = \"touchend\", unloadEvent = \"unload\", nativeEvents = {\n DOMContentLoaded: DOMContentLoadedEvent,\n DOMMouseScroll: DOMMouseScrollEvent,\n abort: abortEvent,\n beforeunload: beforeunloadEvent,\n blur: blurEvent,\n change: changeEvent,\n click: mouseclickEvent,\n contextmenu: contextmenuEvent,\n dblclick: mousedblclickEvent,\n error: errorEvent,\n focus: focusEvent,\n focusin: focusinEvent,\n focusout: focusoutEvent,\n gesturechange: gesturechangeEvent,\n gestureend: gestureendEvent,\n gesturestart: gesturestartEvent,\n hover: mousehoverEvent,\n keydown: keydownEvent,\n keypress: keypressEvent,\n keyup: keyupEvent,\n load: loadEvent,\n mousedown: mousedownEvent,\n mousemove: mousemoveEvent,\n mousein: mouseinEvent,\n mouseout: mouseoutEvent,\n mouseenter: mouseenterEvent,\n mouseleave: mouseleaveEvent,\n mouseover: mouseoverEvent,\n mouseup: mouseupEvent,\n mousewheel: mousewheelEvent,\n move: moveEvent,\n orientationchange: orientationchangeEvent,\n pointercancel: pointercancelEvent,\n pointerdown: pointerdownEvent,\n pointerleave: pointerleaveEvent,\n pointermove: pointermoveEvent,\n pointerup: pointerupEvent,\n readystatechange: readystatechangeEvent,\n reset: resetEvent,\n resize: resizeEvent,\n scroll: scrollEvent,\n select: selectEvent,\n selectend: selectendEvent,\n selectstart: selectstartEvent,\n submit: submitEvent,\n touchcancel: touchcancelEvent,\n touchend: touchendEvent,\n touchmove: touchmoveEvent,\n touchstart: touchstartEvent,\n unload: unloadEvent\n}, dragEvent = \"drag\", dragstartEvent = \"dragstart\", dragenterEvent = \"dragenter\", dragleaveEvent = \"dragleave\", dragoverEvent = \"dragover\", dragendEvent = \"dragend\", loadstartEvent = \"loadstart\", mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" }, mouseHoverEvents = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, focusEvents = { in: \"focusin\", out: \"focusout\" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', keyboardEventKeys = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, keyAlt = \"Alt\", keyArrowDown = \"ArrowDown\", keyArrowUp = \"ArrowUp\", keyArrowLeft = \"ArrowLeft\", keyArrowRight = \"ArrowRight\", keyBackspace = \"Backspace\", keyCapsLock = \"CapsLock\", keyControl = \"Control\", keyDelete = \"Delete\", keyEnter = \"Enter\", keyNumpadEnter = \"NumpadEnter\", keyEscape = \"Escape\", keyInsert = \"Insert\", keyMeta = \"Meta\", keyPause = \"Pause\", keyScrollLock = \"ScrollLock\", keyShift = \"Shift\", keySpace = \"Space\", keyTab = \"Tab\", animationDuration = \"animationDuration\", animationDelay = \"animationDelay\", animationName = \"animationName\", animationEndEvent = \"animationend\", transitionDuration = \"transitionDuration\", transitionDelay = \"transitionDelay\", transitionEndEvent = \"transitionend\", transitionProperty = \"transitionProperty\", addEventListener = \"addEventListener\", removeEventListener = \"removeEventListener\", bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, offsetHeight = \"offsetHeight\", offsetWidth = \"offsetWidth\", scrollHeight = \"scrollHeight\", scrollWidth = \"scrollWidth\", tabindex = \"tabindex\", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (x) => mobileBrands.test(x.brand)\n ) || mobileBrands.test(navigator?.userAgent) || !1;\n}, isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (x) => appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent\n ) || !1;\n}, isFirefox = () => navigator?.userAgent?.includes(\"Firefox\") || /* istanbul ignore next @preserve */\n!1, support3DTransform = () => [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style), noop = () => {\n}, on = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.addEventListener(\n eventName,\n listener,\n ops\n );\n}, off = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.removeEventListener(\n eventName,\n listener,\n ops\n );\n}, one = (element, eventName, listener, options) => {\n const handlerWrapper = (e) => {\n (e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));\n };\n on(element, eventName, handlerWrapper, options);\n}, supportPassive = () => {\n let result = !1;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => (result = !0, result)\n });\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch {\n }\n return result;\n}, supportTransform = () => [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style), supportTouch = () => \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, supportAnimation = () => [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style), supportTransition = () => [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {\n element.classList.add(...classNAME);\n}, removeClass = (element, ...classNAME) => {\n element.classList.remove(...classNAME);\n}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == \"object\" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (x) => node.nodeType === x\n) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component) => componentData.get(component) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n return element && instanceMap && instanceMap.get(element) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = Data.getAllFor(component);\n !instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));\n }\n}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == \"string\" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === \"Window\" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {\n if (!param) return;\n if (isString(param))\n return getDocument().createElement(param);\n const { tagName } = param, newElement = createElement(tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, createElementNS = (ns, param) => {\n if (!ns || !param) return;\n if (isString(param))\n return getDocument().createElementNS(ns, param);\n const { tagName } = param, newElement = createElementNS(ns, tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {\n const computedStyle = getComputedStyle(element), prop = property.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return computedStyle.getPropertyValue(prop);\n}, getElementAnimationDelay = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementAnimationDuration = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateAnimationEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);\n if (duration) {\n const animationEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);\n };\n element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, getElementTransitionDelay = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(delayValue) * delayScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementTransitionDuration = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateTransitionEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);\n if (duration) {\n const transitionEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => [\"true\", !0].includes(value) ? !0 : [\"false\", !1].includes(value) ? !1 : [\"null\", \"\", null, void 0].includes(value) ? null : value !== \"\" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {\n const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = \"title\";\n return ObjectEntries(data).forEach(([k, v]) => {\n const key = ns && typeof k == \"string\" && k.includes(ns) ? k.replace(ns, \"\").replace(\n /[A-Z]/g,\n (match) => toLowerCase(match)\n ) : (\n /* istanbul ignore next @preserve */\n k\n );\n dataOps[key] = normalizeValue(v);\n }), ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v);\n }), ObjectEntries(defaultOps).forEach(([k, v]) => {\n k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;\n }), normalOps;\n}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: !0,\n bubbles: !0\n });\n return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;\n}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key) && key.includes(\"--\"))\n element.style.setProperty(key, value);\n else {\n const propObject = {};\n propObject[key] = value, ObjectAssign(element.style, propObject);\n }\n });\n}, isMap = (obj) => isObject(obj) && obj.constructor.name === \"Map\" || !1, isNumber = (num) => typeof num == \"number\" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (element, callback, delay, key) => {\n isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */\n null : isNumber(keyTimers) ? keyTimers : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n const keyTimers = TimeCache.get(element);\n key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));\n }\n}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();\nfunction handleKeyboardNavigation(event) {\n const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [\n ...querySelectorAll(focusableSelector, this)\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden)\n );\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];\n code === \"Tab\" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));\n}\nconst hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {\n const isCurrentlyTrapped = hasFocusTrap(target);\n (isCurrentlyTrapped ? off : on)(target, \"keydown\", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);\n}, getBoundingClientRect = (element, includeScale) => {\n const { width, height, top, right, bottom, left } = element.getBoundingClientRect();\n let scaleX = 1, scaleY = 1;\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (\n /* istanbul ignore next @preserve */\n 1\n ), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY\n };\n}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {\n const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;\n return { x, y };\n}, isShadowRoot = (element) => isNode(element) && element.constructor.name === \"ShadowRoot\" || !1, getParentNode = (node) => node.nodeName === \"HTML\" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\nisNode(node) && node.parentNode || // DOM Element detected\nisShadowRoot(node) && node.host || // ShadowRoot detected\ngetDocumentElement(node), isScaledElement = (element) => {\n if (!isHTMLElement(element)) return !1;\n const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;\n}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {\n const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent)\n ), offsets = { x: 0, y: 0 };\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, !0);\n offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height\n };\n};\nlet elementUID = 0, elementMapUID = 0;\nconst elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {\n let result = key ? elementUID : elementMapUID;\n if (key) {\n const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();\n elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);\n } else {\n const elkey = element.id || element;\n elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);\n }\n return result;\n}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === \"CANVAS\" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {\n if (!isNode(element)) return !1;\n const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n}, isElementInViewport = (element) => {\n if (!isNode(element)) return !1;\n const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);\n return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;\n}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == \"function\" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === \"HTMLCollection\" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === \"IMG\" || !1, isJSON = (str) => {\n if (!isString(str)) return !1;\n try {\n JSON.parse(str);\n } catch {\n return !1;\n }\n return !0;\n}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === \"WeakMap\" || !1, isMedia = (element) => isNode(element) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (s) => element.constructor.name.includes(s)\n) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === \"NodeList\" || !1, isRTL = (node) => getDocumentElement(node).dir === \"rtl\", isSVGElement = (element) => isNode(element) && element.constructor.name.includes(\"SVG\") || !1, isTableElement = (element) => isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`\nclosest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(\n selector\n), getCustomElements = (parent) => [...getElementsByTagName(\"*\", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(\n selector\n), matches = (target, selector) => target.matches(selector), version = \"2.0.7\";\nexport {\n ArrayFrom,\n DOMContentLoadedEvent,\n DOMMouseScrollEvent,\n Data,\n Float32ArrayFrom,\n Float64ArrayFrom,\n ObjectAssign,\n ObjectEntries,\n ObjectFromEntries,\n ObjectHasOwn,\n ObjectKeys,\n ObjectValues,\n Timer,\n abortEvent,\n addClass,\n addEventListener,\n animationDelay,\n animationDuration,\n animationEndEvent,\n animationName,\n ariaChecked,\n ariaDescribedBy,\n ariaDescription,\n ariaExpanded,\n ariaHasPopup,\n ariaHidden,\n ariaLabel,\n ariaLabelledBy,\n ariaModal,\n ariaPressed,\n ariaSelected,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n ariaValueText,\n beforeunloadEvent,\n bezierEasings,\n blurEvent,\n changeEvent,\n closest,\n contextmenuEvent,\n createCustomEvent,\n createElement,\n createElementNS,\n dispatchEvent,\n distinct,\n documentBody,\n documentElement,\n documentHead,\n dragEvent,\n dragendEvent,\n dragenterEvent,\n dragleaveEvent,\n dragoverEvent,\n dragstartEvent,\n emulateAnimationEnd,\n emulateTransitionEnd,\n errorEvent,\n focus,\n focusEvent,\n focusEvents,\n focusableSelector,\n focusinEvent,\n focusoutEvent,\n gesturechangeEvent,\n gestureendEvent,\n gesturestartEvent,\n getAttribute,\n getAttributeNS,\n getBoundingClientRect,\n getCustomElements,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getDocumentHead,\n getElementAnimationDelay,\n getElementAnimationDuration,\n getElementById,\n getElementStyle,\n getElementTransitionDelay,\n getElementTransitionDuration,\n getElementsByClassName,\n getElementsByTagName,\n getInstance,\n getNodeScroll,\n getParentNode,\n getRectRelativeToOffsetParent,\n getUID,\n getWindow,\n hasAttribute,\n hasAttributeNS,\n hasClass,\n hasFocusTrap,\n isApple,\n isArray,\n isCanvas,\n isCustomElement,\n isDocument,\n isElement,\n isElementInScrollRange,\n isElementInViewport,\n isElementsArray,\n isFirefox,\n isFunction,\n isHTMLCollection,\n isHTMLElement,\n isHTMLImageElement,\n isJSON,\n isMap,\n isMedia,\n isMobile,\n isNode,\n isNodeList,\n isNumber,\n isObject,\n isRTL,\n isSVGElement,\n isScaledElement,\n isShadowRoot,\n isString,\n isTableElement,\n isWeakMap,\n isWindow,\n keyAlt,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keyBackspace,\n keyCapsLock,\n keyControl,\n keyDelete,\n keyEnter,\n keyEscape,\n keyInsert,\n keyMeta,\n keyNumpadEnter,\n keyPause,\n keyScrollLock,\n keyShift,\n keySpace,\n keyTab,\n keyboardEventKeys,\n keydownEvent,\n keypressEvent,\n keyupEvent,\n loadEvent,\n loadstartEvent,\n matches,\n mouseClickEvents,\n mouseHoverEvents,\n mouseSwipeEvents,\n mouseclickEvent,\n mousedblclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseinEvent,\n mouseleaveEvent,\n mousemoveEvent,\n mouseoutEvent,\n mouseoverEvent,\n mouseupEvent,\n mousewheelEvent,\n moveEvent,\n nativeEvents,\n noop,\n normalizeOptions,\n normalizeValue,\n off,\n offsetHeight,\n offsetWidth,\n on,\n one,\n orientationchangeEvent,\n passiveHandler,\n pointercancelEvent,\n pointerdownEvent,\n pointerleaveEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n querySelectorAll,\n readystatechangeEvent,\n reflow,\n removeAttribute,\n removeAttributeNS,\n removeClass,\n removeEventListener,\n resetEvent,\n resizeEvent,\n scrollEvent,\n scrollHeight,\n scrollWidth,\n selectEvent,\n selectendEvent,\n selectstartEvent,\n setAttribute,\n setAttributeNS,\n setElementStyle,\n submitEvent,\n support3DTransform,\n supportAnimation,\n supportPassive,\n supportTouch,\n supportTransform,\n supportTransition,\n tabindex,\n toLowerCase,\n toUpperCase,\n toggleFocusTrap,\n touchEvents,\n touchcancelEvent,\n touchendEvent,\n touchmoveEvent,\n touchstartEvent,\n transitionDelay,\n transitionDuration,\n transitionEndEvent,\n transitionProperty,\n unloadEvent,\n userAgent,\n userAgentData,\n version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isRoot = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget.scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isRoot ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Toggles on/off the component observer.\n *\n * @param self the ScrollSpy instance\n * @param add when `true`, listener is added\n */\nconst toggleObservers = (\n { targets, scrollTarget, element, _observer }: ScrollSpy,\n add?: boolean,\n) => {\n if (add) {\n if (scrollTarget === element) {\n targets.forEach((targetItem) => _observer.observe(targetItem));\n } else {\n _observer.observe(element);\n }\n } else _observer.disconnect();\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: HTMLElement) => {\n return scrollTarget.scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n toggleObservers(this, true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n const clone = { ...this };\n toggleObservers(clone);\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["ariaDescribedBy","ariaExpanded","ariaHidden","ariaModal","ariaPressed","ariaSelected","focusEvent","focusinEvent","focusoutEvent","keydownEvent","keyupEvent","mouseclickEvent","mousedownEvent","mousehoverEvent","mouseenterEvent","mouseleaveEvent","pointerdownEvent","pointermoveEvent","pointerupEvent","touchstartEvent","dragstartEvent","focusableSelector","keyArrowDown","keyArrowUp","keyArrowLeft","keyArrowRight","keyEscape","transitionDuration","transitionDelay","transitionEndEvent","transitionProperty","isApple","appleBrands","x","noop","on","element","eventName","listener","options","ops","off","getAttribute","att","hasAttribute","setAttribute","value","removeAttribute","addClass","classNAME","removeClass","hasClass","isObject","obj","isNode","node","isHTMLElement","componentData","Data","component","instance","instanceMap","getInstance","target","isString","str","isWindow","isDocument","getDocument","ObjectAssign","source","createElement","param","tagName","newElement","attr","dispatchEvent","event","getElementStyle","property","computedStyle","prop","getElementTransitionDelay","propertyValue","delayValue","delayScale","duration","getElementTransitionDuration","durationValue","durationScale","emulateTransitionEnd","handler","called","endEvent","delay","transitionEndWrapper","e","focus","normalizeValue","ObjectEntries","toLowerCase","normalizeOptions","defaultOps","inputOps","ns","INPUT","data","normalOps","dataOps","title","k","v","key","match","ObjectKeys","createCustomEvent","eventType","config","OriginalCustomEvent","passiveHandler","reflow","setElementStyle","styles","propObject","isMap","isNumber","num","TimeCache","Timer","callback","keyTimers","querySelectorAll","selector","parent","focusTrapMap","handleKeyboardNavigation","shiftKey","code","doc","focusableElements","el","firstFocusable","lastFocusable","hasFocusTrap","toggleFocusTrap","isCurrentlyTrapped","getBoundingClientRect","includeScale","width","height","top","right","bottom","left","scaleX","scaleY","offsetWidth2","offsetHeight2","getDocumentBody","getDocumentElement","isShadowRoot","getParentNode","elementUID","elementMapUID","elementIDMap","getUID","result","elID","elMap","elkey","getWindow","isArray","isElementInScrollRange","clientHeight","isFunction","fn","isNodeList","isRTL","isTableElement","closest","querySelector","getElementsByTagName","getElementsByClassName","matches","f","t","c","i","s","o","a","r","E","d","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","version","BaseComponent","prevInstance","alertSelector","alertDismissSelector","getAlertInstance","alertInitCallback","Alert","closeAlertEvent","closedAlertEvent","alertTransitionEnd","self","add","action","addListener","removeListener","dismiss","close","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","attValue","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","activeItem","getActiveIndex","orientation","directionClass","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","RTL","carouselDragHandler","carouselPointerDownHandler","controls","indicators","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","activeIndex","transitionItem","ar","isPaused","idx","next","eventProperties","touch","pause","interval","keyboard","arrow","indicator","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","triggers","btn","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","menuEnd","p","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","targetLeft","targetTop","targetWidth","targetHeight","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","dropdownPreventScroll","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","dropdownClickHandler","activeElement","open","menuItems","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","appendPopup","customContainer","containerIsBody","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","afterModalShow","beforeModalShow","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","overlayDelay","currentOpen","that","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","tooltipDefaults","_","B","m","n","h","l","u","b","g","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","tempDocument","createTip","id","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tipComponent","elem","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","hideTooltipEvent","enabled","tr","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isRoot","links","scrollHEIGHT","href","targetItem","rect","getOffsetHeight","link","toggleObservers","targets","_observer","getScrollHeight","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","context","compData","initCallback","lookUp","elemCollection","cs","init","removeDataAPI","comp"],"mappings":"AAAK,MAAqEA,KAAkB,oBAAoBC,KAAe,iBAAiDC,KAAa,eAA6EC,KAAY,cAAcC,KAAc,gBAAgBC,KAAe,iBAAqYC,KAAa,SAASC,KAAe,WAAWC,KAAgB,YAAsHC,KAAe,WAAuCC,KAAa,SAA6BC,IAAkB,SAA0CC,KAAiB,aAAuCC,KAAkB,SAASC,KAAkB,cAAcC,KAAkB,cAAwQC,KAAmB,eAAmDC,KAAmB,eAAeC,KAAiB,aAA+OC,KAAkB,cAmDxxDC,KAAiB,aAaaC,KAAoB,qFAuCtDC,KAAe,aAAaC,KAAa,WAAWC,KAAe,aAAaC,KAAgB,cAAsKC,KAAY,UAA6SC,KAAqB,sBAAsBC,KAAkB,mBAAmBC,KAAqB,iBAAiBC,KAAqB,sBA+B1tBC,KAAU,MAAM;AACjB,QAAMC,IAAc;AACpB,SAAO,WAAW,eAAe,OAAO;AAAA,IACtC,CAACC,MAAMD,EAAY,KAAKC,EAAE,KAAK;AAAA,EAChC;AAAA,EACDD,EAAY;AAAA,IACV,WAAW;AAAA,EACZ,KAAI;AACP,GAC2GE,KAAO,MAAM;AACxH,GAAGC,KAAK,CAACC,GAASC,GAAWC,GAAUC,MAAY;AACjD,QAAMC,IAAMD,KAAW;AACvB,EAAAH,EAAQ;AAAA,IACNC;AAAA,IACAC;AAAA,IACAE;AAAA,EACD;AACH,GAAGC,KAAM,CAACL,GAASC,GAAWC,GAAUC,MAAY;AAClD,QAAMC,IAAMD,KAAW;AACvB,EAAAH,EAAQ;AAAA,IACNC;AAAA,IACAC;AAAA,IACAE;AAAA,EACD;AACH,GAgBsOE,KAAe,CAACN,GAASO,MAAQP,EAAQ,aAAaO,CAAG,GAA2EC,KAAe,CAACR,GAASO,MAAQP,EAAQ,aAAaO,CAAG,GAA2EE,IAAe,CAACT,GAASO,GAAKG,MAAUV,EAAQ,aAAaO,GA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U,UACjDI,IAAiB,CAAC,GAAGtgB,GAAqB,KAAKqgB,CAAM,CAAC;AAE7C,EAAAP,GAAA,QAAQ,CAACS,MAAO;AACvB,UAAA,EAAE,MAAAC,GAAM,UAAAzjB,EAAA,IAAawjB;AAC3B,IAAAR;AAAA,MACES;AAAA,MACAF,EAAe,OAAO,CAACvE,MAAS7b,GAAQ6b,GAAMhf,CAAQ,CAAC;AAAA,IACzD;AAAA,EAAA,CACD;AACH,GAOa0jB,KAAgB,CAACP,MAAyB;AACrD,QAAMG,IAASH,KAAWA,EAAQ,WAAWA,IAAU;AAExC,EAAAJ,GAAA,QAAQ,CAACY,MAAS;AACR,IAAAT,GAAAS,EAAK,UAAU,MAAML,CAAM;AAAA,EAAA,CACnD;AACH;AAGI,SAAS,OAAmBD,GAAA,IAE9Bne,EAAY,UAAU,oBAAoB,MAAMme,GAAA,GAAgB;AAAA,EAC9D,MAAM;AAAA,CACP;","x_google_ignoreList":[0,1,52]} \ No newline at end of file diff --git a/dist/components/alert.cjs b/dist/components/alert.cjs index 9e964a02..0b461f2d 100644 --- a/dist/components/alert.cjs +++ b/dist/components/alert.cjs @@ -1,4 +1,2 @@ -"use strict";var C=Object.defineProperty;var g=(s,t,e)=>t in s?C(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>g(s,typeof t!="symbol"?t+"":t,e);const n=require("@thednp/shorty"),a=require("@thednp/event-listener"),E=require("./fadeClass-Co6nOzNJ.js"),l=require("./showClass-D_Ms1FgG.js"),p=require("./dataBsDismiss-CMHF7If_.js"),q=require("./base-component-DBcDoOjV.js"),r="alert",u="Alert",L=`.${r}`,f=`[${p.dataBsDismiss}="${r}"]`,$=s=>n.getInstance(s,u),b=s=>new i(s),d=n.createCustomEvent(`close.bs.${r}`),w=n.createCustomEvent(`closed.bs.${r}`),m=s=>{const{element:t}=s;n.dispatchEvent(t,w),s._toggleEventListeners(),s.dispose(),t.remove()};class i extends q.BaseComponent{constructor(e){super(e);o(this,"dismiss");o(this,"close",()=>{const{element:e}=this;// istanbul ignore else @preserve -e&&n.hasClass(e,l.showClass)&&(n.dispatchEvent(e,d),d.defaultPrevented||(n.removeClass(e,l.showClass),n.hasClass(e,E.fadeClass)?n.emulateTransitionEnd(e,()=>m(this)):m(this)))});o(this,"_toggleEventListeners",e=>{const h=e?a.addListener:a.removeListener,{dismiss:c,close:v}=this;// istanbul ignore else @preserve -c&&h(c,n.mouseclickEvent,v)});this.dismiss=n.querySelector(f,this.element),this._toggleEventListeners(!0)}get name(){return u}dispose(){this._toggleEventListeners(),super.dispose()}}o(i,"selector",L),o(i,"init",b),o(i,"getInstance",$);module.exports=i; +"use strict";const s=require("./base-component-D3rSrWwH.js"),i=require("./event-listener-W3RGkfJ6.js"),h=require("./fadeClass-Co6nOzNJ.js"),r=require("./showClass-D_Ms1FgG.js"),v=require("./dataBsDismiss-CMHF7If_.js"),n="alert",l="Alert",C=`.${n}`,E=`[${v.dataBsDismiss}="${n}"]`,g=t=>s.getInstance(t,l),p=t=>new d(t),c=s.createCustomEvent(`close.bs.${n}`),q=s.createCustomEvent(`closed.bs.${n}`),a=t=>{const{element:e}=t;s.dispatchEvent(e,q),t._toggleEventListeners(),t.dispose(),e.remove()};class d extends s.BaseComponent{static selector=C;static init=p;static getInstance=g;dismiss;constructor(e){super(e),this.dismiss=s.querySelector(E,this.element),this._toggleEventListeners(!0)}get name(){return l}close=()=>{const{element:e}=this;e&&s.hasClass(e,r.showClass)&&(s.dispatchEvent(e,c),c.defaultPrevented||(s.removeClass(e,r.showClass),s.hasClass(e,h.fadeClass)?s.emulateTransitionEnd(e,()=>a(this)):a(this)))};_toggleEventListeners=e=>{const m=e?i.E:i.r,{dismiss:o,close:u}=this;o&&m(o,s.mouseclickEvent,u)};dispose(){this._toggleEventListeners(),super.dispose()}}module.exports=d; //# sourceMappingURL=alert.cjs.map diff --git a/dist/components/alert.cjs.map b/dist/components/alert.cjs.map index 3af025f5..2f51fc2f 100644 --- a/dist/components/alert.cjs.map +++ b/dist/components/alert.cjs.map @@ -1 +1 @@ -{"version":3,"file":"alert.cjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","__publicField","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","querySelector"],"mappings":"oZACMA,EAAc,QCAdC,EAAiB,QCyBjBC,EAAgB,IAAIF,CAAW,GAC/BG,EAAuB,IAAIC,EAAAA,aAAa,KAAKJ,CAAW,KAMxDK,EAAoBC,GACxBC,cAAmBD,EAASL,CAAc,EAKtCO,EAAqBF,GAAyB,IAAIG,EAAMH,CAAO,EAI/DI,EAAkBC,EAAA,kBACtB,YAAYX,CAAW,EACzB,EACMY,EAAmBD,EAAA,kBACvB,aAAaX,CAAW,EAC1B,EASMa,EAAsBC,GAAgB,CACpC,KAAA,CAAE,QAAAR,GAAYQ,EACpBC,EAAA,cAAcT,EAASM,CAAgB,EAEvCE,EAAK,sBAAsB,EAC3BA,EAAK,QAAQ,EACbR,EAAQ,OAAO,CACjB,EAKA,MAAqBG,UAAcO,EAAAA,aAAc,CAM/C,YAAYC,EAA8B,CACxC,MAAMA,CAAM,EAHdC,EAAA,gBAwBAA,EAAA,aAAQ,IAAM,CACN,KAAA,CAAE,QAAAZ,GAAY,KAAA;AAGhBA,GAAWa,EAAAA,SAASb,EAASc,EAAS,SAAA,IACxCL,EAAA,cAAcT,EAASI,CAAe,EAEjCA,EAAgB,mBACnBW,EAAA,YAAYf,EAASc,WAAS,EAE1BD,EAAA,SAASb,EAASgB,EAAAA,SAAS,EAC7BC,EAAAA,qBAAqBjB,EAAS,IAAMO,EAAmB,IAAI,CAAC,IACpC,IAAI,GAGpC,GAMAK,EAAA,6BAAyBM,GAAkB,CACnC,MAAAC,EAASD,EAAME,EAAAA,YAAcC,EAAA,eAC7B,CAAE,QAAAC,EAAS,MAAAC,CAAA,EAAU,KAAA;AAEvBD,GAASH,EAAOG,EAASE,EAAAA,gBAAiBD,CAAK,CACrD,GA5CE,KAAK,QAAUE,EAAAA,cAAc5B,EAAsB,KAAK,OAAO,EAG/D,KAAK,sBAAsB,EAAI,CAAA,CAIjC,IAAI,MAAO,CACF,OAAAF,CAAA,CAuCT,SAAU,CACR,KAAK,sBAAsB,EAC3B,MAAM,QAAQ,CAAA,CAElB,CA5DEiB,EADmBT,EACZ,WAAWP,GAClBgB,EAFmBT,EAEZ,OAAOD,GACdU,EAHmBT,EAGZ,cAAcJ"} \ No newline at end of file +{"version":3,"file":"alert.cjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","querySelector","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent"],"mappings":"0NACMA,EAAc,QCAdC,EAAiB,QCyBjBC,EAAgB,IAAIF,CAAW,GAC/BG,EAAuB,IAAIC,EAAAA,aAAa,KAAKJ,CAAW,KAMxDK,EAAoBC,GACxBC,cAAmBD,EAASL,CAAc,EAKtCO,EAAqBF,GAAyB,IAAIG,EAAMH,CAAO,EAI/DI,EAAkBC,EAAA,kBACtB,YAAYX,CAAW,EACzB,EACMY,EAAmBD,EAAA,kBACvB,aAAaX,CAAW,EAC1B,EASMa,EAAsBC,GAAgB,CACpC,KAAA,CAAE,QAAAR,GAAYQ,EACpBC,EAAA,cAAcT,EAASM,CAAgB,EAEvCE,EAAK,sBAAsB,EAC3BA,EAAK,QAAQ,EACbR,EAAQ,OAAO,CACjB,EAKA,MAAqBG,UAAcO,EAAAA,aAAc,CAC/C,OAAO,SAAWd,EAClB,OAAO,KAAOM,EACd,OAAO,YAAcH,EACrB,QAEA,YAAYY,EAA8B,CACxC,MAAMA,CAAM,EAGZ,KAAK,QAAUC,EAAAA,cAAcf,EAAsB,KAAK,OAAO,EAG/D,KAAK,sBAAsB,EAAI,CAAA,CAIjC,IAAI,MAAO,CACF,OAAAF,CAAA,CAUT,MAAQ,IAAM,CACN,KAAA,CAAE,QAAAK,GAAY,KAGhBA,GAAWa,EAAAA,SAASb,EAASc,EAAS,SAAA,IACxCL,EAAA,cAAcT,EAASI,CAAe,EAEjCA,EAAgB,mBACnBW,EAAA,YAAYf,EAASc,WAAS,EAE1BD,EAAA,SAASb,EAASgB,EAAAA,SAAS,EAC7BC,EAAAA,qBAAqBjB,EAAS,IAAMO,EAAmB,IAAI,CAAC,IACpC,IAAI,GAGpC,EAMA,sBAAyBW,GAAkB,CACnC,MAAAC,EAASD,EAAME,EAAAA,EAAcC,EAAA,EAC7B,CAAE,QAAAC,EAAS,MAAAC,CAAA,EAAU,KAEvBD,GAASH,EAAOG,EAASE,EAAAA,gBAAiBD,CAAK,CACrD,EAGA,SAAU,CACR,KAAK,sBAAsB,EAC3B,MAAM,QAAQ,CAAA,CAElB"} \ No newline at end of file diff --git a/dist/components/alert.d.ts b/dist/components/alert.d.ts index 9cb314b8..4081c201 100644 --- a/dist/components/alert.d.ts +++ b/dist/components/alert.d.ts @@ -1,51 +1,49 @@ -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -/** Creates a new Alert instance. */ -declare class Alert extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Alert; - static getInstance: (element: HTMLElement) => Alert | null; - dismiss: HTMLElement | null; - constructor(target: HTMLElement | string); - /** Returns component name string. */ - get name(): string; - /** - * Public method that hides the `.alert` element from the user, - * disposes the instance once animation is complete, then - * removes the element from the DOM. - */ - close: () => void; - /** - * Toggle on / off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Remove the component from target element. */ - dispose(): void; -} - -export { - Alert as default, -}; - -export as namespace Alert; - -export {}; +/** Creates a new Alert instance. */ +declare class Alert extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Alert; + static getInstance: (element: HTMLElement) => Alert | null; + dismiss: HTMLElement | null; + constructor(target: HTMLElement | string); + /** Returns component name string. */ + get name(): string; + /** + * Public method that hides the `.alert` element from the user, + * disposes the instance once animation is complete, then + * removes the element from the DOM. + */ + close: () => void; + /** + * Toggle on / off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Remove the component from target element. */ + dispose(): void; +} +export default Alert; + +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +export { } diff --git a/dist/components/alert.mjs b/dist/components/alert.mjs index 4407b3a2..f80e276b 100644 --- a/dist/components/alert.mjs +++ b/dist/components/alert.mjs @@ -1,59 +1,54 @@ -var h = Object.defineProperty; -var u = (t, s, e) => s in t ? h(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e; -var o = (t, s, e) => u(t, typeof s != "symbol" ? s + "" : s, e); -import { createCustomEvent as d, querySelector as E, hasClass as a, dispatchEvent as p, removeClass as C, emulateTransitionEnd as L, mouseclickEvent as $, getInstance as I } from "@thednp/shorty"; -import { addListener as S, removeListener as _ } from "@thednp/event-listener"; -import { f as b } from "./fadeClass-CLIYI_zn.mjs"; -import { s as c } from "./showClass-C8hdJfjQ.mjs"; -import { d as B } from "./dataBsDismiss-DdNPQYa-.mjs"; -import { B as k } from "./base-component-DHbs0JQk.mjs"; -const i = "alert", g = "Alert", w = `.${i}`, x = `[${B}="${i}"]`, A = (t) => I(t, g), D = (t) => new n(t), l = d( - `close.bs.${i}` -), T = d( - `closed.bs.${i}` -), m = (t) => { +import { B as p, q as h, h as o, d as c, r as v, e as E, g as f, c as l, m as u } from "./base-component-ylZzLp-h.mjs"; +import { E as C, r as A } from "./event-listener-C1-Yf9Z5.mjs"; +import { f as $ } from "./fadeClass-CLIYI_zn.mjs"; +import { s as i } from "./showClass-C8hdJfjQ.mjs"; +import { d as I } from "./dataBsDismiss-DdNPQYa-.mjs"; +const e = "alert", m = "Alert", L = `.${e}`, S = `[${I}="${e}"]`, _ = (t) => f(t, m), b = (t) => new k(t), r = l( + `close.bs.${e}` +), B = l( + `closed.bs.${e}` +), a = (t) => { const { element: s } = t; - p(s, T), t._toggleEventListeners(), t.dispose(), s.remove(); + c(s, B), t._toggleEventListeners(), t.dispose(), s.remove(); }; -class n extends k { - constructor(e) { - super(e); - o(this, "dismiss"); - // ALERT PUBLIC METHODS - // ==================== - /** - * Public method that hides the `.alert` element from the user, - * disposes the instance once animation is complete, then - * removes the element from the DOM. - */ - o(this, "close", () => { - const { element: e } = this; - // istanbul ignore else @preserve - e && a(e, c) && (p(e, l), l.defaultPrevented || (C(e, c), a(e, b) ? L(e, () => m(this)) : m(this))); - }); - /** - * Toggle on / off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - o(this, "_toggleEventListeners", (e) => { - const v = e ? S : _, { dismiss: r, close: f } = this; - // istanbul ignore else @preserve - r && v(r, $, f); - }); - this.dismiss = E(x, this.element), this._toggleEventListeners(!0); +class k extends p { + static selector = L; + static init = b; + static getInstance = _; + dismiss; + constructor(s) { + super(s), this.dismiss = h(S, this.element), this._toggleEventListeners(!0); } /** Returns component name string. */ get name() { - return g; + return m; } + // ALERT PUBLIC METHODS + // ==================== + /** + * Public method that hides the `.alert` element from the user, + * disposes the instance once animation is complete, then + * removes the element from the DOM. + */ + close = () => { + const { element: s } = this; + s && o(s, i) && (c(s, r), r.defaultPrevented || (v(s, i), o(s, $) ? E(s, () => a(this)) : a(this))); + }; + /** + * Toggle on / off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners = (s) => { + const d = s ? C : A, { dismiss: n, close: g } = this; + n && d(n, u, g); + }; /** Remove the component from target element. */ dispose() { this._toggleEventListeners(), super.dispose(); } } -o(n, "selector", w), o(n, "init", D), o(n, "getInstance", A); export { - n as default + k as default }; //# sourceMappingURL=alert.mjs.map diff --git a/dist/components/alert.mjs.map b/dist/components/alert.mjs.map index 875e7e05..3c91a4c8 100644 --- a/dist/components/alert.mjs.map +++ b/dist/components/alert.mjs.map @@ -1 +1 @@ -{"version":3,"file":"alert.mjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","__publicField","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","querySelector"],"mappings":";;;;;;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCyBjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MAMxDK,IAAmB,CAACC,MACxBC,EAAmBD,GAASL,CAAc,GAKtCO,IAAoB,CAACF,MAAyB,IAAIG,EAAMH,CAAO,GAI/DI,IAAkBC;AAAA,EACtB,YAAYX,CAAW;AACzB,GACMY,IAAmBD;AAAA,EACvB,aAAaX,CAAW;AAC1B,GASMa,IAAqB,CAACC,MAAgB;AACpC,QAAA,EAAE,SAAAR,MAAYQ;AACpB,EAAAC,EAAcT,GAASM,CAAgB,GAEvCE,EAAK,sBAAsB,GAC3BA,EAAK,QAAQ,GACbR,EAAQ,OAAO;AACjB;AAKA,MAAqBG,UAAcO,EAAc;AAAA,EAM/C,YAAYC,GAA8B;AACxC,UAAMA,CAAM;AAHd,IAAAC,EAAA;AAwBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,EAAA,eAAQ,MAAM;AACN,YAAA,EAAE,SAAAZ,MAAY;AAAA,MAAA;AAGpB,MAAIA,KAAWa,EAASb,GAASc,CAAS,MACxCL,EAAcT,GAASI,CAAe,GAEjCA,EAAgB,qBACnBW,EAAYf,GAASc,CAAS,GAE1BD,EAASb,GAASgB,CAAS,IAC7BC,EAAqBjB,GAAS,MAAMO,EAAmB,IAAI,CAAC,MACpC,IAAI;AAAA,IAGpC;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAK,EAAA,+BAAwB,CAACM,MAAkB;AACnC,YAAAC,IAASD,IAAME,IAAcC,GAC7B,EAAE,SAAAC,GAAS,OAAAC,EAAA,IAAU;AAAA,MAAA;AAE3B,MAAID,KAASH,EAAOG,GAASE,GAAiBD,CAAK;AAAA,IACrD;AA5CE,SAAK,UAAUE,EAAc5B,GAAsB,KAAK,OAAO,GAG/D,KAAK,sBAAsB,EAAI;AAAA,EAAA;AAAA;AAAA,EAIjC,IAAI,OAAO;AACF,WAAAF;AAAA,EAAA;AAAA;AAAA,EAuCT,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAAA;AAElB;AA5DEiB,EADmBT,GACZ,YAAWP,IAClBgB,EAFmBT,GAEZ,QAAOD,IACdU,EAHmBT,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"alert.mjs","sources":["../../src/strings/alertString.ts","../../src/strings/alertComponent.ts","../../src/components/alert.ts"],"sourcesContent":["/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["alertString","alertComponent","alertSelector","alertDismissSelector","dataBsDismiss","getAlertInstance","element","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","BaseComponent","target","querySelector","hasClass","showClass","removeClass","fadeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent"],"mappings":";;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCyBjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MAMxDK,IAAmB,CAACC,MACxBC,EAAmBD,GAASL,CAAc,GAKtCO,IAAoB,CAACF,MAAyB,IAAIG,EAAMH,CAAO,GAI/DI,IAAkBC;AAAA,EACtB,YAAYX,CAAW;AACzB,GACMY,IAAmBD;AAAA,EACvB,aAAaX,CAAW;AAC1B,GASMa,IAAqB,CAACC,MAAgB;AACpC,QAAA,EAAE,SAAAR,MAAYQ;AACpB,EAAAC,EAAcT,GAASM,CAAgB,GAEvCE,EAAK,sBAAsB,GAC3BA,EAAK,QAAQ,GACbR,EAAQ,OAAO;AACjB;AAKA,MAAqBG,UAAcO,EAAc;AAAA,EAC/C,OAAO,WAAWd;AAAA,EAClB,OAAO,OAAOM;AAAA,EACd,OAAO,cAAcH;AAAA,EACrB;AAAA,EAEA,YAAYY,GAA8B;AACxC,UAAMA,CAAM,GAGZ,KAAK,UAAUC,EAAcf,GAAsB,KAAK,OAAO,GAG/D,KAAK,sBAAsB,EAAI;AAAA,EAAA;AAAA;AAAA,EAIjC,IAAI,OAAO;AACF,WAAAF;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUT,QAAQ,MAAM;AACN,UAAA,EAAE,SAAAK,MAAY;AAGpB,IAAIA,KAAWa,EAASb,GAASc,CAAS,MACxCL,EAAcT,GAASI,CAAe,GAEjCA,EAAgB,qBACnBW,EAAYf,GAASc,CAAS,GAE1BD,EAASb,GAASgB,CAAS,IAC7BC,EAAqBjB,GAAS,MAAMO,EAAmB,IAAI,CAAC,MACpC,IAAI;AAAA,EAGpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,wBAAwB,CAACW,MAAkB;AACnC,UAAAC,IAASD,IAAME,IAAcC,GAC7B,EAAE,SAAAC,GAAS,OAAAC,EAAA,IAAU;AAE3B,IAAID,KAASH,EAAOG,GAASE,GAAiBD,CAAK;AAAA,EACrD;AAAA;AAAA,EAGA,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAAA;AAElB;"} \ No newline at end of file diff --git a/dist/components/base-component-D3rSrWwH.js b/dist/components/base-component-D3rSrWwH.js new file mode 100644 index 00000000..78e5a614 --- /dev/null +++ b/dist/components/base-component-D3rSrWwH.js @@ -0,0 +1,2 @@ +"use strict";const _="aria-describedby",X="aria-expanded",F="aria-hidden",Y="aria-modal",G="aria-pressed",J="aria-selected",Q="focus",ee="focusin",te="focusout",se="keydown",ne="keyup",oe="click",re="mousedown",ae="hover",ie="mouseenter",le="mouseleave",ue="pointerdown",ce="pointermove",de="pointerup",ge="touchstart",pe="dragstart",Ee='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',me="ArrowDown",he="ArrowUp",fe="ArrowLeft",ve="ArrowRight",ye="Escape",we="transitionDuration",be="transitionDelay",N="transitionend",I="transitionProperty",Ae=()=>{const e=/(iPhone|iPod|iPad)/;return navigator?.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(navigator?.userAgent)||!1},Te=()=>{},De=(e,t,s,n)=>{const o=n||!1;e.addEventListener(t,s,o)},Ne=(e,t,s,n)=>{const o=n||!1;e.removeEventListener(t,s,o)},S=(e,t)=>e.getAttribute(t),O=(e,t)=>e.hasAttribute(t),Ce=(e,t,s)=>e.setAttribute(t,s),Le=(e,t)=>e.removeAttribute(t),Se=(e,...t)=>{e.classList.add(...t)},Me=(e,...t)=>{e.classList.remove(...t)},Be=(e,t)=>e.classList.contains(t),y=e=>e!=null&&typeof e=="object"||!1,a=e=>y(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,u=e=>a(e)&&e.nodeType===1||!1,m=new Map,f={data:m,set:(e,t,s)=>{u(e)&&(m.has(t)||m.set(t,new Map),m.get(t).set(e,s))},getAllFor:e=>m.get(e)||null,get:(e,t)=>{if(!u(e)||!t)return null;const s=f.getAllFor(t);return e&&s&&s.get(e)||null},remove:(e,t)=>{const s=f.getAllFor(t);!s||!u(e)||(s.delete(e),s.size===0&&m.delete(t))}},Re=(e,t)=>f.get(e,t),A=e=>typeof e=="string"||!1,He=e=>y(e)&&e.constructor.name==="Window"||!1,P=e=>a(e)&&e.nodeType===9||!1,d=e=>He(e)?e.document:P(e)?e:a(e)?e.ownerDocument:globalThis.document,T=(e,...t)=>Object.assign(e,...t),V=e=>{if(!e)return;if(A(e))return d().createElement(e);const{tagName:t}=e,s=V(t);if(!s)return;const n={...e};return delete n.tagName,T(s,n)},U=(e,t)=>e.dispatchEvent(t),v=(e,t)=>{const s=getComputedStyle(e),n=t.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return s.getPropertyValue(n)},Fe=e=>{const t=v(e,I),s=v(e,be),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},W=e=>{const t=v(e,I),s=v(e,we),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},Ie=(e,t)=>{let s=0;const n=new Event(N),o=W(e),c=Fe(e);if(o){const i=l=>{l.target===e&&(t.apply(e,[l]),e.removeEventListener(N,i),s=1)};e.addEventListener(N,i),setTimeout(()=>{s||U(e,n)},o+c+17)}else t.apply(e,[n])},Oe=(e,t)=>e.focus(t),M=e=>["true",!0].includes(e)?!0:["false",!1].includes(e)?!1:["null","",null,void 0].includes(e)?null:e!==""&&!Number.isNaN(+e)?+e:e,b=e=>Object.entries(e),x=e=>e.toLowerCase(),Pe=(e,t,s,n)=>{const o={...s},c={...e.dataset},i={...t},l={},g="title";return b(c).forEach(([r,p])=>{const w=typeof r=="string"&&r.includes(n)?r.replace(n,"").replace(/[A-Z]/g,Z=>x(Z)):r;l[w]=M(p)}),b(o).forEach(([r,p])=>{o[r]=M(p)}),b(t).forEach(([r,p])=>{r in o?i[r]=o[r]:r in l?i[r]=l[r]:i[r]=r===g?S(e,g):p}),i},B=e=>Object.keys(e),Ve=(e,t)=>{const s=new CustomEvent(e,{cancelable:!0,bubbles:!0});return y(t)&&T(s,t),s},Ue={passive:!0},We=e=>e.offsetHeight,xe=(e,t)=>{b(t).forEach(([s,n])=>{if(n&&A(s)&&s.includes("--"))e.style.setProperty(s,n);else{const o={};o[s]=n,T(e.style,o)}})},C=e=>y(e)&&e.constructor.name==="Map"||!1,qe=e=>typeof e=="number"||!1,E=new Map,je={set:(e,t,s,n)=>{u(e)&&(n&&n.length?(E.has(e)||E.set(e,new Map),E.get(e).set(n,setTimeout(t,s))):E.set(e,setTimeout(t,s)))},get:(e,t)=>{if(!u(e))return null;const s=E.get(e);return t&&s&&C(s)?s.get(t)||null:qe(s)?s:null},clear:(e,t)=>{if(!u(e))return;const s=E.get(e);t&&t.length&&C(s)?(clearTimeout(s.get(t)),s.delete(t),s.size===0&&E.delete(e)):(clearTimeout(s),E.delete(e))}},q=(e,t)=>(a(t)?t:d()).querySelectorAll(e),L=new Map;function ze(e){const{shiftKey:t,code:s}=e,n=d(this),o=[...q(Ee,this)].filter(l=>!O(l,"disabled")&&!S(l,F));if(!o.length)return;const c=o[0],i=o[o.length-1];s==="Tab"&&(t&&n.activeElement===c?(i.focus(),e.preventDefault()):!t&&n.activeElement===i&&(c.focus(),e.preventDefault()))}const $e=e=>L.has(e)===!0,ke=e=>{const t=$e(e);(t?Ne:De)(e,"keydown",ze),t?L.delete(e):L.set(e,!0)},j=(e,t)=>{const{width:s,height:n,top:o,right:c,bottom:i,left:l}=e.getBoundingClientRect();let g=1,r=1;if(t&&u(e)){const{offsetWidth:p,offsetHeight:w}=e;g=p>0?Math.round(s)/p:1,r=w>0?Math.round(n)/w:1}return{width:s/g,height:n/r,top:o/r,right:c/g,bottom:i/r,left:l/g,x:l/g,y:o/r}},Ke=e=>d(e).body,D=e=>d(e).documentElement,z=e=>a(e)&&e.constructor.name==="ShadowRoot"||!1,Ze=e=>e.nodeName==="HTML"?e:u(e)&&e.assignedSlot||a(e)&&e.parentNode||z(e)&&e.host||D(e);let R=0,H=0;const h=new Map,$=(e,t)=>{let s=t?R:H;if(t){const n=$(e),o=h.get(n)||new Map;h.has(n)||h.set(n,o),C(o)&&!o.has(t)?(o.set(t,s),R+=1):s=o.get(t)}else{const n=e.id||e;h.has(n)?s=h.get(n):(h.set(n,s),H+=1)}return s},_e=e=>e?P(e)?e.defaultView:a(e)?e?.ownerDocument?.defaultView:e:window,Xe=e=>Array.isArray(e)||!1,Ye=e=>{if(!a(e))return!1;const{top:t,bottom:s}=j(e),{clientHeight:n}=D(e);return t<=n&&s>=0},Ge=e=>typeof e=="function"||!1,Je=e=>y(e)&&e.constructor.name==="NodeList"||!1,Qe=e=>D(e).dir==="rtl",et=e=>a(e)&&["TABLE","TD","TH"].includes(e.nodeName)||!1,k=(e,t)=>e?e.closest(t)||k(e.getRootNode().host,t):null,K=(e,t)=>u(e)?e:(a(t)?t:d()).querySelector(e),tt=(e,t)=>(a(t)?t:d()).getElementsByTagName(e),st=(e,t)=>(t&&a(t)?t:d()).getElementsByClassName(e),nt=(e,t)=>e.matches(t),ot="5.1.0",rt=ot;class at{constructor(t,s){let n;try{if(u(t))n=t;else if(A(t)){if(n=K(t),!n)throw Error(`"${t}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(c){throw Error(`${this.name} Error: ${c.message}`)}const o=f.get(n,this.name);o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&B(this.defaults).length?Pe(n,this.defaults,s||{},"bs"):{},f.set(n,this.name,this)}get version(){return rt}get name(){return"BaseComponent"}get defaults(){return{}}_toggleEventListeners=()=>{};dispose(){f.remove(this.element,this.name),B(this).forEach(t=>{delete this[t]})}}exports.BaseComponent=at;exports.ObjectAssign=T;exports.Timer=je;exports.addClass=Se;exports.ariaDescribedBy=_;exports.ariaExpanded=X;exports.ariaHidden=F;exports.ariaModal=Y;exports.ariaPressed=G;exports.ariaSelected=J;exports.closest=k;exports.createCustomEvent=Ve;exports.createElement=V;exports.dispatchEvent=U;exports.dragstartEvent=pe;exports.emulateTransitionEnd=Ie;exports.focus=Oe;exports.focusEvent=Q;exports.focusinEvent=ee;exports.focusoutEvent=te;exports.getAttribute=S;exports.getBoundingClientRect=j;exports.getDocument=d;exports.getDocumentBody=Ke;exports.getDocumentElement=D;exports.getElementStyle=v;exports.getElementTransitionDuration=W;exports.getElementsByClassName=st;exports.getElementsByTagName=tt;exports.getInstance=Re;exports.getParentNode=Ze;exports.getUID=$;exports.getWindow=_e;exports.hasAttribute=O;exports.hasClass=Be;exports.isApple=Ae;exports.isArray=Xe;exports.isElementInScrollRange=Ye;exports.isFunction=Ge;exports.isHTMLElement=u;exports.isNode=a;exports.isNodeList=Je;exports.isRTL=Qe;exports.isShadowRoot=z;exports.isString=A;exports.isTableElement=et;exports.keyArrowDown=me;exports.keyArrowLeft=fe;exports.keyArrowRight=ve;exports.keyArrowUp=he;exports.keyEscape=ye;exports.keydownEvent=se;exports.keyupEvent=ne;exports.matches=nt;exports.mouseclickEvent=oe;exports.mousedownEvent=re;exports.mouseenterEvent=ie;exports.mousehoverEvent=ae;exports.mouseleaveEvent=le;exports.noop=Te;exports.passiveHandler=Ue;exports.pointerdownEvent=ue;exports.pointermoveEvent=ce;exports.pointerupEvent=de;exports.querySelector=K;exports.querySelectorAll=q;exports.reflow=We;exports.removeAttribute=Le;exports.removeClass=Me;exports.setAttribute=Ce;exports.setElementStyle=xe;exports.toLowerCase=x;exports.toggleFocusTrap=ke;exports.touchstartEvent=ge; +//# sourceMappingURL=base-component-D3rSrWwH.js.map diff --git a/dist/components/base-component-D3rSrWwH.js.map b/dist/components/base-component-D3rSrWwH.js.map new file mode 100644 index 00000000..60b075d8 --- /dev/null +++ b/dist/components/base-component-D3rSrWwH.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base-component-D3rSrWwH.js","sources":["../../node_modules/.pnpm/@thednp+shorty@2.0.7/node_modules/@thednp/shorty/dist/shorty.mjs","../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["const ariaChecked = \"aria-checked\", ariaDescription = \"aria-description\", ariaDescribedBy = \"aria-describedby\", ariaExpanded = \"aria-expanded\", ariaHasPopup = \"aria-haspopup\", ariaHidden = \"aria-hidden\", ariaLabel = \"aria-label\", ariaLabelledBy = \"aria-labelledby\", ariaModal = \"aria-modal\", ariaPressed = \"aria-pressed\", ariaSelected = \"aria-selected\", ariaValueMin = \"aria-valuemin\", ariaValueMax = \"aria-valuemax\", ariaValueNow = \"aria-valuenow\", ariaValueText = \"aria-valuetext\", abortEvent = \"abort\", beforeunloadEvent = \"beforeunload\", blurEvent = \"blur\", changeEvent = \"change\", contextmenuEvent = \"contextmenu\", DOMContentLoadedEvent = \"DOMContentLoaded\", DOMMouseScrollEvent = \"DOMMouseScroll\", errorEvent = \"error\", focusEvent = \"focus\", focusinEvent = \"focusin\", focusoutEvent = \"focusout\", gesturechangeEvent = \"gesturechange\", gestureendEvent = \"gestureend\", gesturestartEvent = \"gesturestart\", keydownEvent = \"keydown\", keypressEvent = \"keypress\", keyupEvent = \"keyup\", loadEvent = \"load\", mouseclickEvent = \"click\", mousedblclickEvent = \"dblclick\", mousedownEvent = \"mousedown\", mouseupEvent = \"mouseup\", mousehoverEvent = \"hover\", mouseenterEvent = \"mouseenter\", mouseleaveEvent = \"mouseleave\", mouseinEvent = \"mousein\", mouseoutEvent = \"mouseout\", mouseoverEvent = \"mouseover\", mousemoveEvent = \"mousemove\", mousewheelEvent = \"mousewheel\", moveEvent = \"move\", orientationchangeEvent = \"orientationchange\", pointercancelEvent = \"pointercancel\", pointerdownEvent = \"pointerdown\", pointerleaveEvent = \"pointerleave\", pointermoveEvent = \"pointermove\", pointerupEvent = \"pointerup\", readystatechangeEvent = \"readystatechange\", resetEvent = \"reset\", resizeEvent = \"resize\", selectEvent = \"select\", selectendEvent = \"selectend\", selectstartEvent = \"selectstart\", scrollEvent = \"scroll\", submitEvent = \"submit\", touchstartEvent = \"touchstart\", touchmoveEvent = \"touchmove\", touchcancelEvent = \"touchcancel\", touchendEvent = \"touchend\", unloadEvent = \"unload\", nativeEvents = {\n DOMContentLoaded: DOMContentLoadedEvent,\n DOMMouseScroll: DOMMouseScrollEvent,\n abort: abortEvent,\n beforeunload: beforeunloadEvent,\n blur: blurEvent,\n change: changeEvent,\n click: mouseclickEvent,\n contextmenu: contextmenuEvent,\n dblclick: mousedblclickEvent,\n error: errorEvent,\n focus: focusEvent,\n focusin: focusinEvent,\n focusout: focusoutEvent,\n gesturechange: gesturechangeEvent,\n gestureend: gestureendEvent,\n gesturestart: gesturestartEvent,\n hover: mousehoverEvent,\n keydown: keydownEvent,\n keypress: keypressEvent,\n keyup: keyupEvent,\n load: loadEvent,\n mousedown: mousedownEvent,\n mousemove: mousemoveEvent,\n mousein: mouseinEvent,\n mouseout: mouseoutEvent,\n mouseenter: mouseenterEvent,\n mouseleave: mouseleaveEvent,\n mouseover: mouseoverEvent,\n mouseup: mouseupEvent,\n mousewheel: mousewheelEvent,\n move: moveEvent,\n orientationchange: orientationchangeEvent,\n pointercancel: pointercancelEvent,\n pointerdown: pointerdownEvent,\n pointerleave: pointerleaveEvent,\n pointermove: pointermoveEvent,\n pointerup: pointerupEvent,\n readystatechange: readystatechangeEvent,\n reset: resetEvent,\n resize: resizeEvent,\n scroll: scrollEvent,\n select: selectEvent,\n selectend: selectendEvent,\n selectstart: selectstartEvent,\n submit: submitEvent,\n touchcancel: touchcancelEvent,\n touchend: touchendEvent,\n touchmove: touchmoveEvent,\n touchstart: touchstartEvent,\n unload: unloadEvent\n}, dragEvent = \"drag\", dragstartEvent = \"dragstart\", dragenterEvent = \"dragenter\", dragleaveEvent = \"dragleave\", dragoverEvent = \"dragover\", dragendEvent = \"dragend\", loadstartEvent = \"loadstart\", mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" }, mouseHoverEvents = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, focusEvents = { in: \"focusin\", out: \"focusout\" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', keyboardEventKeys = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, keyAlt = \"Alt\", keyArrowDown = \"ArrowDown\", keyArrowUp = \"ArrowUp\", keyArrowLeft = \"ArrowLeft\", keyArrowRight = \"ArrowRight\", keyBackspace = \"Backspace\", keyCapsLock = \"CapsLock\", keyControl = \"Control\", keyDelete = \"Delete\", keyEnter = \"Enter\", keyNumpadEnter = \"NumpadEnter\", keyEscape = \"Escape\", keyInsert = \"Insert\", keyMeta = \"Meta\", keyPause = \"Pause\", keyScrollLock = \"ScrollLock\", keyShift = \"Shift\", keySpace = \"Space\", keyTab = \"Tab\", animationDuration = \"animationDuration\", animationDelay = \"animationDelay\", animationName = \"animationName\", animationEndEvent = \"animationend\", transitionDuration = \"transitionDuration\", transitionDelay = \"transitionDelay\", transitionEndEvent = \"transitionend\", transitionProperty = \"transitionProperty\", addEventListener = \"addEventListener\", removeEventListener = \"removeEventListener\", bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, offsetHeight = \"offsetHeight\", offsetWidth = \"offsetWidth\", scrollHeight = \"scrollHeight\", scrollWidth = \"scrollWidth\", tabindex = \"tabindex\", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (x) => mobileBrands.test(x.brand)\n ) || mobileBrands.test(navigator?.userAgent) || !1;\n}, isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (x) => appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent\n ) || !1;\n}, isFirefox = () => navigator?.userAgent?.includes(\"Firefox\") || /* istanbul ignore next @preserve */\n!1, support3DTransform = () => [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style), noop = () => {\n}, on = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.addEventListener(\n eventName,\n listener,\n ops\n );\n}, off = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.removeEventListener(\n eventName,\n listener,\n ops\n );\n}, one = (element, eventName, listener, options) => {\n const handlerWrapper = (e) => {\n (e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));\n };\n on(element, eventName, handlerWrapper, options);\n}, supportPassive = () => {\n let result = !1;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => (result = !0, result)\n });\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch {\n }\n return result;\n}, supportTransform = () => [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style), supportTouch = () => \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, supportAnimation = () => [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style), supportTransition = () => [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {\n element.classList.add(...classNAME);\n}, removeClass = (element, ...classNAME) => {\n element.classList.remove(...classNAME);\n}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == \"object\" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (x) => node.nodeType === x\n) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component) => componentData.get(component) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n return element && instanceMap && instanceMap.get(element) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = Data.getAllFor(component);\n !instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));\n }\n}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == \"string\" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === \"Window\" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {\n if (!param) return;\n if (isString(param))\n return getDocument().createElement(param);\n const { tagName } = param, newElement = createElement(tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, createElementNS = (ns, param) => {\n if (!ns || !param) return;\n if (isString(param))\n return getDocument().createElementNS(ns, param);\n const { tagName } = param, newElement = createElementNS(ns, tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {\n const computedStyle = getComputedStyle(element), prop = property.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return computedStyle.getPropertyValue(prop);\n}, getElementAnimationDelay = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementAnimationDuration = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateAnimationEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);\n if (duration) {\n const animationEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);\n };\n element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, getElementTransitionDelay = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(delayValue) * delayScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementTransitionDuration = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateTransitionEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);\n if (duration) {\n const transitionEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => [\"true\", !0].includes(value) ? !0 : [\"false\", !1].includes(value) ? !1 : [\"null\", \"\", null, void 0].includes(value) ? null : value !== \"\" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {\n const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = \"title\";\n return ObjectEntries(data).forEach(([k, v]) => {\n const key = ns && typeof k == \"string\" && k.includes(ns) ? k.replace(ns, \"\").replace(\n /[A-Z]/g,\n (match) => toLowerCase(match)\n ) : (\n /* istanbul ignore next @preserve */\n k\n );\n dataOps[key] = normalizeValue(v);\n }), ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v);\n }), ObjectEntries(defaultOps).forEach(([k, v]) => {\n k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;\n }), normalOps;\n}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: !0,\n bubbles: !0\n });\n return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;\n}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key) && key.includes(\"--\"))\n element.style.setProperty(key, value);\n else {\n const propObject = {};\n propObject[key] = value, ObjectAssign(element.style, propObject);\n }\n });\n}, isMap = (obj) => isObject(obj) && obj.constructor.name === \"Map\" || !1, isNumber = (num) => typeof num == \"number\" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (element, callback, delay, key) => {\n isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */\n null : isNumber(keyTimers) ? keyTimers : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n const keyTimers = TimeCache.get(element);\n key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));\n }\n}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();\nfunction handleKeyboardNavigation(event) {\n const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [\n ...querySelectorAll(focusableSelector, this)\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden)\n );\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];\n code === \"Tab\" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));\n}\nconst hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {\n const isCurrentlyTrapped = hasFocusTrap(target);\n (isCurrentlyTrapped ? off : on)(target, \"keydown\", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);\n}, getBoundingClientRect = (element, includeScale) => {\n const { width, height, top, right, bottom, left } = element.getBoundingClientRect();\n let scaleX = 1, scaleY = 1;\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (\n /* istanbul ignore next @preserve */\n 1\n ), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY\n };\n}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {\n const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;\n return { x, y };\n}, isShadowRoot = (element) => isNode(element) && element.constructor.name === \"ShadowRoot\" || !1, getParentNode = (node) => node.nodeName === \"HTML\" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\nisNode(node) && node.parentNode || // DOM Element detected\nisShadowRoot(node) && node.host || // ShadowRoot detected\ngetDocumentElement(node), isScaledElement = (element) => {\n if (!isHTMLElement(element)) return !1;\n const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;\n}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {\n const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent)\n ), offsets = { x: 0, y: 0 };\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, !0);\n offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height\n };\n};\nlet elementUID = 0, elementMapUID = 0;\nconst elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {\n let result = key ? elementUID : elementMapUID;\n if (key) {\n const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();\n elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);\n } else {\n const elkey = element.id || element;\n elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);\n }\n return result;\n}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === \"CANVAS\" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {\n if (!isNode(element)) return !1;\n const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n}, isElementInViewport = (element) => {\n if (!isNode(element)) return !1;\n const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);\n return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;\n}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == \"function\" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === \"HTMLCollection\" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === \"IMG\" || !1, isJSON = (str) => {\n if (!isString(str)) return !1;\n try {\n JSON.parse(str);\n } catch {\n return !1;\n }\n return !0;\n}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === \"WeakMap\" || !1, isMedia = (element) => isNode(element) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (s) => element.constructor.name.includes(s)\n) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === \"NodeList\" || !1, isRTL = (node) => getDocumentElement(node).dir === \"rtl\", isSVGElement = (element) => isNode(element) && element.constructor.name.includes(\"SVG\") || !1, isTableElement = (element) => isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`\nclosest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(\n selector\n), getCustomElements = (parent) => [...getElementsByTagName(\"*\", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(\n selector\n), matches = (target, selector) => target.matches(selector), version = \"2.0.7\";\nexport {\n ArrayFrom,\n DOMContentLoadedEvent,\n DOMMouseScrollEvent,\n Data,\n Float32ArrayFrom,\n Float64ArrayFrom,\n ObjectAssign,\n ObjectEntries,\n ObjectFromEntries,\n ObjectHasOwn,\n ObjectKeys,\n ObjectValues,\n Timer,\n abortEvent,\n addClass,\n addEventListener,\n animationDelay,\n animationDuration,\n animationEndEvent,\n animationName,\n ariaChecked,\n ariaDescribedBy,\n ariaDescription,\n ariaExpanded,\n ariaHasPopup,\n ariaHidden,\n ariaLabel,\n ariaLabelledBy,\n ariaModal,\n ariaPressed,\n ariaSelected,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n ariaValueText,\n beforeunloadEvent,\n bezierEasings,\n blurEvent,\n changeEvent,\n closest,\n contextmenuEvent,\n createCustomEvent,\n createElement,\n createElementNS,\n dispatchEvent,\n distinct,\n documentBody,\n documentElement,\n documentHead,\n dragEvent,\n dragendEvent,\n dragenterEvent,\n dragleaveEvent,\n dragoverEvent,\n dragstartEvent,\n emulateAnimationEnd,\n emulateTransitionEnd,\n errorEvent,\n focus,\n focusEvent,\n focusEvents,\n focusableSelector,\n focusinEvent,\n focusoutEvent,\n gesturechangeEvent,\n gestureendEvent,\n gesturestartEvent,\n getAttribute,\n getAttributeNS,\n getBoundingClientRect,\n getCustomElements,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getDocumentHead,\n getElementAnimationDelay,\n getElementAnimationDuration,\n getElementById,\n getElementStyle,\n getElementTransitionDelay,\n getElementTransitionDuration,\n getElementsByClassName,\n getElementsByTagName,\n getInstance,\n getNodeScroll,\n getParentNode,\n getRectRelativeToOffsetParent,\n getUID,\n getWindow,\n hasAttribute,\n hasAttributeNS,\n hasClass,\n hasFocusTrap,\n isApple,\n isArray,\n isCanvas,\n isCustomElement,\n isDocument,\n isElement,\n isElementInScrollRange,\n isElementInViewport,\n isElementsArray,\n isFirefox,\n isFunction,\n isHTMLCollection,\n isHTMLElement,\n isHTMLImageElement,\n isJSON,\n isMap,\n isMedia,\n isMobile,\n isNode,\n isNodeList,\n isNumber,\n isObject,\n isRTL,\n isSVGElement,\n isScaledElement,\n isShadowRoot,\n isString,\n isTableElement,\n isWeakMap,\n isWindow,\n keyAlt,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keyBackspace,\n keyCapsLock,\n keyControl,\n keyDelete,\n keyEnter,\n keyEscape,\n keyInsert,\n keyMeta,\n keyNumpadEnter,\n keyPause,\n keyScrollLock,\n keyShift,\n keySpace,\n keyTab,\n keyboardEventKeys,\n keydownEvent,\n keypressEvent,\n keyupEvent,\n loadEvent,\n loadstartEvent,\n matches,\n mouseClickEvents,\n mouseHoverEvents,\n mouseSwipeEvents,\n mouseclickEvent,\n mousedblclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseinEvent,\n mouseleaveEvent,\n mousemoveEvent,\n mouseoutEvent,\n mouseoverEvent,\n mouseupEvent,\n mousewheelEvent,\n moveEvent,\n nativeEvents,\n noop,\n normalizeOptions,\n normalizeValue,\n off,\n offsetHeight,\n offsetWidth,\n on,\n one,\n orientationchangeEvent,\n passiveHandler,\n pointercancelEvent,\n pointerdownEvent,\n pointerleaveEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n querySelectorAll,\n readystatechangeEvent,\n reflow,\n removeAttribute,\n removeAttributeNS,\n removeClass,\n removeEventListener,\n resetEvent,\n resizeEvent,\n scrollEvent,\n scrollHeight,\n scrollWidth,\n selectEvent,\n selectendEvent,\n selectstartEvent,\n setAttribute,\n setAttributeNS,\n setElementStyle,\n submitEvent,\n support3DTransform,\n supportAnimation,\n supportPassive,\n supportTouch,\n supportTransform,\n supportTransition,\n tabindex,\n toLowerCase,\n toUpperCase,\n toggleFocusTrap,\n touchEvents,\n touchcancelEvent,\n touchendEvent,\n touchmoveEvent,\n touchstartEvent,\n transitionDelay,\n transitionDuration,\n transitionEndEvent,\n transitionProperty,\n unloadEvent,\n userAgent,\n userAgentData,\n version\n};\n//# sourceMappingURL=shorty.mjs.map\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n"],"names":["ariaDescribedBy","ariaExpanded","ariaHidden","ariaModal","ariaPressed","ariaSelected","focusEvent","focusinEvent","focusoutEvent","keydownEvent","keyupEvent","mouseclickEvent","mousedownEvent","mousehoverEvent","mouseenterEvent","mouseleaveEvent","pointerdownEvent","pointermoveEvent","pointerupEvent","touchstartEvent","dragstartEvent","focusableSelector","keyArrowDown","keyArrowUp","keyArrowLeft","keyArrowRight","keyEscape","transitionDuration","transitionDelay","transitionEndEvent","transitionProperty","isApple","appleBrands","x","noop","on","element","eventName","listener","options","ops","off","getAttribute","att","hasAttribute","setAttribute","value","removeAttribute","addClass","classNAME","removeClass","hasClass","isObject","obj","isNode","node","isHTMLElement","componentData","Data","component","instance","instanceMap","getInstance","target","isString","str","isWindow","isDocument","getDocument","ObjectAssign","source","createElement","param","tagName","newElement","attr","dispatchEvent","event","getElementStyle","property","computedStyle","prop","getElementTransitionDelay","propertyValue","delayValue","delayScale","duration","getElementTransitionDuration","durationValue","durationScale","emulateTransitionEnd","handler","called","endEvent","delay","transitionEndWrapper","e","focus","normalizeValue","ObjectEntries","toLowerCase","normalizeOptions","defaultOps","inputOps","ns","INPUT","data","normalOps","dataOps","title","k","v","key","match","ObjectKeys","createCustomEvent","eventType","config","OriginalCustomEvent","passiveHandler","reflow","setElementStyle","styles","propObject","isMap","isNumber","num","TimeCache","Timer","callback","keyTimers","querySelectorAll","selector","parent","focusTrapMap","handleKeyboardNavigation","shiftKey","code","doc","focusableElements","el","firstFocusable","lastFocusable","hasFocusTrap","toggleFocusTrap","isCurrentlyTrapped","getBoundingClientRect","includeScale","width","height","top","right","bottom","left","scaleX","scaleY","offsetWidth2","offsetHeight2","getDocumentBody","getDocumentElement","isShadowRoot","getParentNode","elementUID","elementMapUID","elementIDMap","getUID","result","elID","elMap","elkey","getWindow","isArray","isElementInScrollRange","clientHeight","isFunction","fn","isNodeList","isRTL","isTableElement","closest","querySelector","getElementsByTagName","getElementsByClassName","matches","Version","version","BaseComponent","prevInstance"],"mappings":"aAAK,MAAqEA,EAAkB,mBAAoBC,EAAe,gBAAiDC,EAAa,cAA6EC,EAAY,aAAcC,EAAc,eAAgBC,EAAe,gBAAqYC,EAAa,QAASC,GAAe,UAAWC,GAAgB,WAAsH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AG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE,CAAA,CAG3D,MAAM2F,EAAejI,EAAK,IAAiBtB,EAAS,KAAK,IAAI,EAEzDuJ,GAGFA,EAAa,sBAAsB,EAGrC,KAAK,QAAUvJ,EACf,KAAK,QAAU,KAAK,UAAY8E,EAAW,KAAK,QAAQ,EAAE,OACtDb,GAAiBjE,EAAS,KAAK,SAAUiF,GAAU,CAAI,EAAA,IAAI,EAE3D,CAAC,EAEL3D,EAAK,IAAItB,EAAS,KAAK,KAAM,IAAI,CAAA,CAInC,IAAI,SAAU,CACL,OAAAoJ,EAAA,CAIT,IAAI,MAAO,CACF,MAAA,eAAA,CAIT,IAAI,UAAW,CACb,MAAO,CAAC,CAAA,CAKV,sBAAwB,IAAM,CAE9B,EAGA,SAAU,CACR9H,EAAK,OAAoB,KAAK,QAAS,KAAK,IAAI,EAChDwD,EAAW,IAAI,EAAE,QAASjC,GAAS,CACjC,OAAO,KAAKA,CAAI,CAAA,CACjB,CAAA,CAEL","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/components/base-component-DBcDoOjV.js b/dist/components/base-component-DBcDoOjV.js deleted file mode 100644 index 7d049e7e..00000000 --- a/dist/components/base-component-DBcDoOjV.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict";var l=Object.defineProperty;var h=(n,e,r)=>e in n?l(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;var i=(n,e,r)=>h(n,typeof e!="symbol"?e+"":e,r);const t=require("@thednp/shorty"),c="5.0.15",m=c;class u{constructor(e,r){i(this,"_toggleEventListeners",()=>{});let s;try{if(t.isHTMLElement(e))s=e;else if(t.isString(e)){s=t.querySelector(e);// istanbul ignore else @preserve -if(!s)throw Error(`"${e}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(a){throw Error(`${this.name} Error: ${a.message}`)}const o=t.Data.get(s,this.name);// istanbul ignore else @preserve -o&&o._toggleEventListeners(),this.element=s,this.options=this.defaults&&t.ObjectKeys(this.defaults).length?t.normalizeOptions(s,this.defaults,r||{},"bs"):{},t.Data.set(s,this.name,this)}get version(){return m}get name(){return"BaseComponent"}get defaults(){return{}}dispose(){t.Data.remove(this.element,this.name),t.ObjectKeys(this).forEach(e=>{delete this[e]})}}exports.BaseComponent=u; -//# sourceMappingURL=base-component-DBcDoOjV.js.map diff --git a/dist/components/base-component-DBcDoOjV.js.map b/dist/components/base-component-DBcDoOjV.js.map deleted file mode 100644 index 2097479e..00000000 --- a/dist/components/base-component-DBcDoOjV.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base-component-DBcDoOjV.js","sources":["../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n"],"names":["Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","e","prevInstance","Data","ObjectKeys","normalizeOptions","prop"],"mappings":"8NAEMA,EAAUC,ECahB,MAAqBC,CAAc,CAQjC,YAAYC,EAA8BC,EAAsB,CAmDhEC,EAAA,6BAAwB,IAAM,CAE9B,GApDM,IAAAC,EAEA,GAAA,CACE,GAAAC,EAAAA,cAAcJ,CAAM,EACZG,EAAAH,UACDK,EAAAA,SAASL,CAAM,EAAG,CAC3BG,EAAUG,gBAA2BN,CAAM,EAAA;AAE3C,GAAI,CAACG,EAAS,MAAM,MAAM,IAAIH,CAAM,4BAA4B,CAAA,KAEhE,OAAM,MAAM,gDAAgD,QAEvDO,EAAG,CACV,MAAM,MAAM,GAAG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE,CAAA,CAG3D,MAAMC,EAAeC,EAAAA,KAAK,IAAiBN,EAAS,KAAK,IAAI,EAAA;AAEzDK,GAGFA,EAAa,sBAAsB,EAGrC,KAAK,QAAUL,EACf,KAAK,QAAU,KAAK,UAAYO,EAAAA,WAAW,KAAK,QAAQ,EAAE,OACtDC,EAAAA,iBAAiBR,EAAS,KAAK,SAAUF,GAAU,CAAI,EAAA,IAAI,EAE3D,CAAC,EAELQ,EAAAA,KAAK,IAAIN,EAAS,KAAK,KAAM,IAAI,CAAA,CAInC,IAAI,SAAU,CACL,OAAAN,CAAA,CAIT,IAAI,MAAO,CACF,MAAA,eAAA,CAIT,IAAI,UAAW,CACb,MAAO,CAAC,CAAA,CAUV,SAAU,CACRY,EAAAA,KAAK,OAAoB,KAAK,QAAS,KAAK,IAAI,EAChDC,EAAAA,WAAW,IAAI,EAAE,QAASE,GAAS,CACjC,OAAO,KAAKA,CAAI,CAAA,CACjB,CAAA,CAEL"} \ No newline at end of file diff --git a/dist/components/base-component-DHbs0JQk.mjs b/dist/components/base-component-DHbs0JQk.mjs deleted file mode 100644 index bdfcb775..00000000 --- a/dist/components/base-component-DHbs0JQk.mjs +++ /dev/null @@ -1,55 +0,0 @@ -var h = Object.defineProperty; -var m = (s, e, n) => e in s ? h(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n; -var i = (s, e, n) => m(s, typeof e != "symbol" ? e + "" : e, n); -import { isHTMLElement as c, isString as f, querySelector as u, Data as r, ObjectKeys as a, normalizeOptions as E } from "@thednp/shorty"; -const g = "5.0.15", p = g; -class y { - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(e, n) { - /** just to have something to extend from */ - // istanbul ignore next @preserve coverage wise this isn't important - i(this, "_toggleEventListeners", () => { - }); - let t; - try { - if (c(e)) - t = e; - else if (f(e)) { - t = u(e); - // istanbul ignore else @preserve - if (!t) throw Error(`"${e}" is not a valid selector.`); - } else - throw Error("your target is not an instance of HTMLElement."); - } catch (l) { - throw Error(`${this.name} Error: ${l.message}`); - } - const o = r.get(t, this.name); - // istanbul ignore else @preserve - o && o._toggleEventListeners(), this.element = t, this.options = this.defaults && a(this.defaults).length ? E(t, this.defaults, n || {}, "bs") : {}, r.set(t, this.name, this); - } - // istanbul ignore next @preserve - get version() { - return p; - } - // istanbul ignore next @preserve - get name() { - return "BaseComponent"; - } - // istanbul ignore next @preserve - get defaults() { - return {}; - } - /** Removes component from target element. */ - dispose() { - r.remove(this.element, this.name), a(this).forEach((e) => { - delete this[e]; - }); - } -} -export { - y as B -}; -//# sourceMappingURL=base-component-DHbs0JQk.mjs.map diff --git a/dist/components/base-component-DHbs0JQk.mjs.map b/dist/components/base-component-DHbs0JQk.mjs.map deleted file mode 100644 index 78c4c4e3..00000000 --- a/dist/components/base-component-DHbs0JQk.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base-component-DHbs0JQk.mjs","sources":["../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n"],"names":["Version","version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","e","prevInstance","Data","ObjectKeys","normalizeOptions","prop"],"mappings":";;;;oBAEMA,IAAUC;ACahB,MAAqBC,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,YAAYC,GAA8BC,GAAsB;AAmDhE;AAAA;AAAA,IAAAC,EAAA,+BAAwB,MAAM;AAAA,IAE9B;AApDM,QAAAC;AAEA,QAAA;AACE,UAAAC,EAAcJ,CAAM;AACZ,QAAAG,IAAAH;AAAA,eACDK,EAASL,CAAM,GAAG;AAC3B,QAAAG,IAAUG,EAA2BN,CAAM;AAAA,QAAA;AAE3C,YAAI,CAACG,EAAS,OAAM,MAAM,IAAIH,CAAM,4BAA4B;AAAA,MAAA;AAEhE,cAAM,MAAM,gDAAgD;AAAA,aAEvDO,GAAG;AACV,YAAM,MAAM,GAAG,KAAK,IAAI,WAAYA,EAAY,OAAO,EAAE;AAAA,IAAA;AAG3D,UAAMC,IAAeC,EAAK,IAAiBN,GAAS,KAAK,IAAI;AAAA,IAAA;AAE7D,IAAIK,KAGFA,EAAa,sBAAsB,GAGrC,KAAK,UAAUL,GACf,KAAK,UAAU,KAAK,YAAYO,EAAW,KAAK,QAAQ,EAAE,SACtDC,EAAiBR,GAAS,KAAK,UAAUF,KAAU,CAAI,GAAA,IAAI,IAE3D,CAAC,GAELQ,EAAK,IAAIN,GAAS,KAAK,MAAM,IAAI;AAAA,EAAA;AAAA;AAAA,EAInC,IAAI,UAAU;AACL,WAAAN;AAAA,EAAA;AAAA;AAAA,EAIT,IAAI,OAAO;AACF,WAAA;AAAA,EAAA;AAAA;AAAA,EAIT,IAAI,WAAW;AACb,WAAO,CAAC;AAAA,EAAA;AAAA;AAAA,EAUV,UAAU;AACR,IAAAY,EAAK,OAAoB,KAAK,SAAS,KAAK,IAAI,GAChDC,EAAW,IAAI,EAAE,QAAQ,CAACE,MAAS;AACjC,aAAO,KAAKA,CAAI;AAAA,IAAA,CACjB;AAAA,EAAA;AAEL;"} \ No newline at end of file diff --git a/dist/components/base-component-ylZzLp-h.mjs b/dist/components/base-component-ylZzLp-h.mjs new file mode 100644 index 00000000..4360d55e --- /dev/null +++ b/dist/components/base-component-ylZzLp-h.mjs @@ -0,0 +1,366 @@ +const it = "aria-describedby", lt = "aria-expanded", R = "aria-hidden", ct = "aria-modal", ut = "aria-pressed", dt = "aria-selected", pt = "focus", gt = "focusin", ht = "focusout", ft = "keydown", mt = "keyup", Et = "click", yt = "mousedown", wt = "hover", vt = "mouseenter", bt = "mouseleave", Tt = "pointerdown", At = "pointermove", Dt = "pointerup", Nt = "touchstart", Lt = "dragstart", V = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]', Mt = "ArrowDown", Ct = "ArrowUp", St = "ArrowLeft", Bt = "ArrowRight", Ot = "Escape", x = "transitionDuration", W = "transitionDelay", T = "transitionend", F = "transitionProperty", Ft = () => { + const t = /(iPhone|iPod|iPad)/; + return navigator?.userAgentData?.brands.some( + (e) => t.test(e.brand) + ) || /* istanbul ignore next @preserve */ + t.test( + navigator?.userAgent + ) || !1; +}, Ht = () => { +}, U = (t, e, s, a) => { + const n = a || !1; + t.addEventListener( + e, + s, + n + ); +}, j = (t, e, s, a) => { + const n = a || !1; + t.removeEventListener( + e, + s, + n + ); +}, H = (t, e) => t.getAttribute(e), q = (t, e) => t.hasAttribute(e), Pt = (t, e, s) => t.setAttribute(e, s), It = (t, e) => t.removeAttribute(e), Rt = (t, ...e) => { + t.classList.add(...e); +}, Vt = (t, ...e) => { + t.classList.remove(...e); +}, xt = (t, e) => t.classList.contains(e), y = (t) => t != null && typeof t == "object" || !1, l = (t) => y(t) && typeof t.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some( + (e) => t.nodeType === e +) || !1, u = (t) => l(t) && t.nodeType === 1 || !1, f = /* @__PURE__ */ new Map(), E = { + data: f, + /** + * Sets web components data. + * + * @param element target element + * @param component the component's name or a unique key + * @param instance the component instance + */ + set: (t, e, s) => { + u(t) && (f.has(e) || f.set(e, /* @__PURE__ */ new Map()), f.get(e).set(t, s)); + }, + /** + * Returns all instances for specified component. + * + * @param component the component's name or a unique key + * @returns all the component instances + */ + getAllFor: (t) => f.get(t) || null, + /** + * Returns the instance associated with the target. + * + * @param element target element + * @param component the component's name or a unique key + * @returns the instance + */ + get: (t, e) => { + if (!u(t) || !e) return null; + const s = E.getAllFor(e); + return t && s && s.get(t) || null; + }, + /** + * Removes web components data. + * + * @param element target element + * @param component the component's name or a unique key + */ + remove: (t, e) => { + const s = E.getAllFor(e); + !s || !u(t) || (s.delete(t), s.size === 0 && f.delete(e)); + } +}, Wt = (t, e) => E.get(t, e), N = (t) => typeof t == "string" || !1, z = (t) => y(t) && t.constructor.name === "Window" || !1, P = (t) => l(t) && t.nodeType === 9 || !1, h = (t) => z(t) ? t.document : P(t) ? t : l(t) ? t.ownerDocument : globalThis.document, L = (t, ...e) => Object.assign(t, ...e), $ = (t) => { + if (!t) return; + if (N(t)) + return h().createElement(t); + const { tagName: e } = t, s = $(e); + if (!s) return; + const a = { ...t }; + return delete a.tagName, L(s, a); +}, K = (t, e) => t.dispatchEvent(e), b = (t, e) => { + const s = getComputedStyle(t), a = e.replace("webkit", "Webkit").replace(/([A-Z])/g, "-$1").toLowerCase(); + return s.getPropertyValue(a); +}, Z = (t) => { + const e = b(t, F), s = b(t, W), a = s.includes("ms") ? ( + /* istanbul ignore next */ + 1 + ) : 1e3, n = e && e !== "none" ? parseFloat(s) * a : ( + /* istanbul ignore next */ + 0 + ); + return Number.isNaN(n) ? ( + /* istanbul ignore next */ + 0 + ) : n; +}, _ = (t) => { + const e = b(t, F), s = b(t, x), a = s.includes("ms") ? ( + /* istanbul ignore next */ + 1 + ) : 1e3, n = e && e !== "none" ? parseFloat(s) * a : ( + /* istanbul ignore next */ + 0 + ); + return Number.isNaN(n) ? ( + /* istanbul ignore next */ + 0 + ) : n; +}, Ut = (t, e) => { + let s = 0; + const a = new Event(T), n = _(t), c = Z(t); + if (n) { + const o = (i) => { + i.target === t && (e.apply(t, [i]), t.removeEventListener(T, o), s = 1); + }; + t.addEventListener(T, o), setTimeout(() => { + s || K(t, a); + }, n + c + 17); + } else + e.apply(t, [a]); +}, jt = (t, e) => t.focus(e), C = (t) => ["true", !0].includes(t) ? !0 : ["false", !1].includes(t) ? !1 : ["null", "", null, void 0].includes(t) ? null : t !== "" && !Number.isNaN(+t) ? +t : t, v = (t) => Object.entries(t), X = (t) => t.toLowerCase(), Y = (t, e, s, a) => { + const n = { ...s }, c = { ...t.dataset }, o = { ...e }, i = {}, d = "title"; + return v(c).forEach(([r, p]) => { + const w = typeof r == "string" && r.includes(a) ? r.replace(a, "").replace( + /[A-Z]/g, + (I) => X(I) + ) : ( + /* istanbul ignore next @preserve */ + r + ); + i[w] = C(p); + }), v(n).forEach(([r, p]) => { + n[r] = C(p); + }), v(e).forEach(([r, p]) => { + r in n ? o[r] = n[r] : r in i ? o[r] = i[r] : o[r] = r === d ? H(t, d) : p; + }), o; +}, S = (t) => Object.keys(t), qt = (t, e) => { + const s = new CustomEvent(t, { + cancelable: !0, + bubbles: !0 + }); + return y(e) && L(s, e), s; +}, zt = { passive: !0 }, $t = (t) => t.offsetHeight, Kt = (t, e) => { + v(e).forEach(([s, a]) => { + if (a && N(s) && s.includes("--")) + t.style.setProperty(s, a); + else { + const n = {}; + n[s] = a, L(t.style, n); + } + }); +}, A = (t) => y(t) && t.constructor.name === "Map" || !1, G = (t) => typeof t == "number" || !1, g = /* @__PURE__ */ new Map(), Zt = { + /** + * Sets a new timeout timer for an element, or element -> key association. + * + * @param element target element + * @param callback the callback + * @param delay the execution delay + * @param key a unique key + */ + set: (t, e, s, a) => { + u(t) && (a && a.length ? (g.has(t) || g.set(t, /* @__PURE__ */ new Map()), g.get(t).set(a, setTimeout(e, s))) : g.set(t, setTimeout(e, s))); + }, + /** + * Returns the timer associated with the target. + * + * @param element target element + * @param key a unique + * @returns the timer + */ + get: (t, e) => { + if (!u(t)) return null; + const s = g.get(t); + return e && s && A(s) ? s.get(e) || /* istanbul ignore next @preserve */ + null : G(s) ? s : null; + }, + /** + * Clears the element's timer. + * + * @param element target element + * @param key a unique key + */ + clear: (t, e) => { + if (!u(t)) return; + const s = g.get(t); + e && e.length && A(s) ? (clearTimeout(s.get(e)), s.delete(e), s.size === 0 && g.delete(t)) : (clearTimeout(s), g.delete(t)); + } +}, J = (t, e) => (l(e) ? e : h()).querySelectorAll(t), D = /* @__PURE__ */ new Map(); +function Q(t) { + const { shiftKey: e, code: s } = t, a = h(this), n = [ + ...J(V, this) + ].filter( + (i) => !q(i, "disabled") && !H(i, R) + ); + if (!n.length) return; + const c = n[0], o = n[n.length - 1]; + s === "Tab" && (e && a.activeElement === c ? (o.focus(), t.preventDefault()) : !e && a.activeElement === o && (c.focus(), t.preventDefault())); +} +const k = (t) => D.has(t) === !0, _t = (t) => { + const e = k(t); + (e ? j : U)(t, "keydown", Q), e ? D.delete(t) : D.set(t, !0); +}, tt = (t, e) => { + const { width: s, height: a, top: n, right: c, bottom: o, left: i } = t.getBoundingClientRect(); + let d = 1, r = 1; + if (e && u(t)) { + const { offsetWidth: p, offsetHeight: w } = t; + d = p > 0 ? Math.round(s) / p : ( + /* istanbul ignore next @preserve */ + 1 + ), r = w > 0 ? Math.round(a) / w : ( + /* istanbul ignore next @preserve */ + 1 + ); + } + return { + width: s / d, + height: a / r, + top: n / r, + right: c / d, + bottom: o / r, + left: i / d, + x: i / d, + y: n / r + }; +}, Xt = (t) => h(t).body, M = (t) => h(t).documentElement, et = (t) => l(t) && t.constructor.name === "ShadowRoot" || !1, Yt = (t) => t.nodeName === "HTML" ? t : u(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node +l(t) && t.parentNode || // DOM Element detected +et(t) && t.host || // ShadowRoot detected +M(t); +let B = 0, O = 0; +const m = /* @__PURE__ */ new Map(), st = (t, e) => { + let s = e ? B : O; + if (e) { + const a = st(t), n = m.get(a) || /* @__PURE__ */ new Map(); + m.has(a) || m.set(a, n), A(n) && !n.has(e) ? (n.set(e, s), B += 1) : s = n.get(e); + } else { + const a = t.id || t; + m.has(a) ? s = m.get(a) : (m.set(a, s), O += 1); + } + return s; +}, Gt = (t) => t ? P(t) ? t.defaultView : l(t) ? t?.ownerDocument?.defaultView : t : window, Jt = (t) => Array.isArray(t) || !1, Qt = (t) => { + if (!l(t)) return !1; + const { top: e, bottom: s } = tt(t), { clientHeight: a } = M(t); + return e <= a && s >= 0; +}, kt = (t) => typeof t == "function" || !1, te = (t) => y(t) && t.constructor.name === "NodeList" || !1, ee = (t) => M(t).dir === "rtl", se = (t) => l(t) && ["TABLE", "TD", "TH"].includes(t.nodeName) || !1, at = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot` +at(t.getRootNode().host, e) : null, nt = (t, e) => u(t) ? t : (l(e) ? e : h()).querySelector(t), ae = (t, e) => (l(e) ? e : h()).getElementsByTagName( + t +), ne = (t, e) => (e && l(e) ? e : h()).getElementsByClassName( + t +), re = (t, e) => t.matches(e), rt = "5.1.0", ot = rt; +class oe { + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(e, s) { + let a; + try { + if (u(e)) + a = e; + else if (N(e)) { + if (a = nt(e), !a) throw Error(`"${e}" is not a valid selector.`); + } else + throw Error("your target is not an instance of HTMLElement."); + } catch (c) { + throw Error(`${this.name} Error: ${c.message}`); + } + const n = E.get(a, this.name); + n && n._toggleEventListeners(), this.element = a, this.options = this.defaults && S(this.defaults).length ? Y(a, this.defaults, s || {}, "bs") : {}, E.set(a, this.name, this); + } + // istanbul ignore next @preserve + get version() { + return ot; + } + // istanbul ignore next @preserve + get name() { + return "BaseComponent"; + } + // istanbul ignore next @preserve + get defaults() { + return {}; + } + /** just to have something to extend from */ + // istanbul ignore next @preserve coverage wise this isn't important + _toggleEventListeners = () => { + }; + /** Removes component from target element. */ + dispose() { + E.remove(this.element, this.name), S(this).forEach((e) => { + delete this[e]; + }); + } +} +export { + R as $, + Lt as A, + oe as B, + ft as C, + at as D, + At as E, + Dt as F, + Bt as G, + St as H, + N as I, + Ht as J, + Kt as K, + lt as L, + q as M, + jt as N, + L as O, + b as P, + M as Q, + tt as R, + pt as S, + Zt as T, + mt as U, + yt as V, + Mt as W, + Ct as X, + Ot as Y, + It as Z, + Xt as _, + ut as a, + ct as a0, + _t as a1, + Gt as a2, + $ as a3, + ae as a4, + dt as a5, + gt as a6, + ht as a7, + X as a8, + kt as a9, + te as aa, + Jt as ab, + l as ac, + Yt as ad, + et as ae, + se as af, + st as ag, + wt as ah, + Ft as ai, + it as aj, + H as b, + qt as c, + K as d, + Ut as e, + Rt as f, + Wt as g, + xt as h, + ee as i, + ne as j, + re as k, + h as l, + Et as m, + J as n, + Qt as o, + _ as p, + nt as q, + Vt as r, + Pt as s, + $t as t, + u, + vt as v, + bt as w, + zt as x, + Tt as y, + Nt as z +}; +//# sourceMappingURL=base-component-ylZzLp-h.mjs.map diff --git a/dist/components/base-component-ylZzLp-h.mjs.map b/dist/components/base-component-ylZzLp-h.mjs.map new file mode 100644 index 00000000..212d749b --- /dev/null +++ b/dist/components/base-component-ylZzLp-h.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"base-component-ylZzLp-h.mjs","sources":["../../node_modules/.pnpm/@thednp+shorty@2.0.7/node_modules/@thednp/shorty/dist/shorty.mjs","../../src/version.ts","../../src/components/base-component.ts"],"sourcesContent":["const ariaChecked = \"aria-checked\", ariaDescription = \"aria-description\", ariaDescribedBy = \"aria-describedby\", ariaExpanded = \"aria-expanded\", ariaHasPopup = \"aria-haspopup\", ariaHidden = \"aria-hidden\", ariaLabel = \"aria-label\", ariaLabelledBy = \"aria-labelledby\", ariaModal = \"aria-modal\", ariaPressed = \"aria-pressed\", ariaSelected = \"aria-selected\", ariaValueMin = \"aria-valuemin\", ariaValueMax = \"aria-valuemax\", ariaValueNow = \"aria-valuenow\", ariaValueText = \"aria-valuetext\", abortEvent = \"abort\", beforeunloadEvent = \"beforeunload\", blurEvent = \"blur\", changeEvent = \"change\", contextmenuEvent = \"contextmenu\", DOMContentLoadedEvent = \"DOMContentLoaded\", DOMMouseScrollEvent = \"DOMMouseScroll\", errorEvent = \"error\", focusEvent = \"focus\", focusinEvent = \"focusin\", focusoutEvent = \"focusout\", gesturechangeEvent = \"gesturechange\", gestureendEvent = \"gestureend\", gesturestartEvent = \"gesturestart\", keydownEvent = \"keydown\", keypressEvent = \"keypress\", keyupEvent = \"keyup\", loadEvent = \"load\", mouseclickEvent = \"click\", mousedblclickEvent = \"dblclick\", mousedownEvent = \"mousedown\", mouseupEvent = \"mouseup\", mousehoverEvent = \"hover\", mouseenterEvent = \"mouseenter\", mouseleaveEvent = \"mouseleave\", mouseinEvent = \"mousein\", mouseoutEvent = \"mouseout\", mouseoverEvent = \"mouseover\", mousemoveEvent = \"mousemove\", mousewheelEvent = \"mousewheel\", moveEvent = \"move\", orientationchangeEvent = \"orientationchange\", pointercancelEvent = \"pointercancel\", pointerdownEvent = \"pointerdown\", pointerleaveEvent = \"pointerleave\", pointermoveEvent = \"pointermove\", pointerupEvent = \"pointerup\", readystatechangeEvent = \"readystatechange\", resetEvent = \"reset\", resizeEvent = \"resize\", selectEvent = \"select\", selectendEvent = \"selectend\", selectstartEvent = \"selectstart\", scrollEvent = \"scroll\", submitEvent = \"submit\", touchstartEvent = \"touchstart\", touchmoveEvent = \"touchmove\", touchcancelEvent = \"touchcancel\", touchendEvent = \"touchend\", unloadEvent = \"unload\", nativeEvents = {\n DOMContentLoaded: DOMContentLoadedEvent,\n DOMMouseScroll: DOMMouseScrollEvent,\n abort: abortEvent,\n beforeunload: beforeunloadEvent,\n blur: blurEvent,\n change: changeEvent,\n click: mouseclickEvent,\n contextmenu: contextmenuEvent,\n dblclick: mousedblclickEvent,\n error: errorEvent,\n focus: focusEvent,\n focusin: focusinEvent,\n focusout: focusoutEvent,\n gesturechange: gesturechangeEvent,\n gestureend: gestureendEvent,\n gesturestart: gesturestartEvent,\n hover: mousehoverEvent,\n keydown: keydownEvent,\n keypress: keypressEvent,\n keyup: keyupEvent,\n load: loadEvent,\n mousedown: mousedownEvent,\n mousemove: mousemoveEvent,\n mousein: mouseinEvent,\n mouseout: mouseoutEvent,\n mouseenter: mouseenterEvent,\n mouseleave: mouseleaveEvent,\n mouseover: mouseoverEvent,\n mouseup: mouseupEvent,\n mousewheel: mousewheelEvent,\n move: moveEvent,\n orientationchange: orientationchangeEvent,\n pointercancel: pointercancelEvent,\n pointerdown: pointerdownEvent,\n pointerleave: pointerleaveEvent,\n pointermove: pointermoveEvent,\n pointerup: pointerupEvent,\n readystatechange: readystatechangeEvent,\n reset: resetEvent,\n resize: resizeEvent,\n scroll: scrollEvent,\n select: selectEvent,\n selectend: selectendEvent,\n selectstart: selectstartEvent,\n submit: submitEvent,\n touchcancel: touchcancelEvent,\n touchend: touchendEvent,\n touchmove: touchmoveEvent,\n touchstart: touchstartEvent,\n unload: unloadEvent\n}, dragEvent = \"drag\", dragstartEvent = \"dragstart\", dragenterEvent = \"dragenter\", dragleaveEvent = \"dragleave\", dragoverEvent = \"dragover\", dragendEvent = \"dragend\", loadstartEvent = \"loadstart\", mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" }, mouseHoverEvents = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, focusEvents = { in: \"focusin\", out: \"focusout\" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', keyboardEventKeys = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, keyAlt = \"Alt\", keyArrowDown = \"ArrowDown\", keyArrowUp = \"ArrowUp\", keyArrowLeft = \"ArrowLeft\", keyArrowRight = \"ArrowRight\", keyBackspace = \"Backspace\", keyCapsLock = \"CapsLock\", keyControl = \"Control\", keyDelete = \"Delete\", keyEnter = \"Enter\", keyNumpadEnter = \"NumpadEnter\", keyEscape = \"Escape\", keyInsert = \"Insert\", keyMeta = \"Meta\", keyPause = \"Pause\", keyScrollLock = \"ScrollLock\", keyShift = \"Shift\", keySpace = \"Space\", keyTab = \"Tab\", animationDuration = \"animationDuration\", animationDelay = \"animationDelay\", animationName = \"animationName\", animationEndEvent = \"animationend\", transitionDuration = \"transitionDuration\", transitionDelay = \"transitionDelay\", transitionEndEvent = \"transitionend\", transitionProperty = \"transitionProperty\", addEventListener = \"addEventListener\", removeEventListener = \"removeEventListener\", bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, offsetHeight = \"offsetHeight\", offsetWidth = \"offsetWidth\", scrollHeight = \"scrollHeight\", scrollWidth = \"scrollWidth\", tabindex = \"tabindex\", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (x) => mobileBrands.test(x.brand)\n ) || mobileBrands.test(navigator?.userAgent) || !1;\n}, isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (x) => appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent\n ) || !1;\n}, isFirefox = () => navigator?.userAgent?.includes(\"Firefox\") || /* istanbul ignore next @preserve */\n!1, support3DTransform = () => [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style), noop = () => {\n}, on = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.addEventListener(\n eventName,\n listener,\n ops\n );\n}, off = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.removeEventListener(\n eventName,\n listener,\n ops\n );\n}, one = (element, eventName, listener, options) => {\n const handlerWrapper = (e) => {\n (e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));\n };\n on(element, eventName, handlerWrapper, options);\n}, supportPassive = () => {\n let result = !1;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => (result = !0, result)\n });\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch {\n }\n return result;\n}, supportTransform = () => [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style), supportTouch = () => \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, supportAnimation = () => [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style), supportTransition = () => [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {\n element.classList.add(...classNAME);\n}, removeClass = (element, ...classNAME) => {\n element.classList.remove(...classNAME);\n}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == \"object\" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (x) => node.nodeType === x\n) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component) => componentData.get(component) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n return element && instanceMap && instanceMap.get(element) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = Data.getAllFor(component);\n !instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));\n }\n}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == \"string\" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === \"Window\" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {\n if (!param) return;\n if (isString(param))\n return getDocument().createElement(param);\n const { tagName } = param, newElement = createElement(tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, createElementNS = (ns, param) => {\n if (!ns || !param) return;\n if (isString(param))\n return getDocument().createElementNS(ns, param);\n const { tagName } = param, newElement = createElementNS(ns, tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {\n const computedStyle = getComputedStyle(element), prop = property.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return computedStyle.getPropertyValue(prop);\n}, getElementAnimationDelay = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementAnimationDuration = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateAnimationEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);\n if (duration) {\n const animationEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);\n };\n element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, getElementTransitionDelay = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(delayValue) * delayScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementTransitionDuration = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateTransitionEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);\n if (duration) {\n const transitionEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => [\"true\", !0].includes(value) ? !0 : [\"false\", !1].includes(value) ? !1 : [\"null\", \"\", null, void 0].includes(value) ? null : value !== \"\" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {\n const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = \"title\";\n return ObjectEntries(data).forEach(([k, v]) => {\n const key = ns && typeof k == \"string\" && k.includes(ns) ? k.replace(ns, \"\").replace(\n /[A-Z]/g,\n (match) => toLowerCase(match)\n ) : (\n /* istanbul ignore next @preserve */\n k\n );\n dataOps[key] = normalizeValue(v);\n }), ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v);\n }), ObjectEntries(defaultOps).forEach(([k, v]) => {\n k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;\n }), normalOps;\n}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: !0,\n bubbles: !0\n });\n return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;\n}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key) && key.includes(\"--\"))\n element.style.setProperty(key, value);\n else {\n const propObject = {};\n propObject[key] = value, ObjectAssign(element.style, propObject);\n }\n });\n}, isMap = (obj) => isObject(obj) && obj.constructor.name === \"Map\" || !1, isNumber = (num) => typeof num == \"number\" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (element, callback, delay, key) => {\n isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */\n null : isNumber(keyTimers) ? keyTimers : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n const keyTimers = TimeCache.get(element);\n key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));\n }\n}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();\nfunction handleKeyboardNavigation(event) {\n const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [\n ...querySelectorAll(focusableSelector, this)\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden)\n );\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];\n code === \"Tab\" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));\n}\nconst hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {\n const isCurrentlyTrapped = hasFocusTrap(target);\n (isCurrentlyTrapped ? off : on)(target, \"keydown\", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);\n}, getBoundingClientRect = (element, includeScale) => {\n const { width, height, top, right, bottom, left } = element.getBoundingClientRect();\n let scaleX = 1, scaleY = 1;\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (\n /* istanbul ignore next @preserve */\n 1\n ), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY\n };\n}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {\n const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;\n return { x, y };\n}, isShadowRoot = (element) => isNode(element) && element.constructor.name === \"ShadowRoot\" || !1, getParentNode = (node) => node.nodeName === \"HTML\" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\nisNode(node) && node.parentNode || // DOM Element detected\nisShadowRoot(node) && node.host || // ShadowRoot detected\ngetDocumentElement(node), isScaledElement = (element) => {\n if (!isHTMLElement(element)) return !1;\n const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;\n}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {\n const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent)\n ), offsets = { x: 0, y: 0 };\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, !0);\n offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height\n };\n};\nlet elementUID = 0, elementMapUID = 0;\nconst elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {\n let result = key ? elementUID : elementMapUID;\n if (key) {\n const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();\n elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);\n } else {\n const elkey = element.id || element;\n elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);\n }\n return result;\n}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === \"CANVAS\" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {\n if (!isNode(element)) return !1;\n const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n}, isElementInViewport = (element) => {\n if (!isNode(element)) return !1;\n const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);\n return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;\n}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == \"function\" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === \"HTMLCollection\" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === \"IMG\" || !1, isJSON = (str) => {\n if (!isString(str)) return !1;\n try {\n JSON.parse(str);\n } catch {\n return !1;\n }\n return !0;\n}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === \"WeakMap\" || !1, isMedia = (element) => isNode(element) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (s) => element.constructor.name.includes(s)\n) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === \"NodeList\" || !1, isRTL = (node) => getDocumentElement(node).dir === \"rtl\", isSVGElement = (element) => isNode(element) && element.constructor.name.includes(\"SVG\") || !1, isTableElement = (element) => isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`\nclosest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(\n selector\n), getCustomElements = (parent) => [...getElementsByTagName(\"*\", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(\n selector\n), matches = (target, selector) => target.matches(selector), version = \"2.0.7\";\nexport {\n ArrayFrom,\n DOMContentLoadedEvent,\n DOMMouseScrollEvent,\n Data,\n Float32ArrayFrom,\n Float64ArrayFrom,\n ObjectAssign,\n ObjectEntries,\n ObjectFromEntries,\n ObjectHasOwn,\n ObjectKeys,\n ObjectValues,\n Timer,\n abortEvent,\n addClass,\n addEventListener,\n animationDelay,\n animationDuration,\n animationEndEvent,\n animationName,\n ariaChecked,\n ariaDescribedBy,\n ariaDescription,\n ariaExpanded,\n ariaHasPopup,\n ariaHidden,\n ariaLabel,\n ariaLabelledBy,\n ariaModal,\n ariaPressed,\n ariaSelected,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n ariaValueText,\n beforeunloadEvent,\n bezierEasings,\n blurEvent,\n changeEvent,\n closest,\n contextmenuEvent,\n createCustomEvent,\n createElement,\n createElementNS,\n dispatchEvent,\n distinct,\n documentBody,\n documentElement,\n documentHead,\n dragEvent,\n dragendEvent,\n dragenterEvent,\n dragleaveEvent,\n dragoverEvent,\n dragstartEvent,\n emulateAnimationEnd,\n emulateTransitionEnd,\n errorEvent,\n focus,\n focusEvent,\n focusEvents,\n focusableSelector,\n focusinEvent,\n focusoutEvent,\n gesturechangeEvent,\n gestureendEvent,\n gesturestartEvent,\n getAttribute,\n getAttributeNS,\n getBoundingClientRect,\n getCustomElements,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getDocumentHead,\n getElementAnimationDelay,\n getElementAnimationDuration,\n getElementById,\n getElementStyle,\n getElementTransitionDelay,\n getElementTransitionDuration,\n getElementsByClassName,\n getElementsByTagName,\n getInstance,\n getNodeScroll,\n getParentNode,\n getRectRelativeToOffsetParent,\n getUID,\n getWindow,\n hasAttribute,\n hasAttributeNS,\n hasClass,\n hasFocusTrap,\n isApple,\n isArray,\n isCanvas,\n isCustomElement,\n isDocument,\n isElement,\n isElementInScrollRange,\n isElementInViewport,\n isElementsArray,\n isFirefox,\n isFunction,\n isHTMLCollection,\n isHTMLElement,\n isHTMLImageElement,\n isJSON,\n isMap,\n isMedia,\n isMobile,\n isNode,\n isNodeList,\n isNumber,\n isObject,\n isRTL,\n isSVGElement,\n isScaledElement,\n isShadowRoot,\n isString,\n isTableElement,\n isWeakMap,\n isWindow,\n keyAlt,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keyBackspace,\n keyCapsLock,\n keyControl,\n keyDelete,\n keyEnter,\n keyEscape,\n keyInsert,\n keyMeta,\n keyNumpadEnter,\n keyPause,\n keyScrollLock,\n keyShift,\n keySpace,\n keyTab,\n keyboardEventKeys,\n keydownEvent,\n keypressEvent,\n keyupEvent,\n loadEvent,\n loadstartEvent,\n matches,\n mouseClickEvents,\n mouseHoverEvents,\n mouseSwipeEvents,\n mouseclickEvent,\n mousedblclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseinEvent,\n mouseleaveEvent,\n mousemoveEvent,\n mouseoutEvent,\n mouseoverEvent,\n mouseupEvent,\n mousewheelEvent,\n moveEvent,\n nativeEvents,\n noop,\n normalizeOptions,\n normalizeValue,\n off,\n offsetHeight,\n offsetWidth,\n on,\n one,\n orientationchangeEvent,\n passiveHandler,\n pointercancelEvent,\n pointerdownEvent,\n pointerleaveEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n querySelectorAll,\n readystatechangeEvent,\n reflow,\n removeAttribute,\n removeAttributeNS,\n removeClass,\n removeEventListener,\n resetEvent,\n resizeEvent,\n scrollEvent,\n scrollHeight,\n scrollWidth,\n selectEvent,\n selectendEvent,\n selectstartEvent,\n setAttribute,\n setAttributeNS,\n setElementStyle,\n submitEvent,\n support3DTransform,\n supportAnimation,\n supportPassive,\n supportTouch,\n supportTransform,\n supportTransition,\n tabindex,\n toLowerCase,\n toUpperCase,\n toggleFocusTrap,\n touchEvents,\n touchcancelEvent,\n touchendEvent,\n touchmoveEvent,\n touchstartEvent,\n transitionDelay,\n transitionDuration,\n transitionEndEvent,\n transitionProperty,\n unloadEvent,\n userAgent,\n userAgentData,\n version\n};\n//# sourceMappingURL=shorty.mjs.map\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n"],"names":["ariaDescribedBy","ariaExpanded","ariaHidden","ariaModal","ariaPressed","ariaSelected","focusEvent","focusinEvent","focusoutEvent","keydownEvent","keyupEvent","mouseclickEvent","mousedownEvent","mousehoverEvent","mouseenterEvent","mouseleaveEvent","pointerdownEvent","pointermoveEvent","pointerupEvent","touchstartEvent","dragstartEvent","focusableSelector","keyArrowDown","keyArrowUp","keyArrowLeft","keyArrowRight","keyEscape","transitionDuration","transitionDelay","transitionEndEvent","transitionProperty","isApple","appleBrands","x","noop","on","element","eventName","listener","options","ops","off","getAttribute","att","hasAttribute","setAttribute","value","removeAttribute","addClass","classNAME","removeClass","hasClass","isObject","obj","isNode","node","isHTMLElement","componentData","Data","component","instance","instanceMap","getInstance","target","isString","str","isWindow","isDocument","getDocument","ObjectAssign","source","createElement","param","tagName","newElement","attr","dispatchEvent","event","getElementStyle","property","computedStyle","prop","getElementTransitionDelay","propertyValue","delayValue","delayScale","duration","getElementTransitionDuration","durationValue","durationScale","emulateTransitionEnd","handler","called","endEvent","delay","transitionEndWrapper","e","focus","normalizeValue","ObjectEntries","toLowerCase","normalizeOptions","defaultOps","inputOps","ns","INPUT","data","normalOps","dataOps","title","k","v","key","match","ObjectKeys","createCustomEvent","eventType","config","OriginalCustomEvent","passiveHandler","reflow","setElementStyle","styles","propObject","isMap","isNumber","num","TimeCache","Timer","callback","keyTimers","querySelectorAll","selector","parent","focusTrapMap","handleKeyboardNavigation","shiftKey","code","doc","focusableElements","el","firstFocusable","lastFocusable","hasFocusTrap","toggleFocusTrap","isCurrentlyTrapped","getBoundingClientRect","includeScale","width","height","top","right","bottom","left","scaleX","scaleY","offsetWidth2","offsetHeight2","getDocumentBody","getDocumentElement","isShadowRoot","getParentNode","elementUID","elementMapUID","elementIDMap","getUID","result","elID","elMap","elkey","getWindow","isArray","isElementInScrollRange","clientHeight","isFunction","fn","isNodeList","isRTL","isTableElement","closest","querySelector","getElementsByTagName","getElementsByClassName","matches","Version","version","BaseComponent","prevInstance"],"mappings":"AAAK,MAAqEA,KAAkB,oBAAoBC,KAAe,iBAAiDC,IAAa,eAA6EC,KAAY,cAAcC,KAAc,gBAAgBC,KAAe,iBAAqYC,KAAa,SAASC,KAAe,WAAWC,KAAgB,YAAsHC,KAAe,WAAuCC,KAAa,SAA6BC,KAAkB,SAA0CC,KAAiB,aAAuCC,KAAkB,SAASC,KAAkB,cAAcC,KAAkB,cAAwQC,KAAmB,eAAmDC,KAAmB,eAAeC,KAAiB,aAA+OC,KAAkB,cAmDxxDC,KAAiB,aAaaC,IAAoB,qFAuCtDC,KAAe,aAAaC,KAAa,WAAWC,KAAe,aAAaC,KAAgB,cAAsKC,KAAY,UAA6SC,IAAqB,sBAAsBC,IAAkB,mBAAmBC,IAAqB,iBAAiBC,IAAqB,sBA+B1tBC,KAAU,MAAM;AACjB,QAAMC,IAAc;AACpB,SAAO,WAAW,eAAe,OAAO;AAAA,IACtC,CAACC,MAAMD,EAAY,KAAKC,EAAE,KAAK;AAAA,EAChC;AAAA,EACDD,EAAY;AAAA,IACV,WAAW;AAAA,EACZ,KAAI;AACP,GAC2GE,KAAO,MAAM;AACxH,GAAGC,IAAK,CAACC,GAASC,GAAWC,GAAUC,MAAY;AACjD,QAAMC,IAAMD,KAAW;AACvB,EAAAH,EAAQ;AAAA,IACNC;AAAA,IACAC;AAAA,IACAE;AAAA,EACD;AACH,GAAGC,IAAM,C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C,aAAO,KAAKA,CAAI;AAAA,IAAA,CACjB;AAAA,EAAA;AAEL;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/components/button.cjs b/dist/components/button.cjs index 5f1a490c..ee558d7b 100644 --- a/dist/components/button.cjs +++ b/dist/components/button.cjs @@ -1,2 +1,2 @@ -"use strict";var g=Object.defineProperty;var v=(s,n,e)=>n in s?g(s,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[n]=e;var a=(s,n,e)=>v(s,typeof n!="symbol"?n+"":n,e);const t=require("@thednp/shorty"),l=require("@thednp/event-listener"),c=require("./activeClass-CxJYQAGN.js"),d=require("./dataBsToggle-Dj-Ng54N.js"),h=require("./base-component-DBcDoOjV.js"),C="button",u="Button",b=`[${d.dataBsToggle}="${C}"]`,m=s=>t.getInstance(s,u),p=s=>new o(s);class o extends h.BaseComponent{constructor(e){super(e);a(this,"isActive",!1);a(this,"toggle",e=>{e&&e.preventDefault();const{element:i,isActive:r}=this;!t.hasClass(i,"disabled")&&!t.getAttribute(i,"disabled")&&((r?t.removeClass:t.addClass)(i,c.activeClass),t.setAttribute(i,t.ariaPressed,r?"false":"true"),this.isActive=t.hasClass(i,c.activeClass))});a(this,"_toggleEventListeners",e=>{(e?l.addListener:l.removeListener)(this.element,t.mouseclickEvent,this.toggle)});const{element:i}=this;this.isActive=t.hasClass(i,c.activeClass),t.setAttribute(i,t.ariaPressed,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return u}dispose(){this._toggleEventListeners(),super.dispose()}}a(o,"selector",b),a(o,"init",p),a(o,"getInstance",m);module.exports=o; +"use strict";const t=require("./base-component-D3rSrWwH.js"),a=require("./event-listener-W3RGkfJ6.js"),i=require("./activeClass-CxJYQAGN.js"),l=require("./dataBsToggle-Dj-Ng54N.js"),u="button",c="Button",g=`[${l.dataBsToggle}="${u}"]`,v=n=>t.getInstance(n,c),d=n=>new r(n);class r extends t.BaseComponent{static selector=g;static init=d;static getInstance=v;isActive=!1;constructor(s){super(s);const{element:e}=this;this.isActive=t.hasClass(e,i.activeClass),t.setAttribute(e,t.ariaPressed,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return c}toggle=s=>{s&&s.preventDefault();const{element:e,isActive:o}=this;!t.hasClass(e,"disabled")&&!t.getAttribute(e,"disabled")&&((o?t.removeClass:t.addClass)(e,i.activeClass),t.setAttribute(e,t.ariaPressed,o?"false":"true"),this.isActive=t.hasClass(e,i.activeClass))};_toggleEventListeners=s=>{(s?a.E:a.r)(this.element,t.mouseclickEvent,this.toggle)};dispose(){this._toggleEventListeners(),super.dispose()}}module.exports=r; //# sourceMappingURL=button.cjs.map diff --git a/dist/components/button.cjs.map b/dist/components/button.cjs.map index cf0b0356..76e81287 100644 --- a/dist/components/button.cjs.map +++ b/dist/components/button.cjs.map @@ -1 +1 @@ -{"version":3,"file":"button.cjs","sources":["../../src/strings/buttonString.ts","../../src/strings/buttonComponent.ts","../../src/components/button.ts"],"sourcesContent":["/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance'}),b=t=>r.getInstance(t,e.popoverComponent),m=t=>new i(t);class i extends e.Tooltip{constructor(o,p){super(o,p);n(this,"show",()=>{super.show();const{options:o,btn:p}=this;// istanbul ignore else @preserve -o.dismissible&&p&&setTimeout(()=>r.focus(p),17)})}get name(){return e.popoverComponent}get defaults(){return g}}n(i,"selector",u),n(i,"init",m),n(i,"getInstance",b),n(i,"styleTip",e.styleTip);module.exports=i; +"use strict";const n=require("./base-component-D3rSrWwH.js"),i=require("./dataBsToggle-Dj-Ng54N.js"),t=require("./tooltip--Tnf23hE.js"),r=`[${i.dataBsToggle}="${t.popoverString}"],[data-tip="${t.popoverString}"]`,a=n.ObjectAssign({},t.tooltipDefaults,{template:t.getTipTemplate(t.popoverString),content:"",dismissible:!1,btnClose:''}),c=e=>n.getInstance(e,t.popoverComponent),l=e=>new p(e);class p extends t.Tooltip{static selector=r;static init=l;static getInstance=c;static styleTip=t.styleTip;constructor(s,o){super(s,o)}get name(){return t.popoverComponent}get defaults(){return a}show=()=>{super.show();const{options:s,btn:o}=this;s.dismissible&&o&&setTimeout(()=>n.focus(o),17)}}module.exports=p; //# sourceMappingURL=popover.cjs.map diff --git a/dist/components/popover.cjs.map b/dist/components/popover.cjs.map index 504a1acc..9c116f0e 100644 --- a/dist/components/popover.cjs.map +++ b/dist/components/popover.cjs.map @@ -1 +1 @@ -{"version":3,"file":"popover.cjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from \"@thednp/shorty\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\n\nimport getTipTemplate from \"../util/getTipTemplate\";\nimport styleTip from \"../util/styleTip\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport Tooltip from \"./tooltip\";\n\nimport type { PopoverOptions /* , PopoverEvent */ } from \"../interface/popover\";\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector =\n `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: \"\",\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","target","config","__publicField","options","btn","focus","styleTip"],"mappings":"8RAiBMA,EACJ,IAAIC,cAAY,KAAKC,EAAAA,aAAa,iBAAiBA,EAAa,aAAA,KAE5DC,EAAkCC,EAAAA,aAAa,CAAC,EAAGC,kBAAiB,CACxE,SAAUC,iBAAeJ,eAAa,EACtC,QAAS,GACT,YAAa,GACb,SAAU,wDACZ,CAAC,EAMKK,EAAsBC,GAC1BC,cAAqBD,EAASE,EAAAA,gBAAgB,EAK1CC,EAAuBH,GAAyB,IAAII,EAAQJ,CAAO,EAKzE,MAAqBI,UAAgBC,EAAAA,OAAQ,CAW3C,YAAYC,EAA8BC,EAAkC,CAC1E,MAAMD,EAAQC,CAAM,EAgBtBC,EAAA,YAAO,IAAM,CACX,MAAM,KAAK,EAEL,KAAA,CAAE,QAAAC,EAAS,IAAAC,CAAA,EAAQ,KAAA;AAErBD,EAAQ,aAAeC,GAAK,WAAW,IAAMC,QAAMD,CAAG,EAAG,EAAE,CACjE,EAtBsB,CAKtB,IAAI,MAAO,CACF,OAAAR,EAAA,gBAAA,CAKT,IAAI,UAAW,CACN,OAAAP,CAAA,CAWX,CAlCEa,EADmBJ,EACZ,WAAWZ,GAClBgB,EAFmBJ,EAEZ,OAAOD,GACdK,EAHmBJ,EAGZ,cAAcL,GACrBS,EAJmBJ,EAIZ,WAAWQ,EAAA"} \ No newline at end of file +{"version":3,"file":"popover.cjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from \"@thednp/shorty\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\n\nimport getTipTemplate from \"../util/getTipTemplate\";\nimport styleTip from \"../util/styleTip\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport Tooltip from \"./tooltip\";\n\nimport type { PopoverOptions /* , PopoverEvent */ } from \"../interface/popover\";\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector =\n `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: \"\",\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","styleTip","target","config","options","btn","focus"],"mappings":"wIAiBMA,EACJ,IAAIC,cAAY,KAAKC,EAAAA,aAAa,iBAAiBA,EAAa,aAAA,KAE5DC,EAAkCC,EAAAA,aAAa,CAAC,EAAGC,kBAAiB,CACxE,SAAUC,iBAAeJ,eAAa,EACtC,QAAS,GACT,YAAa,GACb,SAAU,wDACZ,CAAC,EAMKK,EAAsBC,GAC1BC,cAAqBD,EAASE,EAAAA,gBAAgB,EAK1CC,EAAuBH,GAAyB,IAAII,EAAQJ,CAAO,EAKzE,MAAqBI,UAAgBC,EAAAA,OAAQ,CAC3C,OAAO,SAAWb,EAClB,OAAO,KAAOW,EACd,OAAO,YAAcJ,EACrB,OAAO,SAAWO,EAAA,SAOlB,YAAYC,EAA8BC,EAAkC,CAC1E,MAAMD,EAAQC,CAAM,CAAA,CAKtB,IAAI,MAAO,CACF,OAAAN,EAAA,gBAAA,CAKT,IAAI,UAAW,CACN,OAAAP,CAAA,CAIT,KAAO,IAAM,CACX,MAAM,KAAK,EAEL,KAAA,CAAE,QAAAc,EAAS,IAAAC,CAAA,EAAQ,KAErBD,EAAQ,aAAeC,GAAK,WAAW,IAAMC,QAAMD,CAAG,EAAG,EAAE,CACjE,CACF"} \ No newline at end of file diff --git a/dist/components/popover.d.ts b/dist/components/popover.d.ts index 736b21bc..bdfc97df 100644 --- a/dist/components/popover.d.ts +++ b/dist/components/popover.d.ts @@ -1,131 +1,133 @@ -import PositionObserver$1 from '@thednp/position-observer'; - -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -export interface TooltipOptions extends BaseOptions { - template: string | HTMLElement; - title: string | HTMLElement; - customClass: string; - trigger: string; - placement: "top" | "bottom" | "left" | "right"; - sanitizeFn?: (str: string) => string; - animation: boolean; - delay: number; - content: string | HTMLElement; - dismissible: boolean; - btnClose: string | HTMLElement; -} -declare class Tooltip extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Tooltip; - static getInstance: (element: HTMLElement) => Tooltip | null; - static styleTip: (self: T) => void; - options: TooltipOptions; - btn?: HTMLElement; - tooltip?: HTMLElement; - container: ParentNode; - arrow?: HTMLElement; - offsetParent?: HTMLElement; - enabled: boolean; - id: string; - _observer: PositionObserver$1; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): TooltipOptions; - /** Handles the focus event on iOS. */ - handleFocus: () => void; - /** Shows the tooltip. */ - handleShow: () => void; - show(): void; - /** Hides the tooltip. */ - handleHide: () => void; - hide(): void; - /** Updates the tooltip position. */ - update: () => void; - /** Toggles the tooltip visibility. */ - toggle: () => void; - /** Enables the tooltip. */ - enable(): void; - /** Disables the tooltip. */ - disable(): void; - /** Toggles the `disabled` property. */ - toggleEnabled(): void; - /** - * Handles the `touchstart` event listener for `Tooltip` - * - * @this {Tooltip} - * @param {TouchEvent} e the `Event` object - */ - handleTouch: ({ target }: TouchEvent) => void; - /** - * Toggles on/off the `Tooltip` event listeners. - * - * @param add when `true`, event listeners are added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Tooltip` from the target element. */ - dispose(): void; -} -export interface PopoverOptions extends TooltipOptions { - title: string | HTMLElement; - content: string | HTMLElement; - btnClose: string | HTMLElement; - dismissible: boolean; -} -/** Returns a new `Popover` instance. */ -declare class Popover extends Tooltip { - static selector: string; - static init: (element: HTMLElement) => Popover; - static getInstance: (element: HTMLElement) => Popover | null; - static styleTip: (self: T) => void; - options: PopoverOptions; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): PopoverOptions; - show: () => void; -} - -export { - Popover as default, -}; - -export as namespace Popover; - -export {}; +import { default as default_2 } from '@thednp/position-observer'; + +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +/** Returns a new `Popover` instance. */ +declare class Popover extends Tooltip { + static selector: string; + static init: (element: HTMLElement) => Popover; + static getInstance: (element: HTMLElement) => Popover | null; + static styleTip: (self: T) => void; + options: PopoverOptions; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): PopoverOptions; + show: () => void; +} +export default Popover; + +declare interface PopoverOptions extends TooltipOptions { + title: string | HTMLElement; + content: string | HTMLElement; + btnClose: string | HTMLElement; + dismissible: boolean; +} + +/** Creates a new `Tooltip` instance. */ +declare class Tooltip extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Tooltip; + static getInstance: (element: HTMLElement) => Tooltip | null; + static styleTip: (self: T) => void; + options: TooltipOptions; + btn?: HTMLElement; + tooltip?: HTMLElement; + container: ParentNode; + arrow?: HTMLElement; + offsetParent?: HTMLElement; + enabled: boolean; + id: string; + _observer: default_2; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): TooltipOptions; + /** Handles the focus event on iOS. */ + handleFocus: () => void; + /** Shows the tooltip. */ + handleShow: () => void; + show(): void; + /** Hides the tooltip. */ + handleHide: () => void; + hide(): void; + /** Updates the tooltip position. */ + update: () => void; + /** Toggles the tooltip visibility. */ + toggle: () => void; + /** Enables the tooltip. */ + enable(): void; + /** Disables the tooltip. */ + disable(): void; + /** Toggles the `disabled` property. */ + toggleEnabled(): void; + /** + * Handles the `touchstart` event listener for `Tooltip` + * + * @this {Tooltip} + * @param {TouchEvent} e the `Event` object + */ + handleTouch: ({ target }: TouchEvent) => void; + /** + * Toggles on/off the `Tooltip` event listeners. + * + * @param add when `true`, event listeners are added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Tooltip` from the target element. */ + dispose(): void; +} + +declare interface TooltipOptions extends BaseOptions { + template: string | HTMLElement; + title: string | HTMLElement; + customClass: string; + trigger: string; + placement: "top" | "bottom" | "left" | "right"; + sanitizeFn?: (str: string) => string; + animation: boolean; + delay: number; + content: string | HTMLElement; + dismissible: boolean; + btnClose: string | HTMLElement; +} + +export { } diff --git a/dist/components/popover.mjs b/dist/components/popover.mjs index 5694be82..100cecc1 100644 --- a/dist/components/popover.mjs +++ b/dist/components/popover.mjs @@ -1,45 +1,44 @@ -var p = Object.defineProperty; -var c = (t, s, e) => s in t ? p(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e; -var o = (t, s, e) => c(t, typeof s != "symbol" ? s + "" : s, e); -import { ObjectAssign as r, focus as m, getInstance as u } from "@thednp/shorty"; -import { d as g } from "./dataBsToggle-B84TS15h.mjs"; -import { t as b, g as f, T as d, s as T, p as l, a as i } from "./tooltip-Dyd4Gul9.mjs"; -const C = `[${g}="${i}"],[data-tip="${i}"]`, I = r({}, b, { - template: f(i), +import { O as n, N as i, g as p } from "./base-component-ylZzLp-h.mjs"; +import { d as r } from "./dataBsToggle-B84TS15h.mjs"; +import { T as l, s as c, p as a, a as o, g as m, t as u } from "./tooltip-B5F6ZNW7.mjs"; +const g = `[${r}="${o}"],[data-tip="${o}"]`, b = n({}, u, { + template: m(o), content: "", dismissible: !1, btnClose: '' -}), h = (t) => u(t, l), v = (t) => new a(t); -class a extends d { +}), f = (t) => p(t, a), d = (t) => new T(t); +class T extends l { + static selector = g; + static init = d; + static getInstance = f; + static styleTip = c; /** * @param target the target element * @param config the instance options */ - constructor(e, n) { - super(e, n); - /* extend original `show()` */ - o(this, "show", () => { - super.show(); - const { options: e, btn: n } = this; - // istanbul ignore else @preserve - e.dismissible && n && setTimeout(() => m(n), 17); - }); + constructor(e, s) { + super(e, s); } /** * Returns component name string. */ get name() { - return l; + return a; } /** * Returns component default options. */ get defaults() { - return I; + return b; } + /* extend original `show()` */ + show = () => { + super.show(); + const { options: e, btn: s } = this; + e.dismissible && s && setTimeout(() => i(s), 17); + }; } -o(a, "selector", C), o(a, "init", v), o(a, "getInstance", h), o(a, "styleTip", T); export { - a as default + T as default }; //# sourceMappingURL=popover.mjs.map diff --git a/dist/components/popover.mjs.map b/dist/components/popover.mjs.map index 3aa7e057..d61e9b72 100644 --- a/dist/components/popover.mjs.map +++ b/dist/components/popover.mjs.map @@ -1 +1 @@ -{"version":3,"file":"popover.mjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from \"@thednp/shorty\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\n\nimport getTipTemplate from \"../util/getTipTemplate\";\nimport styleTip from \"../util/styleTip\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport Tooltip from \"./tooltip\";\n\nimport type { PopoverOptions /* , PopoverEvent */ } from \"../interface/popover\";\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector =\n `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: \"\",\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","target","config","__publicField","options","btn","focus","styleTip"],"mappings":";;;;;;AAiBA,MAAMA,IACJ,IAAIC,CAAY,KAAKC,CAAa,iBAAiBA,CAAa,MAE5DC,IAAkCC,EAAa,CAAC,GAAGC,GAAiB;AAAA,EACxE,UAAUC,EAAeJ,CAAa;AAAA,EACtC,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACZ,CAAC,GAMKK,IAAqB,CAACC,MAC1BC,EAAqBD,GAASE,CAAgB,GAK1CC,IAAsB,CAACH,MAAyB,IAAII,EAAQJ,CAAO;AAKzE,MAAqBI,UAAgBC,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAW3C,YAAYC,GAA8BC,GAAkC;AAC1E,UAAMD,GAAQC,CAAM;AAgBtB;AAAA,IAAAC,EAAA,cAAO,MAAM;AACX,YAAM,KAAK;AAEL,YAAA,EAAE,SAAAC,GAAS,KAAAC,EAAA,IAAQ;AAAA,MAAA;AAErB,MAAAD,EAAQ,eAAeC,KAAK,WAAW,MAAMC,EAAMD,CAAG,GAAG,EAAE;AAAA,IACjE;AAAA,EAtBsB;AAAA;AAAA;AAAA;AAAA,EAKtB,IAAI,OAAO;AACF,WAAAR;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,EAKT,IAAI,WAAW;AACN,WAAAP;AAAA,EAAA;AAWX;AAlCEa,EADmBJ,GACZ,YAAWZ,IAClBgB,EAFmBJ,GAEZ,QAAOD,IACdK,EAHmBJ,GAGZ,eAAcL,IACrBS,EAJmBJ,GAIZ,YAAWQ;"} \ No newline at end of file +{"version":3,"file":"popover.mjs","sources":["../../src/components/popover.ts"],"sourcesContent":["/* Native JavaScript for Bootstrap 5 | Popover\n---------------------------------------------- */\nimport { focus, getInstance, ObjectAssign } from \"@thednp/shorty\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\n\nimport getTipTemplate from \"../util/getTipTemplate\";\nimport styleTip from \"../util/styleTip\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport Tooltip from \"./tooltip\";\n\nimport type { PopoverOptions /* , PopoverEvent */ } from \"../interface/popover\";\n\n// POPOVER PRIVATE GC\n// ==================\nconst popoverSelector =\n `[${dataBsToggle}=\"${popoverString}\"],[data-tip=\"${popoverString}\"]`;\n\nconst popoverDefaults: PopoverOptions = ObjectAssign({}, tooltipDefaults, {\n template: getTipTemplate(popoverString),\n content: \"\",\n dismissible: false,\n btnClose: '',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n"],"names":["popoverSelector","dataBsToggle","popoverString","popoverDefaults","ObjectAssign","tooltipDefaults","getTipTemplate","getPopoverInstance","element","getInstance","popoverComponent","popoverInitCallback","Popover","Tooltip","styleTip","target","config","options","btn","focus"],"mappings":";;;AAiBA,MAAMA,IACJ,IAAIC,CAAY,KAAKC,CAAa,iBAAiBA,CAAa,MAE5DC,IAAkCC,EAAa,CAAC,GAAGC,GAAiB;AAAA,EACxE,UAAUC,EAAeJ,CAAa;AAAA,EACtC,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACZ,CAAC,GAMKK,IAAqB,CAACC,MAC1BC,EAAqBD,GAASE,CAAgB,GAK1CC,IAAsB,CAACH,MAAyB,IAAII,EAAQJ,CAAO;AAKzE,MAAqBI,UAAgBC,EAAQ;AAAA,EAC3C,OAAO,WAAWb;AAAA,EAClB,OAAO,OAAOW;AAAA,EACd,OAAO,cAAcJ;AAAA,EACrB,OAAO,WAAWO;AAAA;AAAA;AAAA;AAAA;AAAA,EAOlB,YAAYC,GAA8BC,GAAkC;AAC1E,UAAMD,GAAQC,CAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,EAKtB,IAAI,OAAO;AACF,WAAAN;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,EAKT,IAAI,WAAW;AACN,WAAAP;AAAA,EAAA;AAAA;AAAA,EAIT,OAAO,MAAM;AACX,UAAM,KAAK;AAEL,UAAA,EAAE,SAAAc,GAAS,KAAAC,EAAA,IAAQ;AAErB,IAAAD,EAAQ,eAAeC,KAAK,WAAW,MAAMC,EAAMD,CAAG,GAAG,EAAE;AAAA,EACjE;AACF;"} \ No newline at end of file diff --git a/dist/components/popupContainer-BitC465I.mjs b/dist/components/popupContainer-BitC465I.mjs deleted file mode 100644 index 75432ce4..00000000 --- a/dist/components/popupContainer-BitC465I.mjs +++ /dev/null @@ -1,24 +0,0 @@ -import { createElement as c, isNode as n, getDocumentBody as f } from "@thednp/shorty"; -const B = "modal", i = "offcanvas", e = c({ - tagName: "div", - className: "popup-container" -}), m = (p, o) => { - const s = n(o) && o.nodeName === "BODY", a = n(o) && !s ? o : e, d = s ? o : f(p); - // istanbul ignore else @preserve - n(p) && (a === e && d.append(e), a.append(p)); -}, v = (p, o) => { - const s = n(o) && o.nodeName === "BODY", a = n(o) && !s ? o : e; - // istanbul ignore else @preserve - n(p) && (p.remove(), a === e && !e.children.length && e.remove()); -}, N = (p, o) => { - const s = n(o) && o.nodeName !== "BODY" ? o : e; - return n(p) && s.contains(p); -}; -export { - m as a, - N as h, - B as m, - i as o, - v as r -}; -//# sourceMappingURL=popupContainer-BitC465I.mjs.map diff --git a/dist/components/popupContainer-D8In9VFi.js b/dist/components/popupContainer-D8In9VFi.js new file mode 100644 index 00000000..2ebe8510 --- /dev/null +++ b/dist/components/popupContainer-D8In9VFi.js @@ -0,0 +1,2 @@ +"use strict";const e=require("./base-component-D3rSrWwH.js"),c="modal",i="offcanvas",n=e.createElement({tagName:"div",className:"popup-container"}),N=(p,o)=>{const s=e.isNode(o)&&o.nodeName==="BODY",d=e.isNode(o)&&!s?o:n,a=s?o:e.getDocumentBody(p);e.isNode(p)&&(d===n&&a.append(n),d.append(p))},f=(p,o)=>{const s=e.isNode(o)&&o.nodeName==="BODY",d=e.isNode(o)&&!s?o:n;e.isNode(p)&&(p.remove(),d===n&&!n.children.length&&n.remove())},l=(p,o)=>{const s=e.isNode(o)&&o.nodeName!=="BODY"?o:n;return e.isNode(p)&&s.contains(p)};exports.appendPopup=N;exports.hasPopup=l;exports.modalString=c;exports.offcanvasString=i;exports.removePopup=f; +//# sourceMappingURL=popupContainer-D8In9VFi.js.map diff --git a/dist/components/popupContainer-DIlSFkzD.js.map b/dist/components/popupContainer-D8In9VFi.js.map similarity index 77% rename from dist/components/popupContainer-DIlSFkzD.js.map rename to dist/components/popupContainer-D8In9VFi.js.map index 810fff32..72f177da 100644 --- a/dist/components/popupContainer-DIlSFkzD.js.map +++ b/dist/components/popupContainer-D8In9VFi.js.map @@ -1 +1 @@ -{"version":3,"file":"popupContainer-DIlSFkzD.js","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":"+CACMA,EAAc,QCAdC,EAAkB,YCElBC,EAAiBC,EAAAA,cAAc,CACnC,QAAS,MACT,UAAW,iBACb,CAAC,EAEKC,EAAc,CAACC,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAC5CA,EAAgB,WAAa,OACzBG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EACvCD,EACAJ,EACEQ,EAAOH,EAAkBD,EAAkBK,EAAAA,gBAAgBN,CAAM,EAAA;AAGnEG,EAAAA,OAAOH,CAAM,IACXI,IAAWP,GACbQ,EAAK,OAAOR,CAAc,EAE5BO,EAAO,OAAOJ,CAAM,EAExB,EAEMO,EAAc,CAACP,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAC5CA,EAAgB,WAAa,OACzBG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EACvCD,EACAJ,EAAA;AAGAM,EAAAA,OAAOH,CAAM,IACfA,EAAO,OAAO,EAEVI,IAAWP,GAAkB,CAACA,EAAe,SAAS,QACxDA,EAAe,OAAO,EAG5B,EAEMW,EAAW,CAACR,EAAqBC,IAAiC,CACtE,MAAMG,EAASD,EAAO,OAAAF,CAAe,GAAKA,EAAgB,WAAa,OACnEA,EACAJ,EACJ,OAAOM,EAAO,OAAAH,CAAM,GAAKI,EAAO,SAASJ,CAAM,CACjD"} \ No newline at end of file +{"version":3,"file":"popupContainer-D8In9VFi.js","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":"6DACMA,EAAc,QCAdC,EAAkB,YCElBC,EAAiBC,EAAAA,cAAc,CACnC,QAAS,MACT,UAAW,iBACb,CAAC,EAEKC,EAAc,CAACC,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAC5CA,EAAgB,WAAa,OACzBG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EACvCD,EACAJ,EACEQ,EAAOH,EAAkBD,EAAkBK,EAAAA,gBAAgBN,CAAM,EAGnEG,EAAAA,OAAOH,CAAM,IACXI,IAAWP,GACbQ,EAAK,OAAOR,CAAc,EAE5BO,EAAO,OAAOJ,CAAM,EAExB,EAEMO,EAAc,CAACP,EAAqBC,IAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAOF,CAAe,GAC5CA,EAAgB,WAAa,OACzBG,EAASD,EAAAA,OAAOF,CAAe,GAAK,CAACC,EACvCD,EACAJ,EAGAM,EAAAA,OAAOH,CAAM,IACfA,EAAO,OAAO,EAEVI,IAAWP,GAAkB,CAACA,EAAe,SAAS,QACxDA,EAAe,OAAO,EAG5B,EAEMW,EAAW,CAACR,EAAqBC,IAAiC,CACtE,MAAMG,EAASD,EAAO,OAAAF,CAAe,GAAKA,EAAgB,WAAa,OACnEA,EACAJ,EACJ,OAAOM,EAAO,OAAAH,CAAM,GAAKI,EAAO,SAASJ,CAAM,CACjD"} \ No newline at end of file diff --git a/dist/components/popupContainer-DIlSFkzD.js b/dist/components/popupContainer-DIlSFkzD.js deleted file mode 100644 index 6145acc1..00000000 --- a/dist/components/popupContainer-DIlSFkzD.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict";const e=require("@thednp/shorty"),i="modal",a="offcanvas",s=e.createElement({tagName:"div",className:"popup-container"}),N=(p,o)=>{const n=e.isNode(o)&&o.nodeName==="BODY",d=e.isNode(o)&&!n?o:s,c=n?o:e.getDocumentBody(p);// istanbul ignore else @preserve -e.isNode(p)&&(d===s&&c.append(s),d.append(p))},f=(p,o)=>{const n=e.isNode(o)&&o.nodeName==="BODY",d=e.isNode(o)&&!n?o:s;// istanbul ignore else @preserve -e.isNode(p)&&(p.remove(),d===s&&!s.children.length&&s.remove())},l=(p,o)=>{const n=e.isNode(o)&&o.nodeName!=="BODY"?o:s;return e.isNode(p)&&n.contains(p)};exports.appendPopup=N;exports.hasPopup=l;exports.modalString=i;exports.offcanvasString=a;exports.removePopup=f; -//# sourceMappingURL=popupContainer-DIlSFkzD.js.map diff --git a/dist/components/popupContainer-ymf2oGcv.mjs b/dist/components/popupContainer-ymf2oGcv.mjs new file mode 100644 index 00000000..27c6b741 --- /dev/null +++ b/dist/components/popupContainer-ymf2oGcv.mjs @@ -0,0 +1,22 @@ +import { a3 as d, ac as s, _ as f } from "./base-component-ylZzLp-h.mjs"; +const B = "modal", i = "offcanvas", a = d({ + tagName: "div", + className: "popup-container" +}), m = (p, o) => { + const e = s(o) && o.nodeName === "BODY", n = s(o) && !e ? o : a, c = e ? o : f(p); + s(p) && (n === a && c.append(a), n.append(p)); +}, v = (p, o) => { + const e = s(o) && o.nodeName === "BODY", n = s(o) && !e ? o : a; + s(p) && (p.remove(), n === a && !a.children.length && a.remove()); +}, N = (p, o) => { + const e = s(o) && o.nodeName !== "BODY" ? o : a; + return s(p) && e.contains(p); +}; +export { + m as a, + N as h, + B as m, + i as o, + v as r +}; +//# sourceMappingURL=popupContainer-ymf2oGcv.mjs.map diff --git a/dist/components/popupContainer-BitC465I.mjs.map b/dist/components/popupContainer-ymf2oGcv.mjs.map similarity index 80% rename from dist/components/popupContainer-BitC465I.mjs.map rename to dist/components/popupContainer-ymf2oGcv.mjs.map index cf93762d..a78157e7 100644 --- a/dist/components/popupContainer-BitC465I.mjs.map +++ b/dist/components/popupContainer-ymf2oGcv.mjs.map @@ -1 +1 @@ -{"version":3,"file":"popupContainer-BitC465I.mjs","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":";AACA,MAAMA,IAAc,SCAdC,IAAkB,aCElBC,IAAiBC,EAAc;AAAA,EACnC,SAAS;AAAA,EACT,WAAW;AACb,CAAC,GAEKC,IAAc,CAACC,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAC5CA,EAAgB,aAAa,QACzBG,IAASD,EAAOF,CAAe,KAAK,CAACC,IACvCD,IACAJ,GACEQ,IAAOH,IAAkBD,IAAkBK,EAAgBN,CAAM;AAAA,EAAA;AAGnE,EAAAG,EAAOH,CAAM,MACXI,MAAWP,KACbQ,EAAK,OAAOR,CAAc,GAE5BO,EAAO,OAAOJ,CAAM;AAExB,GAEMO,IAAc,CAACP,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAC5CA,EAAgB,aAAa,QACzBG,IAASD,EAAOF,CAAe,KAAK,CAACC,IACvCD,IACAJ;AAAA,EAAA;AAGA,EAAAM,EAAOH,CAAM,MACfA,EAAO,OAAO,GAEVI,MAAWP,KAAkB,CAACA,EAAe,SAAS,UACxDA,EAAe,OAAO;AAG5B,GAEMW,IAAW,CAACR,GAAqBC,MAAiC;AACtE,QAAMG,IAASD,EAAOF,CAAe,KAAKA,EAAgB,aAAa,SACnEA,IACAJ;AACJ,SAAOM,EAAOH,CAAM,KAAKI,EAAO,SAASJ,CAAM;AACjD;"} \ No newline at end of file +{"version":3,"file":"popupContainer-ymf2oGcv.mjs","sources":["../../src/strings/modalString.ts","../../src/strings/offcanvasString.ts","../../src/util/popupContainer.ts"],"sourcesContent":["/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: HTMLElement, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n"],"names":["modalString","offcanvasString","popupContainer","createElement","appendPopup","target","customContainer","containerIsBody","isNode","lookup","BODY","getDocumentBody","removePopup","hasPopup"],"mappings":";AACA,MAAMA,IAAc,SCAdC,IAAkB,aCElBC,IAAiBC,EAAc;AAAA,EACnC,SAAS;AAAA,EACT,WAAW;AACb,CAAC,GAEKC,IAAc,CAACC,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAC5CA,EAAgB,aAAa,QACzBG,IAASD,EAAOF,CAAe,KAAK,CAACC,IACvCD,IACAJ,GACEQ,IAAOH,IAAkBD,IAAkBK,EAAgBN,CAAM;AAGnE,EAAAG,EAAOH,CAAM,MACXI,MAAWP,KACbQ,EAAK,OAAOR,CAAc,GAE5BO,EAAO,OAAOJ,CAAM;AAExB,GAEMO,IAAc,CAACP,GAAqBC,MAAiC;AACzE,QAAMC,IAAkBC,EAAOF,CAAe,KAC5CA,EAAgB,aAAa,QACzBG,IAASD,EAAOF,CAAe,KAAK,CAACC,IACvCD,IACAJ;AAGA,EAAAM,EAAOH,CAAM,MACfA,EAAO,OAAO,GAEVI,MAAWP,KAAkB,CAACA,EAAe,SAAS,UACxDA,EAAe,OAAO;AAG5B,GAEMW,IAAW,CAACR,GAAqBC,MAAiC;AACtE,QAAMG,IAASD,EAAOF,CAAe,KAAKA,EAAgB,aAAa,SACnEA,IACAJ;AACJ,SAAOM,EAAOH,CAAM,KAAKI,EAAO,SAASJ,CAAM;AACjD;"} \ No newline at end of file diff --git a/dist/components/scrollspy.cjs b/dist/components/scrollspy.cjs index 33df8fbc..b792fa57 100644 --- a/dist/components/scrollspy.cjs +++ b/dist/components/scrollspy.cjs @@ -1,9 +1,2 @@ -"use strict";var S=Object.defineProperty;var L=(t,s,o)=>s in t?S(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o;var g=(t,s,o)=>L(t,typeof s!="symbol"?s+"":s,o);const e=require("@thednp/shorty"),D=require("./index-C8qIpGHG.js"),f=require("./activeClass-CxJYQAGN.js"),_=require("./base-component-DBcDoOjV.js"),q="scrollspy",T="ScrollSpy",A='[data-bs-spy="scroll"]',B={offset:10,target:null},w=t=>e.getInstance(t,T),x=t=>new v(t),y=e.createCustomEvent(`activate.bs.${q}`),M=t=>{const{target:s,scrollTarget:o,options:r,itemsLength:i,scrollHeight:n,element:a}=t,{offset:c}=r,h=o!==a,l=s&&e.getElementsByTagName("A",s),m=e.getDocument(a),d=o?b(o):n;t.scrollTop=o.scrollTop;// istanbul ignore else @preserve -if(l&&(d!==n||i!==l.length)){let p,u,C;t.items=[],t.targets=[],t.offsets=[],t.scrollHeight=d,t.maxScroll=t.scrollHeight-k(t),Array.from(l).forEach(E=>{p=e.getAttribute(E,"href"),u=p&&p.charAt(0)==="#"&&p.slice(-1)!=="#"&&e.querySelector(p,m),u&&(t.items.push(E),t.targets.push(u),C=e.getBoundingClientRect(u),t.offsets.push((h?C.top+t.scrollTop:u.offsetTop)-c))}),t.itemsLength=t.items.length}},b=t=>e.isHTMLElement(t)?t.scrollHeight:e.getDocumentElement(t).scrollHeight,k=({element:t,scrollTarget:s})=>s!==t?s.clientHeight:e.getBoundingClientRect(t).height,I=t=>{[...e.getElementsByTagName("A",t)].forEach(s=>{e.hasClass(s,f.activeClass)&&e.removeClass(s,f.activeClass)})},H=(t,s)=>{const{target:o,element:r}=t;// istanbul ignore else @preserve -e.isHTMLElement(o)&&I(o),t.activeItem=s,e.addClass(s,f.activeClass);const i=[];let n=s;for(;n!==e.getDocumentBody(r);)n=n.parentElement,(e.hasClass(n,"nav")||e.hasClass(n,"dropdown-menu"))&&i.push(n);i.forEach(a=>{const c=a.previousElementSibling;// istanbul ignore else @preserve -c&&!e.hasClass(c,f.activeClass)&&e.addClass(c,f.activeClass)}),y.relatedTarget=s,e.dispatchEvent(r,y)};class v extends _.BaseComponent{constructor(o,r){super(o,r);g(this,"refresh",()=>{const{target:o}=this;// istanbul ignore else @preserve -if(e.isHTMLElement(o)&&o.offsetHeight>0){M(this);const{scrollTop:r,maxScroll:i,itemsLength:n,items:a,activeItem:c}=this;if(r>=i){const l=a[n-1];// istanbul ignore else @preserve -c!==l&&H(this,l);return}const{offsets:h}=this;// istanbul ignore else @preserve -if(c&&r0){this.activeItem=null;// istanbul ignore else @preserve -o&&I(o);return}a.forEach((l,m)=>{c!==l&&r>=h[m]&&(typeof h[m+1]>"u"||r{o?this.scrollTarget===this.element?this.targets.forEach(r=>this._observer.observe(r)):this._observer.observe(this.element):this._observer.disconnect()});const{element:i,options:n}=this;this.target=e.querySelector(n.target,e.getDocument(i)),this.target&&(this.scrollTarget=i.clientHeightthis.refresh(),{root:this.scrollTarget}),this._toggleEventListeners(!0))}get name(){return T}get defaults(){return B}dispose(){this._toggleEventListeners(),super.dispose()}}g(v,"selector",A),g(v,"init",x),g(v,"getInstance",w);module.exports=v; +"use strict";const s=require("./base-component-D3rSrWwH.js"),I=require("./index-BRPRSfaI.js"),u=require("./activeClass-CxJYQAGN.js"),b="scrollspy",S="ScrollSpy",x='[data-bs-spy="scroll"]',A={offset:10,target:null},B=t=>s.getInstance(t,S),L=t=>new E(t),v=s.createCustomEvent(`activate.bs.${b}`),q=t=>{const{target:e,scrollTarget:o,options:c,itemsLength:l,scrollHeight:r,element:i}=t,{offset:n}=c,a=o!==i,h=e&&s.getElementsByTagName("A",e),T=s.getDocument(i),m=o.scrollHeight;if(t.scrollTop=o.scrollTop,h&&(m!==r||l!==h.length)){let g,p,f;t.items=[],t.targets=[],t.offsets=[],t.scrollHeight=m,t.maxScroll=t.scrollHeight-D(t),Array.from(h).forEach(d=>{g=s.getAttribute(d,"href"),p=g&&g.charAt(0)==="#"&&g.slice(-1)!=="#"&&s.querySelector(g,T),p&&(t.items.push(d),t.targets.push(p),f=s.getBoundingClientRect(p),t.offsets.push((a?f.top+t.scrollTop:p.offsetTop)-n))}),t.itemsLength=t.items.length}},C=({targets:t,scrollTarget:e,element:o,_observer:c},l)=>{l?e===o?t.forEach(r=>c.observe(r)):c.observe(o):c.disconnect()},w=t=>t.scrollHeight,D=({element:t,scrollTarget:e})=>e!==t?e.clientHeight:s.getBoundingClientRect(t).height,H=t=>{[...s.getElementsByTagName("A",t)].forEach(e=>{s.hasClass(e,u.activeClass)&&s.removeClass(e,u.activeClass)})},y=(t,e)=>{const{target:o,element:c}=t;s.isHTMLElement(o)&&H(o),t.activeItem=e,s.addClass(e,u.activeClass);const l=[];let r=e;for(;r!==s.getDocumentBody(c);)r=r.parentElement,(s.hasClass(r,"nav")||s.hasClass(r,"dropdown-menu"))&&l.push(r);l.forEach(i=>{const n=i.previousElementSibling;n&&!s.hasClass(n,u.activeClass)&&s.addClass(n,u.activeClass)}),v.relatedTarget=e,s.dispatchEvent(c,v)};class E extends s.BaseComponent{static selector=x;static init=L;static getInstance=B;constructor(e,o){super(e,o);const{element:c,options:l}=this;this.target=s.querySelector(l.target,s.getDocument(c)),this.target&&(this.scrollTarget=c.clientHeightthis.refresh(),{root:this.scrollTarget}),C(this,!0))}get name(){return S}get defaults(){return A}refresh=()=>{const{target:e}=this;if(s.isHTMLElement(e)&&e.offsetHeight>0){q(this);const{scrollTop:o,maxScroll:c,itemsLength:l,items:r,activeItem:i}=this;if(o>=c){const a=r[l-1];i!==a&&y(this,a);return}const{offsets:n}=this;if(i&&o0){this.activeItem=null,e&&H(e);return}r.forEach((a,h)=>{i!==a&&o>=n[h]&&(typeof n[h+1]>"u"||o\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n this._toggleEventListeners(true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n if (add) {\n if (this.scrollTarget === this.element) {\n this.targets.forEach((targetItem) =>\n this._observer.observe(targetItem)\n );\n } else {\n this._observer.observe(this.element);\n }\n } else this._observer.disconnect();\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isWin","links","getElementsByTagName","doc","getDocument","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getBoundingClientRect","isHTMLElement","getDocumentElement","clear","item","hasClass","activeClass","removeClass","activate","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","__publicField","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","add","PositionObserver"],"mappings":"qUACMA,EAAkB,YCAlBC,EAAqB,YC6BrBC,EAAoB,yBAEpBC,EAAsC,CAC1C,OAAQ,GACR,OAAQ,IACV,EAUMC,EAAwBC,GAC5BC,cAAuBD,EAASJ,CAAkB,EAK9CM,EAAyBF,GAAyB,IAAIG,EAAUH,CAAO,EAIvEI,EAAoBC,EAAAA,kBAGxB,eAAeV,CAAe,EAAE,EAS5BW,EAAoBC,GAAoB,CAC5C,KAAM,CAAE,OAAAC,EAAQ,aAA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ponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isRoot = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget.scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isRoot ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Toggles on/off the component observer.\n *\n * @param self the ScrollSpy instance\n * @param add when `true`, listener is added\n */\nconst toggleObservers = (\n { targets, scrollTarget, element, _observer }: ScrollSpy,\n add?: boolean,\n) => {\n if (add) {\n if (scrollTarget === element) {\n targets.forEach((targetItem) => _observer.observe(targetItem));\n } else {\n _observer.observe(element);\n }\n } else _observer.disconnect();\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: HTMLElement) => {\n return scrollTarget.scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n toggleObservers(this, true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n const clone = { ...this };\n toggleObservers(clone);\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isRoot","links","getElementsByTagName","doc","getDocument","scrollHEIGHT","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getBoundingClientRect","toggleObservers","targets","_observer","add","getScrollHeight","clear","item","hasClass","activeClass","removeClass","activate","isHTMLElement","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","getDocumentElement","PositionObserver","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","clone"],"mappings":"qIACMA,EAAkB,YCAlBC,EAAqB,YC6BrBC,EAAoB,yBAEpBC,EAAsC,CAC1C,OAAQ,GACR,OAAQ,IACV,EAUMC,EAAwBC,GAC5BC,cAAuBD,EAASJ,CAAkB,EAK9CM,EAAyBF,GAAyB,IAAIG,EAAUH,CAAO,EAIvEI,EAAoBC,EAAAA,kBAGxB,eAAeV,CAAe,EAAE,EAS5BW,EAAoBC,GAAoB,CAC5C,KAAM,CAAE,OAAAC,EAAQ,aAAAC,EAAc,QAAAC,EAAS,YAAAC,EAAa,aAAAC,EAAc,QAAAZ,GAChEO,EACI,CAAE,OAAAM,GAAWH,EACbI,EAASL,IAAiBT,EAE1Be,EAAQP,GAAUQ,uBAAqB,IAAKR,CAAM,EAClDS,EAAMC,cAAYlB,CAAO,EACzBmB,EAAeV,EAAa,aAMlC,GAJAF,EAAK,UAAYE,EAAa,UAK5BM,IAAUI,IAAiBP,GAAgBD,IAAgBI,EAAM,QACjE,CACI,IAAAK,EACAC,EACAC,EAGJf,EAAK,MAAQ,CAAC,EACdA,EAAK,QAAU,CAAC,EAChBA,EAAK,QAAU,CAAC,EAChBA,EAAK,aAAeY,EACpBZ,EAAK,UAAYA,EAAK,aAAegB,EAAgBhB,CAAI,EAEzD,MAAM,KAAKQ,CAAK,EAAE,QAASS,GAAS,CAC3BJ,EAAAK,EAAAA,aAAaD,EAAM,MAAM,EAChCH,EAAaD,GAAQA,EAAK,OAAO,CAAC,IAAM,KAAOA,EAAK,MAAM,EAAE,IAAM,KAChEM,EAAAA,cAAcN,EAAMH,CAAG,EAErBI,IACGd,EAAA,MAAM,KAAKiB,CAAI,EACfjB,EAAA,QAAQ,KAAKc,CAAU,EAC5BC,EAAOK,wBAAsBN,CAAU,EACvCd,EAAK,QAAQ,MACVO,EAASQ,E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ACrB,OAAOD,EAAQC,EAAI,CAAC,EAAM,KAAeN,EAAYK,EAAQC,EAAI,CAAC,IAEnEnB,EAAS,KAAMJ,CAAI,CACrB,CACD,CAAA,CAEL,EAGA,SAAU,CACF,MAAAwB,EAAQ,CAAE,GAAG,IAAK,EACxB9B,EAAgB8B,CAAK,EACrB,MAAM,QAAQ,CAAA,CAElB"} \ No newline at end of file diff --git a/dist/components/scrollspy.d.ts b/dist/components/scrollspy.d.ts index a96c6d1f..6be97b7a 100644 --- a/dist/components/scrollspy.d.ts +++ b/dist/components/scrollspy.d.ts @@ -1,74 +1,67 @@ -import PositionObserver$1 from '@thednp/position-observer'; - -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -export interface ScrollSpyOptions extends BaseOptions { - offset: number; - target: HTMLElement | string | null; -} -/** Returns a new `ScrollSpy` instance. */ -declare class ScrollSpy extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => ScrollSpy; - static getInstance: (element: HTMLElement) => ScrollSpy | null; - options: ScrollSpyOptions; - target: HTMLElement | null; - scrollTarget: HTMLElement; - scrollTop: number; - maxScroll: number; - scrollHeight: number; - activeItem: HTMLElement | null; - items: HTMLElement[]; - targets: HTMLElement[]; - itemsLength: number; - offsets: number[]; - _observer: PositionObserver$1; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): ScrollSpyOptions; - /** Updates all items. */ - refresh: () => void; - /** - * Toggles on/off the component event listener. - * - * @param add when `true`, listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes `ScrollSpy` from the target element. */ - dispose(): void; -} - -export { - ScrollSpy as default, -}; - -export as namespace ScrollSpy; - -export {}; +import { default as default_2 } from '@thednp/position-observer'; + +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +/** Returns a new `ScrollSpy` instance. */ +declare class ScrollSpy extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => ScrollSpy; + static getInstance: (element: HTMLElement) => ScrollSpy | null; + options: ScrollSpyOptions; + target: HTMLElement | null; + scrollTarget: HTMLElement; + scrollTop: number; + maxScroll: number; + scrollHeight: number; + activeItem: HTMLElement | null; + items: HTMLElement[]; + targets: HTMLElement[]; + itemsLength: number; + offsets: number[]; + _observer: default_2; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): ScrollSpyOptions; + /** Updates all items. */ + refresh: () => void; + /** Removes `ScrollSpy` from the target element. */ + dispose(): void; +} +export default ScrollSpy; + +declare interface ScrollSpyOptions extends BaseOptions { + offset: number; + target: HTMLElement | string | null; +} + +export { } diff --git a/dist/components/scrollspy.mjs b/dist/components/scrollspy.mjs index 94faae4b..83a4789c 100644 --- a/dist/components/scrollspy.mjs +++ b/dist/components/scrollspy.mjs @@ -1,117 +1,99 @@ -var x = Object.defineProperty; -var k = (t, e, s) => e in t ? x(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s; -var h = (t, e, s) => k(t, typeof e != "symbol" ? e + "" : e, s); -import { createCustomEvent as q, querySelector as S, getDocument as C, getDocumentElement as L, isHTMLElement as d, getInstance as G, getElementsByTagName as _, getAttribute as M, getBoundingClientRect as A, hasClass as u, removeClass as N, addClass as T, getDocumentBody as O, dispatchEvent as R } from "@thednp/shorty"; -import { D as W } from "./index-CmM9Kopf.mjs"; -import { a as f } from "./activeClass-iqaD75Su.mjs"; -import { B as $ } from "./base-component-DHbs0JQk.mjs"; -const j = "scrollspy", w = "ScrollSpy", z = '[data-bs-spy="scroll"]', F = { +import { B, q as E, l as T, Q as L, u as I, g as D, c as R, a4 as C, b as k, R as b, h as f, r as q, f as y, _ as O, d as G } from "./base-component-ylZzLp-h.mjs"; +import { x as M } from "./index-gZuXW-3_.mjs"; +import { a as p } from "./activeClass-iqaD75Su.mjs"; +const N = "scrollspy", A = "ScrollSpy", Q = '[data-bs-spy="scroll"]', $ = { offset: 10, target: null -}, J = (t) => G(t, w), K = (t) => new v(t), b = q(`activate.bs.${j}`), P = (t) => { - const { target: e, scrollTarget: s, options: o, itemsLength: n, scrollHeight: r, element: l } = t, { offset: i } = o, a = s !== l, c = e && _("A", e), g = C(l), E = s ? B(s) : r; - t.scrollTop = s.scrollTop; - // istanbul ignore else @preserve - if (c && (E !== r || n !== c.length)) { - let p, m, H; - t.items = [], t.targets = [], t.offsets = [], t.scrollHeight = E, t.maxScroll = t.scrollHeight - Q(t), Array.from(c).forEach((y) => { - p = M(y, "href"), m = p && p.charAt(0) === "#" && p.slice(-1) !== "#" && S(p, g), m && (t.items.push(y), t.targets.push(m), H = A(m), t.offsets.push( - (a ? H.top + t.scrollTop : m.offsetTop) - i +}, j = (t) => D(t, A), z = (t) => new P(t), S = R(`activate.bs.${N}`), F = (t) => { + const { target: e, scrollTarget: s, options: o, itemsLength: n, scrollHeight: r, element: a } = t, { offset: c } = o, i = s !== a, l = e && C("A", e), x = T(a), m = s.scrollHeight; + if (t.scrollTop = s.scrollTop, l && (m !== r || n !== l.length)) { + let h, g, u; + t.items = [], t.targets = [], t.offsets = [], t.scrollHeight = m, t.maxScroll = t.scrollHeight - K(t), Array.from(l).forEach((d) => { + h = k(d, "href"), g = h && h.charAt(0) === "#" && h.slice(-1) !== "#" && E(h, x), g && (t.items.push(d), t.targets.push(g), u = b(g), t.offsets.push( + (i ? u.top + t.scrollTop : g.offsetTop) - c )); }), t.itemsLength = t.items.length; } -}, B = (t) => d(t) ? t.scrollHeight : L(t).scrollHeight, Q = ({ element: t, scrollTarget: e }) => e !== t ? e.clientHeight : A(t).height, D = (t) => { - [..._("A", t)].forEach((e) => { - u(e, f) && N(e, f); +}, v = ({ targets: t, scrollTarget: e, element: s, _observer: o }, n) => { + n ? e === s ? t.forEach((r) => o.observe(r)) : o.observe(s) : o.disconnect(); +}, J = (t) => t.scrollHeight, K = ({ element: t, scrollTarget: e }) => e !== t ? e.clientHeight : b(t).height, w = (t) => { + [...C("A", t)].forEach((e) => { + f(e, p) && q(e, p); }); -}, I = (t, e) => { +}, H = (t, e) => { const { target: s, element: o } = t; - // istanbul ignore else @preserve - d(s) && D(s), t.activeItem = e, T(e, f); + I(s) && w(s), t.activeItem = e, y(e, p); const n = []; let r = e; for (; r !== O(o); ) - r = r.parentElement, (u(r, "nav") || u(r, "dropdown-menu")) && n.push(r); - n.forEach((l) => { - const i = l.previousElementSibling; - // istanbul ignore else @preserve - i && !u(i, f) && T(i, f); - }), b.relatedTarget = e, R(o, b); + r = r.parentElement, (f(r, "nav") || f(r, "dropdown-menu")) && n.push(r); + n.forEach((a) => { + const c = a.previousElementSibling; + c && !f(c, p) && y(c, p); + }), S.relatedTarget = e, G(o, S); }; -class v extends $ { +class P extends B { + static selector = Q; + static init = z; + static getInstance = j; /** * @param target the target element * @param config the instance options */ - constructor(s, o) { - super(s, o); - /* eslint-enable */ - // SCROLLSPY PUBLIC METHODS - // ======================== - /** Updates all items. */ - h(this, "refresh", () => { - const { target: s } = this; - // istanbul ignore else @preserve - if (d(s) && s.offsetHeight > 0) { - P(this); - const { scrollTop: o, maxScroll: n, itemsLength: r, items: l, activeItem: i } = this; - if (o >= n) { - const c = l[r - 1]; - // istanbul ignore else @preserve - i !== c && I(this, c); - return; - } - const { offsets: a } = this; - // istanbul ignore else @preserve - if (i && o < a[0] && a[0] > 0) { - this.activeItem = null; - // istanbul ignore else @preserve - s && D(s); - return; - } - l.forEach((c, g) => { - i !== c && o >= a[g] && (typeof a[g + 1] > "u" || o < a[g + 1]) && I(this, c); - }); - } - }); - /** - * Toggles on/off the component event listener. - * - * @param add when `true`, listener is added - */ - h(this, "_toggleEventListeners", (s) => { - s ? this.scrollTarget === this.element ? this.targets.forEach( - (o) => this._observer.observe(o) - ) : this._observer.observe(this.element) : this._observer.disconnect(); - }); - const { element: n, options: r } = this; - this.target = S( - r.target, - C(n) - ), this.target && (this.scrollTarget = n.clientHeight < n.scrollHeight ? n : L(n), this.scrollHeight = B(this.scrollTarget), this.refresh(), this._observer = new W(() => this.refresh(), { + constructor(e, s) { + super(e, s); + const { element: o, options: n } = this; + this.target = E( + n.target, + T(o) + ), this.target && (this.scrollTarget = o.clientHeight < o.scrollHeight ? o : L(o), this.scrollHeight = J(this.scrollTarget), this.refresh(), this._observer = new M(() => this.refresh(), { root: this.scrollTarget - }), this._toggleEventListeners(!0)); + }), v(this, !0)); } /* eslint-disable */ /** * Returns component name string. */ get name() { - return w; + return A; } /** * Returns component default options. */ get defaults() { - return F; + return $; } + /* eslint-enable */ + // SCROLLSPY PUBLIC METHODS + // ======================== + /** Updates all items. */ + refresh = () => { + const { target: e } = this; + if (I(e) && e.offsetHeight > 0) { + F(this); + const { scrollTop: s, maxScroll: o, itemsLength: n, items: r, activeItem: a } = this; + if (s >= o) { + const i = r[n - 1]; + a !== i && H(this, i); + return; + } + const { offsets: c } = this; + if (a && s < c[0] && c[0] > 0) { + this.activeItem = null, e && w(e); + return; + } + r.forEach((i, l) => { + a !== i && s >= c[l] && (typeof c[l + 1] > "u" || s < c[l + 1]) && H(this, i); + }); + } + }; /** Removes `ScrollSpy` from the target element. */ dispose() { - this._toggleEventListeners(), super.dispose(); + const e = { ...this }; + v(e), super.dispose(); } } -h(v, "selector", z), h(v, "init", K), h(v, "getInstance", J); export { - v as default + P as default }; //# sourceMappingURL=scrollspy.mjs.map diff --git a/dist/components/scrollspy.mjs.map b/dist/components/scrollspy.mjs.map index 4f5c4be9..3987c188 100644 --- a/dist/components/scrollspy.mjs.map +++ b/dist/components/scrollspy.mjs.map @@ -1 +1 @@ -{"version":3,"file":"scrollspy.mjs","sources":["../../src/strings/scrollspyString.ts","../../src/strings/scrollspyComponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n this._toggleEventListeners(true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n if (add) {\n if (this.scrollTarget === this.element) {\n this.targets.forEach((targetItem) =>\n this._observer.observe(targetItem)\n );\n } else {\n this._observer.observe(this.element);\n }\n } else this._observer.disconnect();\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isWin","links","getElementsByTagName","doc","getDocument","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getBoundingClientRect","isHTMLElement","getDocumentElement","clear","item","hasClass","activeClass","removeClass","activate","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","__publicField","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","add","PositionObserver"],"mappings":";;;;;;;AACA,MAAMA,IAAkB,aCAlBC,IAAqB,aC6BrBC,IAAoB,0BAEpBC,IAAsC;AAAA,EAC1C,QAAQ;AAAA,EACR,QAAQ;AACV,GAUMC,IAAuB,CAACC,MAC5BC,EAAuBD,GAASJ,CAAkB,GAK9CM,IAAwB,CAACF,MAAyB,IAAIG,EAAUH,CAAO,GAIvEI,IAAoBC,EAGxB,eAAeV,CAAe,EAAE,GAS5BW,IAAmB,CAACC,MAAoB;AAC5C,QAAM,EAAE,QAAAC,GAAQ,cAAAC,GAAc,SAAAC,GAAS,aAAAC,GAAa,cAAAC,GAAc,SAAAZ,MAChEO,GACI,EAAE,QAAAM,MAAWH,GACbI,IAAQL,MAAiBT,GAEzBe,IAAQP,KAAUQ,EAAqB,KAAKR,CAAM,GAClDS,IAAMC,EAAYlB,CAAO,GACzBmB,IAAeV,IACjBW,EAAgBX,CAAY,IAE5BG;AAEJ,EAAAL,EAAK,YAAYE,EAAa;AAAA,EAAA;AAI9B,MACEM,MAAUI,MAAiBP,KAAgBD,MAAgBI,EAAM,SACjE;AACI,QAAAM,GACAC,GACAC;AAGJ,IAAAhB,EAAK,QAAQ,CAAC,GACdA,EAAK,UAAU,CAAC,GAChBA,EAAK,UAAU,CAAC,GAChBA,EAAK,eAAeY,GACpBZ,EAAK,YAAYA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,IAEL;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAc,EAAA,+BAAwB,CAACQ,MAAkB;AACzC,MAAIA,IACE,KAAK,iBAAiB,KAAK,UAC7B,KAAK,QAAQ;AAAA,QAAQ,CAAChC,MACpB,KAAK,UAAU,QAAQA,CAAU;AAAA,MACnC,IAEK,KAAA,UAAU,QAAQ,KAAK,OAAO,IAE3B,KAAA,UAAU,WAAW;AAAA,IACnC;AAxGQ,UAAA,EAAE,SAAAtB,GAAS,SAAAU,EAAA,IAAY;AAG7B,SAAK,SAASiB;AAAA,MACZjB,EAAQ;AAAA,MACRQ,EAAYlB,CAAO;AAAA,IACrB,GAGI,KAAK,WAEP,KAAK,eAAeA,EAAQ,eAAeA,EAAQ,eAC/CA,IACA8B,EAAmB9B,CAAO,GACzB,KAAA,eAAeoB,EAAgB,KAAK,YAAY,GAGrD,KAAK,QAAQ,GAGb,KAAK,YAAY,IAAImC,EAAiB,MAAM,KAAK,WAAW;AAAA,MAC1D,MAAM,KAAK;AAAA,IAAA,CACZ,GAGD,KAAK,sBAAsB,EAAI;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA,EAOF,IAAI,OAAO;AACF,WAAA3D;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,EAKT,IAAI,WAAW;AACN,WAAAE;AAAA,EAAA;AAAA;AAAA,EAmET,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAAA;AAElB;AA1IEgD,EADmB3C,GACZ,YAAWN,IAClBiD,EAFmB3C,GAEZ,QAAOD,IACd4C,EAHmB3C,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"scrollspy.mjs","sources":["../../src/strings/scrollspyString.ts","../../src/strings/scrollspyComponent.ts","../../src/components/scrollspy.ts"],"sourcesContent":["/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isRoot = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget.scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isRoot ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Toggles on/off the component observer.\n *\n * @param self the ScrollSpy instance\n * @param add when `true`, listener is added\n */\nconst toggleObservers = (\n { targets, scrollTarget, element, _observer }: ScrollSpy,\n add?: boolean,\n) => {\n if (add) {\n if (scrollTarget === element) {\n targets.forEach((targetItem) => _observer.observe(targetItem));\n } else {\n _observer.observe(element);\n }\n } else _observer.disconnect();\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: HTMLElement) => {\n return scrollTarget.scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n toggleObservers(this, true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n const clone = { ...this };\n toggleObservers(clone);\n super.dispose();\n }\n}\n"],"names":["scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","element","getInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","createCustomEvent","updateSpyTargets","self","target","scrollTarget","options","itemsLength","scrollHeight","offset","isRoot","links","getElementsByTagName","doc","getDocument","scrollHEIGHT","href","targetItem","rect","getOffsetHeight","link","getAttribute","querySelector","getBoundingClientRect","toggleObservers","targets","_observer","add","getScrollHeight","clear","item","hasClass","activeClass","removeClass","activate","isHTMLElement","addClass","parents","parentItem","getDocumentBody","menuItem","parentLink","dispatchEvent","BaseComponent","config","getDocumentElement","PositionObserver","scrollTop","maxScroll","items","activeItem","newActiveItem","offsets","i","clone"],"mappings":";;;AACA,MAAMA,IAAk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MAAA6C,EAAA,QAAQ,CAACnB,GAAMuB,MAAM;AACzB,QACEH,MAAepB,KACfiB,KAAaK,EAAQC,CAAC,MACrB,OAAOD,EAAQC,IAAI,CAAC,IAAM,OAAeN,IAAYK,EAAQC,IAAI,CAAC,MAEnEnB,EAAS,MAAMJ,CAAI;AAAA,MACrB,CACD;AAAA,IAAA;AAAA,EAEL;AAAA;AAAA,EAGA,UAAU;AACF,UAAAwB,IAAQ,EAAE,GAAG,KAAK;AACxB,IAAA9B,EAAgB8B,CAAK,GACrB,MAAM,QAAQ;AAAA,EAAA;AAElB;"} \ No newline at end of file diff --git a/dist/components/tab.cjs b/dist/components/tab.cjs index 123aba91..18811440 100644 --- a/dist/components/tab.cjs +++ b/dist/components/tab.cjs @@ -1,28 +1,2 @@ -"use strict";var P=Object.defineProperty;var k=(n,s,t)=>s in n?P(n,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[s]=t;var g=(n,s,t)=>k(n,typeof s!="symbol"?s+"":s,t);const e=require("@thednp/shorty"),H=require("@thednp/event-listener"),E=require("./collapsingClass-CLblascz.js"),d=require("./activeClass-CxJYQAGN.js"),h=require("./fadeClass-Co6nOzNJ.js"),m=require("./showClass-D_Ms1FgG.js"),p=require("./dropdownClasses-CnEyz_iw.js"),D=require("./dataBsToggle-Dj-Ng54N.js"),w=require("./getTargetElement-Cl-PhUJH.js"),_=require("./base-component-DBcDoOjV.js"),f="tab",B="Tab",L=`[${D.dataBsToggle}="${f}"]`,I=n=>e.getInstance(n,B),j=n=>new u(n),b=e.createCustomEvent(`show.bs.${f}`),q=e.createCustomEvent(`shown.bs.${f}`),T=e.createCustomEvent(`hide.bs.${f}`),M=e.createCustomEvent(`hidden.bs.${f}`),v=new Map,x=n=>{const{tabContent:s,nav:t}=n;// istanbul ignore else @preserve -s&&e.hasClass(s,E.collapsingClass)&&(s.style.height="",e.removeClass(s,E.collapsingClass));// istanbul ignore else @preserve -t&&e.Timer.clear(t)},$=n=>{const{element:s,tabContent:t,content:a,nav:l}=n,{tab:r}=e.isHTMLElement(l)&&v.get(l)||{tab:null};// istanbul ignore else @preserve -if(t&&a&&e.hasClass(a,h.fadeClass)){const{currentHeight:o,nextHeight:i}=v.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch -o!==i?setTimeout(()=>{t.style.height=`${i}px`,e.reflow(t),e.emulateTransitionEnd(t,()=>x(n))},50):x(n)}else l&&e.Timer.clear(l);q.relatedTarget=r,e.dispatchEvent(s,q)},S=n=>{const{element:s,content:t,tabContent:a,nav:l}=n,{tab:r,content:o}=l&&v.get(l)||{tab:null,content:null};let i=0;// istanbul ignore else @preserve -a&&t&&e.hasClass(t,h.fadeClass)&&([o,t].forEach(c=>{// istanbul ignore else @preserve -e.isHTMLElement(c)&&e.addClass(c,"overflow-hidden")}),i=e.isHTMLElement(o)?o.scrollHeight:0),b.relatedTarget=r,M.relatedTarget=s,e.dispatchEvent(s,b);// istanbul ignore else @preserve -if(!b.defaultPrevented){// istanbul ignore else @preserve -t&&e.addClass(t,d.activeClass);// istanbul ignore else @preserve -o&&e.removeClass(o,d.activeClass);// istanbul ignore else @preserve -if(a&&t&&e.hasClass(t,h.fadeClass)){const c=t.scrollHeight;v.set(s,{currentHeight:i,nextHeight:c,tab:null,content:null}),e.addClass(a,E.collapsingClass),a.style.height=`${i}px`,e.reflow(a),[o,t].forEach(C=>{// istanbul ignore else @preserve -C&&e.removeClass(C,"overflow-hidden")})}if(t&&t&&e.hasClass(t,h.fadeClass))setTimeout(()=>{e.addClass(t,m.showClass),e.emulateTransitionEnd(t,()=>{$(n)})},1);else{// istanbul ignore else @preserve -t&&e.addClass(t,m.showClass),$(n)}// istanbul ignore else @preserve -r&&e.dispatchEvent(r,M)}},y=n=>{const{nav:s}=n;// istanbul ignore next @preserve -if(!e.isHTMLElement(s))return{tab:null,content:null};const t=e.getElementsByClassName(d.activeClass,s);let a=null;// istanbul ignore else @preserve -t.length===1&&!p.dropdownMenuClasses.some(r=>e.hasClass(t[0].parentElement,r))?[a]=t:t.length>1&&(a=t[t.length-1]);const l=e.isHTMLElement(a)?w.getTargetElement(a):null;return{tab:a,content:l}},A=n=>{// istanbul ignore next @preserve -if(!e.isHTMLElement(n))return null;const s=e.closest(n,`.${p.dropdownMenuClasses.join(",.")}`);return s?e.querySelector(`.${p.dropdownMenuClasses[0]}-toggle`,s):null},N=n=>{const s=I(n.target);// istanbul ignore else @preserve -s&&(n.preventDefault(),s.show())};class u extends _.BaseComponent{constructor(t){super(t);g(this,"_toggleEventListeners",t=>{(t?H.addListener:H.removeListener)(this.element,e.mouseclickEvent,N)});const{element:a}=this,l=w.getTargetElement(a);// istanbul ignore else @preserve -if(l){const r=e.closest(a,".nav"),o=e.closest(l,".tab-content");this.nav=r,this.content=l,this.tabContent=o,this.dropdown=A(a);const{tab:i}=y(this);if(r&&!i){const c=e.querySelector(L,r),C=c&&w.getTargetElement(c);// istanbul ignore else @preserve -C&&(e.addClass(c,d.activeClass),e.addClass(C,m.showClass),e.addClass(C,d.activeClass),e.setAttribute(a,e.ariaSelected,"true"))}this._toggleEventListeners(!0)}}get name(){return B}show(){const{element:t,content:a,nav:l,dropdown:r}=this;// istanbul ignore else @preserve -if(!(l&&e.Timer.get(l))&&!e.hasClass(t,d.activeClass)){const{tab:o,content:i}=y(this);// istanbul ignore else @preserve -l&&v.set(l,{tab:o,content:i,currentHeight:0,nextHeight:0}),T.relatedTarget=t;// istanbul ignore else @preserve -if(e.isHTMLElement(o)){e.dispatchEvent(o,T);// istanbul ignore else @preserve -if(!T.defaultPrevented){e.addClass(t,d.activeClass),e.setAttribute(t,e.ariaSelected,"true");const c=e.isHTMLElement(o)&&A(o);c&&e.hasClass(c,d.activeClass)&&e.removeClass(c,d.activeClass);// istanbul ignore else @preserve -if(l){const C=()=>{// istanbul ignore else @preserve -o&&(e.removeClass(o,d.activeClass),e.setAttribute(o,e.ariaSelected,"false")),r&&!e.hasClass(r,d.activeClass)&&e.addClass(r,d.activeClass)};i&&(e.hasClass(i,h.fadeClass)||a&&e.hasClass(a,h.fadeClass))?e.Timer.set(l,C,1):C()}// istanbul ignore else @preserve -i&&(e.removeClass(i,m.showClass),e.hasClass(i,h.fadeClass)?e.emulateTransitionEnd(i,()=>S(this)):S(this))}}}}dispose(){this._toggleEventListeners(),super.dispose()}}g(u,"selector",L),g(u,"init",j),g(u,"getInstance",I);module.exports=u; +"use strict";const e=require("./base-component-D3rSrWwH.js"),p=require("./event-listener-W3RGkfJ6.js"),b=require("./collapsingClass-CLblascz.js"),c=require("./activeClass-CxJYQAGN.js"),C=require("./fadeClass-Co6nOzNJ.js"),u=require("./showClass-D_Ms1FgG.js"),m=require("./dropdownClasses-CnEyz_iw.js"),I=require("./dataBsToggle-Dj-Ng54N.js"),T=require("./getTargetElement-DOtJ4BXO.js"),g="tab",y="Tab",w=`[${I.dataBsToggle}="${g}"]`,A=a=>e.getInstance(a,y),P=a=>new B(a),v=e.createCustomEvent(`show.bs.${g}`),H=e.createCustomEvent(`shown.bs.${g}`),f=e.createCustomEvent(`hide.bs.${g}`),L=e.createCustomEvent(`hidden.bs.${g}`),h=new Map,M=a=>{const{tabContent:s,nav:t}=a;s&&e.hasClass(s,b.collapsingClass)&&(s.style.height="",e.removeClass(s,b.collapsingClass)),t&&e.Timer.clear(t)},q=a=>{const{element:s,tabContent:t,content:n,nav:i}=a,{tab:l}=e.isHTMLElement(i)&&h.get(i)||{tab:null};if(t&&n&&e.hasClass(n,C.fadeClass)){const{currentHeight:o,nextHeight:r}=h.get(s)||{currentHeight:0,nextHeight:0};o!==r?setTimeout(()=>{t.style.height=`${r}px`,e.reflow(t),e.emulateTransitionEnd(t,()=>M(a))},50):M(a)}else i&&e.Timer.clear(i);H.relatedTarget=l,e.dispatchEvent(s,H)},x=a=>{const{element:s,content:t,tabContent:n,nav:i}=a,{tab:l,content:o}=i&&h.get(i)||{tab:null,content:null};let r=0;if(n&&t&&e.hasClass(t,C.fadeClass)&&([o,t].forEach(d=>{e.isHTMLElement(d)&&e.addClass(d,"overflow-hidden")}),r=e.isHTMLElement(o)?o.scrollHeight:0),v.relatedTarget=l,L.relatedTarget=s,e.dispatchEvent(s,v),!v.defaultPrevented){if(t&&e.addClass(t,c.activeClass),o&&e.removeClass(o,c.activeClass),n&&t&&e.hasClass(t,C.fadeClass)){const d=t.scrollHeight;h.set(s,{currentHeight:r,nextHeight:d,tab:null,content:null}),e.addClass(n,b.collapsingClass),n.style.height=`${r}px`,e.reflow(n),[o,t].forEach(E=>{E&&e.removeClass(E,"overflow-hidden")})}t&&t&&e.hasClass(t,C.fadeClass)?setTimeout(()=>{e.addClass(t,u.showClass),e.emulateTransitionEnd(t,()=>{q(a)})},1):(t&&e.addClass(t,u.showClass),q(a)),l&&e.dispatchEvent(l,L)}},$=a=>{const{nav:s}=a;if(!e.isHTMLElement(s))return{tab:null,content:null};const t=e.getElementsByClassName(c.activeClass,s);let n=null;t.length===1&&!m.dropdownMenuClasses.some(l=>e.hasClass(t[0].parentElement,l))?[n]=t:t.length>1&&(n=t[t.length-1]);const i=e.isHTMLElement(n)?T.getTargetElement(n):null;return{tab:n,content:i}},S=a=>{if(!e.isHTMLElement(a))return null;const s=e.closest(a,`.${m.dropdownMenuClasses.join(",.")}`);return s?e.querySelector(`.${m.dropdownMenuClasses[0]}-toggle`,s):null},k=a=>{const s=A(a.target);s&&(a.preventDefault(),s.show())};class B extends e.BaseComponent{static selector=w;static init=P;static getInstance=A;constructor(s){super(s);const{element:t}=this,n=T.getTargetElement(t);if(n){const i=e.closest(t,".nav"),l=e.closest(n,".tab-content");this.nav=i,this.content=n,this.tabContent=l,this.dropdown=S(t);const{tab:o}=$(this);if(i&&!o){const r=e.querySelector(w,i),d=r&&T.getTargetElement(r);d&&(e.addClass(r,c.activeClass),e.addClass(d,u.showClass),e.addClass(d,c.activeClass),e.setAttribute(t,e.ariaSelected,"true"))}this._toggleEventListeners(!0)}}get name(){return y}show(){const{element:s,content:t,nav:n,dropdown:i}=this;if(!(n&&e.Timer.get(n))&&!e.hasClass(s,c.activeClass)){const{tab:l,content:o}=$(this);if(n&&h.set(n,{tab:l,content:o,currentHeight:0,nextHeight:0}),f.relatedTarget=s,e.isHTMLElement(l)&&(e.dispatchEvent(l,f),!f.defaultPrevented)){e.addClass(s,c.activeClass),e.setAttribute(s,e.ariaSelected,"true");const r=e.isHTMLElement(l)&&S(l);if(r&&e.hasClass(r,c.activeClass)&&e.removeClass(r,c.activeClass),n){const d=()=>{l&&(e.removeClass(l,c.activeClass),e.setAttribute(l,e.ariaSelected,"false")),i&&!e.hasClass(i,c.activeClass)&&e.addClass(i,c.activeClass)};o&&(e.hasClass(o,C.fadeClass)||t&&e.hasClass(t,C.fadeClass))?e.Timer.set(n,d,1):d()}o&&(e.removeClass(o,u.showClass),e.hasClass(o,C.fadeClass)?e.emulateTransitionEnd(o,()=>x(this)):x(this))}}}_toggleEventListeners=s=>{(s?p.E:p.r)(this.element,e.mouseclickEvent,k)};dispose(){this._toggleEventListeners(),super.dispose()}}module.exports=B; //# sourceMappingURL=tab.cjs.map diff --git a/dist/components/tab.cjs.map b/dist/components/tab.cjs.map index ac5a8bd5..eb408d0a 100644 --- a/dist/components/tab.cjs.map +++ b/dist/components/tab.cjs.map @@ -1 +1 @@ -{"version":3,"file":"tab.cjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","addClass","activeClass","c","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","__publicField","add","addListener","removeListener","mouseclickEvent","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab"],"mappings":"4jBACMA,EAAY,MCAZC,EAAe,MCqCfC,EAAc,IAAIC,EAAAA,YAAY,KAAKH,CAAS,KAM5CI,EAAkBC,GACtBC,cAAiBD,EAASJ,CAAY,EAGlCM,EAAmBF,GAAyB,IAAIG,EAAIH,CAAO,EAQ3DI,EAAeC,EAAA,kBACnB,WAAWV,CAAS,EACtB,EACMW,EAAgBD,EAAA,kBACpB,YAAYV,CAAS,EACvB,EACMY,EAAeF,EAAA,kBACnB,WAAWV,CAAS,EACtB,EACMa,EAAiBH,EAAA,kBACrB,aAAaV,CAAS,EACxB,EAaMc,MAA+C,IAS/CC,EAAiBC,GAAc,CAC7B,KAAA,CAAE,WAAAC,EAAY,IAAAC,CAAA,EAAQF,EAAA;AAGxBC,GAAcE,EAAAA,SAASF,EAAYG,EAAe,eAAA,IACpDH,EAAW,MAAM,OAAS,GAC1BI,EAAA,YAAYJ,EAAYG,iBAAe,GACzC;AAGIF,GAAWI,EAAAA,MAAA,MAAMJ,CAAG,CAC1B,EAOMK,EAAkBP,GAAc,CACpC,KAAM,CAAE,QAAAX,EAAS,WAAAY,EAAY,QAASO,EAAa,IAAAN,GAAQF,EACrD,CAAE,IAAAS,GAASC,EAAA,cAAcR,CAAG,GAAKJ,EAAW,IAAII,CAAG,GAEvD,CAAE,IAAK,IAAK,EAAA;AAGd,GAAID,GAAcO,GAAeL,EAAS,SAAAK,EAAaG,EAAS,SAAA,EAAG,CACjE,KAAM,CAAE,cAAAC,EAAe,WAAAC,CAAA,EAAef,EAAW,IAAIT,CAAO,GAE1D,CAAE,cAAe,EAAG,WAAY,CAAE,EAAA;AAEhCuB,IAAkBC,EAEpB,WAAW,IAAM,CACJZ,EAAA,MAAM,OAAS,GAAGY,CAAU,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GZ,cAAcJ"} \ No newline at end of file +{"version":3,"file":"tab.cjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","c","addClass","activeClass","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab","add","addListener","removeListener","mouseclickEvent"],"mappings":"kYACMA,EAAY,MCAZC,EAAe,MCqCfC,EAAc,IAAIC,EAAAA,YAAY,KAAKH,CAAS,KAM5CI,EAAkBC,GACtBC,cAAiBD,EAASJ,CAAY,EAGlCM,EAAmBF,GAAyB,IAAIG,EAAIH,CAAO,EAQ3DI,EAAeC,EAAA,kBACnB,WAAWV,CAAS,EACtB,EACMW,EAAgBD,EAAA,kBACpB,YAAYV,CAAS,EACvB,EACMY,EAAeF,EAAA,kBACnB,WAAWV,CAAS,EACtB,EACMa,EAAiBH,EAAA,kBACrB,aAAaV,CAAS,EACxB,EAaMc,MAA+C,IAS/CC,EAAiBC,GAAc,CAC7B,KAAA,CAAE,WAAAC,EAAY,IAAAC,CAAA,EAAQF,EAGxBC,GAAcE,EAAAA,SAASF,EAAYG,EAAe,eAAA,IACpDH,EAAW,MAAM,OAAS,GAC1BI,EAAA,YAAYJ,EAAYG,iBAAe,GAIrCF,GAAWI,EAAAA,MAAA,MAAMJ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AAA,qBAAqBG,EAAS,IAAMD,EAAe,IAAI,CAAC,EAExDA,EAAe,IAAI,EAEvB,CAEJ,CACF,CAQF,sBAAyB0B,GAAkB,EAC1BA,EAAMC,EAAAA,EAAcC,EAAA,GAC5B,KAAK,QAASC,EAAAA,gBAAiBd,CAAe,CACvD,EAGA,SAAU,CACR,KAAK,sBAAsB,EAC3B,MAAM,QAAQ,CAAA,CAElB"} \ No newline at end of file diff --git a/dist/components/tab.d.ts b/dist/components/tab.d.ts index 06b01ff4..6cc13bf1 100644 --- a/dist/components/tab.d.ts +++ b/dist/components/tab.d.ts @@ -1,54 +1,52 @@ -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -/** Creates a new `Tab` instance. */ -declare class Tab extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Tab; - static getInstance: (element: HTMLElement) => Tab | null; - nav: HTMLElement | null; - content: HTMLElement | null; - tabContent: HTMLElement | null; - nextContent: HTMLElement | null; - dropdown: HTMLElement | null; - /** @param target the target element */ - constructor(target: HTMLElement | string); - /** - * Returns component name string. - */ - get name(): string; - /** Shows the tab to the user. */ - show(): void; - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Tab` component from the target element. */ - dispose(): void; -} - -export { - Tab as default, -}; - -export as namespace Tab; - -export {}; +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +/** Creates a new `Tab` instance. */ +declare class Tab extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Tab; + static getInstance: (element: HTMLElement) => Tab | null; + nav: HTMLElement | null; + content: HTMLElement | null; + tabContent: HTMLElement | null; + nextContent: HTMLElement | null; + dropdown: HTMLElement | null; + /** @param target the target element */ + constructor(target: HTMLElement | string); + /** + * Returns component name string. + */ + get name(): string; + /** Shows the tab to the user. */ + show(): void; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Tab` component from the target element. */ + dispose(): void; +} +export default Tab; + +export { } diff --git a/dist/components/tab.mjs b/dist/components/tab.mjs index 0d5cfc92..6c4d35a8 100644 --- a/dist/components/tab.mjs +++ b/dist/components/tab.mjs @@ -1,129 +1,92 @@ -var O = Object.defineProperty; -var Q = (n, e, t) => e in n ? O(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; -var u = (n, e, t) => Q(n, typeof e != "symbol" ? e + "" : e, t); -import { createCustomEvent as H, closest as S, querySelector as F, addClass as g, setAttribute as x, ariaSelected as $, Timer as C, hasClass as f, isHTMLElement as d, dispatchEvent as w, removeClass as b, emulateTransitionEnd as k, mouseclickEvent as R, getInstance as U, reflow as G, getElementsByClassName as V } from "@thednp/shorty"; -import { addListener as W, removeListener as X } from "@thednp/event-listener"; -import { c as B } from "./collapsingClass-BxKtDBMH.mjs"; -import { a as l } from "./activeClass-iqaD75Su.mjs"; -import { f as m } from "./fadeClass-CLIYI_zn.mjs"; -import { s as E } from "./showClass-C8hdJfjQ.mjs"; -import { d as I } from "./dropdownClasses-CdCdZ-PX.mjs"; -import { d as Y } from "./dataBsToggle-B84TS15h.mjs"; -import { g as P } from "./getTargetElement-DbfK8LsG.mjs"; -import { B as Z } from "./base-component-DHbs0JQk.mjs"; -const v = "tab", J = "Tab", D = `[${Y}="${v}"]`, K = (n) => U(n, J), tt = (n) => new T(n), L = H( - `show.bs.${v}` -), M = H( - `shown.bs.${v}` -), y = H( - `hide.bs.${v}` -), _ = H( - `hidden.bs.${v}` -), p = /* @__PURE__ */ new Map(), A = (n) => { - const { tabContent: e, nav: t } = n; - // istanbul ignore else @preserve - e && f(e, B) && (e.style.height = "", b(e, B)); - // istanbul ignore else @preserve - t && C.clear(t); -}, j = (n) => { - const { element: e, tabContent: t, content: s, nav: o } = n, { tab: r } = d(o) && p.get(o) || // istanbul ignore next @preserve +import { B as J, D as $, q as N, f, s as w, T as p, h as l, u as h, d as v, r as b, e as D, g as K, c as C, t as z, j as O, a5 as E, m as Q } from "./base-component-ylZzLp-h.mjs"; +import { E as R, r as U } from "./event-listener-C1-Yf9Z5.mjs"; +import { c as y } from "./collapsingClass-BxKtDBMH.mjs"; +import { a as c } from "./activeClass-iqaD75Su.mjs"; +import { f as d } from "./fadeClass-CLIYI_zn.mjs"; +import { s as T } from "./showClass-C8hdJfjQ.mjs"; +import { d as S } from "./dropdownClasses-CdCdZ-PX.mjs"; +import { d as V } from "./dataBsToggle-B84TS15h.mjs"; +import { g as B } from "./getTargetElement-BFOUI7hP.mjs"; +const u = "tab", F = "Tab", L = `[${V}="${u}"]`, G = (s) => K(s, F), W = (s) => new Y(s), H = C( + `show.bs.${u}` +), P = C( + `shown.bs.${u}` +), x = C( + `hide.bs.${u}` +), k = C( + `hidden.bs.${u}` +), m = /* @__PURE__ */ new Map(), M = (s) => { + const { tabContent: e, nav: t } = s; + e && l(e, y) && (e.style.height = "", b(e, y)), t && p.clear(t); +}, _ = (s) => { + const { element: e, tabContent: t, content: n, nav: i } = s, { tab: o } = h(i) && m.get(i) || // istanbul ignore next @preserve { tab: null }; - // istanbul ignore else @preserve - if (t && s && f(s, m)) { - const { currentHeight: i, nextHeight: a } = p.get(e) || // istanbul ignore next @preserve + if (t && n && l(n, d)) { + const { currentHeight: a, nextHeight: r } = m.get(e) || // istanbul ignore next @preserve { currentHeight: 0, nextHeight: 0 }; - // istanbul ignore else @preserve: vitest won't validate this branch - i !== a ? setTimeout(() => { - t.style.height = `${a}px`, G(t), k(t, () => A(n)); - }, 50) : A(n); - } else o && C.clear(o); - M.relatedTarget = r, w(e, M); -}, q = (n) => { - const { element: e, content: t, tabContent: s, nav: o } = n, { tab: r, content: i } = o && p.get(o) || // istanbul ignore next @preserve + a !== r ? setTimeout(() => { + t.style.height = `${r}px`, z(t), D(t, () => M(s)); + }, 50) : M(s); + } else i && p.clear(i); + P.relatedTarget = o, v(e, P); +}, j = (s) => { + const { element: e, content: t, tabContent: n, nav: i } = s, { tab: o, content: a } = i && m.get(i) || // istanbul ignore next @preserve { tab: null, content: null }; - let a = 0; - // istanbul ignore else @preserve - s && t && f(t, m) && ([i, t].forEach((c) => { - // istanbul ignore else @preserve - d(c) && g(c, "overflow-hidden"); - }), a = d(i) ? i.scrollHeight : 0), L.relatedTarget = r, _.relatedTarget = e, w(e, L); - // istanbul ignore else @preserve - if (!L.defaultPrevented) { - // istanbul ignore else @preserve - t && g(t, l); - // istanbul ignore else @preserve - i && b(i, l); - // istanbul ignore else @preserve - if (s && t && f(t, m)) { - const c = t.scrollHeight; - p.set(e, { - currentHeight: a, - nextHeight: c, + let r = 0; + if (n && t && l(t, d) && ([a, t].forEach((g) => { + h(g) && f(g, "overflow-hidden"); + }), r = h(a) ? a.scrollHeight : 0), H.relatedTarget = o, k.relatedTarget = e, v(e, H), !H.defaultPrevented) { + if (t && f(t, c), a && b(a, c), n && t && l(t, d)) { + const g = t.scrollHeight; + m.set(e, { + currentHeight: r, + nextHeight: g, tab: null, content: null - }), g(s, B), s.style.height = `${a}px`, G(s), [i, t].forEach((h) => { - // istanbul ignore else @preserve - h && b(h, "overflow-hidden"); + }), f(n, y), n.style.height = `${r}px`, z(n), [a, t].forEach((I) => { + I && b(I, "overflow-hidden"); }); } - if (t && t && f(t, m)) - setTimeout(() => { - g(t, E), k(t, () => { - j(n); - }); - }, 1); - else { - // istanbul ignore else @preserve - t && g(t, E), j(n); - } - // istanbul ignore else @preserve - r && w(r, _); + t && t && l(t, d) ? setTimeout(() => { + f(t, T), D(t, () => { + _(s); + }); + }, 1) : (t && f(t, T), _(s)), o && v(o, k); } -}, N = (n) => { - const { nav: e } = n; - // istanbul ignore next @preserve - if (!d(e)) +}, q = (s) => { + const { nav: e } = s; + if (!h(e)) return { tab: null, content: null }; - const t = V(l, e); - let s = null; - // istanbul ignore else @preserve - t.length === 1 && !I.some( - (r) => f(t[0].parentElement, r) - ) ? [s] = t : t.length > 1 && (s = t[t.length - 1]); - const o = d(s) ? P(s) : null; - return { tab: s, content: o }; -}, z = (n) => { - // istanbul ignore next @preserve - if (!d(n)) return null; - const e = S(n, `.${I.join(",.")}`); - return e ? F(`.${I[0]}-toggle`, e) : null; -}, et = (n) => { - const e = K(n.target); - // istanbul ignore else @preserve - e && (n.preventDefault(), e.show()); + const t = O(c, e); + let n = null; + t.length === 1 && !S.some( + (o) => l(t[0].parentElement, o) + ) ? [n] = t : t.length > 1 && (n = t[t.length - 1]); + const i = h(n) ? B(n) : null; + return { tab: n, content: i }; +}, A = (s) => { + if (!h(s)) return null; + const e = $(s, `.${S.join(",.")}`); + return e ? N(`.${S[0]}-toggle`, e) : null; +}, X = (s) => { + const e = G(s.target); + e && (s.preventDefault(), e.show()); }; -class T extends Z { +class Y extends J { + static selector = L; + static init = W; + static getInstance = G; /** @param target the target element */ - constructor(t) { - super(t); - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, event listener is added - */ - u(this, "_toggleEventListeners", (t) => { - (t ? W : X)(this.element, R, et); - }); - const { element: s } = this, o = P(s); - // istanbul ignore else @preserve - if (o) { - const r = S(s, ".nav"), i = S(o, ".tab-content"); - this.nav = r, this.content = o, this.tabContent = i, this.dropdown = z(s); - const { tab: a } = N(this); - if (r && !a) { - const c = F(D, r), h = c && P(c); - // istanbul ignore else @preserve - h && (g(c, l), g(h, E), g(h, l), x(s, $, "true")); + constructor(e) { + super(e); + const { element: t } = this, n = B(t); + if (n) { + const i = $(t, ".nav"), o = $(n, ".tab-content"); + this.nav = i, this.content = n, this.tabContent = o, this.dropdown = A(t); + const { tab: a } = q(this); + if (i && !a) { + const r = N(L, i), g = r && B(r); + g && (f(r, c), f(g, T), f(g, c), w(t, E, "true")); } this._toggleEventListeners(!0); } @@ -132,47 +95,42 @@ class T extends Z { * Returns component name string. */ get name() { - return J; + return F; } // TAB PUBLIC METHODS // ================== /** Shows the tab to the user. */ show() { - const { element: t, content: s, nav: o, dropdown: r } = this; - // istanbul ignore else @preserve - if (!(o && C.get(o)) && !f(t, l)) { - const { tab: i, content: a } = N(this); - // istanbul ignore else @preserve - o && p.set(o, { tab: i, content: a, currentHeight: 0, nextHeight: 0 }), y.relatedTarget = t; - // istanbul ignore else @preserve - if (d(i)) { - w(i, y); - // istanbul ignore else @preserve - if (!y.defaultPrevented) { - g(t, l), x(t, $, "true"); - const c = d(i) && z(i); - c && f(c, l) && b(c, l); - // istanbul ignore else @preserve - if (o) { - const h = () => { - // istanbul ignore else @preserve - i && (b(i, l), x(i, $, "false")), r && !f(r, l) && g(r, l); - }; - a && (f(a, m) || s && f(s, m)) ? C.set(o, h, 1) : h(); - } - // istanbul ignore else @preserve - a && (b(a, E), f(a, m) ? k(a, () => q(this)) : q(this)); + const { element: e, content: t, nav: n, dropdown: i } = this; + if (!(n && p.get(n)) && !l(e, c)) { + const { tab: o, content: a } = q(this); + if (n && m.set(n, { tab: o, content: a, currentHeight: 0, nextHeight: 0 }), x.relatedTarget = e, h(o) && (v(o, x), !x.defaultPrevented)) { + f(e, c), w(e, E, "true"); + const r = h(o) && A(o); + if (r && l(r, c) && b(r, c), n) { + const g = () => { + o && (b(o, c), w(o, E, "false")), i && !l(i, c) && f(i, c); + }; + a && (l(a, d) || t && l(t, d)) ? p.set(n, g, 1) : g(); } + a && (b(a, T), l(a, d) ? D(a, () => j(this)) : j(this)); } } } + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, event listener is added + */ + _toggleEventListeners = (e) => { + (e ? R : U)(this.element, Q, X); + }; /** Removes the `Tab` component from the target element. */ dispose() { this._toggleEventListeners(), super.dispose(); } } -u(T, "selector", D), u(T, "init", tt), u(T, "getInstance", K); export { - T as default + Y as default }; //# sourceMappingURL=tab.mjs.map diff --git a/dist/components/tab.mjs.map b/dist/components/tab.mjs.map index 739a061e..e7f0625b 100644 --- a/dist/components/tab.mjs.map +++ b/dist/components/tab.mjs.map @@ -1 +1 @@ -{"version":3,"file":"tab.mjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","addClass","activeClass","c","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","__publicField","add","addListener","removeListener","mouseclickEvent","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab"],"mappings":";;;;;;;;;;;;;AACA,MAAMA,IAAY,OCAZC,IAAe,OCqCfC,IAAc,IAAIC,CAAY,KAAKH,CAAS,MAM5CI,IAAiB,CAACC,MACtBC,EAAiBD,GAASJ,CAAY,GAGlCM,KAAkB,CAACF,MAAyB,IAAIG,EAAIH,CAAO,GAQ3DI,IAAeC;AAAA,EACnB,WAAWV,CAAS;AACtB,GACMW,IAAgBD;AAAA,EACpB,YAAYV,CAAS;AACvB,GACMY,IAAeF;AAAA,E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A;AAE1C,YAAA,CAACA,EAAa,kBAAkB;AAClC,UAAAuB,EAAS9B,GAAS+B,CAAW,GAChBwB,EAAAvD,GAASwD,GAAc,MAAM;AAE1C,gBAAMC,IAAiBpC,EAAcD,CAAG,KAAKmB,EAAkBnB,CAAG;AAClE,UAAIqC,KAAkB3C,EAAS2C,GAAgB1B,CAAW,KACxDf,EAAYyC,GAAgB1B,CAAW;AAAA,UACzC;AAGA,cAAIlB,GAAK;AACP,kBAAM6C,IAAY,MAAM;AAAA,cAAA;AAEtB,cAAItC,MACFJ,EAAYI,GAAKW,CAAW,GACfwB,EAAAnC,GAAKoC,GAAc,OAAO,IAErChB,KAAY,CAAC1B,EAAS0B,GAAUT,CAAW,KAC7CD,EAASU,GAAUT,CAAW;AAAA,YAElC;AAGE,YAAAF,MACCf,EAASe,GAASP,CAAS,KACzBH,KAAeL,EAASK,GAAaG,CAAS,KAE3CL,EAAA,IAAIJ,GAAK6C,GAAW,CAAC,IACZA,EAAA;AAAA,UAAA;AAAA,UACnB;AAGA,UAAI7B,MACFb,EAAYa,GAASI,CAAS,GAC1BnB,EAASe,GAASP,CAAS,IAC7BI,EAAqBG,GAAS,MAAMD,EAAe,IAAI,CAAC,IAExDA,EAAe,IAAI;AAAA,QAEvB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAcF,UAAU;AACR,SAAK,sBAAsB,GAC3B,MAAM,QAAQ;AAAA,EAAA;AAElB;AA5IEmB,EADmB5C,GACZ,YAAWN,IAClBkD,EAFmB5C,GAEZ,QAAOD,KACd6C,EAHmB5C,GAGZ,eAAcJ;"} \ No newline at end of file +{"version":3,"file":"tab.mjs","sources":["../../src/strings/tabString.ts","../../src/strings/tabComponent.ts","../../src/components/tab.ts"],"sourcesContent":["/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n"],"names":["tabString","tabComponent","tabSelector","dataBsToggle","getTabInstance","element","getInstance","tabInitCallback","Tab","showTabEvent","createCustomEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","self","tabContent","nav","hasClass","collapsingClass","removeClass","Timer","triggerTabShow","nextContent","tab","isHTMLElement","fadeClass","currentHeight","nextHeight","reflow","emulateTransitionEnd","dispatchEvent","triggerTabHide","content","c","addClass","activeClass","showClass","getActiveTab","activeTabs","getElementsByClassName","dropdownClasses","getTargetElement","getParentDropdown","dropdown","closest","querySelector","tabClickHandler","e","BaseComponent","target","container","firstTab","firstTabContent","setAttribute","ariaSelected","activeDropdown","toggleTab","add","addListener","removeListener","mouseclickEvent"],"mappings":";;;;;;;;;AACA,MAAMA,IAAY,OCAZC,IAAe,OCqCfC,IAAc,IAAIC,CAAY,KAAKH,CAAS,MAM5CI,IAAiB,CAACC,MACtBC,EAAiBD,GAASJ,CAAY,GAGlCM,IAAkB,CAACF,MAAyB,IAAIG,EAAIH,CAAO,GAQ3DI,IAAeC;AAAA,EACnB,WAAWV,CAAS;AACtB,GACMW,IAAgBD;AAAA,EACpB,YAAYV,CAAS;AACvB,GACMY,IAAeF;AAAA,EACnB,WAAWV,CAAS;AACtB,GACMa,IAAiBH;AAAA,EACrB,aAAaV,CAAS;AACxB,GAaMc,wBAA+C,IAAI,GASnDC,IAAgB,CAACC,MAAc;AAC7B,QAAA,EAAE,YAAAC,GAAY,KAAAC,EAAA,IAAQF;AAG5B,EAAIC,KAAcE,EAASF,GAAYG,CAAe,MACpDH,EAAW,MAAM,SAAS,IAC1BI,EAAYJ,GAAYG,CAAe,IAIrCF,KAAWI,EAAA,MAAMJ,CAAG;AAC1B,GAOMK,IAAiB,CAACP,MAAc;AACpC,QAAM,EAAE,SAAAX,GAAS,YAAAY,GAAY,SAASO,GAAa,KAAAN,MAAQF,GACrD,EAAE,KAAAS,MAASC,EAAcR,CAAG,KAAKJ,EAAW,IAAII,CAAG;AAAA,EAEvD,EAAE,KAAK,KAAK;AAGd,MAAID,KAAcO,KAAeL,EAASK,GAAaG,CA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,EAAA;AAElB;"} \ No newline at end of file diff --git a/dist/components/toast.cjs b/dist/components/toast.cjs index 73f2c12e..af960ea8 100644 --- a/dist/components/toast.cjs +++ b/dist/components/toast.cjs @@ -1,11 +1,2 @@ -"use strict";var D=Object.defineProperty;var L=(n,t,s)=>t in n?D(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var r=(n,t,s)=>L(n,typeof t!="symbol"?t+"":t,s);const e=require("@thednp/shorty"),v=require("@thednp/event-listener"),h=require("./fadeClass-Co6nOzNJ.js"),u=require("./showClass-D_Ms1FgG.js"),B=require("./dataBsDismiss-CMHF7If_.js"),k=require("./dataBsToggle-Dj-Ng54N.js"),w=require("./getTargetElement-Cl-PhUJH.js"),I=require("./base-component-DBcDoOjV.js"),i="toast",q="Toast",_=`.${i}`,x=`[${B.dataBsDismiss}="${i}"]`,S=`[${k.dataBsToggle}="${i}"]`,c="showing",$="hide",A={animation:!0,autohide:!0,delay:5e3},C=n=>e.getInstance(n,q),H=n=>new d(n),f=e.createCustomEvent(`show.bs.${i}`),P=e.createCustomEvent(`shown.bs.${i}`),E=e.createCustomEvent(`hide.bs.${i}`),N=e.createCustomEvent(`hidden.bs.${i}`),T=n=>{const{element:t,options:s}=n;e.removeClass(t,c),e.Timer.clear(t,c),e.dispatchEvent(t,P);// istanbul ignore else @preserve -s.autohide&&e.Timer.set(t,()=>n.hide(),s.delay,i)},p=n=>{const{element:t}=n;e.removeClass(t,c),e.removeClass(t,u.showClass),e.addClass(t,$),e.Timer.clear(t,i),e.dispatchEvent(t,N)},j=n=>{const{element:t,options:s}=n;e.addClass(t,c),s.animation?(e.reflow(t),e.emulateTransitionEnd(t,()=>p(n))):p(n)},z=n=>{const{element:t,options:s}=n;e.Timer.set(t,()=>{e.removeClass(t,$),e.reflow(t),e.addClass(t,u.showClass),e.addClass(t,c),s.animation?e.emulateTransitionEnd(t,()=>T(n)):T(n)},17,c)},F=n=>{const{target:t}=n,s=t&&e.closest(t,S),o=s&&w.getTargetElement(s),a=o&&C(o);// istanbul ignore else @preserve -if(a){// istanbul ignore else @preserve -s&&s.tagName==="A"&&n.preventDefault(),a.relatedTarget=s,a.show()}},G=n=>{const t=n.target,s=C(t),{type:o,relatedTarget:a}=n;// istanbul ignore else @preserve: a solid filter is required -s&&t!==a&&!t.contains(a)&&([e.mouseenterEvent,e.focusinEvent].includes(o)?e.Timer.clear(t,i):e.Timer.set(t,()=>s.hide(),s.options.delay,i))};class d extends I.BaseComponent{constructor(s,o){super(s,o);r(this,"show",()=>{const{element:s,isShown:o}=this;// istanbul ignore else @preserve -s&&!o&&(e.dispatchEvent(s,f),f.defaultPrevented||z(this))});r(this,"hide",()=>{const{element:s,isShown:o}=this;// istanbul ignore else @preserve -s&&o&&(e.dispatchEvent(s,E),E.defaultPrevented||j(this))});r(this,"_toggleEventListeners",s=>{const o=s?v.addListener:v.removeListener,{element:a,triggers:l,dismiss:m,options:y,hide:b}=this;// istanbul ignore else @preserve -m&&o(m,e.mouseclickEvent,b);// istanbul ignore else @preserve -y.autohide&&[e.focusinEvent,e.focusoutEvent,e.mouseenterEvent,e.mouseleaveEvent].forEach(g=>o(a,g,G));// istanbul ignore else @preserve -l.length&&l.forEach(g=>o(g,e.mouseclickEvent,F))});const{element:a,options:l}=this;l.animation&&!e.hasClass(a,h.fadeClass)?e.addClass(a,h.fadeClass):!l.animation&&e.hasClass(a,h.fadeClass)&&e.removeClass(a,h.fadeClass),this.dismiss=e.querySelector(x,a),this.triggers=[...e.querySelectorAll(S,e.getDocument(a))].filter(m=>w.getTargetElement(m)===a),this._toggleEventListeners(!0)}get name(){return q}get defaults(){return A}get isShown(){return e.hasClass(this.element,u.showClass)}dispose(){const{element:s,isShown:o}=this;this._toggleEventListeners(),e.Timer.clear(s,i),o&&e.removeClass(s,u.showClass),super.dispose()}}r(d,"selector",_),r(d,"init",H),r(d,"getInstance",C);module.exports=d; +"use strict";const e=require("./base-component-D3rSrWwH.js"),u=require("./event-listener-W3RGkfJ6.js"),l=require("./fadeClass-Co6nOzNJ.js"),d=require("./showClass-D_Ms1FgG.js"),b=require("./dataBsDismiss-CMHF7If_.js"),y=require("./dataBsToggle-Dj-Ng54N.js"),E=require("./getTargetElement-DOtJ4BXO.js"),i="toast",T="Toast",D=`.${i}`,B=`[${b.dataBsDismiss}="${i}"]`,p=`[${y.dataBsToggle}="${i}"]`,r="showing",w="hide",k={animation:!0,autohide:!0,delay:5e3},h=o=>e.getInstance(o,T),I=o=>new S(o),g=e.createCustomEvent(`show.bs.${i}`),L=e.createCustomEvent(`shown.bs.${i}`),C=e.createCustomEvent(`hide.bs.${i}`),_=e.createCustomEvent(`hidden.bs.${i}`),v=o=>{const{element:t,options:s}=o;e.removeClass(t,r),e.Timer.clear(t,r),e.dispatchEvent(t,L),s.autohide&&e.Timer.set(t,()=>o.hide(),s.delay,i)},f=o=>{const{element:t}=o;e.removeClass(t,r),e.removeClass(t,d.showClass),e.addClass(t,w),e.Timer.clear(t,i),e.dispatchEvent(t,_)},x=o=>{const{element:t,options:s}=o;e.addClass(t,r),s.animation?(e.reflow(t),e.emulateTransitionEnd(t,()=>f(o))):f(o)},A=o=>{const{element:t,options:s}=o;e.Timer.set(t,()=>{e.removeClass(t,w),e.reflow(t),e.addClass(t,d.showClass),e.addClass(t,r),s.animation?e.emulateTransitionEnd(t,()=>v(o)):v(o)},17,r)},H=o=>{const{target:t}=o,s=t&&e.closest(t,p),n=s&&E.getTargetElement(s),a=n&&h(n);a&&(s&&s.tagName==="A"&&o.preventDefault(),a.relatedTarget=s,a.show())},P=o=>{const t=o.target,s=h(t),{type:n,relatedTarget:a}=o;s&&t!==a&&!t.contains(a)&&([e.mouseenterEvent,e.focusinEvent].includes(n)?e.Timer.clear(t,i):e.Timer.set(t,()=>s.hide(),s.options.delay,i))};class S extends e.BaseComponent{static selector=D;static init=I;static getInstance=h;constructor(t,s){super(t,s);const{element:n,options:a}=this;a.animation&&!e.hasClass(n,l.fadeClass)?e.addClass(n,l.fadeClass):!a.animation&&e.hasClass(n,l.fadeClass)&&e.removeClass(n,l.fadeClass),this.dismiss=e.querySelector(B,n),this.triggers=[...e.querySelectorAll(p,e.getDocument(n))].filter(c=>E.getTargetElement(c)===n),this._toggleEventListeners(!0)}get name(){return T}get defaults(){return k}get isShown(){return e.hasClass(this.element,d.showClass)}show=()=>{const{element:t,isShown:s}=this;t&&!s&&(e.dispatchEvent(t,g),g.defaultPrevented||A(this))};hide=()=>{const{element:t,isShown:s}=this;t&&s&&(e.dispatchEvent(t,C),C.defaultPrevented||x(this))};_toggleEventListeners=t=>{const s=t?u.E:u.r,{element:n,triggers:a,dismiss:c,options:q,hide:$}=this;c&&s(c,e.mouseclickEvent,$),q.autohide&&[e.focusinEvent,e.focusoutEvent,e.mouseenterEvent,e.mouseleaveEvent].forEach(m=>s(n,m,P)),a.length&&a.forEach(m=>s(m,e.mouseclickEvent,H))};dispose(){const{element:t,isShown:s}=this;this._toggleEventListeners(),e.Timer.clear(t,i),s&&e.removeClass(t,d.showClass),super.dispose()}}module.exports=S; //# sourceMappingURL=toast.cjs.map diff --git a/dist/components/toast.cjs.map b/dist/components/toast.cjs.map index 38884774..80994da5 100644 --- a/dist/components/toast.cjs.map +++ b/dist/components/toast.cjs.map @@ -1 +1 @@ -{"version":3,"file":"toast.cjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","__publicField","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","btn","hasClass","fadeClass","querySelector","querySelectorAll","getDocument"],"mappings":"weACMA,EAAc,QCAdC,EAAiB,QCoCjBC,EAAgB,IAAIF,CAAW,GAC/BG,EAAuB,IAAIC,EAAAA,aAAa,KAAKJ,CAAW,KACxDK,EAAsB,IAAIC,EAAAA,YAAY,KAAKN,CAAW,KACtDO,EAAe,UAEfC,EAAY,OAEZC,EAAgB,CACpB,UAAW,GACX,SAAU,GACV,MAAO,GACT,EAMMC,EAAoBC,GACxBC,cAAmBD,EAASV,CAAc,EAKtCY,EAAqBF,GAAyB,IAAIG,EAAMH,CAAO,EAI/DI,EAAiBC,EAAA,kBACrB,WAAWhB,CAAW,EACxB,EACMiB,EAAkBD,EAAA,kBACtB,YAAYhB,CAAW,EACz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,EAGZ,cAAcJ"} \ No newline at end of file +{"version":3,"file":"toast.cjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","hasClass","fadeClass","querySelector","querySelectorAll","getDocument","btn","isShown","add","action","addListener","removeList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oB,EAAAA,eAAe,EAAE,QAC7D5B,GAAMoB,EAAO3C,EAASuB,EAAGK,CAAuB,CACnD,EAGEkB,EAAS,QACFA,EAAA,QAASN,GAChBG,EAAOH,EAAKS,kBAAiB3B,CAAiB,CAChD,CAEJ,EAGA,SAAU,CACF,KAAA,CAAE,QAAAtB,EAAS,QAAAyC,CAAA,EAAY,KAC7B,KAAK,sBAAsB,EACrB5B,QAAA,MAAMb,EAASX,CAAW,EAE5BoD,GACF7B,EAAA,YAAYZ,EAASgB,WAAS,EAEhC,MAAM,QAAQ,CAAA,CAElB"} \ No newline at end of file diff --git a/dist/components/toast.d.ts b/dist/components/toast.d.ts index 78871324..d7e8707f 100644 --- a/dist/components/toast.d.ts +++ b/dist/components/toast.d.ts @@ -1,75 +1,74 @@ -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -export interface ToastOptions extends BaseOptions { - animation: boolean; - autohide: boolean; - delay: number; -} -/** Creates a new `Toast` instance. */ -declare class Toast extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Toast; - static getInstance: (element: HTMLElement) => Toast | null; - options: ToastOptions; - dismiss: HTMLElement | null; - triggers: HTMLElement[]; - relatedTarget: HTMLElement | null; - /** - * @param target the target `.toast` element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): { - animation: boolean; - autohide: boolean; - delay: number; - }; - /** - * Returns *true* when toast is visible. - */ - get isShown(): boolean; - /** Shows the toast. */ - show: () => void; - /** Hides the toast. */ - hide: () => void; - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, it will add the listener - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Toast` component from the target element. */ - dispose(): void; -} - -export { - Toast as default, -}; - -export as namespace Toast; - -export {}; +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +/** Creates a new `Toast` instance. */ +declare class Toast extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Toast; + static getInstance: (element: HTMLElement) => Toast | null; + options: ToastOptions; + dismiss: HTMLElement | null; + triggers: HTMLElement[]; + relatedTarget: HTMLElement | null; + /** + * @param target the target `.toast` element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): { + animation: boolean; + autohide: boolean; + delay: number; + }; + /** + * Returns *true* when toast is visible. + */ + get isShown(): boolean; + /** Shows the toast. */ + show: () => void; + /** Hides the toast. */ + hide: () => void; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, it will add the listener + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Toast` component from the target element. */ + dispose(): void; +} +export default Toast; + +declare interface ToastOptions extends BaseOptions { + animation: boolean; + autohide: boolean; + delay: number; +} + +export { } diff --git a/dist/components/toast.mjs b/dist/components/toast.mjs index b63b89b9..91eb51cb 100644 --- a/dist/components/toast.mjs +++ b/dist/components/toast.mjs @@ -1,131 +1,115 @@ -var P = Object.defineProperty; -var N = (s, t, e) => t in s ? P(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e; -var a = (s, t, e) => N(s, typeof t != "symbol" ? t + "" : t, e); -import { createCustomEvent as v, hasClass as w, addClass as d, removeClass as c, querySelector as j, querySelectorAll as z, getDocument as F, dispatchEvent as u, mouseclickEvent as C, focusinEvent as D, focusoutEvent as G, mouseenterEvent as L, mouseleaveEvent as J, Timer as r, getInstance as K, reflow as B, emulateTransitionEnd as I, closest as M } from "@thednp/shorty"; -import { addListener as O, removeListener as Q } from "@thednp/event-listener"; -import { f } from "./fadeClass-CLIYI_zn.mjs"; -import { s as p } from "./showClass-C8hdJfjQ.mjs"; -import { d as R } from "./dataBsDismiss-DdNPQYa-.mjs"; -import { d as U } from "./dataBsToggle-B84TS15h.mjs"; -import { g as k } from "./getTargetElement-DbfK8LsG.mjs"; -import { B as V } from "./base-component-DHbs0JQk.mjs"; -const i = "toast", _ = "Toast", W = `.${i}`, X = `[${R}="${i}"]`, q = `[${U}="${i}"]`, l = "showing", x = "hide", Y = { +import { B as x, h as p, f as l, r, q as A, n as H, l as P, d, a6 as $, a7 as N, v as y, w as j, T as i, g as z, c as g, t as D, e as b, m as T, D as F } from "./base-component-ylZzLp-h.mjs"; +import { E as G, r as J } from "./event-listener-C1-Yf9Z5.mjs"; +import { f as h } from "./fadeClass-CLIYI_zn.mjs"; +import { s as f } from "./showClass-C8hdJfjQ.mjs"; +import { d as K } from "./dataBsDismiss-DdNPQYa-.mjs"; +import { d as M } from "./dataBsToggle-B84TS15h.mjs"; +import { g as B } from "./getTargetElement-BFOUI7hP.mjs"; +const a = "toast", I = "Toast", O = `.${a}`, Q = `[${K}="${a}"]`, k = `[${M}="${a}"]`, c = "showing", q = "hide", R = { animation: !0, autohide: !0, delay: 5e3 -}, T = (s) => K(s, _), Z = (s) => new g(s), S = v( - `show.bs.${i}` -), tt = v( - `shown.bs.${i}` -), $ = v( - `hide.bs.${i}` -), et = v( - `hidden.bs.${i}` -), y = (s) => { - const { element: t, options: e } = s; - c(t, l), r.clear(t, l), u(t, tt); - // istanbul ignore else @preserve - e.autohide && r.set(t, () => s.hide(), e.delay, i); -}, b = (s) => { - const { element: t } = s; - c(t, l), c(t, p), d(t, x), r.clear(t, i), u(t, et); -}, st = (s) => { - const { element: t, options: e } = s; - d(t, l), e.animation ? (B(t), I(t, () => b(s))) : b(s); -}, ot = (s) => { - const { element: t, options: e } = s; - r.set( +}, v = (e) => z(e, I), U = (e) => new st(e), E = g( + `show.bs.${a}` +), V = g( + `shown.bs.${a}` +), w = g( + `hide.bs.${a}` +), W = g( + `hidden.bs.${a}` +), C = (e) => { + const { element: t, options: s } = e; + r(t, c), i.clear(t, c), d(t, V), s.autohide && i.set(t, () => e.hide(), s.delay, a); +}, S = (e) => { + const { element: t } = e; + r(t, c), r(t, f), l(t, q), i.clear(t, a), d(t, W); +}, X = (e) => { + const { element: t, options: s } = e; + l(t, c), s.animation ? (D(t), b(t, () => S(e))) : S(e); +}, Y = (e) => { + const { element: t, options: s } = e; + i.set( t, () => { - c(t, x), B(t), d(t, p), d(t, l), e.animation ? I(t, () => y(s)) : y(s); + r(t, q), D(t), l(t, f), l(t, c), s.animation ? b(t, () => C(e)) : C(e); }, 17, - l + c ); -}, nt = (s) => { - const { target: t } = s, e = t && M(t, q), o = e && k(e), n = o && T(o); - // istanbul ignore else @preserve - if (n) { - // istanbul ignore else @preserve - e && e.tagName === "A" && s.preventDefault(), n.relatedTarget = e, n.show(); - } -}, it = (s) => { - const t = s.target, e = T(t), { type: o, relatedTarget: n } = s; - // istanbul ignore else @preserve: a solid filter is required - e && t !== n && !t.contains(n) && ([L, D].includes(o) ? r.clear(t, i) : r.set(t, () => e.hide(), e.options.delay, i)); +}, Z = (e) => { + const { target: t } = e, s = t && F(t, k), o = s && B(s), n = o && v(o); + n && (s && s.tagName === "A" && e.preventDefault(), n.relatedTarget = s, n.show()); +}, tt = (e) => { + const t = e.target, s = v(t), { type: o, relatedTarget: n } = e; + s && t !== n && !t.contains(n) && ([y, $].includes(o) ? i.clear(t, a) : i.set(t, () => s.hide(), s.options.delay, a)); }; -class g extends V { +class st extends x { + static selector = O; + static init = U; + static getInstance = v; /** * @param target the target `.toast` element * @param config the instance options */ - constructor(e, o) { - super(e, o); - // TOAST PUBLIC METHODS - // ==================== - /** Shows the toast. */ - a(this, "show", () => { - const { element: e, isShown: o } = this; - // istanbul ignore else @preserve - e && !o && (u(e, S), S.defaultPrevented || ot(this)); - }); - /** Hides the toast. */ - a(this, "hide", () => { - const { element: e, isShown: o } = this; - // istanbul ignore else @preserve - e && o && (u(e, $), $.defaultPrevented || st(this)); - }); - /** - * Toggles on/off the `click` event listener. - * - * @param add when `true`, it will add the listener - */ - a(this, "_toggleEventListeners", (e) => { - const o = e ? O : Q, { element: n, triggers: m, dismiss: h, options: A, hide: H } = this; - // istanbul ignore else @preserve - h && o(h, C, H); - // istanbul ignore else @preserve - A.autohide && [D, G, L, J].forEach( - (E) => o(n, E, it) - ); - // istanbul ignore else @preserve - m.length && m.forEach( - (E) => o(E, C, nt) - ); - }); - const { element: n, options: m } = this; - m.animation && !w(n, f) ? d(n, f) : !m.animation && w(n, f) && c(n, f), this.dismiss = j(X, n), this.triggers = [ - ...z(q, F(n)) + constructor(t, s) { + super(t, s); + const { element: o, options: n } = this; + n.animation && !p(o, h) ? l(o, h) : !n.animation && p(o, h) && r(o, h), this.dismiss = A(Q, o), this.triggers = [ + ...H(k, P(o)) ].filter( - (h) => k(h) === n + (m) => B(m) === o ), this._toggleEventListeners(!0); } /** * Returns component name string. */ get name() { - return _; + return I; } /** * Returns component default options. */ get defaults() { - return Y; + return R; } /** * Returns *true* when toast is visible. */ get isShown() { - return w(this.element, p); + return p(this.element, f); } + // TOAST PUBLIC METHODS + // ==================== + /** Shows the toast. */ + show = () => { + const { element: t, isShown: s } = this; + t && !s && (d(t, E), E.defaultPrevented || Y(this)); + }; + /** Hides the toast. */ + hide = () => { + const { element: t, isShown: s } = this; + t && s && (d(t, w), w.defaultPrevented || X(this)); + }; + /** + * Toggles on/off the `click` event listener. + * + * @param add when `true`, it will add the listener + */ + _toggleEventListeners = (t) => { + const s = t ? G : J, { element: o, triggers: n, dismiss: m, options: L, hide: _ } = this; + m && s(m, T, _), L.autohide && [$, N, y, j].forEach( + (u) => s(o, u, tt) + ), n.length && n.forEach( + (u) => s(u, T, Z) + ); + }; /** Removes the `Toast` component from the target element. */ dispose() { - const { element: e, isShown: o } = this; - this._toggleEventListeners(), r.clear(e, i), o && c(e, p), super.dispose(); + const { element: t, isShown: s } = this; + this._toggleEventListeners(), i.clear(t, a), s && r(t, f), super.dispose(); } } -a(g, "selector", W), a(g, "init", Z), a(g, "getInstance", T); export { - g as default + st as default }; //# sourceMappingURL=toast.mjs.map diff --git a/dist/components/toast.mjs.map b/dist/components/toast.mjs.map index 6f234123..62ff2e39 100644 --- a/dist/components/toast.mjs.map +++ b/dist/components/toast.mjs.map @@ -1 +1 @@ -{"version":3,"file":"toast.mjs","sources":["../../src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","e","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","__publicField","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","btn","hasClass","fadeClass","querySelector","querySelectorAll","getDocument"],"mappings":";;;;;;;;;;;AACA,MAAMA,IAAc,SCAdC,IAAiB,SCoCjBC,IAAgB,IAAIF,CAAW,IAC/BG,IAAuB,IAAIC,CAAa,KAAKJ,CAAW,MACxDK,IAAsB,IAAIC,CAAY,KAAKN,CAAW,MACtDO,IAAe,WAEfC,IAAY,QAEZC,IAAgB;AAAA,EACpB,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AACT,GAMMC,IAAmB,CAACC,MACxBC,EAAmBD,GAASV,CAAc,GAKtCY,IAAoB,CAACF,MAAyB,IAAIG,EAAMH,CAAO,GAI/DI,IAAiBC;AAAA,EACrB,WAAWhB,CAAW;AACxB,GACMiB,KAAkBD;AAAA,EACtB,YAAYhB,CAAW;AACzB,GACMkB,IAAiBF;AAAA,EACrB,WAAWhB,CAAW;AACxB,GACMmB,KAAmBH;AAAA,EACvB,aAAahB,CAAW;AAC1B,GASMoB,IAAoB,CAACC,MAAgB;AACnC,QAAA,EAAE,SAAAV,GAAS,SAAAW,EAAA,IAAYD;AAC7B,EAAAE,EAAYZ,GAASJ,CAAY,GAC3BiB,EAAA,MAAMb,GAASJ,CAAY,GAEjCkB,EAAcd,GAASM,EAAe;AAAA,EAAA;AAEtC,EAAIK,EAAQ,YACJE,EAAA,IAAIb,GAA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src/strings/toastString.ts","../../src/strings/toastComponent.ts","../../src/components/toast.ts"],"sourcesContent":["/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n"],"names":["toastString","toastComponent","toastSelector","toastDismissSelector","dataBsDismiss","toastToggleSelector","dataBsToggle","showingClass","hideClass","toastDefaults","getToastInstance","element","getInstance","toastInitCallback","Toast","showToastEvent","createCustomEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","self","options","removeClass","Timer","dispatchEvent","hideToastComplete","showClass","addClass","hideToast","reflow","emulateTransitionEnd","showToast","toastClickHandler","target","trigger","closest","getTargetElement","interactiveToastHandler","type","relatedTarget","mouseenterEvent","focusinEvent","BaseComponent","config","hasClass","fadeClass","querySelector","querySelectorAll","getDocument","btn","isShown","add","action","addListener","removeListener","triggers","dismiss","hide","mouseclickEvent","focusoutEvent","mouseleaveEvent","e"],"mappings":";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C,GAAS,SAAAnC,GAAS,MAAAoC,MAAS;AAGtD,IAAID,KACKJ,EAAAI,GAASE,GAAiBD,CAAI,GAInCpC,EAAQ,YACV,CAACoB,GAAckB,GAAenB,GAAiBoB,CAAe,EAAE;AAAA,MAC9D,CAACC,MAAMT,EAAO1C,GAASmD,GAAGxB,EAAuB;AAAA,IACnD,GAGEkB,EAAS,UACFA,EAAA;AAAA,MAAQ,CAACN,MAChBG,EAAOH,GAAKS,GAAiB1B,CAAiB;AAAA,IAChD;AAAA,EAEJ;AAAA;AAAA,EAGA,UAAU;AACF,UAAA,EAAE,SAAAtB,GAAS,SAAAwC,EAAA,IAAY;AAC7B,SAAK,sBAAsB,GACrB3B,EAAA,MAAMb,GAASX,CAAW,GAE5BmD,KACF5B,EAAYZ,GAASgB,CAAS,GAEhC,MAAM,QAAQ;AAAA,EAAA;AAElB;"} \ No newline at end of file diff --git a/dist/components/tooltip--Tnf23hE.js b/dist/components/tooltip--Tnf23hE.js new file mode 100644 index 00000000..dea528db --- /dev/null +++ b/dist/components/tooltip--Tnf23hE.js @@ -0,0 +1,2 @@ +"use strict";const t=require("./base-component-D3rSrWwH.js"),q=require("./event-listener-W3RGkfJ6.js"),vt=require("./index-BRPRSfaI.js"),bt=require("./dataBsToggle-Dj-Ng54N.js"),Z=require("./showClass-D_Ms1FgG.js"),N=require("./popupContainer-D8In9VFi.js"),st=require("./fadeClass-Co6nOzNJ.js"),z="popover",ot="Popover",C="tooltip",rt=i=>{const e=i===C,s=e?`${i}-inner`:`${i}-body`,o=e?"":`

`,n=`
`,l=`
`;return`
${o+n+l}
`},ct={top:"top",bottom:"bottom",left:"start",right:"end"},tt=i=>{const e=/\b(top|bottom|start|end)+/,{element:s,tooltip:o,container:n,options:l,arrow:c}=i;if(o){const m={...ct},p=t.isRTL(s);t.setElementStyle(o,{top:"",left:"",right:"",bottom:""});const f=i.name===ot,{offsetWidth:r,offsetHeight:g}=o,{clientWidth:P,clientHeight:b,offsetWidth:B}=t.getDocumentElement(s);let{placement:a}=l;const{clientWidth:E,offsetWidth:T}=n,H=t.getElementStyle(n,"position")==="fixed",d=Math.abs(H?E-T:P-B),L=p&&H?d:0,w=P-(p?0:d)-1,{width:u,height:v,left:h,right:ft,top:D}=t.getBoundingClientRect(s,!0),{x:U,y:R}={x:h,y:D};t.setElementStyle(c,{top:"",left:"",right:"",bottom:""});let x=0,O="",y=0,K="",W="",Y="",Q="";const A=c.offsetWidth||0,$=c.offsetHeight||0,V=A/2;let _=D-g-$<0,k=D+g+v+$>=b,I=h-r-A=w;const G=["left","right"],X=["top","bottom"];_=G.includes(a)?D+v/2-g/2-$<0:_,k=G.includes(a)?D+g/2+v/2+$>=b:k,I=X.includes(a)?h+u/2-r/2=w:F,a=G.includes(a)&&I&&F?"top":a,a=a==="top"&&_?"bottom":a,a=a==="bottom"&&k?"top":a,a=a==="left"&&I?"right":a,a=a==="right"&&F?"left":a,o.className.includes(a)||(o.className=o.className.replace(e,m[a])),G.includes(a)?(a==="left"?y=U-r-(f?A:0):y=U+u+(f?A:0),_&&k?(x=0,O=0,W=D+v/2-$/2):_?(x=R,O="",W=v/2-A):k?(x=R-g+v,O="",W=g-v/2-A):(x=R-g/2+v/2,W=g/2-$/2)):X.includes(a)&&(a==="top"?x=R-g-(f?$:0):x=R+v+(f?$:0),I?(y=0,Y=U+u/2-V):F?(y="auto",K=0,Q=u/2+w-ft-V):(y=U-r/2+u/2,Y=r/2-V)),t.setElementStyle(o,{top:`${x}px`,bottom:O===""?"":`${O}px`,left:y==="auto"?y:`${y}px`,right:K!==""?`${K}px`:""}),t.isHTMLElement(c)&&(W!==""&&(c.style.top=`${W}px`),Y!==""?c.style.left=`${Y}px`:Q!==""&&(c.style.right=`${Q}px`));const gt=t.createCustomEvent(`updated.bs.${t.toLowerCase(i.name)}`);t.dispatchEvent(s,gt)}},et={template:rt(C),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},dt="data-original-title",M="Tooltip",S=(i,e,s)=>{if(t.isString(e)&&e.length){let o=e.trim();t.isFunction(s)&&(o=s(o));const l=new DOMParser().parseFromString(o,"text/html");i.append(...l.body.childNodes)}else t.isHTMLElement(e)?i.append(e):(t.isNodeList(e)||t.isArray(e)&&e.every(t.isNode))&&i.append(...e)},Et=i=>{const e=i.name===M,{id:s,element:o,options:n}=i,{title:l,placement:c,template:m,animation:p,customClass:f,sanitizeFn:r,dismissible:g,content:P,btnClose:b}=n,B=e?C:z,a={...ct};let E=[],T=[];t.isRTL(o)&&(a.left="end",a.right="start");const J=`bs-${B}-${a[c]}`;let H;if(t.isHTMLElement(m))H=m;else{const L=t.createElement("div");S(L,m,r),H=L.firstChild}i.tooltip=t.isHTMLElement(H)?H.cloneNode(!0):void 0;const{tooltip:d}=i;if(d){t.setAttribute(d,"id",s),t.setAttribute(d,"role",C);const L=e?`${C}-inner`:`${z}-body`,w=e?null:t.querySelector(`.${z}-header`,d),u=t.querySelector(`.${L}`,d);i.arrow=t.querySelector(`.${B}-arrow`,d);const{arrow:v}=i;if(t.isHTMLElement(l))E=[l.cloneNode(!0)];else{const h=t.createElement("div");S(h,l,r),E=[...h.childNodes]}if(t.isHTMLElement(P))T=[P.cloneNode(!0)];else{const h=t.createElement("div");S(h,P,r),T=[...h.childNodes]}if(g)if(l)if(t.isHTMLElement(b))E=[...E,b.cloneNode(!0)];else{const h=t.createElement("div");S(h,b,r),E=[...E,h.firstChild]}else if(w&&w.remove(),t.isHTMLElement(b))T=[...T,b.cloneNode(!0)];else{const h=t.createElement("div");S(h,b,r),T=[...T,h.firstChild]}e?l&&u&&S(u,l,r):(l&&w&&S(w,E,r),P&&u&&S(u,T,r),i.btn=t.querySelector(".btn-close",d)||void 0),t.addClass(d,"position-fixed"),t.addClass(v,"position-absolute"),t.hasClass(d,B)||t.addClass(d,B),p&&!t.hasClass(d,st.fadeClass)&&t.addClass(d,st.fadeClass),f&&!t.hasClass(d,f)&&t.addClass(d,f),t.hasClass(d,J)||t.addClass(d,J)}},Tt=i=>{const e=["HTML","BODY"],s=[];let{parentNode:o}=i;for(;o&&!e.includes(o.nodeName);)o=t.getParentNode(o),t.isShadowRoot(o)||t.isTableElement(o)||s.push(o);return s.find((n,l)=>t.getElementStyle(n,"position")!=="relative"&&s.slice(l+1).every(c=>t.getElementStyle(c,"position")==="static")?n:null)||t.getDocument(i).body},Ct=`[${bt.dataBsToggle}="${C}"],[data-tip="${C}"]`,ht="title";let it=i=>t.getInstance(i,M);const wt=i=>new ut(i),yt=i=>{const{element:e,tooltip:s,container:o,offsetParent:n}=i;t.removeAttribute(e,t.ariaDescribedBy),N.removePopup(s,o===n?o:n)},j=i=>{const{tooltip:e,container:s,offsetParent:o}=i;return e&&N.hasPopup(e,s===o?s:o)},$t=(i,e)=>{const{element:s}=i;i._toggleEventListeners(),t.hasAttribute(s,dt)&&i.name===M&&mt(i),e&&e()},pt=(i,e)=>{const s=e?q.E:q.r,{element:o}=i;s(t.getDocument(o),t.touchstartEvent,i.handleTouch,t.passiveHandler)},nt=i=>{const{element:e}=i,s=t.createCustomEvent(`shown.bs.${t.toLowerCase(i.name)}`);pt(i,!0),t.dispatchEvent(e,s),t.Timer.clear(e,"in")},lt=i=>{const{element:e}=i,s=t.createCustomEvent(`hidden.bs.${t.toLowerCase(i.name)}`);pt(i),yt(i),t.dispatchEvent(e,s),t.Timer.clear(e,"out")},at=(i,e)=>{const s=e?q.E:q.r,{element:o}=i,n=t.closest(o,`.${N.modalString}`),l=t.closest(o,`.${N.offcanvasString}`);e?i._observer.observe(i.element):i._observer.disconnect(),n&&s(n,`hide.bs.${N.modalString}`,i.handleHide),l&&s(l,`hide.bs.${N.offcanvasString}`,i.handleHide)},mt=(i,e)=>{const s=[dt,ht],{element:o}=i;t.setAttribute(o,s[e?0:1],e||t.getAttribute(o,s[0])||""),t.removeAttribute(o,s[e?1:0])};class ut extends t.BaseComponent{static selector=Ct;static init=wt;static getInstance=it;static styleTip=tt;constructor(e,s){super(e,s);const{element:o}=this,n=this.name===M,l=n?C:z,c=n?M:ot;it=p=>t.getInstance(p,c),this.enabled=!0,this.id=`${l}-${t.getUID(o,l)}`;const{options:m}=this;!m.title&&n||!n&&!m.content||(t.ObjectAssign(et,{titleAttr:""}),t.hasAttribute(o,ht)&&n&&typeof m.title=="string"&&mt(this,m.title),this.container=Tt(o),this.offsetParent=["sticky","fixed"].some(p=>t.getElementStyle(this.container,"position")===p)?this.container:t.getDocument(this.element).body,Et(this),this._observer=new vt.x(()=>this.update()),this._toggleEventListeners(!0))}get name(){return M}get defaults(){return et}handleFocus=()=>t.focus(this.element);handleShow=()=>this.show();show(){const{options:e,tooltip:s,element:o,container:n,offsetParent:l,id:c}=this,{animation:m}=e,p=t.Timer.get(o,"out"),f=n===l?n:l;t.Timer.clear(o,"out"),s&&!p&&!j(this)&&t.Timer.set(o,()=>{const r=t.createCustomEvent(`show.bs.${t.toLowerCase(this.name)}`);t.dispatchEvent(o,r),r.defaultPrevented||(N.appendPopup(s,f),t.setAttribute(o,t.ariaDescribedBy,`#${c}`),this.update(),at(this,!0),t.hasClass(s,Z.showClass)||t.addClass(s,Z.showClass),m?t.emulateTransitionEnd(s,()=>nt(this)):nt(this))},17,"in")}handleHide=()=>this.hide();hide(){const{options:e,tooltip:s,element:o}=this,{animation:n,delay:l}=e;t.Timer.clear(o,"in"),s&&j(this)&&t.Timer.set(o,()=>{const c=t.createCustomEvent(`hide.bs.${t.toLowerCase(this.name)}`);t.dispatchEvent(o,c),c.defaultPrevented||(this.update(),t.removeClass(s,Z.showClass),at(this),n?t.emulateTransitionEnd(s,()=>lt(this)):lt(this))},l+17,"out")}update=()=>{tt(this)};toggle=()=>{const{tooltip:e}=this;e&&!j(this)?this.show():this.hide()};enable(){const{enabled:e}=this;e||(this._toggleEventListeners(!0),this.enabled=!e)}disable(){const{tooltip:e,enabled:s}=this;s&&(e&&j(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!s)}toggleEnabled(){this.enabled?this.disable():this.enable()}handleTouch=({target:e})=>{const{tooltip:s,element:o}=this;s&&s.contains(e)||e===o||e&&o.contains(e)||this.hide()};_toggleEventListeners=e=>{const s=e?q.E:q.r,{element:o,options:n,btn:l}=this,{trigger:c}=n,p=!!(this.name!==M&&n.dismissible);c.includes("manual")||(this.enabled=!!e,c.split(" ").forEach(r=>{r===t.mousehoverEvent?(s(o,t.mousedownEvent,this.handleShow),s(o,t.mouseenterEvent,this.handleShow),p||(s(o,t.mouseleaveEvent,this.handleHide),s(t.getDocument(o),t.touchstartEvent,this.handleTouch,t.passiveHandler))):r===t.mouseclickEvent?s(o,r,p?this.handleShow:this.toggle):r===t.focusEvent&&(s(o,t.focusinEvent,this.handleShow),p||s(o,t.focusoutEvent,this.handleHide),t.isApple()&&s(o,t.mouseclickEvent,this.handleFocus)),p&&l&&s(l,t.mouseclickEvent,this.handleHide)}))};dispose(){const{tooltip:e,options:s}=this,o={...this,name:this.name},n=()=>setTimeout(()=>$t(o,()=>super.dispose()),17);s.animation&&j(o)?(this.options.delay=0,this.hide(),t.emulateTransitionEnd(e,n)):n()}}exports.Tooltip=ut;exports.getTipTemplate=rt;exports.popoverComponent=ot;exports.popoverString=z;exports.styleTip=tt;exports.tooltipDefaults=et; +//# sourceMappingURL=tooltip--Tnf23hE.js.map diff --git a/dist/components/tooltip-BG3vXGWl.js.map b/dist/components/tooltip--Tnf23hE.js.map similarity index 66% rename from dist/components/tooltip-BG3vXGWl.js.map rename to dist/components/tooltip--Tnf23hE.js.map index 9f0987ea..42fefba5 100644 --- a/dist/components/tooltip-BG3vXGWl.js.map +++ b/dist/components/tooltip--Tnf23hE.js.map @@ -1 +1 @@ -{"version":3,"file":"tooltip-BG3vXGWl.js","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = \"popover\";\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = \"Popover\";\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = \"tooltip\";\nexport default tooltipString;\n","import tooltipString from \"../strings/tooltipString\";\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : \"\";\n const arrow = `
`;\n const body = `
`;\n return `
${\n header + arrow + body\n }
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: \"top\",\n bottom: \"bottom\",\n left: \"start\",\n right: \"end\",\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from \"@thednp/shorty\";\n\nimport popoverComponent from \"../strings/popoverComponent\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport Tooltip from \"../components/tooltip\";\nimport type { TooltipEvent } from \"../interface/tooltip\";\nimport type { PopoverEvent } from \"../interface/popover\";\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } =\n getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } =\n container as HTMLElement;\n const parentPosition = getElementStyle(\n container as HTMLElement,\n \"position\",\n );\n const fixedParent = parentPosition === \"fixed\";\n const scrollbarWidth = fixedParent\n ? Math.abs(parentCWidth - parentOWidth)\n : Math.abs(htmlcw - htmlow);\n const leftBoundry = RTL && fixedParent\n // istanbul ignore next @preserve\n ? scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = \"\";\n let leftPosition: number | string = 0;\n let rightPosition: number | string = \"\";\n let arrowTop: number | string = \"\";\n let arrowLeft: number | string = \"\";\n let arrowRight: number | string = \"\";\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed =\n elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed =\n elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = [\"left\", \"right\"];\n const verticals = [\"top\", \"bottom\"];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement)\n ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry\n : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed\n ? \"top\"\n : placement;\n // recompute placement\n placement = placement === \"top\" && topExceed ? \"bottom\" : placement;\n placement = placement === \"bottom\" && bottomExceed ? \"top\" : placement;\n placement = placement === \"left\" && leftExceed ? \"right\" : placement;\n placement = placement === \"right\" && rightExceed\n ? \"left\"\n // istanbul ignore next @preserve\n : placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(\n tipClasses,\n tipPositions[placement],\n );\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === \"left\") {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = \"\";\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = \"\";\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === \"top\") {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = \"auto\";\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === \"\" ? \"\" : `${bottomPosition}px`,\n left: leftPosition === \"auto\" ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== \"\" ? `${rightPosition}px` : \"\",\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== \"\") {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== \"\") {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== \"\") {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from \"./getTipTemplate\";\nimport tooltipString from \"../strings/tooltipString\";\nimport { TooltipOptions } from \"../interface/tooltip\";\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: \"\",\n customClass: \"\",\n trigger: \"hover focus\",\n placement: \"top\",\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: \"\",\n dismissible: false,\n btnClose: \"\",\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = \"data-original-title\";\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = \"Tooltip\";\nexport default tooltipComponent;\n","import {\n isArray,\n isFunction,\n isHTMLElement,\n isNode,\n isNodeList,\n isString,\n} from \"@thednp/shorty\";\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (\n element: HTMLElement,\n content: Node[] | Node | string,\n sanitizeFn?: (s: string) => string,\n) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, \"text/html\");\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (\n isNodeList(content) || (isArray(content) && content.every(isNode))\n ) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import {\n addClass,\n createElement,\n hasClass,\n isHTMLElement,\n isRTL,\n querySelector,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport tooltipString from \"../strings/tooltipString\";\nimport popoverString from \"../strings/popoverString\";\nimport fadeClass from \"../strings/fadeClass\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport setHtml from \"./setHtml\";\nimport Tooltip from \"../components/tooltip\";\nimport Popover from \"../components/popover\";\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const {\n title,\n placement,\n template,\n animation,\n customClass,\n sanitizeFn,\n dismissible,\n content,\n btnClose,\n } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = \"end\";\n tipPositions.right = \"start\";\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement(\"div\") as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n // istanbul ignore next @preserve\n : undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, \"id\", id);\n setAttribute(tooltip, \"role\", tooltipString);\n\n const bodyClass = isTooltip\n ? `${tooltipString}-inner`\n : `${popoverString}-body`;\n const tooltipHeader = isTooltip\n ? null\n : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement(\"div\") as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement(\"div\") as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector(\".btn-close\", tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, \"position-fixed\");\n addClass(arrow, \"position-absolute\");\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import {\n getDocument,\n getElementStyle,\n getParentNode,\n isShadowRoot,\n isTableElement,\n} from \"@thednp/shorty\";\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = [\"HTML\", \"BODY\"];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, \"position\") !== \"relative\" &&\n containers.slice(i + 1).every((r) =>\n getElementStyle(r as HTMLElement, \"position\") === \"static\"\n )\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport dataOriginalTitle from \"../strings/dataOriginalTitle\";\nimport showClass from \"../strings/showClass\";\nimport tooltipString from \"../strings/tooltipString\";\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\n\nimport styleTip from \"../util/styleTip\";\nimport createTip from \"../util/createTip\";\nimport { appendPopup, hasPopup, removePopup } from \"../util/popupContainer\";\nimport getElementContainer from \"../util/getElementContainer\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport BaseComponent from \"./base-component\";\nimport type { TooltipEvent, TooltipOptions } from \"../interface/tooltip\";\nimport type { PopoverEvent, PopoverOptions } from \"../interface/popover\";\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector =\n `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = \"title\";\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) =>\n getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(\n tooltip as HTMLElement,\n container === offsetParent ? container : offsetParent,\n );\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip &&\n hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent\n ) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(\n getDocument(element),\n touchstartEvent,\n self.handleTouch,\n passiveHandler,\n );\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, \"in\");\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, \"out\");\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n // const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n if (add) self._observer.observe(self.element);\n else self._observer.disconnect();\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n \"\",\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) =>\n getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: \"\" });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, titleAttr) && isTooltip &&\n typeof options.title === \"string\"\n ) {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = [\"sticky\", \"fixed\"].some(\n (position) =>\n getElementStyle(this.container as HTMLElement, \"position\") ===\n position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // create observer\n this._observer = new PositionObserver(() => this.update());\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, \"out\");\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, \"out\");\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n \"in\",\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, \"in\");\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n \"out\",\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible\n ? true\n : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes(\"manual\")) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(\" \");\n\n triggerOptions.forEach((tr) => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(\n getDocument(element),\n touchstartEvent,\n this.handleTouch,\n passiveHandler,\n );\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () =>\n setTimeout(\n () => disposeTooltipComplete(clone, () => super.dispose()),\n 17,\n );\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","closest","modalString","parentOffcanvas","offcanvasString","titleAtt","getAttribute","BaseComponent","target","config","__publicField","focus","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","ObjectAssign","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","clone"],"mappings":"ueACMA,EAAgB,UCAhBC,GAAmB,UCAnBC,EAAgB,UCOhBC,GAAkBC,GAAoB,CAC1C,MAAMC,EAAYD,IAAYF,EACxBI,EAAYD,EAAY,GAAGD,CAAO,SAAW,GAAGA,CAAO,QACvDG,EAAUF,EAAoD,GAAxC,cAAcD,CAAO,iBAC3CI,EAAQ,eAAeJ,CAAO,iBAC9BK,EAAO,eAAeH,CAAS,WACrC,MAAO,eAAeF,CAAO,WAAWF,CAAa,KACnDK,EAASC,EAAQC,CACnB,QACF,ECjBMC,GAAoB,CACxB,IAAK,MACL,OAAQ,SACR,KAAM,QACN,MAAO,KACT,ECkBMC,GAA+BC,GAAY,CAC/C,MAAMC,EAAa,4BACb,CAAE,QAAAC,EAAS,QAAAC,EAAS,UAAAC,EAAW,QAAAC,EAAS,MAAAT,GAAUI,EAAA;AAG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CAAC,KACpC,IAAI,CAAA,CAEnC,EACAuC,EAAQ,GACR,KACF,CACF,CAiBF,QAAS,CACD,KAAA,CAAE,QAAAG,GAAY,KAAA;AAEfA,IACH,KAAK,sBAAsB,EAAI,EAC/B,KAAK,QAAU,CAACA,EAClB,CAIF,SAAU,CACF,KAAA,CAAE,QAAAzK,EAAS,QAAAyK,CAAA,EAAY,KAAA;AAEzBA,IACEzK,GAAW+G,EAAO,IAAI,QAAQ,KAAK,EACvC,KAAK,sBAAsB,EAC3B,KAAK,QAAU,CAAC0D,EAClB,CAIF,eAAgB,CACT,KAAK,aACA,QAAQ,EADC,KAAK,OAAO,CACb,CAiFpB,SAAU,CACF,KAAA,CAAE,QAAAzK,EAAS,QAAAE,CAAA,EAAY,KACvBwK,EAAQ,CAAE,GAAG,KAAM,KAAM,KAAK,IAAK,EACnCxD,EAAW,IACf,WACE,IAAMD,GAAuByD,EAAO,IAAM,MAAM,SAAS,EACzD,EACF,EAEExK,EAAQ,WAAa6G,EAAO2D,CAAK,GACnC,KAAK,QAAQ,MAAQ,EACrB,KAAK,KAAK,EACVL,EAAA,qBAAqBrK,EAAwBkH,CAAQ,GAE5CA,EAAA,CACX,CAEJ,CAvTE0B,EADmBnC,EACZ,WAAWN,IAClByC,EAFmBnC,EAEZ,OAAOD,IACdoC,EAHmBnC,EAGZ,cAAcH,IACrBsC,EAJmBnC,EAIZ,WAAW7G"} \ No newline at end of file +{"version":3,"file":"tooltip--Tnf23hE.js","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = \"popover\";\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = \"Popover\";\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = \"tooltip\";\nexport default tooltipString;\n","import tooltipString from \"../strings/tooltipString\";\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : \"\";\n const arrow = `
`;\n const body = `
`;\n return `
${\n header + arrow + body\n }
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: \"top\",\n bottom: \"bottom\",\n left: \"start\",\n right: \"end\",\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from \"@thednp/shorty\";\n\nimport popoverComponent from \"../strings/popoverComponent\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport Tooltip from \"../components/tooltip\";\nimport type { TooltipEvent } from \"../interface/tooltip\";\nimport type { PopoverEvent } from \"../interface/popover\";\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } =\n getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } =\n container as HTMLElement;\n const parentPosition = getElementStyle(\n container as HTMLElement,\n \"position\",\n );\n const fixedParent = parentPosition === \"fixed\";\n const scrollbarWidth = fixedParent\n ? Math.abs(parentCWidth - parentOWidth)\n : Math.abs(htmlcw - htmlow);\n const leftBoundry = RTL && fixedParent\n // istanbul ignore next @preserve\n ? scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = \"\";\n let leftPosition: number | string = 0;\n let rightPosition: number | string = \"\";\n let arrowTop: number | string = \"\";\n let arrowLeft: number | string = \"\";\n let arrowRight: number | string = \"\";\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed =\n elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed =\n elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = [\"left\", \"right\"];\n const verticals = [\"top\", \"bottom\"];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement)\n ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry\n : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed\n ? \"top\"\n : placement;\n // recompute placement\n placement = placement === \"top\" && topExceed ? \"bottom\" : placement;\n placement = placement === \"bottom\" && bottomExceed ? \"top\" : placement;\n placement = placement === \"left\" && leftExceed ? \"right\" : placement;\n placement = placement === \"right\" && rightExceed\n ? \"left\"\n // istanbul ignore next @preserve\n : placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(\n tipClasses,\n tipPositions[placement],\n );\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === \"left\") {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = \"\";\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = \"\";\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === \"top\") {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = \"auto\";\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === \"\" ? \"\" : `${bottomPosition}px`,\n left: leftPosition === \"auto\" ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== \"\" ? `${rightPosition}px` : \"\",\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== \"\") {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== \"\") {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== \"\") {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from \"./getTipTemplate\";\nimport tooltipString from \"../strings/tooltipString\";\nimport { TooltipOptions } from \"../interface/tooltip\";\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: \"\",\n customClass: \"\",\n trigger: \"hover focus\",\n placement: \"top\",\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: \"\",\n dismissible: false,\n btnClose: \"\",\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = \"data-original-title\";\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = \"Tooltip\";\nexport default tooltipComponent;\n","import {\n isArray,\n isFunction,\n isHTMLElement,\n isNode,\n isNodeList,\n isString,\n} from \"@thednp/shorty\";\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (\n element: HTMLElement,\n content: Node[] | Node | string,\n sanitizeFn?: (s: string) => string,\n) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, \"text/html\");\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (\n isNodeList(content) || (isArray(content) && content.every(isNode))\n ) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import {\n addClass,\n createElement,\n hasClass,\n isHTMLElement,\n isRTL,\n querySelector,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport tooltipString from \"../strings/tooltipString\";\nimport popoverString from \"../strings/popoverString\";\nimport fadeClass from \"../strings/fadeClass\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport setHtml from \"./setHtml\";\nimport Tooltip from \"../components/tooltip\";\nimport Popover from \"../components/popover\";\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const {\n title,\n placement,\n template,\n animation,\n customClass,\n sanitizeFn,\n dismissible,\n content,\n btnClose,\n } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = \"end\";\n tipPositions.right = \"start\";\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement(\"div\") as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n // istanbul ignore next @preserve\n : undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, \"id\", id);\n setAttribute(tooltip, \"role\", tooltipString);\n\n const bodyClass = isTooltip\n ? `${tooltipString}-inner`\n : `${popoverString}-body`;\n const tooltipHeader = isTooltip\n ? null\n : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement(\"div\") as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement(\"div\") as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector(\".btn-close\", tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, \"position-fixed\");\n addClass(arrow, \"position-absolute\");\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import {\n getDocument,\n getElementStyle,\n getParentNode,\n isShadowRoot,\n isTableElement,\n} from \"@thednp/shorty\";\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = [\"HTML\", \"BODY\"];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, \"position\") !== \"relative\" &&\n containers.slice(i + 1).every((r) =>\n getElementStyle(r as HTMLElement, \"position\") === \"static\"\n )\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport dataOriginalTitle from \"../strings/dataOriginalTitle\";\nimport showClass from \"../strings/showClass\";\nimport tooltipString from \"../strings/tooltipString\";\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\n\nimport styleTip from \"../util/styleTip\";\nimport createTip from \"../util/createTip\";\nimport { appendPopup, hasPopup, removePopup } from \"../util/popupContainer\";\nimport getElementContainer from \"../util/getElementContainer\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport BaseComponent from \"./base-component\";\nimport type { TooltipEvent, TooltipOptions } from \"../interface/tooltip\";\nimport type { PopoverEvent, PopoverOptions } from \"../interface/popover\";\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector =\n `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = \"title\";\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) =>\n getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(\n tooltip as HTMLElement,\n container === offsetParent ? container : offsetParent,\n );\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip &&\n hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent\n ) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(\n getDocument(element),\n touchstartEvent,\n self.handleTouch,\n passiveHandler,\n );\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, \"in\");\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, \"out\");\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n // const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n if (add) self._observer.observe(self.element);\n else self._observer.disconnect();\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n \"\",\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) =>\n getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: \"\" });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, titleAttr) && isTooltip &&\n typeof options.title === \"string\"\n ) {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = [\"sticky\", \"fixed\"].some(\n (position) =>\n getElementStyle(this.container as HTMLElement, \"position\") ===\n position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // create observer\n this._observer = new PositionObserver(() => this.update());\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, \"out\");\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, \"out\");\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n \"in\",\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, \"in\");\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n \"out\",\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible\n ? true\n : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes(\"manual\")) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(\" \");\n\n triggerOptions.forEach((tr) => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(\n getDocument(element),\n touchstartEvent,\n this.handleTouch,\n passiveHandler,\n );\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple()) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () =>\n setTimeout(\n () => disposeTooltipComplete(clone, () => super.dispose()),\n 17,\n );\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","r","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","closest","modalString","parentOffcanvas","offcanvasString","titleAtt","getAttribute","BaseComponent","target","config","tipComponent","elem","getUID","ObjectAssign","position","PositionObserver","focus","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","clone"],"mappings":"uSACMA,EAAgB,UCAhBC,GAAmB,UCAnBC,EAAgB,UCOhBC,GAAkBC,GAAoB,CAC1C,MAAMC,EAAYD,IAAYF,EACxBI,EAAYD,EAAY,GAAGD,CAAO,SAAW,GAAGA,CAAO,QACvDG,EAAUF,EAAoD,GAAxC,cAAcD,CAAO,iBAC3CI,EAAQ,eAAeJ,CAAO,iBAC9BK,EAAO,eAAeH,CAAS,WACrC,MAAO,eAAeF,CAAO,WAAWF,CAAa,KACnDK,EAASC,EAAQC,CACnB,QACF,ECjBMC,GAAoB,CACxB,IAAK,MACL,OAAQ,SACR,KAAM,QACN,MAAO,KACT,ECkBMC,GAA+BC,GAAY,CAC/C,MAAMC,EAAa,4BACb,CAAE,QAAAC,EAAS,QAAAC,EAAS,UAAAC,EAAW,QAAAC,EAAS,MAAAT,GAAUI,EAGxD,GAAIG,EAAS,CACL,MAAAG,EAAe,CAAE,GAAGR,EAAkB,EACtCS,EAAMC,QAAMN,CAAO,EAGzBO,EAAAA,gBAAgBN,EAAS,CAEvB,IAAK,GACL,KAAM,GACN,MAAO,GACP,OAAQ,E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,CAAE,GAAG,KAAM,KAAM,KAAK,IAAK,EACnCvD,EAAW,IACf,WACE,IAAMD,GAAuBwD,EAAO,IAAM,MAAM,SAAS,EACzD,EACF,EAEExK,EAAQ,WAAa8G,EAAO0D,CAAK,GACnC,KAAK,QAAQ,MAAQ,EACrB,KAAK,KAAK,EACVjB,EAAA,qBAAqBzJ,EAAwBmH,CAAQ,GAE5CA,EAAA,CACX,CAEJ"} \ No newline at end of file diff --git a/dist/components/tooltip-B5F6ZNW7.mjs b/dist/components/tooltip-B5F6ZNW7.mjs new file mode 100644 index 00000000..cbcd2960 --- /dev/null +++ b/dist/components/tooltip-B5F6ZNW7.mjs @@ -0,0 +1,327 @@ +import { i as Pt, K as ct, Q as It, P as tt, R as kt, u as y, c as Q, a8 as U, d as V, I as Ft, a9 as jt, aa as zt, ab as qt, ac as Kt, a3 as z, s as et, q as J, f as L, h as K, ad as Qt, ae as Ut, af as Vt, l as st, B as Yt, g as yt, ag as Zt, O as Gt, M as xt, N as Jt, T as B, e as rt, r as Xt, ah as te, V as ee, v as se, w as oe, z as St, m as dt, S as ie, a6 as ne, a7 as ae, ai as le, D as ft, b as ce, Z as Ht, aj as Nt, x as At } from "./base-component-ylZzLp-h.mjs"; +import { E as pt, r as mt } from "./event-listener-C1-Yf9Z5.mjs"; +import { x as re } from "./index-gZuXW-3_.mjs"; +import { d as de } from "./dataBsToggle-B84TS15h.mjs"; +import { s as ht } from "./showClass-C8hdJfjQ.mjs"; +import { a as he, h as pe, m as ut, o as gt, r as me } from "./popupContainer-ymf2oGcv.mjs"; +import { f as bt } from "./fadeClass-CLIYI_zn.mjs"; +const X = "popover", Lt = "Popover", w = "tooltip", fe = (o) => { + const t = o === w, s = t ? `${o}-inner` : `${o}-body`, e = t ? "" : `

`, i = `
`, n = `
`; + return `
${e + i + n}
`; +}, Bt = { + top: "top", + bottom: "bottom", + left: "start", + right: "end" +}, vt = (o) => { + const t = /\b(top|bottom|start|end)+/, { element: s, tooltip: e, container: i, options: n, arrow: c } = o; + if (e) { + const p = { ...Bt }, h = Pt(s); + ct(e, { + // top: '0px', left: '0px', right: '', bottom: '', + top: "", + left: "", + right: "", + bottom: "" + }); + const f = o.name === Lt, { offsetWidth: l, offsetHeight: u } = e, { clientWidth: x, clientHeight: b, offsetWidth: O } = It(s); + let { placement: a } = n; + const { clientWidth: v, offsetWidth: T } = i, S = tt( + i, + "position" + ) === "fixed", r = Math.abs(S ? v - T : x - O), H = h && S ? r : 0, $ = x - (h ? 0 : r) - 1, { + width: m, + height: g, + left: d, + right: Mt, + top: R + } = kt(s, !0), { x: Y, y: M } = { + x: d, + y: R + }; + ct(c, { + top: "", + left: "", + right: "", + bottom: "" + }); + let N = 0, _ = "", E = 0, it = "", D = "", Z = "", nt = ""; + const A = c.offsetWidth || 0, C = c.offsetHeight || 0, at = A / 2; + let I = R - u - C < 0, k = R + u + g + C >= b, F = d - l - A < H, j = d + l + m + A >= $; + const G = ["left", "right"], lt = ["top", "bottom"]; + I = G.includes(a) ? R + g / 2 - u / 2 - C < 0 : I, k = G.includes(a) ? R + u / 2 + g / 2 + C >= b : k, F = lt.includes(a) ? d + m / 2 - l / 2 < H : F, j = lt.includes(a) ? d + l / 2 + m / 2 >= $ : j, a = G.includes(a) && F && j ? "top" : a, a = a === "top" && I ? "bottom" : a, a = a === "bottom" && k ? "top" : a, a = a === "left" && F ? "right" : a, a = a === "right" && j ? "left" : a, e.className.includes(a) || (e.className = e.className.replace( + t, + p[a] + )), G.includes(a) ? (a === "left" ? E = Y - l - (f ? A : 0) : E = Y + m + (f ? A : 0), I && k ? (N = 0, _ = 0, D = R + g / 2 - C / 2) : I ? (N = M, _ = "", D = g / 2 - A) : k ? (N = M - u + g, _ = "", D = u - g / 2 - A) : (N = M - u / 2 + g / 2, D = u / 2 - C / 2)) : lt.includes(a) && (a === "top" ? N = M - u - (f ? C : 0) : N = M + g + (f ? C : 0), F ? (E = 0, Z = Y + m / 2 - at) : j ? (E = "auto", it = 0, nt = m / 2 + $ - Mt - at) : (E = Y - l / 2 + m / 2, Z = l / 2 - at)), ct(e, { + top: `${N}px`, + bottom: _ === "" ? "" : `${_}px`, + left: E === "auto" ? E : `${E}px`, + right: it !== "" ? `${it}px` : "" + }), y(c) && (D !== "" && (c.style.top = `${D}px`), Z !== "" ? c.style.left = `${Z}px` : nt !== "" && (c.style.right = `${nt}px`)); + const _t = Q( + `updated.bs.${U(o.name)}` + ); + V(s, _t); + } +}, Tt = { + template: fe(w), + title: "", + customClass: "", + trigger: "hover focus", + placement: "top", + sanitizeFn: void 0, + animation: !0, + delay: 200, + container: document.body, + content: "", + dismissible: !1, + btnClose: "" +}, Wt = "data-original-title", W = "Tooltip", P = (o, t, s) => { + if (Ft(t) && t.length) { + let e = t.trim(); + jt(s) && (e = s(e)); + const n = new DOMParser().parseFromString(e, "text/html"); + o.append(...n.body.childNodes); + } else y(t) ? o.append(t) : (zt(t) || qt(t) && t.every(Kt)) && o.append(...t); +}, ue = (o) => { + const t = o.name === W, { id: s, element: e, options: i } = o, { + title: n, + placement: c, + template: p, + animation: h, + customClass: f, + sanitizeFn: l, + dismissible: u, + content: x, + btnClose: b + } = i, O = t ? w : X, a = { ...Bt }; + let v = [], T = []; + Pt(e) && (a.left = "end", a.right = "start"); + const ot = `bs-${O}-${a[c]}`; + let S; + if (y(p)) + S = p; + else { + const H = z("div"); + P(H, p, l), S = H.firstChild; + } + o.tooltip = y(S) ? S.cloneNode(!0) : void 0; + const { tooltip: r } = o; + if (r) { + et(r, "id", s), et(r, "role", w); + const H = t ? `${w}-inner` : `${X}-body`, $ = t ? null : J(`.${X}-header`, r), m = J(`.${H}`, r); + o.arrow = J(`.${O}-arrow`, r); + const { arrow: g } = o; + if (y(n)) v = [n.cloneNode(!0)]; + else { + const d = z("div"); + P(d, n, l), v = [...d.childNodes]; + } + if (y(x)) T = [x.cloneNode(!0)]; + else { + const d = z("div"); + P(d, x, l), T = [...d.childNodes]; + } + if (u) + if (n) + if (y(b)) + v = [...v, b.cloneNode(!0)]; + else { + const d = z("div"); + P(d, b, l), v = [...v, d.firstChild]; + } + else if ($ && $.remove(), y(b)) + T = [...T, b.cloneNode(!0)]; + else { + const d = z("div"); + P(d, b, l), T = [...T, d.firstChild]; + } + t ? n && m && P(m, n, l) : (n && $ && P($, v, l), x && m && P(m, T, l), o.btn = J(".btn-close", r) || void 0), L(r, "position-fixed"), L(g, "position-absolute"), K(r, O) || L(r, O), h && !K(r, bt) && L(r, bt), f && !K(r, f) && L(r, f), K(r, ot) || L(r, ot); + } +}, ge = (o) => { + const t = ["HTML", "BODY"], s = []; + let { parentNode: e } = o; + for (; e && !t.includes(e.nodeName); ) + e = Qt(e), Ut(e) || Vt(e) || s.push(e); + return s.find((i, n) => tt(i, "position") !== "relative" && s.slice(n + 1).every( + (c) => tt(c, "position") === "static" + ) ? i : null) || // istanbul ignore next: optional guard + st(o).body; +}, be = `[${de}="${w}"],[data-tip="${w}"]`, Ot = "title"; +let wt = (o) => yt(o, W); +const ve = (o) => new $e(o), Te = (o) => { + const { element: t, tooltip: s, container: e, offsetParent: i } = o; + Ht(t, Nt), me( + s, + e === i ? e : i + ); +}, q = (o) => { + const { tooltip: t, container: s, offsetParent: e } = o; + return t && pe(t, s === e ? s : e); +}, we = (o, t) => { + const { element: s } = o; + o._toggleEventListeners(), xt(s, Wt) && o.name === W && Dt(o), t && t(); +}, Rt = (o, t) => { + const s = t ? pt : mt, { element: e } = o; + s( + st(e), + St, + o.handleTouch, + At + ); +}, $t = (o) => { + const { element: t } = o, s = Q( + `shown.bs.${U(o.name)}` + ); + Rt(o, !0), V(t, s), B.clear(t, "in"); +}, Et = (o) => { + const { element: t } = o, s = Q( + `hidden.bs.${U(o.name)}` + ); + Rt(o), Te(o), V(t, s), B.clear(t, "out"); +}, Ct = (o, t) => { + const s = t ? pt : mt, { element: e } = o, i = ft(e, `.${ut}`), n = ft(e, `.${gt}`); + t ? o._observer.observe(o.element) : o._observer.disconnect(), i && s(i, `hide.bs.${ut}`, o.handleHide), n && s(n, `hide.bs.${gt}`, o.handleHide); +}, Dt = (o, t) => { + const s = [Wt, Ot], { element: e } = o; + et( + e, + s[t ? 0 : 1], + t || ce(e, s[0]) || // istanbul ignore next @preserve + "" + ), Ht(e, s[t ? 1 : 0]); +}; +class $e extends Yt { + static selector = be; + static init = ve; + static getInstance = wt; + static styleTip = vt; + /** + * @param target the target element + * @param config the instance options + */ + constructor(t, s) { + super(t, s); + const { element: e } = this, i = this.name === W, n = i ? w : X, c = i ? W : Lt; + wt = (h) => yt(h, c), this.enabled = !0, this.id = `${n}-${Zt(e, n)}`; + const { options: p } = this; + !p.title && i || !i && !p.content || (Gt(Tt, { titleAttr: "" }), xt(e, Ot) && i && typeof p.title == "string" && Dt(this, p.title), this.container = ge(e), this.offsetParent = ["sticky", "fixed"].some( + (h) => tt(this.container, "position") === h + ) ? this.container : st(this.element).body, ue(this), this._observer = new re(() => this.update()), this._toggleEventListeners(!0)); + } + /** + * Returns component name string. + */ + get name() { + return W; + } + /** + * Returns component default options. + */ + get defaults() { + return Tt; + } + // TOOLTIP PUBLIC METHODS + // ====================== + /** Handles the focus event on iOS. */ + // istanbul ignore next @preserve - impossible to test without Apple device + handleFocus = () => Jt(this.element); + /** Shows the tooltip. */ + handleShow = () => this.show(); + show() { + const { options: t, tooltip: s, element: e, container: i, offsetParent: n, id: c } = this, { animation: p } = t, h = B.get(e, "out"), f = i === n ? i : n; + B.clear(e, "out"), s && !h && !q(this) && B.set( + e, + () => { + const l = Q( + `show.bs.${U(this.name)}` + ); + V(e, l), l.defaultPrevented || (he(s, f), et(e, Nt, `#${c}`), this.update(), Ct(this, !0), K(s, ht) || L(s, ht), p ? rt(s, () => $t(this)) : $t(this)); + }, + 17, + "in" + ); + } + /** Hides the tooltip. */ + handleHide = () => this.hide(); + hide() { + const { options: t, tooltip: s, element: e } = this, { animation: i, delay: n } = t; + B.clear(e, "in"), s && q(this) && B.set( + e, + () => { + const c = Q( + `hide.bs.${U(this.name)}` + ); + V(e, c), c.defaultPrevented || (this.update(), Xt(s, ht), Ct(this), i ? rt(s, () => Et(this)) : Et(this)); + }, + n + 17, + "out" + ); + } + /** Updates the tooltip position. */ + update = () => { + vt(this); + }; + /** Toggles the tooltip visibility. */ + toggle = () => { + const { tooltip: t } = this; + t && !q(this) ? this.show() : this.hide(); + }; + /** Enables the tooltip. */ + enable() { + const { enabled: t } = this; + t || (this._toggleEventListeners(!0), this.enabled = !t); + } + /** Disables the tooltip. */ + disable() { + const { tooltip: t, enabled: s } = this; + s && (t && q(this) && this.hide(), this._toggleEventListeners(), this.enabled = !s); + } + /** Toggles the `disabled` property. */ + toggleEnabled() { + this.enabled ? this.disable() : this.enable(); + } + /** + * Handles the `touchstart` event listener for `Tooltip` + * + * @this {Tooltip} + * @param {TouchEvent} e the `Event` object + */ + handleTouch = ({ target: t }) => { + const { tooltip: s, element: e } = this; + s && s.contains(t) || t === e || t && e.contains(t) || this.hide(); + }; + /** + * Toggles on/off the `Tooltip` event listeners. + * + * @param add when `true`, event listeners are added + */ + _toggleEventListeners = (t) => { + const s = t ? pt : mt, { element: e, options: i, btn: n } = this, { trigger: c } = i, h = !!(this.name !== W && i.dismissible); + c.includes("manual") || (this.enabled = !!t, c.split(" ").forEach((l) => { + l === te ? (s(e, ee, this.handleShow), s(e, se, this.handleShow), h || (s(e, oe, this.handleHide), s( + st(e), + St, + this.handleTouch, + At + ))) : l === dt ? s(e, l, h ? this.handleShow : this.toggle) : l === ie && (s(e, ne, this.handleShow), h || s(e, ae, this.handleHide), le() && s(e, dt, this.handleFocus)), h && n && s(n, dt, this.handleHide); + })); + }; + /** Removes the `Tooltip` from the target element. */ + dispose() { + const { tooltip: t, options: s } = this, e = { ...this, name: this.name }, i = () => setTimeout( + () => we(e, () => super.dispose()), + 17 + ); + s.animation && q(e) ? (this.options.delay = 0, this.hide(), rt(t, i)) : i(); + } +} +export { + $e as T, + X as a, + fe as g, + Lt as p, + vt as s, + Tt as t +}; +//# sourceMappingURL=tooltip-B5F6ZNW7.mjs.map diff --git a/dist/components/tooltip-Dyd4Gul9.mjs.map b/dist/components/tooltip-B5F6ZNW7.mjs.map similarity index 65% rename from dist/components/tooltip-Dyd4Gul9.mjs.map rename to dist/components/tooltip-B5F6ZNW7.mjs.map index b192d414..d73c738b 100644 --- a/dist/components/tooltip-Dyd4Gul9.mjs.map +++ b/dist/components/tooltip-B5F6ZNW7.mjs.map @@ -1 +1 @@ -{"version":3,"file":"tooltip-Dyd4Gul9.mjs","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = \"popover\";\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = \"Popover\";\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = \"tooltip\";\nexport default tooltipString;\n","import tooltipString from \"../strings/tooltipString\";\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : \"\";\n const arrow = `
`;\n const body = `
`;\n return `
${\n header + arrow + body\n }
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: \"top\",\n bottom: \"bottom\",\n left: \"start\",\n right: \"end\",\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from \"@thednp/shorty\";\n\nimport popoverComponent from \"../strings/popoverComponent\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport Tooltip from \"../components/tooltip\";\nimport type { TooltipEvent } from \"../interface/tooltip\";\nimport type { PopoverEvent } from \"../interface/popover\";\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } =\n getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } =\n container as HTMLElement;\n const parentPosition = getElementStyle(\n container as HTMLElement,\n \"position\",\n );\n const fixedParent = parentPosition === \"fixed\";\n const scrollbarWidth = fixedParent\n ? Math.abs(parentCWidth - parentOWidth)\n : Math.abs(htmlcw - htmlow);\n const leftBoundry = RTL && fixedParent\n // istanbul ignore next @preserve\n ? scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = \"\";\n let leftPosition: number | string = 0;\n let rightPosition: number | string = \"\";\n let arrowTop: number | string = \"\";\n let arrowLeft: number | string = \"\";\n let arrowRight: number | string = \"\";\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed =\n elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed =\n elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = [\"left\", \"right\"];\n const verticals = [\"top\", \"bottom\"];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement)\n ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry\n : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed\n ? \"top\"\n : placement;\n // recompute placement\n placement = placement === \"top\" && topExceed ? \"bottom\" : placement;\n placement = placement === \"bottom\" && bottomExceed ? \"top\" : placement;\n placement = placement === \"left\" && leftExceed ? \"right\" : placement;\n placement = placement === \"right\" && rightExceed\n ? \"left\"\n // istanbul ignore next @preserve\n : placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(\n tipClasses,\n tipPositions[placement],\n );\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === \"left\") {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = \"\";\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = \"\";\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === \"top\") {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = \"auto\";\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === \"\" ? \"\" : `${bottomPosition}px`,\n left: leftPosition === \"auto\" ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== \"\" ? `${rightPosition}px` : \"\",\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== \"\") {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== \"\") {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== \"\") {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from \"./getTipTemplate\";\nimport tooltipString from \"../strings/tooltipString\";\nimport { TooltipOptions } from \"../interface/tooltip\";\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: \"\",\n customClass: \"\",\n trigger: \"hover focus\",\n placement: \"top\",\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: \"\",\n dismissible: false,\n btnClose: \"\",\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = \"data-original-title\";\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = \"Tooltip\";\nexport default tooltipComponent;\n","import {\n isArray,\n isFunction,\n isHTMLElement,\n isNode,\n isNodeList,\n isString,\n} from \"@thednp/shorty\";\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (\n element: HTMLElement,\n content: Node[] | Node | string,\n sanitizeFn?: (s: string) => string,\n) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, \"text/html\");\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (\n isNodeList(content) || (isArray(content) && content.every(isNode))\n ) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import {\n addClass,\n createElement,\n hasClass,\n isHTMLElement,\n isRTL,\n querySelector,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport tooltipString from \"../strings/tooltipString\";\nimport popoverString from \"../strings/popoverString\";\nimport fadeClass from \"../strings/fadeClass\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport setHtml from \"./setHtml\";\nimport Tooltip from \"../components/tooltip\";\nimport Popover from \"../components/popover\";\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const {\n title,\n placement,\n template,\n animation,\n customClass,\n sanitizeFn,\n dismissible,\n content,\n btnClose,\n } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = \"end\";\n tipPositions.right = \"start\";\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement(\"div\") as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n // istanbul ignore next @preserve\n : undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, \"id\", id);\n setAttribute(tooltip, \"role\", tooltipString);\n\n const bodyClass = isTooltip\n ? `${tooltipString}-inner`\n : `${popoverString}-body`;\n const tooltipHeader = isTooltip\n ? null\n : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement(\"div\") as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement(\"div\") as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector(\".btn-close\", tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, \"position-fixed\");\n addClass(arrow, \"position-absolute\");\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import {\n getDocument,\n getElementStyle,\n getParentNode,\n isShadowRoot,\n isTableElement,\n} from \"@thednp/shorty\";\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = [\"HTML\", \"BODY\"];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, \"position\") !== \"relative\" &&\n containers.slice(i + 1).every((r) =>\n getElementStyle(r as HTMLElement, \"position\") === \"static\"\n )\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport dataOriginalTitle from \"../strings/dataOriginalTitle\";\nimport showClass from \"../strings/showClass\";\nimport tooltipString from \"../strings/tooltipString\";\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\n\nimport styleTip from \"../util/styleTip\";\nimport createTip from \"../util/createTip\";\nimport { appendPopup, hasPopup, removePopup } from \"../util/popupContainer\";\nimport getElementContainer from \"../util/getElementContainer\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport BaseComponent from \"./base-component\";\nimport type { TooltipEvent, TooltipOptions } from \"../interface/tooltip\";\nimport type { PopoverEvent, PopoverOptions } from \"../interface/popover\";\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector =\n `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = \"title\";\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) =>\n getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(\n tooltip as HTMLElement,\n container === offsetParent ? container : offsetParent,\n );\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip &&\n hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent\n ) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(\n getDocument(element),\n touchstartEvent,\n self.handleTouch,\n passiveHandler,\n );\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, \"in\");\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, \"out\");\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n // const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n if (add) self._observer.observe(self.element);\n else self._observer.disconnect();\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n \"\",\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) =>\n getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: \"\" });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, titleAttr) && isTooltip &&\n typeof options.title === \"string\"\n ) {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = [\"sticky\", \"fixed\"].some(\n (position) =>\n getElementStyle(this.container as HTMLElement, \"position\") ===\n position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // create observer\n this._observer = new PositionObserver(() => this.update());\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, \"out\");\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, \"out\");\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n \"in\",\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, \"in\");\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n \"out\",\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible\n ? true\n : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes(\"manual\")) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(\" \");\n\n triggerOptions.forEach((tr) => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(\n getDocument(element),\n touchstartEvent,\n this.handleTouch,\n passiveHandler,\n );\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () =>\n setTimeout(\n () => disposeTooltipComplete(clone, () => super.dispose()),\n 17,\n );\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","r","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","closest","modalString","parentOffcanvas","offcanvasString","titleAtt","getAttribute","BaseComponent","target","config","__publicField","focus","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","ObjectAssign","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","clone"],"mappings":";;;;;;;;;;;AACA,MAAMA,KAAgB,WCAhBC,KAAmB,WCAnBC,IAAgB,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C,EAJmBnC,GAIZ,YAAW9G;"} \ No newline at end of file +{"version":3,"file":"tooltip-B5F6ZNW7.mjs","sources":["../../src/strings/popoverString.ts","../../src/strings/popoverComponent.ts","../../src/strings/tooltipString.ts","../../src/util/getTipTemplate.ts","../../src/util/tipClassPositions.ts","../../src/util/styleTip.ts","../../src/util/tooltipDefaults.ts","../../src/strings/dataOriginalTitle.ts","../../src/strings/tooltipComponent.ts","../../src/util/setHtml.ts","../../src/util/createTip.ts","../../src/util/getElementContainer.ts","../../src/components/tooltip.ts"],"sourcesContent":["/** @type {string} */\nconst popoverString = \"popover\";\nexport default popoverString;\n","/** @type {string} */\nconst popoverComponent = \"Popover\";\nexport default popoverComponent;\n","/** @type {string} */\nconst tooltipString = \"tooltip\";\nexport default tooltipString;\n","import tooltipString from \"../strings/tooltipString\";\n\n/**\n * Returns a template for Popover / Tooltip.\n *\n * @param tipType the expected markup type\n * @returns the template markup\n */\nconst getTipTemplate = (tipType: string) => {\n const isTooltip = tipType === tooltipString;\n const bodyClass = isTooltip ? `${tipType}-inner` : `${tipType}-body`;\n const header = !isTooltip ? `

` : \"\";\n const arrow = `
`;\n const body = `
`;\n return `
${\n header + arrow + body\n }
`;\n};\n\nexport default getTipTemplate;\n","const tipClassPositions = {\n top: \"top\",\n bottom: \"bottom\",\n left: \"start\",\n right: \"end\",\n};\n\nexport default tipClassPositions;\n","import {\n createCustomEvent,\n dispatchEvent,\n getBoundingClientRect,\n getDocumentElement,\n getElementStyle,\n isHTMLElement,\n isRTL,\n setElementStyle,\n toLowerCase,\n} from \"@thednp/shorty\";\n\nimport popoverComponent from \"../strings/popoverComponent\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport Tooltip from \"../components/tooltip\";\nimport type { TooltipEvent } from \"../interface/tooltip\";\nimport type { PopoverEvent } from \"../interface/popover\";\n\n/**\n * Style popovers and tooltips.\n *\n * @param self the `Popover` / `Tooltip` instance\n */\nconst styleTip = (self: T) => {\n const tipClasses = /\\b(top|bottom|start|end)+/;\n const { element, tooltip, container, options, arrow } = self;\n\n // istanbul ignore else @preserve\n if (tooltip) {\n const tipPositions = { ...tipClassPositions };\n const RTL = isRTL(element);\n\n // reset tooltip style (top: 0, left: 0 works best)\n setElementStyle(tooltip, {\n // top: '0px', left: '0px', right: '', bottom: '',\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n const isPopover = self.name === popoverComponent;\n const { offsetWidth: tipWidth, offsetHeight: tipHeight } = tooltip;\n const { clientWidth: htmlcw, clientHeight: htmlch, offsetWidth: htmlow } =\n getDocumentElement(element);\n let { placement } = options;\n const { clientWidth: parentCWidth, offsetWidth: parentOWidth } =\n container as HTMLElement;\n const parentPosition = getElementStyle(\n container as HTMLElement,\n \"position\",\n );\n const fixedParent = parentPosition === \"fixed\";\n const scrollbarWidth = fixedParent\n ? Math.abs(parentCWidth - parentOWidth)\n : Math.abs(htmlcw - htmlow);\n const leftBoundry = RTL && fixedParent\n // istanbul ignore next @preserve\n ? scrollbarWidth\n : 0;\n const rightBoundry = htmlcw - (!RTL ? scrollbarWidth : 0) - 1;\n const {\n width: elemWidth,\n height: elemHeight,\n left: elemRectLeft,\n right: elemRectRight,\n top: elemRectTop,\n } = getBoundingClientRect(element, true);\n const { x, y } = {\n x: elemRectLeft,\n y: elemRectTop,\n };\n // reset arrow style\n setElementStyle(arrow as HTMLElement, {\n top: \"\",\n left: \"\",\n right: \"\",\n bottom: \"\",\n });\n let topPosition: number | string = 0;\n let bottomPosition: number | string = \"\";\n let leftPosition: number | string = 0;\n let rightPosition: number | string = \"\";\n let arrowTop: number | string = \"\";\n let arrowLeft: number | string = \"\";\n let arrowRight: number | string = \"\";\n\n const arrowWidth = (arrow as HTMLElement).offsetWidth || 0;\n const arrowHeight = (arrow as HTMLElement).offsetHeight || 0;\n const arrowAdjust = arrowWidth / 2;\n\n // check placement\n let topExceed = elemRectTop - tipHeight - arrowHeight < 0;\n let bottomExceed =\n elemRectTop + tipHeight + elemHeight + arrowHeight >= htmlch;\n let leftExceed = elemRectLeft - tipWidth - arrowWidth < leftBoundry;\n let rightExceed =\n elemRectLeft + tipWidth + elemWidth + arrowWidth >= rightBoundry;\n\n const horizontals = [\"left\", \"right\"];\n const verticals = [\"top\", \"bottom\"];\n\n topExceed = horizontals.includes(placement)\n ? elemRectTop + elemHeight / 2 - tipHeight / 2 - arrowHeight < 0\n : topExceed;\n bottomExceed = horizontals.includes(placement)\n ? elemRectTop + tipHeight / 2 + elemHeight / 2 + arrowHeight >= htmlch\n : bottomExceed;\n leftExceed = verticals.includes(placement)\n ? elemRectLeft + elemWidth / 2 - tipWidth / 2 < leftBoundry\n : leftExceed;\n rightExceed = verticals.includes(placement)\n ? elemRectLeft + tipWidth / 2 + elemWidth / 2 >= rightBoundry\n : rightExceed;\n\n // first remove side positions if both left and right limits are exceeded\n // we usually fall back to top|bottom\n placement = horizontals.includes(placement) && leftExceed && rightExceed\n ? \"top\"\n : placement;\n // recompute placement\n placement = placement === \"top\" && topExceed ? \"bottom\" : placement;\n placement = placement === \"bottom\" && bottomExceed ? \"top\" : placement;\n placement = placement === \"left\" && leftExceed ? \"right\" : placement;\n placement = placement === \"right\" && rightExceed\n ? \"left\"\n // istanbul ignore next @preserve\n : placement;\n\n // update tooltip/popover class\n if (!tooltip.className.includes(placement)) {\n tooltip.className = tooltip.className.replace(\n tipClasses,\n tipPositions[placement],\n );\n }\n\n // compute tooltip / popover coordinates\n // istanbul ignore else @preserve\n if (horizontals.includes(placement)) {\n // secondary|side positions\n if (placement === \"left\") {\n // LEFT\n leftPosition = x - tipWidth - (isPopover ? arrowWidth : 0);\n } else {\n // RIGHT\n leftPosition = x + elemWidth + (isPopover ? arrowWidth : 0);\n }\n\n // adjust top and arrow\n if (topExceed && bottomExceed) {\n topPosition = 0;\n bottomPosition = 0;\n arrowTop = elemRectTop + elemHeight / 2 - arrowHeight / 2;\n } else if (topExceed) {\n topPosition = y;\n bottomPosition = \"\";\n arrowTop = elemHeight / 2 - arrowWidth;\n } else if (bottomExceed) {\n topPosition = y - tipHeight + elemHeight;\n bottomPosition = \"\";\n arrowTop = tipHeight - elemHeight / 2 - arrowWidth;\n } else {\n topPosition = y - tipHeight / 2 + elemHeight / 2;\n arrowTop = tipHeight / 2 - arrowHeight / 2;\n }\n } else if (verticals.includes(placement)) {\n if (placement === \"top\") {\n topPosition = y - tipHeight - (isPopover ? arrowHeight : 0);\n } else {\n // BOTTOM\n topPosition = y + elemHeight + (isPopover ? arrowHeight : 0);\n }\n\n // adjust left | right and also the arrow\n if (leftExceed) {\n leftPosition = 0;\n arrowLeft = x + elemWidth / 2 - arrowAdjust;\n } else if (rightExceed) {\n leftPosition = \"auto\";\n rightPosition = 0;\n arrowRight = elemWidth / 2 + rightBoundry - elemRectRight - arrowAdjust;\n } else {\n leftPosition = x - tipWidth / 2 + elemWidth / 2;\n arrowLeft = tipWidth / 2 - arrowAdjust;\n }\n }\n\n // apply style to tooltip/popover\n setElementStyle(tooltip, {\n top: `${topPosition}px`,\n bottom: bottomPosition === \"\" ? \"\" : `${bottomPosition}px`,\n left: leftPosition === \"auto\" ? leftPosition : `${leftPosition}px`,\n right: rightPosition !== \"\" ? `${rightPosition}px` : \"\",\n });\n\n // update arrow placement\n // istanbul ignore else @preserve\n if (isHTMLElement(arrow)) {\n if (arrowTop !== \"\") {\n arrow.style.top = `${arrowTop}px`;\n }\n if (arrowLeft !== \"\") {\n arrow.style.left = `${arrowLeft}px`;\n } else if (arrowRight !== \"\") {\n arrow.style.right = `${arrowRight}px`;\n }\n }\n const updatedTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `updated.bs.${toLowerCase(self.name)}`,\n );\n dispatchEvent(element, updatedTooltipEvent);\n }\n};\n\nexport default styleTip;\n","import getTipTemplate from \"./getTipTemplate\";\nimport tooltipString from \"../strings/tooltipString\";\nimport { TooltipOptions } from \"../interface/tooltip\";\n\nconst tooltipDefaults: TooltipOptions = {\n template: getTipTemplate(tooltipString),\n title: \"\",\n customClass: \"\",\n trigger: \"hover focus\",\n placement: \"top\",\n sanitizeFn: undefined,\n animation: true,\n delay: 200,\n container: document.body,\n content: \"\",\n dismissible: false,\n btnClose: \"\",\n};\nexport default tooltipDefaults;\n","/**\n * Global namespace for `data-bs-title` attribute.\n */\nconst dataOriginalTitle = \"data-original-title\";\nexport default dataOriginalTitle;\n","/** @type {string} */\nconst tooltipComponent = \"Tooltip\";\nexport default tooltipComponent;\n","import {\n isArray,\n isFunction,\n isHTMLElement,\n isNode,\n isNodeList,\n isString,\n} from \"@thednp/shorty\";\n\n/**\n * Append an existing `Element` to Popover / Tooltip component or HTML\n * markup string to be parsed & sanitized to be used as popover / tooltip content.\n *\n * @param element target\n * @param content the `Element` to append / string\n * @param sanitizeFn a function to sanitize string content\n */\nconst setHtml = (\n element: HTMLElement,\n content: Node[] | Node | string,\n sanitizeFn?: (s: string) => string,\n) => {\n // istanbul ignore else @preserve\n if (isString(content) && content.length) {\n let dirty = content.trim(); // fixing #233\n if (isFunction(sanitizeFn)) dirty = sanitizeFn(dirty);\n\n const domParser = new DOMParser();\n const tempDocument = domParser.parseFromString(dirty, \"text/html\");\n element.append(...[...tempDocument.body.childNodes]);\n } else if (isHTMLElement(content)) {\n element.append(content);\n } else if (\n isNodeList(content) || (isArray(content) && content.every(isNode))\n ) {\n element.append(...[...content]);\n }\n};\nexport default setHtml;\n","import {\n addClass,\n createElement,\n hasClass,\n isHTMLElement,\n isRTL,\n querySelector,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport tooltipString from \"../strings/tooltipString\";\nimport popoverString from \"../strings/popoverString\";\nimport fadeClass from \"../strings/fadeClass\";\nimport tipClassPositions from \"./tipClassPositions\";\nimport setHtml from \"./setHtml\";\nimport Tooltip from \"../components/tooltip\";\nimport Popover from \"../components/popover\";\n\n/**\n * Creates a new tooltip / popover.\n *\n * @param self the `Tooltip` / `Popover` instance\n */\nconst createTip = (self: Tooltip | Popover) => {\n const isTooltip = self.name === tooltipComponent;\n\n const { id, element, options } = self;\n const {\n title,\n placement,\n template,\n animation,\n customClass,\n sanitizeFn,\n dismissible,\n content,\n btnClose,\n } = options;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipPositions = { ...tipClassPositions };\n let titleParts: Node[] = [];\n let contentParts: Node[] = [];\n\n if (isRTL(element)) {\n tipPositions.left = \"end\";\n tipPositions.right = \"start\";\n }\n\n // set initial popover class\n const placementClass = `bs-${tipString}-${tipPositions[placement]}`;\n\n // load template\n let tooltipTemplate: Node | string;\n if (isHTMLElement(template)) {\n tooltipTemplate = template;\n } else {\n const htmlMarkup = createElement(\"div\") as HTMLElement;\n setHtml(htmlMarkup, template, sanitizeFn);\n tooltipTemplate = htmlMarkup.firstChild as HTMLElement;\n }\n\n // set popover markup\n self.tooltip = isHTMLElement(tooltipTemplate)\n ? (tooltipTemplate.cloneNode(true) as HTMLElement)\n // istanbul ignore next @preserve\n : undefined;\n\n const { tooltip } = self;\n // istanbul ignore else @preserve\n if (tooltip) {\n // set id and role attributes\n setAttribute(tooltip, \"id\", id);\n setAttribute(tooltip, \"role\", tooltipString);\n\n const bodyClass = isTooltip\n ? `${tooltipString}-inner`\n : `${popoverString}-body`;\n const tooltipHeader = isTooltip\n ? null\n : querySelector(`.${popoverString}-header`, tooltip);\n const tooltipBody = querySelector(`.${bodyClass}`, tooltip);\n\n // set arrow and enable access for styleTip\n self.arrow = querySelector(`.${tipString}-arrow`, tooltip) as HTMLElement;\n const { arrow } = self;\n\n if (isHTMLElement(title)) titleParts = [title.cloneNode(true)];\n else {\n const tempTitle = createElement(\"div\") as HTMLElement;\n setHtml(tempTitle, title, sanitizeFn);\n titleParts = [...[...tempTitle.childNodes]];\n }\n\n if (isHTMLElement(content)) contentParts = [content.cloneNode(true)];\n else {\n const tempContent = createElement(\"div\") as HTMLElement;\n setHtml(tempContent, content, sanitizeFn);\n contentParts = [...[...tempContent.childNodes]];\n }\n\n // set dismissible button\n if (dismissible) {\n if (title) {\n if (isHTMLElement(btnClose)) {\n titleParts = [...titleParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n titleParts = [...titleParts, tempBtn.firstChild as Node];\n }\n } else {\n // istanbul ignore else @preserve\n if (tooltipHeader) tooltipHeader.remove();\n if (isHTMLElement(btnClose)) {\n contentParts = [...contentParts, btnClose.cloneNode(true)];\n } else {\n const tempBtn = createElement(\"div\") as HTMLElement;\n setHtml(tempBtn, btnClose, sanitizeFn);\n contentParts = [...contentParts, tempBtn.firstChild as Node];\n }\n }\n }\n\n // fill the template with content from options / data attributes\n // also sanitize title && content\n // istanbul ignore else @preserve\n if (!isTooltip) {\n // istanbul ignore else @preserve\n if (title && tooltipHeader) {\n setHtml(tooltipHeader, titleParts, sanitizeFn);\n }\n // istanbul ignore else @preserve\n if (content && tooltipBody) {\n setHtml(tooltipBody, contentParts, sanitizeFn);\n }\n // set btn\n self.btn = querySelector(\".btn-close\", tooltip) || undefined;\n } else if (title && tooltipBody) setHtml(tooltipBody, title, sanitizeFn);\n\n // Bootstrap 5.2.x\n // addClass(tooltip, 'position-absolute');\n addClass(tooltip, \"position-fixed\");\n addClass(arrow, \"position-absolute\");\n\n // set popover animation and placement\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, tipString)) addClass(tooltip, tipString);\n // istanbul ignore else @preserve\n if (animation && !hasClass(tooltip, fadeClass)) {\n addClass(tooltip, fadeClass);\n }\n // istanbul ignore else @preserve\n if (customClass && !hasClass(tooltip, customClass)) {\n addClass(tooltip, customClass);\n }\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, placementClass)) addClass(tooltip, placementClass);\n }\n};\n\nexport default createTip;\n","import {\n getDocument,\n getElementStyle,\n getParentNode,\n isShadowRoot,\n isTableElement,\n} from \"@thednp/shorty\";\n\n/**\n * Returns an `HTMLElement` to be used as default value for *options.container*\n * for `Tooltip` / `Popover` components.\n *\n * @see https://github.com/floating-ui/floating-ui\n *\n * @param element the target\n * @returns the query result\n */\nconst getElementContainer = (element: HTMLElement): ParentNode => {\n const majorBlockTags = [\"HTML\", \"BODY\"];\n const containers: ParentNode[] = [];\n let { parentNode } = element as Node;\n\n while (parentNode && !majorBlockTags.includes(parentNode.nodeName)) {\n parentNode = getParentNode(parentNode) as ParentNode;\n // istanbul ignore else @preserve\n if (!(isShadowRoot(parentNode) || isTableElement(parentNode))) {\n containers.push(parentNode);\n }\n }\n\n return (\n containers.find((c, i) => {\n if (\n getElementStyle(c as HTMLElement, \"position\") !== \"relative\" &&\n containers.slice(i + 1).every((r) =>\n getElementStyle(r as HTMLElement, \"position\") === \"static\"\n )\n ) {\n return c;\n }\n return null;\n }) ||\n // istanbul ignore next: optional guard\n getDocument(element).body\n );\n};\n\nexport default getElementContainer;\n","/* Native JavaScript for Bootstrap 5 | Tooltip\n---------------------------------------------- */\nimport {\n addClass,\n ariaDescribedBy,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n focusEvent,\n focusinEvent,\n focusoutEvent,\n getAttribute,\n getDocument,\n getElementStyle,\n getInstance,\n getUID,\n hasAttribute,\n hasClass,\n isApple,\n mouseclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseleaveEvent,\n ObjectAssign,\n passiveHandler,\n removeAttribute,\n removeClass,\n setAttribute,\n Timer,\n toLowerCase,\n touchstartEvent,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport dataOriginalTitle from \"../strings/dataOriginalTitle\";\nimport showClass from \"../strings/showClass\";\nimport tooltipString from \"../strings/tooltipString\";\nimport tooltipComponent from \"../strings/tooltipComponent\";\nimport popoverString from \"../strings/popoverString\";\nimport popoverComponent from \"../strings/popoverComponent\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\n\nimport styleTip from \"../util/styleTip\";\nimport createTip from \"../util/createTip\";\nimport { appendPopup, hasPopup, removePopup } from \"../util/popupContainer\";\nimport getElementContainer from \"../util/getElementContainer\";\nimport tooltipDefaults from \"../util/tooltipDefaults\";\nimport BaseComponent from \"./base-component\";\nimport type { TooltipEvent, TooltipOptions } from \"../interface/tooltip\";\nimport type { PopoverEvent, PopoverOptions } from \"../interface/popover\";\n\n// TOOLTIP PRIVATE GC\n// ==================\nconst tooltipSelector =\n `[${dataBsToggle}=\"${tooltipString}\"],[data-tip=\"${tooltipString}\"]`;\nconst titleAttr = \"title\";\n\n/**\n * Static method which returns an existing `Tooltip` instance associated\n * to a target `Element`.\n */\nlet getTooltipInstance = (element: HTMLElement) =>\n getInstance(element, tooltipComponent);\n\n/**\n * A `Tooltip` initialization callback.\n */\nconst tooltipInitCallback = (element: HTMLElement) => new Tooltip(element);\n\n// TOOLTIP PRIVATE METHODS\n// =======================\n/**\n * Removes the tooltip from the DOM.\n *\n * @param self the `Tooltip` instance\n */\nconst removeTooltip = (self: Tooltip) => {\n const { element, tooltip, container, offsetParent } = self;\n removeAttribute(element, ariaDescribedBy);\n removePopup(\n tooltip as HTMLElement,\n container === offsetParent ? container : offsetParent,\n );\n};\n\n/**\n * Check if container contains the tooltip.\n *\n * @param self Tooltip\n */\nconst hasTip = (self: Tooltip): boolean | undefined => {\n const { tooltip, container, offsetParent } = self;\n\n return tooltip &&\n hasPopup(tooltip, container === offsetParent ? container : offsetParent);\n};\n\n/**\n * Executes after the instance has been disposed.\n *\n * @param self the `Tooltip` instance\n * @param callback the parent dispose callback\n */\nconst disposeTooltipComplete = (self: Tooltip, callback?: () => void) => {\n const { element } = self;\n self._toggleEventListeners();\n\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, dataOriginalTitle) && self.name === tooltipComponent\n ) {\n toggleTooltipTitle(self);\n }\n // istanbul ignore else @preserve\n if (callback) callback();\n};\n\n/**\n * Toggles on/off the special `Tooltip` event listeners.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipAction = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n\n action(\n getDocument(element),\n touchstartEvent,\n self.handleTouch,\n passiveHandler,\n );\n};\n\n/**\n * Executes after the tooltip was shown to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipShownAction = (self: Tooltip) => {\n const { element } = self;\n const shownTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `shown.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self, true);\n dispatchEvent(element, shownTooltipEvent);\n Timer.clear(element, \"in\");\n};\n\n/**\n * Executes after the tooltip was hidden to the user.\n *\n * @param self the `Tooltip` instance\n */\nconst tooltipHiddenAction = (self: Tooltip) => {\n const { element } = self;\n const hiddenTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hidden.bs.${toLowerCase(self.name)}`,\n );\n\n toggleTooltipAction(self);\n removeTooltip(self);\n dispatchEvent(element, hiddenTooltipEvent);\n\n Timer.clear(element, \"out\");\n};\n\n/**\n * Toggles on/off the `Tooltip` event listeners that hide/update the tooltip.\n *\n * @param self the `Tooltip` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleTooltipOpenHandlers = (self: Tooltip, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n // const { offsetHeight, scrollHeight } = container as HTMLElement;\n const parentModal = closest(element, `.${modalString}`);\n const parentOffcanvas = closest(element, `.${offcanvasString}`);\n\n if (add) self._observer.observe(self.element);\n else self._observer.disconnect();\n\n // dismiss tooltips inside modal / offcanvas\n if (parentModal) {\n action(parentModal, `hide.bs.${modalString}`, self.handleHide);\n }\n if (parentOffcanvas) {\n action(parentOffcanvas, `hide.bs.${offcanvasString}`, self.handleHide);\n }\n};\n\n/**\n * Toggles the `title` and `data-original-title` attributes.\n *\n * @param self the `Tooltip` instance\n * @param content when `true`, event listeners are added\n */\nconst toggleTooltipTitle = (self: Tooltip, content?: string) => {\n // [0 - add, 1 - remove] | [0 - remove, 1 - add]\n const titleAtt = [dataOriginalTitle, titleAttr];\n const { element } = self;\n\n setAttribute(\n element,\n titleAtt[content ? 0 : 1],\n content ||\n getAttribute(element, titleAtt[0]) ||\n // istanbul ignore next @preserve\n \"\",\n );\n removeAttribute(element, titleAtt[content ? 1 : 0]);\n};\n\n// TOOLTIP DEFINITION\n// ==================\n/** Creates a new `Tooltip` instance. */\nexport default class Tooltip extends BaseComponent {\n static selector = tooltipSelector;\n static init = tooltipInitCallback;\n static getInstance = getTooltipInstance;\n static styleTip = styleTip;\n declare options: TooltipOptions;\n declare btn?: HTMLElement;\n declare tooltip?: HTMLElement;\n declare container: ParentNode;\n declare arrow?: HTMLElement;\n declare offsetParent?: HTMLElement;\n declare enabled: boolean;\n declare id: string;\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n\n const { element } = this;\n const isTooltip = this.name === tooltipComponent;\n const tipString = isTooltip ? tooltipString : popoverString;\n const tipComponent = isTooltip ? tooltipComponent : popoverComponent;\n\n // istanbul ignore next @preserve: this is to set Popover too\n getTooltipInstance = (elem: HTMLElement) =>\n getInstance(elem, tipComponent);\n\n // additional properties\n this.enabled = true;\n /** Set unique ID for `aria-describedby`. */\n this.id = `${tipString}-${getUID(element, tipString)}`;\n\n // instance options\n const { options } = this;\n\n // invalidate\n if (!((!options.title && isTooltip) || (!isTooltip && !options.content))) {\n // reset default options\n ObjectAssign(tooltipDefaults, { titleAttr: \"\" });\n\n // set title attributes and add event listeners\n // istanbul ignore else @preserve\n if (\n hasAttribute(element, titleAttr) && isTooltip &&\n typeof options.title === \"string\"\n ) {\n toggleTooltipTitle(this, options.title);\n }\n\n // set containers\n this.container = getElementContainer(element);\n this.offsetParent = [\"sticky\", \"fixed\"].some(\n (position) =>\n getElementStyle(this.container as HTMLElement, \"position\") ===\n position,\n )\n ? (this.container as HTMLElement)\n : getDocument(this.element).body;\n\n // create tooltip here\n createTip(this);\n\n // create observer\n this._observer = new PositionObserver(() => this.update());\n\n // attach events\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tooltipComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return tooltipDefaults;\n }\n\n // TOOLTIP PUBLIC METHODS\n // ======================\n /** Handles the focus event on iOS. */\n // istanbul ignore next @preserve - impossible to test without Apple device\n handleFocus = () => focus(this.element);\n /** Shows the tooltip. */\n handleShow = () => this.show();\n show() {\n const { options, tooltip, element, container, offsetParent, id } = this;\n const { animation } = options;\n const outTimer = Timer.get(element, \"out\");\n const tipContainer = container === offsetParent ? container : offsetParent;\n\n Timer.clear(element, \"out\");\n\n if (tooltip && !outTimer && !hasTip(this)) {\n Timer.set(\n element,\n () => {\n const showTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `show.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, showTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!showTooltipEvent.defaultPrevented) {\n // append to container\n appendPopup(tooltip, tipContainer);\n\n setAttribute(element, ariaDescribedBy, `#${id}`);\n\n this.update();\n toggleTooltipOpenHandlers(this, true);\n\n // istanbul ignore else @preserve\n if (!hasClass(tooltip, showClass)) addClass(tooltip, showClass);\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipShownAction(this));\n } else tooltipShownAction(this);\n }\n },\n 17,\n \"in\",\n );\n }\n }\n\n /** Hides the tooltip. */\n handleHide = () => this.hide();\n hide() {\n const { options, tooltip, element } = this;\n const { animation, delay } = options;\n\n Timer.clear(element, \"in\");\n\n // istanbul ignore else @preserve\n if (tooltip && hasTip(this)) {\n Timer.set(\n element,\n () => {\n const hideTooltipEvent = createCustomEvent<\n Record,\n TooltipEvent | PopoverEvent\n >(\n `hide.bs.${toLowerCase(this.name)}`,\n );\n dispatchEvent(element, hideTooltipEvent);\n\n // istanbul ignore else @preserve\n if (!hideTooltipEvent.defaultPrevented) {\n this.update();\n removeClass(tooltip, showClass);\n toggleTooltipOpenHandlers(this);\n\n // istanbul ignore else @preserve\n if (animation) {\n emulateTransitionEnd(tooltip, () => tooltipHiddenAction(this));\n } else tooltipHiddenAction(this);\n }\n },\n delay + 17,\n \"out\",\n );\n }\n }\n\n /** Updates the tooltip position. */\n update = () => {\n styleTip(this);\n };\n\n /** Toggles the tooltip visibility. */\n toggle = () => {\n const { tooltip } = this;\n\n if (tooltip && !hasTip(this)) this.show();\n else this.hide();\n };\n\n /** Enables the tooltip. */\n enable() {\n const { enabled } = this;\n // istanbul ignore else @preserve\n if (!enabled) {\n this._toggleEventListeners(true);\n this.enabled = !enabled;\n }\n }\n\n /** Disables the tooltip. */\n disable() {\n const { tooltip, enabled } = this;\n // istanbul ignore else @preserve\n if (enabled) {\n if (tooltip && hasTip(this)) this.hide();\n this._toggleEventListeners();\n this.enabled = !enabled;\n }\n }\n\n /** Toggles the `disabled` property. */\n toggleEnabled() {\n if (!this.enabled) this.enable();\n else this.disable();\n }\n\n /**\n * Handles the `touchstart` event listener for `Tooltip`\n *\n * @this {Tooltip}\n * @param {TouchEvent} e the `Event` object\n */\n handleTouch = ({ target }: TouchEvent) => {\n const { tooltip, element } = this;\n\n // istanbul ignore if @preserve\n if (\n (tooltip && tooltip.contains(target as HTMLElement)) ||\n target === element ||\n (target && element.contains(target as HTMLElement))\n ) {\n // smile for ESLint\n } else {\n this.hide();\n }\n };\n\n /**\n * Toggles on/off the `Tooltip` event listeners.\n *\n * @param add when `true`, event listeners are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n // btn is only for dismissible popover\n const { element, options, btn } = this;\n const { trigger } = options;\n const isPopover = this.name !== tooltipComponent;\n const dismissible = isPopover && (options as PopoverOptions).dismissible\n ? true\n : false;\n\n // istanbul ignore else @preserve\n if (!trigger.includes(\"manual\")) {\n this.enabled = !!add;\n\n const triggerOptions = trigger.split(\" \");\n\n triggerOptions.forEach((tr) => {\n // istanbul ignore else @preserve\n if (tr === mousehoverEvent) {\n action(element, mousedownEvent, this.handleShow);\n action(element, mouseenterEvent, this.handleShow);\n\n // istanbul ignore else @preserve\n if (!dismissible) {\n action(element, mouseleaveEvent, this.handleHide);\n action(\n getDocument(element),\n touchstartEvent,\n this.handleTouch,\n passiveHandler,\n );\n }\n } else if (tr === mouseclickEvent) {\n action(element, tr, !dismissible ? this.toggle : this.handleShow);\n } else if (tr === focusEvent) {\n action(element, focusinEvent, this.handleShow);\n // istanbul ignore else @preserve\n if (!dismissible) action(element, focusoutEvent, this.handleHide);\n // istanbul ignore else @preserve\n if (isApple()) {\n action(element, mouseclickEvent, this.handleFocus);\n }\n }\n // istanbul ignore else @preserve\n if (dismissible && btn) {\n action(btn, mouseclickEvent, this.handleHide);\n }\n });\n }\n };\n\n /** Removes the `Tooltip` from the target element. */\n dispose() {\n const { tooltip, options } = this;\n const clone = { ...this, name: this.name };\n const callback = () =>\n setTimeout(\n () => disposeTooltipComplete(clone, () => super.dispose()),\n 17,\n );\n\n if (options.animation && hasTip(clone)) {\n this.options.delay = 0; // reset delay\n this.hide();\n emulateTransitionEnd(tooltip as HTMLElement, callback);\n } else {\n callback();\n }\n }\n}\n"],"names":["popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","arrow","body","tipClassPositions","styleTip","self","tipClasses","element","tooltip","container","options","tipPositions","RTL","isRTL","setElementStyle","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","getDocumentElement","placement","parentCWidth","parentOWidth","fixedParent","getElementStyle","scrollbarWidth","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","getBoundingClientRect","x","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","topExceed","bottomExceed","leftExceed","rightExceed","horizontals","verticals","isHTMLElement","updatedTooltipEvent","createCustomEvent","toLowerCase","dispatchEvent","tooltipDefaults","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","isString","dirty","isFunction","tempDocument","isNodeList","isArray","isNode","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","createElement","setAttribute","tooltipHeader","querySelector","tooltipBody","tempTitle","tempContent","tempBtn","addClass","hasClass","fadeClass","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","c","i","r","getDocument","tooltipSelector","dataBsToggle","titleAttr","getTooltipInstance","getInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","removeAttribute","ariaDescribedBy","removePopup","hasTip","hasPopup","disposeTooltipComplete","callback","hasAttribute","toggleTooltipTitle","toggleTooltipAction","add","action","addListener","removeListener","touchstartEvent","passiveHandler","tooltipShownAction","shownTooltipEvent","Timer","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","closest","modalString","parentOffcanvas","offcanvasString","titleAtt","getAttribute","BaseComponent","target","config","tipComponent","elem","getUID","ObjectAssign","position","PositionObserver","focus","outTimer","tipContainer","showTooltipEvent","appendPopup","showClass","emulateTransitionEnd","delay","hideTooltipEvent","removeClass","enabled","btn","trigger","tr","mousehoverEvent","mousedownEvent","mouseenterEvent","mouseleaveEvent","mouseclickEvent","focusEvent","focusinEvent","focusoutEvent","isApple","clone"],"mappings":";;;;;;;AACA,MAAMA,IAAgB,WCAhBC,KAAmB,WCAnBC,IAAgB,WCOhBC,KAAiB,CAACC,MAAoB;AAC1C,QAAMC,IAAYD,MAAYF,GACxBI,IAAYD,IAAY,GAAGD,CAAO,WAAW,GAAGA,CAAO,SACvDG,IAAUF,IAAoD,KAAxC,cAAcD,CAAO,kBAC3CI,IAAQ,eAAeJ,CAAO,kBAC9BK,IAAO,eAAeH,CAAS;AACrC,SAAO,e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AAuBwD,GAAO,MAAM,MAAM,SAAS;AAAA,MACzD;AAAA,IACF;AAEF,IAAIxK,EAAQ,aAAa8G,EAAO0D,CAAK,KACnC,KAAK,QAAQ,QAAQ,GACrB,KAAK,KAAK,GACVjB,GAAqBzJ,GAAwBmH,CAAQ,KAE5CA,EAAA;AAAA,EACX;AAEJ;"} \ No newline at end of file diff --git a/dist/components/tooltip-BG3vXGWl.js b/dist/components/tooltip-BG3vXGWl.js deleted file mode 100644 index c393ffaf..00000000 --- a/dist/components/tooltip-BG3vXGWl.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict";var bt=Object.defineProperty;var Et=(s,i,o)=>i in s?bt(s,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[i]=o;var v=(s,i,o)=>Et(s,typeof i!="symbol"?i+"":i,o);const t=require("@thednp/shorty"),O=require("@thednp/event-listener"),Ct=require("./index-C8qIpGHG.js"),Tt=require("./dataBsToggle-Dj-Ng54N.js"),et=require("./showClass-D_Ms1FgG.js"),D=require("./popupContainer-DIlSFkzD.js"),nt=require("./fadeClass-Co6nOzNJ.js"),wt=require("./base-component-DBcDoOjV.js"),Y="popover",it="Popover",w="tooltip",dt=s=>{const i=s===w,o=i?`${s}-inner`:`${s}-body`,e=i?"":`

`,n=`
`,l=`
`;return`
${e+n+l}
`},ht={top:"top",bottom:"bottom",left:"start",right:"end"},st=s=>{const i=/\b(top|bottom|start|end)+/,{element:o,tooltip:e,container:n,options:l,arrow:r}=s;// istanbul ignore else @preserve -if(e){const u={...ht},f=t.isRTL(o);t.setElementStyle(e,{top:"",left:"",right:"",bottom:""});const c=s.name===it,{offsetWidth:d,offsetHeight:h}=e,{clientWidth:P,clientHeight:E,offsetWidth:B}=t.getDocumentElement(o);let{placement:a}=l;const{clientWidth:C,offsetWidth:T}=n,H=t.getElementStyle(n,"position")==="fixed",p=Math.abs(H?C-T:P-B),x=f&&H?p:0,y=P-(f?0:p)-1,{width:g,height:b,left:m,right:gt,top:q}=t.getBoundingClientRect(o,!0),{x:G,y:_}={x:m,y:q};t.setElementStyle(r,{top:"",left:"",right:"",bottom:""});let A=0,k="",$=0,V="",W="",J="",X="";const N=r.offsetWidth||0,L=r.offsetHeight||0,Z=N/2;let I=q-h-L<0,F=q+h+b+L>=E,j=m-d-N=y;const K=["left","right"],tt=["top","bottom"];I=K.includes(a)?q+b/2-h/2-L<0:I,F=K.includes(a)?q+h/2+b/2+L>=E:F,j=tt.includes(a)?m+g/2-d/2=y:z,a=K.includes(a)&&j&&z?"top":a,a=a==="top"&&I?"bottom":a,a=a==="bottom"&&F?"top":a,a=a==="left"&&j?"right":a,a=a==="right"&&z?"left":a,e.className.includes(a)||(e.className=e.className.replace(i,u[a]));// istanbul ignore else @preserve -K.includes(a)?(a==="left"?$=G-d-(c?N:0):$=G+g+(c?N:0),I&&F?(A=0,k=0,W=q+b/2-L/2):I?(A=_,k="",W=b/2-N):F?(A=_-h+b,k="",W=h-b/2-N):(A=_-h/2+b/2,W=h/2-L/2)):tt.includes(a)&&(a==="top"?A=_-h-(c?L:0):A=_+b+(c?L:0),j?($=0,J=G+g/2-Z):z?($="auto",V=0,X=g/2+y-gt-Z):($=G-d/2+g/2,J=d/2-Z)),t.setElementStyle(e,{top:`${A}px`,bottom:k===""?"":`${k}px`,left:$==="auto"?$:`${$}px`,right:V!==""?`${V}px`:""});// istanbul ignore else @preserve -t.isHTMLElement(r)&&(W!==""&&(r.style.top=`${W}px`),J!==""?r.style.left=`${J}px`:X!==""&&(r.style.right=`${X}px`));const vt=t.createCustomEvent(`updated.bs.${t.toLowerCase(s.name)}`);t.dispatchEvent(o,vt)}},ot={template:dt(w),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},pt="data-original-title",M="Tooltip",S=(s,i,o)=>{// istanbul ignore else @preserve -if(t.isString(i)&&i.length){let e=i.trim();t.isFunction(o)&&(e=o(e));const l=new DOMParser().parseFromString(e,"text/html");s.append(...l.body.childNodes)}else t.isHTMLElement(i)?s.append(i):(t.isNodeList(i)||t.isArray(i)&&i.every(t.isNode))&&s.append(...i)},yt=s=>{const i=s.name===M,{id:o,element:e,options:n}=s,{title:l,placement:r,template:u,animation:f,customClass:c,sanitizeFn:d,dismissible:h,content:P,btnClose:E}=n,B=i?w:Y,a={...ht};let C=[],T=[];t.isRTL(e)&&(a.left="end",a.right="start");const Q=`bs-${B}-${a[r]}`;let H;if(t.isHTMLElement(u))H=u;else{const x=t.createElement("div");S(x,u,d),H=x.firstChild}s.tooltip=t.isHTMLElement(H)?H.cloneNode(!0):void 0;const{tooltip:p}=s;// istanbul ignore else @preserve -if(p){t.setAttribute(p,"id",o),t.setAttribute(p,"role",w);const x=i?`${w}-inner`:`${Y}-body`,y=i?null:t.querySelector(`.${Y}-header`,p),g=t.querySelector(`.${x}`,p);s.arrow=t.querySelector(`.${B}-arrow`,p);const{arrow:b}=s;if(t.isHTMLElement(l))C=[l.cloneNode(!0)];else{const m=t.createElement("div");S(m,l,d),C=[...m.childNodes]}if(t.isHTMLElement(P))T=[P.cloneNode(!0)];else{const m=t.createElement("div");S(m,P,d),T=[...m.childNodes]}if(h)if(l)if(t.isHTMLElement(E))C=[...C,E.cloneNode(!0)];else{const m=t.createElement("div");S(m,E,d),C=[...C,m.firstChild]}else{// istanbul ignore else @preserve -if(y&&y.remove(),t.isHTMLElement(E))T=[...T,E.cloneNode(!0)];else{const m=t.createElement("div");S(m,E,d),T=[...T,m.firstChild]}}// istanbul ignore else @preserve -if(i)l&&g&&S(g,l,d);else{// istanbul ignore else @preserve -l&&y&&S(y,C,d);// istanbul ignore else @preserve -P&&g&&S(g,T,d),s.btn=t.querySelector(".btn-close",p)||void 0}t.addClass(p,"position-fixed"),t.addClass(b,"position-absolute");// istanbul ignore else @preserve -t.hasClass(p,B)||t.addClass(p,B);// istanbul ignore else @preserve -f&&!t.hasClass(p,nt.fadeClass)&&t.addClass(p,nt.fadeClass);// istanbul ignore else @preserve -c&&!t.hasClass(p,c)&&t.addClass(p,c);// istanbul ignore else @preserve -t.hasClass(p,Q)||t.addClass(p,Q)}},$t=s=>{const i=["HTML","BODY"],o=[];let{parentNode:e}=s;for(;e&&!i.includes(e.nodeName);){e=t.getParentNode(e);// istanbul ignore else @preserve -t.isShadowRoot(e)||t.isTableElement(e)||o.push(e)}return o.find((n,l)=>t.getElementStyle(n,"position")!=="relative"&&o.slice(l+1).every(r=>t.getElementStyle(r,"position")==="static")?n:null)||t.getDocument(s).body},Lt=`[${Tt.dataBsToggle}="${w}"],[data-tip="${w}"]`,mt="title";let lt=s=>t.getInstance(s,M);const St=s=>new R(s),Pt=s=>{const{element:i,tooltip:o,container:e,offsetParent:n}=s;t.removeAttribute(i,t.ariaDescribedBy),D.removePopup(o,e===n?e:n)},U=s=>{const{tooltip:i,container:o,offsetParent:e}=s;return i&&D.hasPopup(i,o===e?o:e)},Ht=(s,i)=>{const{element:o}=s;s._toggleEventListeners();// istanbul ignore else @preserve -t.hasAttribute(o,pt)&&s.name===M&&ft(s);// istanbul ignore else @preserve -i&&i()},ut=(s,i)=>{const o=i?O.addListener:O.removeListener,{element:e}=s;o(t.getDocument(e),t.touchstartEvent,s.handleTouch,t.passiveHandler)},at=s=>{const{element:i}=s,o=t.createCustomEvent(`shown.bs.${t.toLowerCase(s.name)}`);ut(s,!0),t.dispatchEvent(i,o),t.Timer.clear(i,"in")},rt=s=>{const{element:i}=s,o=t.createCustomEvent(`hidden.bs.${t.toLowerCase(s.name)}`);ut(s),Pt(s),t.dispatchEvent(i,o),t.Timer.clear(i,"out")},ct=(s,i)=>{const o=i?O.addListener:O.removeListener,{element:e}=s,n=t.closest(e,`.${D.modalString}`),l=t.closest(e,`.${D.offcanvasString}`);i?s._observer.observe(s.element):s._observer.disconnect(),n&&o(n,`hide.bs.${D.modalString}`,s.handleHide),l&&o(l,`hide.bs.${D.offcanvasString}`,s.handleHide)},ft=(s,i)=>{const o=[pt,mt],{element:e}=s;t.setAttribute(e,o[i?0:1],i||t.getAttribute(e,o[0])||""),t.removeAttribute(e,o[i?1:0])};class R extends wt.BaseComponent{constructor(o,e){super(o,e);v(this,"handleFocus",()=>t.focus(this.element));v(this,"handleShow",()=>this.show());v(this,"handleHide",()=>this.hide());v(this,"update",()=>{st(this)});v(this,"toggle",()=>{const{tooltip:o}=this;o&&!U(this)?this.show():this.hide()});v(this,"handleTouch",({target:o})=>{const{tooltip:e,element:n}=this;// istanbul ignore if @preserve -e&&e.contains(o)||o===n||o&&n.contains(o)||this.hide()});v(this,"_toggleEventListeners",o=>{const e=o?O.addListener:O.removeListener,{element:n,options:l,btn:r}=this,{trigger:u}=l,c=!!(this.name!==M&&l.dismissible);// istanbul ignore else @preserve -u.includes("manual")||(this.enabled=!!o,u.split(" ").forEach(h=>{// istanbul ignore else @preserve -if(h===t.mousehoverEvent){e(n,t.mousedownEvent,this.handleShow),e(n,t.mouseenterEvent,this.handleShow);// istanbul ignore else @preserve -c||(e(n,t.mouseleaveEvent,this.handleHide),e(t.getDocument(n),t.touchstartEvent,this.handleTouch,t.passiveHandler))}else if(h===t.mouseclickEvent)e(n,h,c?this.handleShow:this.toggle);else if(h===t.focusEvent){e(n,t.focusinEvent,this.handleShow);// istanbul ignore else @preserve -c||e(n,t.focusoutEvent,this.handleHide);// istanbul ignore else @preserve -t.isApple&&e(n,t.mouseclickEvent,this.handleFocus)}// istanbul ignore else @preserve -c&&r&&e(r,t.mouseclickEvent,this.handleHide)}))});const{element:n}=this,l=this.name===M,r=l?w:Y,u=l?M:it;// istanbul ignore next @preserve: this is to set Popover too -lt=c=>t.getInstance(c,u),this.enabled=!0,this.id=`${r}-${t.getUID(n,r)}`;const{options:f}=this;if(!(!f.title&&l||!l&&!f.content)){t.ObjectAssign(ot,{titleAttr:""});// istanbul ignore else @preserve -t.hasAttribute(n,mt)&&l&&typeof f.title=="string"&&ft(this,f.title),this.container=$t(n),this.offsetParent=["sticky","fixed"].some(c=>t.getElementStyle(this.container,"position")===c)?this.container:t.getDocument(this.element).body,yt(this),this._observer=new Ct.D(()=>this.update()),this._toggleEventListeners(!0)}}get name(){return M}get defaults(){return ot}show(){const{options:o,tooltip:e,element:n,container:l,offsetParent:r,id:u}=this,{animation:f}=o,c=t.Timer.get(n,"out"),d=l===r?l:r;t.Timer.clear(n,"out"),e&&!c&&!U(this)&&t.Timer.set(n,()=>{const h=t.createCustomEvent(`show.bs.${t.toLowerCase(this.name)}`);t.dispatchEvent(n,h);// istanbul ignore else @preserve -if(!h.defaultPrevented){D.appendPopup(e,d),t.setAttribute(n,t.ariaDescribedBy,`#${u}`),this.update(),ct(this,!0);// istanbul ignore else @preserve -t.hasClass(e,et.showClass)||t.addClass(e,et.showClass);// istanbul ignore else @preserve -f?t.emulateTransitionEnd(e,()=>at(this)):at(this)}},17,"in")}hide(){const{options:o,tooltip:e,element:n}=this,{animation:l,delay:r}=o;t.Timer.clear(n,"in");// istanbul ignore else @preserve -e&&U(this)&&t.Timer.set(n,()=>{const u=t.createCustomEvent(`hide.bs.${t.toLowerCase(this.name)}`);t.dispatchEvent(n,u);// istanbul ignore else @preserve -if(!u.defaultPrevented){this.update(),t.removeClass(e,et.showClass),ct(this);// istanbul ignore else @preserve -l?t.emulateTransitionEnd(e,()=>rt(this)):rt(this)}},r+17,"out")}enable(){const{enabled:o}=this;// istanbul ignore else @preserve -o||(this._toggleEventListeners(!0),this.enabled=!o)}disable(){const{tooltip:o,enabled:e}=this;// istanbul ignore else @preserve -e&&(o&&U(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!e)}toggleEnabled(){this.enabled?this.disable():this.enable()}dispose(){const{tooltip:o,options:e}=this,n={...this,name:this.name},l=()=>setTimeout(()=>Ht(n,()=>super.dispose()),17);e.animation&&U(n)?(this.options.delay=0,this.hide(),t.emulateTransitionEnd(o,l)):l()}}v(R,"selector",Lt),v(R,"init",St),v(R,"getInstance",lt),v(R,"styleTip",st);exports.Tooltip=R;exports.getTipTemplate=dt;exports.popoverComponent=it;exports.popoverString=Y;exports.styleTip=st;exports.tooltipDefaults=ot; -//# sourceMappingURL=tooltip-BG3vXGWl.js.map diff --git a/dist/components/tooltip-Dyd4Gul9.mjs b/dist/components/tooltip-Dyd4Gul9.mjs deleted file mode 100644 index 22c7e766..00000000 --- a/dist/components/tooltip-Dyd4Gul9.mjs +++ /dev/null @@ -1,402 +0,0 @@ -var It = Object.defineProperty; -var jt = (e, i, o) => i in e ? It(e, i, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[i] = o; -var g = (e, i, o) => jt(e, typeof i != "symbol" ? i + "" : i, o); -import { isRTL as xt, setElementStyle as dt, getDocumentElement as zt, getElementStyle as ot, getBoundingClientRect as qt, isHTMLElement as x, createCustomEvent as J, toLowerCase as K, dispatchEvent as Q, isString as Ut, isFunction as Yt, isNodeList as Gt, isArray as Jt, isNode as Kt, createElement as q, setAttribute as it, querySelector as tt, addClass as B, hasClass as Y, getParentNode as Qt, isShadowRoot as Vt, isTableElement as Xt, getDocument as st, getInstance as Ht, getUID as Zt, ObjectAssign as te, hasAttribute as St, focus as ee, Timer as W, ariaDescribedBy as Nt, emulateTransitionEnd as ht, removeClass as oe, mousehoverEvent as ie, mousedownEvent as se, mouseenterEvent as ne, mouseleaveEvent as le, touchstartEvent as Lt, passiveHandler as At, mouseclickEvent as pt, focusEvent as ae, focusinEvent as re, focusoutEvent as ce, isApple as de, closest as gt, getAttribute as he, removeAttribute as Bt } from "@thednp/shorty"; -import { addListener as ft, removeListener as ut } from "@thednp/event-listener"; -import { D as pe } from "./index-CmM9Kopf.mjs"; -import { d as me } from "./dataBsToggle-B84TS15h.mjs"; -import { s as mt } from "./showClass-C8hdJfjQ.mjs"; -import { a as fe, h as ue, m as bt, o as vt, r as ge } from "./popupContainer-BitC465I.mjs"; -import { f as $t } from "./fadeClass-CLIYI_zn.mjs"; -import { B as be } from "./base-component-DHbs0JQk.mjs"; -const et = "popover", Wt = "Popover", E = "tooltip", ve = (e) => { - const i = e === E, o = i ? `${e}-inner` : `${e}-body`, t = i ? "" : `

`, s = `
`, n = `
`; - return `
${t + s + n}
`; -}, Dt = { - top: "top", - bottom: "bottom", - left: "start", - right: "end" -}, wt = (e) => { - const i = /\b(top|bottom|start|end)+/, { element: o, tooltip: t, container: s, options: n, arrow: a } = e; - // istanbul ignore else @preserve - if (t) { - const m = { ...Dt }, f = xt(o); - dt(t, { - // top: '0px', left: '0px', right: '', bottom: '', - top: "", - left: "", - right: "", - bottom: "" - }); - const r = e.name === Wt, { offsetWidth: c, offsetHeight: d } = t, { clientWidth: H, clientHeight: v, offsetWidth: O } = zt(o); - let { placement: l } = n; - const { clientWidth: $, offsetWidth: w } = s, S = ot( - s, - "position" - ) === "fixed", h = Math.abs(S ? $ - w : H - O), N = f && S ? h : 0, T = H - (f ? 0 : h) - 1, { - width: u, - height: b, - left: p, - right: kt, - top: R - } = qt(o, !0), { x: V, y: M } = { - x: p, - y: R - }; - dt(a, { - top: "", - left: "", - right: "", - bottom: "" - }); - let L = 0, k = "", C = 0, lt = "", _ = "", X = "", at = ""; - const A = a.offsetWidth || 0, P = a.offsetHeight || 0, rt = A / 2; - let F = R - d - P < 0, I = R + d + b + P >= v, j = p - c - A < N, z = p + c + u + A >= T; - const Z = ["left", "right"], ct = ["top", "bottom"]; - F = Z.includes(l) ? R + b / 2 - d / 2 - P < 0 : F, I = Z.includes(l) ? R + d / 2 + b / 2 + P >= v : I, j = ct.includes(l) ? p + u / 2 - c / 2 < N : j, z = ct.includes(l) ? p + c / 2 + u / 2 >= T : z, l = Z.includes(l) && j && z ? "top" : l, l = l === "top" && F ? "bottom" : l, l = l === "bottom" && I ? "top" : l, l = l === "left" && j ? "right" : l, l = l === "right" && z ? "left" : l, t.className.includes(l) || (t.className = t.className.replace( - i, - m[l] - )); - // istanbul ignore else @preserve - Z.includes(l) ? (l === "left" ? C = V - c - (r ? A : 0) : C = V + u + (r ? A : 0), F && I ? (L = 0, k = 0, _ = R + b / 2 - P / 2) : F ? (L = M, k = "", _ = b / 2 - A) : I ? (L = M - d + b, k = "", _ = d - b / 2 - A) : (L = M - d / 2 + b / 2, _ = d / 2 - P / 2)) : ct.includes(l) && (l === "top" ? L = M - d - (r ? P : 0) : L = M + b + (r ? P : 0), j ? (C = 0, X = V + u / 2 - rt) : z ? (C = "auto", lt = 0, at = u / 2 + T - kt - rt) : (C = V - c / 2 + u / 2, X = c / 2 - rt)), dt(t, { - top: `${L}px`, - bottom: k === "" ? "" : `${k}px`, - left: C === "auto" ? C : `${C}px`, - right: lt !== "" ? `${lt}px` : "" - }); - // istanbul ignore else @preserve - x(a) && (_ !== "" && (a.style.top = `${_}px`), X !== "" ? a.style.left = `${X}px` : at !== "" && (a.style.right = `${at}px`)); - const Ft = J( - `updated.bs.${K(e.name)}` - ); - Q(o, Ft); - } -}, Et = { - template: ve(E), - title: "", - customClass: "", - trigger: "hover focus", - placement: "top", - sanitizeFn: void 0, - animation: !0, - delay: 200, - container: document.body, - content: "", - dismissible: !1, - btnClose: "" -}, Ot = "data-original-title", D = "Tooltip", y = (e, i, o) => { - // istanbul ignore else @preserve - if (Ut(i) && i.length) { - let t = i.trim(); - Yt(o) && (t = o(t)); - const n = new DOMParser().parseFromString(t, "text/html"); - e.append(...n.body.childNodes); - } else x(i) ? e.append(i) : (Gt(i) || Jt(i) && i.every(Kt)) && e.append(...i); -}, $e = (e) => { - const i = e.name === D, { id: o, element: t, options: s } = e, { - title: n, - placement: a, - template: m, - animation: f, - customClass: r, - sanitizeFn: c, - dismissible: d, - content: H, - btnClose: v - } = s, O = i ? E : et, l = { ...Dt }; - let $ = [], w = []; - xt(t) && (l.left = "end", l.right = "start"); - const nt = `bs-${O}-${l[a]}`; - let S; - if (x(m)) - S = m; - else { - const N = q("div"); - y(N, m, c), S = N.firstChild; - } - e.tooltip = x(S) ? S.cloneNode(!0) : void 0; - const { tooltip: h } = e; - // istanbul ignore else @preserve - if (h) { - it(h, "id", o), it(h, "role", E); - const N = i ? `${E}-inner` : `${et}-body`, T = i ? null : tt(`.${et}-header`, h), u = tt(`.${N}`, h); - e.arrow = tt(`.${O}-arrow`, h); - const { arrow: b } = e; - if (x(n)) $ = [n.cloneNode(!0)]; - else { - const p = q("div"); - y(p, n, c), $ = [...p.childNodes]; - } - if (x(H)) w = [H.cloneNode(!0)]; - else { - const p = q("div"); - y(p, H, c), w = [...p.childNodes]; - } - if (d) - if (n) - if (x(v)) - $ = [...$, v.cloneNode(!0)]; - else { - const p = q("div"); - y(p, v, c), $ = [...$, p.firstChild]; - } - else { - // istanbul ignore else @preserve - if (T && T.remove(), x(v)) - w = [...w, v.cloneNode(!0)]; - else { - const p = q("div"); - y(p, v, c), w = [...w, p.firstChild]; - } - } - // istanbul ignore else @preserve - if (i) - n && u && y(u, n, c); - else { - // istanbul ignore else @preserve - n && T && y(T, $, c); - // istanbul ignore else @preserve - H && u && y(u, w, c), e.btn = tt(".btn-close", h) || void 0; - } - B(h, "position-fixed"), B(b, "position-absolute"); - // istanbul ignore else @preserve - Y(h, O) || B(h, O); - // istanbul ignore else @preserve - f && !Y(h, $t) && B(h, $t); - // istanbul ignore else @preserve - r && !Y(h, r) && B(h, r); - // istanbul ignore else @preserve - Y(h, nt) || B(h, nt); - } -}, we = (e) => { - const i = ["HTML", "BODY"], o = []; - let { parentNode: t } = e; - for (; t && !i.includes(t.nodeName); ) { - t = Qt(t); - // istanbul ignore else @preserve - Vt(t) || Xt(t) || o.push(t); - } - return o.find((s, n) => ot(s, "position") !== "relative" && o.slice(n + 1).every( - (a) => ot(a, "position") === "static" - ) ? s : null) || // istanbul ignore next: optional guard - st(e).body; -}, Ee = `[${me}="${E}"],[data-tip="${E}"]`, Rt = "title"; -let Tt = (e) => Ht(e, D); -const Te = (e) => new G(e), Ce = (e) => { - const { element: i, tooltip: o, container: t, offsetParent: s } = e; - Bt(i, Nt), ge( - o, - t === s ? t : s - ); -}, U = (e) => { - const { tooltip: i, container: o, offsetParent: t } = e; - return i && ue(i, o === t ? o : t); -}, Pe = (e, i) => { - const { element: o } = e; - e._toggleEventListeners(); - // istanbul ignore else @preserve - St(o, Ot) && e.name === D && Mt(e); - // istanbul ignore else @preserve - i && i(); -}, _t = (e, i) => { - const o = i ? ft : ut, { element: t } = e; - o( - st(t), - Lt, - e.handleTouch, - At - ); -}, Ct = (e) => { - const { element: i } = e, o = J( - `shown.bs.${K(e.name)}` - ); - _t(e, !0), Q(i, o), W.clear(i, "in"); -}, Pt = (e) => { - const { element: i } = e, o = J( - `hidden.bs.${K(e.name)}` - ); - _t(e), Ce(e), Q(i, o), W.clear(i, "out"); -}, yt = (e, i) => { - const o = i ? ft : ut, { element: t } = e, s = gt(t, `.${bt}`), n = gt(t, `.${vt}`); - i ? e._observer.observe(e.element) : e._observer.disconnect(), s && o(s, `hide.bs.${bt}`, e.handleHide), n && o(n, `hide.bs.${vt}`, e.handleHide); -}, Mt = (e, i) => { - const o = [Ot, Rt], { element: t } = e; - it( - t, - o[i ? 0 : 1], - i || he(t, o[0]) || // istanbul ignore next @preserve - "" - ), Bt(t, o[i ? 1 : 0]); -}; -class G extends be { - /** - * @param target the target element - * @param config the instance options - */ - constructor(o, t) { - super(o, t); - // TOOLTIP PUBLIC METHODS - // ====================== - /** Handles the focus event on iOS. */ - // istanbul ignore next @preserve - impossible to test without Apple device - g(this, "handleFocus", () => ee(this.element)); - /** Shows the tooltip. */ - g(this, "handleShow", () => this.show()); - /** Hides the tooltip. */ - g(this, "handleHide", () => this.hide()); - /** Updates the tooltip position. */ - g(this, "update", () => { - wt(this); - }); - /** Toggles the tooltip visibility. */ - g(this, "toggle", () => { - const { tooltip: o } = this; - o && !U(this) ? this.show() : this.hide(); - }); - /** - * Handles the `touchstart` event listener for `Tooltip` - * - * @this {Tooltip} - * @param {TouchEvent} e the `Event` object - */ - g(this, "handleTouch", ({ target: o }) => { - const { tooltip: t, element: s } = this; - // istanbul ignore if @preserve - t && t.contains(o) || o === s || o && s.contains(o) || this.hide(); - }); - /** - * Toggles on/off the `Tooltip` event listeners. - * - * @param add when `true`, event listeners are added - */ - g(this, "_toggleEventListeners", (o) => { - const t = o ? ft : ut, { element: s, options: n, btn: a } = this, { trigger: m } = n, r = !!(this.name !== D && n.dismissible); - // istanbul ignore else @preserve - m.includes("manual") || (this.enabled = !!o, m.split(" ").forEach((d) => { - // istanbul ignore else @preserve - if (d === ie) { - t(s, se, this.handleShow), t(s, ne, this.handleShow); - // istanbul ignore else @preserve - r || (t(s, le, this.handleHide), t( - st(s), - Lt, - this.handleTouch, - At - )); - } else if (d === pt) - t(s, d, r ? this.handleShow : this.toggle); - else if (d === ae) { - t(s, re, this.handleShow); - // istanbul ignore else @preserve - r || t(s, ce, this.handleHide); - // istanbul ignore else @preserve - de && t(s, pt, this.handleFocus); - } - // istanbul ignore else @preserve - r && a && t(a, pt, this.handleHide); - })); - }); - const { element: s } = this, n = this.name === D, a = n ? E : et, m = n ? D : Wt; - // istanbul ignore next @preserve: this is to set Popover too - Tt = (r) => Ht(r, m), this.enabled = !0, this.id = `${a}-${Zt(s, a)}`; - const { options: f } = this; - if (!(!f.title && n || !n && !f.content)) { - te(Et, { titleAttr: "" }); - // istanbul ignore else @preserve - St(s, Rt) && n && typeof f.title == "string" && Mt(this, f.title), this.container = we(s), this.offsetParent = ["sticky", "fixed"].some( - (r) => ot(this.container, "position") === r - ) ? this.container : st(this.element).body, $e(this), this._observer = new pe(() => this.update()), this._toggleEventListeners(!0); - } - } - /** - * Returns component name string. - */ - get name() { - return D; - } - /** - * Returns component default options. - */ - get defaults() { - return Et; - } - show() { - const { options: o, tooltip: t, element: s, container: n, offsetParent: a, id: m } = this, { animation: f } = o, r = W.get(s, "out"), c = n === a ? n : a; - W.clear(s, "out"), t && !r && !U(this) && W.set( - s, - () => { - const d = J( - `show.bs.${K(this.name)}` - ); - Q(s, d); - // istanbul ignore else @preserve - if (!d.defaultPrevented) { - fe(t, c), it(s, Nt, `#${m}`), this.update(), yt(this, !0); - // istanbul ignore else @preserve - Y(t, mt) || B(t, mt); - // istanbul ignore else @preserve - f ? ht(t, () => Ct(this)) : Ct(this); - } - }, - 17, - "in" - ); - } - hide() { - const { options: o, tooltip: t, element: s } = this, { animation: n, delay: a } = o; - W.clear(s, "in"); - // istanbul ignore else @preserve - t && U(this) && W.set( - s, - () => { - const m = J( - `hide.bs.${K(this.name)}` - ); - Q(s, m); - // istanbul ignore else @preserve - if (!m.defaultPrevented) { - this.update(), oe(t, mt), yt(this); - // istanbul ignore else @preserve - n ? ht(t, () => Pt(this)) : Pt(this); - } - }, - a + 17, - "out" - ); - } - /** Enables the tooltip. */ - enable() { - const { enabled: o } = this; - // istanbul ignore else @preserve - o || (this._toggleEventListeners(!0), this.enabled = !o); - } - /** Disables the tooltip. */ - disable() { - const { tooltip: o, enabled: t } = this; - // istanbul ignore else @preserve - t && (o && U(this) && this.hide(), this._toggleEventListeners(), this.enabled = !t); - } - /** Toggles the `disabled` property. */ - toggleEnabled() { - this.enabled ? this.disable() : this.enable(); - } - /** Removes the `Tooltip` from the target element. */ - dispose() { - const { tooltip: o, options: t } = this, s = { ...this, name: this.name }, n = () => setTimeout( - () => Pe(s, () => super.dispose()), - 17 - ); - t.animation && U(s) ? (this.options.delay = 0, this.hide(), ht(o, n)) : n(); - } -} -g(G, "selector", Ee), g(G, "init", Te), g(G, "getInstance", Tt), g(G, "styleTip", wt); -export { - G as T, - et as a, - ve as g, - Wt as p, - wt as s, - Et as t -}; -//# sourceMappingURL=tooltip-Dyd4Gul9.mjs.map diff --git a/dist/components/tooltip.cjs b/dist/components/tooltip.cjs index 4465ae56..45e00ed8 100644 --- a/dist/components/tooltip.cjs +++ b/dist/components/tooltip.cjs @@ -1,2 +1,2 @@ -"use strict";require("@thednp/shorty");require("@thednp/event-listener");require("./index-C8qIpGHG.js");require("./dataBsToggle-Dj-Ng54N.js");const e=require("./tooltip-BG3vXGWl.js");require("./showClass-D_Ms1FgG.js");require("./popupContainer-DIlSFkzD.js");require("./base-component-DBcDoOjV.js");module.exports=e.Tooltip; +"use strict";require("./base-component-D3rSrWwH.js");require("./event-listener-W3RGkfJ6.js");require("./index-BRPRSfaI.js");require("./dataBsToggle-Dj-Ng54N.js");const e=require("./tooltip--Tnf23hE.js");require("./showClass-D_Ms1FgG.js");require("./popupContainer-D8In9VFi.js");module.exports=e.Tooltip; //# sourceMappingURL=tooltip.cjs.map diff --git a/dist/components/tooltip.d.ts b/dist/components/tooltip.d.ts index 83bd3a42..a68030e1 100644 --- a/dist/components/tooltip.d.ts +++ b/dist/components/tooltip.d.ts @@ -1,104 +1,103 @@ -import PositionObserver$1 from '@thednp/position-observer'; - -export interface BaseOptions { - [key: string]: unknown; -} -declare class BaseComponent { - element: HTMLElement; - options?: BaseOptions; - /** - * @param target `HTMLElement` or selector string - * @param config component instance options - */ - constructor(target: HTMLElement | string, config?: BaseOptions); - get version(): string; - get name(): string; - get defaults(): {}; - /** just to have something to extend from */ - _toggleEventListeners: () => void; - /** Removes component from target element. */ - dispose(): void; -} -export interface TooltipOptions extends BaseOptions { - template: string | HTMLElement; - title: string | HTMLElement; - customClass: string; - trigger: string; - placement: "top" | "bottom" | "left" | "right"; - sanitizeFn?: (str: string) => string; - animation: boolean; - delay: number; - content: string | HTMLElement; - dismissible: boolean; - btnClose: string | HTMLElement; -} -/** Creates a new `Tooltip` instance. */ -declare class Tooltip extends BaseComponent { - static selector: string; - static init: (element: HTMLElement) => Tooltip; - static getInstance: (element: HTMLElement) => Tooltip | null; - static styleTip: (self: T) => void; - options: TooltipOptions; - btn?: HTMLElement; - tooltip?: HTMLElement; - container: ParentNode; - arrow?: HTMLElement; - offsetParent?: HTMLElement; - enabled: boolean; - id: string; - _observer: PositionObserver$1; - /** - * @param target the target element - * @param config the instance options - */ - constructor(target: HTMLElement | string, config?: Partial); - /** - * Returns component name string. - */ - get name(): string; - /** - * Returns component default options. - */ - get defaults(): TooltipOptions; - /** Handles the focus event on iOS. */ - handleFocus: () => void; - /** Shows the tooltip. */ - handleShow: () => void; - show(): void; - /** Hides the tooltip. */ - handleHide: () => void; - hide(): void; - /** Updates the tooltip position. */ - update: () => void; - /** Toggles the tooltip visibility. */ - toggle: () => void; - /** Enables the tooltip. */ - enable(): void; - /** Disables the tooltip. */ - disable(): void; - /** Toggles the `disabled` property. */ - toggleEnabled(): void; - /** - * Handles the `touchstart` event listener for `Tooltip` - * - * @this {Tooltip} - * @param {TouchEvent} e the `Event` object - */ - handleTouch: ({ target }: TouchEvent) => void; - /** - * Toggles on/off the `Tooltip` event listeners. - * - * @param add when `true`, event listeners are added - */ - _toggleEventListeners: (add?: boolean) => void; - /** Removes the `Tooltip` from the target element. */ - dispose(): void; -} - -export { - Tooltip as default, -}; - -export as namespace Tooltip; - -export {}; +import { default as default_2 } from '@thednp/position-observer'; + +/** Returns a new `BaseComponent` instance. */ +declare class BaseComponent { + element: HTMLElement; + options?: BaseOptions; + /** + * @param target `HTMLElement` or selector string + * @param config component instance options + */ + constructor(target: HTMLElement | string, config?: BaseOptions); + get version(): string; + get name(): string; + get defaults(): {}; + /** just to have something to extend from */ + _toggleEventListeners: () => void; + /** Removes component from target element. */ + dispose(): void; +} + +declare interface BaseOptions { + [key: string]: unknown; +} + +/** Creates a new `Tooltip` instance. */ +declare class Tooltip extends BaseComponent { + static selector: string; + static init: (element: HTMLElement) => Tooltip; + static getInstance: (element: HTMLElement) => Tooltip | null; + static styleTip: (self: T) => void; + options: TooltipOptions; + btn?: HTMLElement; + tooltip?: HTMLElement; + container: ParentNode; + arrow?: HTMLElement; + offsetParent?: HTMLElement; + enabled: boolean; + id: string; + _observer: default_2; + /** + * @param target the target element + * @param config the instance options + */ + constructor(target: HTMLElement | string, config?: Partial); + /** + * Returns component name string. + */ + get name(): string; + /** + * Returns component default options. + */ + get defaults(): TooltipOptions; + /** Handles the focus event on iOS. */ + handleFocus: () => void; + /** Shows the tooltip. */ + handleShow: () => void; + show(): void; + /** Hides the tooltip. */ + handleHide: () => void; + hide(): void; + /** Updates the tooltip position. */ + update: () => void; + /** Toggles the tooltip visibility. */ + toggle: () => void; + /** Enables the tooltip. */ + enable(): void; + /** Disables the tooltip. */ + disable(): void; + /** Toggles the `disabled` property. */ + toggleEnabled(): void; + /** + * Handles the `touchstart` event listener for `Tooltip` + * + * @this {Tooltip} + * @param {TouchEvent} e the `Event` object + */ + handleTouch: ({ target }: TouchEvent) => void; + /** + * Toggles on/off the `Tooltip` event listeners. + * + * @param add when `true`, event listeners are added + */ + _toggleEventListeners: (add?: boolean) => void; + /** Removes the `Tooltip` from the target element. */ + dispose(): void; +} +export default Tooltip; + +declare interface TooltipOptions extends BaseOptions { + template: string | HTMLElement; + title: string | HTMLElement; + customClass: string; + trigger: string; + placement: "top" | "bottom" | "left" | "right"; + sanitizeFn?: (str: string) => string; + animation: boolean; + delay: number; + content: string | HTMLElement; + dismissible: boolean; + btnClose: string | HTMLElement; +} + +export { } diff --git a/dist/components/tooltip.mjs b/dist/components/tooltip.mjs index 52e783a4..01fcd97b 100644 --- a/dist/components/tooltip.mjs +++ b/dist/components/tooltip.mjs @@ -1,12 +1,11 @@ -import "@thednp/shorty"; -import "@thednp/event-listener"; -import "./index-CmM9Kopf.mjs"; +import "./base-component-ylZzLp-h.mjs"; +import "./event-listener-C1-Yf9Z5.mjs"; +import "./index-gZuXW-3_.mjs"; import "./dataBsToggle-B84TS15h.mjs"; -import { T as d } from "./tooltip-Dyd4Gul9.mjs"; +import { T as f } from "./tooltip-B5F6ZNW7.mjs"; import "./showClass-C8hdJfjQ.mjs"; -import "./popupContainer-BitC465I.mjs"; -import "./base-component-DHbs0JQk.mjs"; +import "./popupContainer-ymf2oGcv.mjs"; export { - d as default + f as default }; //# sourceMappingURL=tooltip.mjs.map diff --git a/dist/components/tooltip.mjs.map b/dist/components/tooltip.mjs.map index 77886058..c606ac44 100644 --- a/dist/components/tooltip.mjs.map +++ b/dist/components/tooltip.mjs.map @@ -1 +1 @@ -{"version":3,"file":"tooltip.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"} \ No newline at end of file +{"version":3,"file":"tooltip.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"} \ No newline at end of file diff --git a/docs/assets/js/bootstrap-native.js b/docs/assets/js/bootstrap-native.js index 4406b1e7..bff96e7d 100644 --- a/docs/assets/js/bootstrap-native.js +++ b/docs/assets/js/bootstrap-native.js @@ -1,187 +1,2 @@ -var BSN=function(H){"use strict";var pr=Object.defineProperty;var ur=(H,it,lt)=>it in H?pr(H,it,{enumerable:!0,configurable:!0,writable:!0,value:lt}):H[it]=lt;var d=(H,it,lt)=>ur(H,typeof it!="symbol"?it+"":it,lt);const it="aria-describedby",lt="aria-expanded",re="aria-hidden",He="aria-modal",Fs="aria-pressed",Ze="aria-selected",qo="DOMContentLoaded",Je="focus",Ge="focusin",Rs="focusout",xe="keydown",Yo="keyup",_="click",Ws="mousedown",Uo="hover",Ae="mouseenter",Qe="mouseleave",Zo="pointerdown",Jo="pointermove",Go="pointerup",ts="touchstart",Qo="dragstart",ti='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',es="ArrowDown",ss="ArrowUp",js="ArrowLeft",Vs="ArrowRight",ns="Escape",ei="transitionDuration",si="transitionDelay",os="transitionend",zs="transitionProperty",ni=navigator.userAgentData,De=ni,{userAgent:oi}=navigator,ke=oi,Xs=/iPhone|iPad|iPod|Android/i;// istanbul ignore else @preserve -De?De.brands.some(t=>Xs.test(t.brand)):Xs.test(ke);const Ks=/(iPhone|iPod|iPad)/,ii=De?De.brands.some(t=>Ks.test(t.brand)):Ks.test(ke);ke&&ke.includes("Firefox");const{head:Ie}=document;["webkitPerspective","perspective"].some(t=>t in Ie.style);const qs=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},Ys=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},ci=(t,s,e,n)=>{const o=i=>{// istanbul ignore else @preserve -(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),Ys(t,s,o,n))};qs(t,s,o,n)},ae=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});// istanbul ignore next @preserve -ci(document,qo,ae,s)}catch{}return t})(),["webkitTransform","transform"].some(t=>t in Ie.style),["webkitAnimation","animation"].some(t=>t in Ie.style),["webkitTransition","transition"].some(t=>t in Ie.style);const et=(t,s)=>t.getAttribute(s),le=(t,s)=>t.hasAttribute(s),O=(t,s,e)=>t.setAttribute(s,e),Dt=(t,s)=>t.removeAttribute(s),f=(t,...s)=>{t.classList.add(...s)},b=(t,...s)=>{t.classList.remove(...s)},g=(t,s)=>t.classList.contains(s),de=t=>t!=null&&typeof t=="object"||!1,D=t=>de(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,y=t=>D(t)&&t.nodeType===1||!1,jt=new Map,kt={data:jt,set:(t,s,e)=>{if(!y(t))return;// istanbul ignore else @preserve -jt.has(s)||jt.set(s,new Map),jt.get(s).set(t,e)},getAllFor:t=>jt.get(t)||null,get:(t,s)=>{if(!y(t)||!s)return null;const e=kt.getAllFor(s);return t&&e&&e.get(t)||null},remove:(t,s)=>{const e=kt.getAllFor(s);if(!e||!y(t))return;e.delete(t);// istanbul ignore else @preserve -e.size===0&&jt.delete(s)}},V=(t,s)=>kt.get(t,s),he=t=>typeof t=="string"||!1,ri=t=>de(t)&&t.constructor.name==="Window"||!1,Us=t=>D(t)&&t.nodeType===9||!1,$=t=>ri(t)?t.document:Us(t)?t:D(t)?t.ownerDocument:globalThis.document,dt=(t,...s)=>Object.assign(t,...s),mt=t=>{if(!t)return;if(he(t))return $().createElement(t);const{tagName:s}=t,e=mt(s);if(!e)return;const n={...t};return delete n.tagName,dt(e,n)},E=(t,s)=>t.dispatchEvent(s),K=(t,s)=>{const e=getComputedStyle(t),n=s.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return e.getPropertyValue(n)},ai=t=>{const s=K(t,zs),e=K(t,si),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},fe=t=>{const s=K(t,zs),e=K(t,ei),n=e.includes("ms")?1:1e3,o=s&&s!=="none"?parseFloat(e)*n:0;return Number.isNaN(o)?0:o},k=(t,s)=>{let e=0;const n=new Event(os),o=fe(t),i=ai(t);if(o){const c=r=>{// istanbul ignore else @preserve -r.target===t&&(s.apply(t,[r]),t.removeEventListener(os,c),e=1)};t.addEventListener(os,c),setTimeout(()=>{// istanbul ignore next @preserve -e||E(t,n)},o+i+17)}else s.apply(t,[n])},ht=(t,s)=>t.focus(s),Zs=t=>["true",!0].includes(t)?!0:["false",!1].includes(t)?!1:["null","",null,void 0].includes(t)?null:t!==""&&!Number.isNaN(+t)?+t:t,Le=t=>Object.entries(t),Vt=t=>t.toLowerCase(),li=(t,s,e,n)=>{const o={...e},i={...t.dataset},c={...s},r={},l="title";return Le(i).forEach(([a,h])=>{const p=typeof a=="string"&&a.includes(n)?a.replace(n,"").replace(/[A-Z]/g,u=>Vt(u)):a;r[p]=Zs(h)}),Le(o).forEach(([a,h])=>{o[a]=Zs(h)}),Le(s).forEach(([a,h])=>{// istanbul ignore else @preserve -a in o?c[a]=o[a]:a in r?c[a]=r[a]:c[a]=a===l?et(t,l):h}),c},Js=t=>Object.keys(t),T=(t,s)=>{const e=new CustomEvent(t,{cancelable:!0,bubbles:!0});// istanbul ignore else @preserve -return de(s)&&dt(e,s),e},ge={passive:!0},It=t=>t.offsetHeight,I=(t,s)=>{Le(s).forEach(([e,n])=>{if(n&&he(e)&&e.includes("--"))t.style.setProperty(e,n);else{const o={};o[e]=n,dt(t.style,o)}})},is=t=>de(t)&&t.constructor.name==="Map"||!1,di=t=>typeof t=="number"||!1,vt=new Map,m={set:(t,s,e,n)=>{if(!y(t))return;// istanbul ignore else @preserve -if(n&&n.length){// istanbul ignore else @preserve -vt.has(t)||vt.set(t,new Map),vt.get(t).set(n,setTimeout(s,e))}else vt.set(t,setTimeout(s,e))},get:(t,s)=>{if(!y(t))return null;const e=vt.get(t);return s&&e&&is(e)?e.get(s)||null:di(e)?e:null},clear:(t,s)=>{if(!y(t))return;const e=vt.get(t);if(s&&s.length&&is(e)){clearTimeout(e.get(s)),e.delete(s);// istanbul ignore else @preserve -e.size===0&&vt.delete(t)}else clearTimeout(e),vt.delete(t)}},J=(t,s)=>(D(s)?s:$()).querySelectorAll(t),cs=new Map;function hi(t){const{shiftKey:s,code:e}=t,n=$(this),o=[...J(ti,this)].filter(r=>!le(r,"disabled")&&!et(r,re));if(!o.length)return;const i=o[0],c=o[o.length-1];// istanbul ignore else @preserve -e==="Tab"&&(s&&n.activeElement===i?(c.focus(),t.preventDefault()):!s&&n.activeElement===c&&(i.focus(),t.preventDefault()))}const fi=t=>cs.has(t)===!0,_e=t=>{const s=fi(t);(s?Ys:qs)(t,"keydown",hi),s?cs.delete(t):cs.set(t,!0)},pe=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:c,left:r}=t.getBoundingClientRect();let l=1,a=1;if(s&&y(t)){const{offsetWidth:h,offsetHeight:p}=t;l=h>0?Math.round(e)/h:1,a=p>0?Math.round(n)/p:1}return{width:e/l,height:n/a,top:o/a,right:i/l,bottom:c/a,left:r/l,x:r/l,y:o/a}},bt=t=>$(t).body,ct=t=>$(t).documentElement,Gs=t=>D(t)&&t.constructor.name==="ShadowRoot"||!1,gi=t=>t.nodeName==="HTML"?t:y(t)&&t.assignedSlot||D(t)&&t.parentNode||Gs(t)&&t.host||ct(t);let Qs=0,tn=0;const zt=new Map,en=(t,s)=>{let e=s?Qs:tn;if(s){const n=en(t),o=zt.get(n)||new Map;zt.has(n)||zt.set(n,o),is(o)&&!o.has(s)?(o.set(s,e),Qs+=1):e=o.get(s)}else{const n=t.id||t;zt.has(n)?e=zt.get(n):(zt.set(n,e),tn+=1)}return e},pi=t=>{var s;return t?Us(t)?t.defaultView:D(t)?(s=t==null?void 0:t.ownerDocument)==null?void 0:s.defaultView:t:window},ui=t=>Array.isArray(t)||!1,sn=t=>{if(!D(t))return!1;const{top:s,bottom:e}=pe(t),{clientHeight:n}=ct(t);return s<=n&&e>=0},mi=t=>typeof t=="function"||!1,vi=t=>de(t)&&t.constructor.name==="NodeList"||!1,wt=t=>ct(t).dir==="rtl",bi=t=>D(t)&&["TABLE","TD","TH"].includes(t.nodeName)||!1,N=(t,s)=>t?t.closest(s)||N(t.getRootNode().host,s):null,x=(t,s)=>y(t)?t:(D(s)?s:$()).querySelector(t),rs=(t,s)=>(D(s)?s:$()).getElementsByTagName(t),ft=(t,s)=>(s&&D(s)?s:$()).getElementsByClassName(t),nn=(t,s)=>t.matches(s),Xt={},on=t=>{const{type:s,currentTarget:e}=t;[...Xt[s]].forEach(([n,o])=>{/* istanbul ignore else @preserve */e===n&&[...o].forEach(([i,c])=>{i.apply(n,[t]),typeof c=="object"&&c.once&&F(n,s,i,c)})})},B=(t,s,e,n)=>{/* istanbul ignore else @preserve */Xt[s]||(Xt[s]=new Map);const o=Xt[s];/* istanbul ignore else @preserve */o.has(t)||o.set(t,new Map);const i=o.get(t),{size:c}=i;i.set(e,n);/* istanbul ignore else @preserve */c||t.addEventListener(s,on,n)},F=(t,s,e,n)=>{const o=Xt[s],i=o&&o.get(t),c=i&&i.get(e),r=c!==void 0?c:n;/* istanbul ignore else @preserve */i&&i.has(e)&&i.delete(e);/* istanbul ignore else @preserve */o&&(!i||!i.size)&&o.delete(t);/* istanbul ignore else @preserve */(!o||!o.size)&&delete Xt[s];/* istanbul ignore else @preserve */(!i||!i.size)&&t.removeEventListener(s,on,r)},R="fade",v="show",Oe="data-bs-dismiss",Ne="alert",cn="Alert",wi="5.0.15";class st{constructor(s,e){d(this,"_toggleEventListeners",()=>{});let n;try{if(y(s))n=s;else if(he(s)){n=x(s);// istanbul ignore else @preserve -if(!n)throw Error(`"${s}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(i){throw Error(`${this.name} Error: ${i.message}`)}const o=kt.get(n,this.name);// istanbul ignore else @preserve -o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Js(this.defaults).length?li(n,this.defaults,e||{},"bs"):{},kt.set(n,this.name,this)}get version(){return wi}get name(){return"BaseComponent"}get defaults(){return{}}dispose(){kt.remove(this.element,this.name),Js(this).forEach(s=>{delete this[s]})}}const $i=`.${Ne}`,Ei=`[${Oe}="${Ne}"]`,Ti=t=>V(t,cn),yi=t=>new Kt(t),rn=T(`close.bs.${Ne}`),Ci=T(`closed.bs.${Ne}`),an=t=>{const{element:s}=t;E(s,Ci),t._toggleEventListeners(),t.dispose(),s.remove()};class Kt extends st{constructor(e){super(e);d(this,"dismiss");d(this,"close",()=>{const{element:e}=this;// istanbul ignore else @preserve -e&&g(e,v)&&(E(e,rn),rn.defaultPrevented||(b(e,v),g(e,R)?k(e,()=>an(this)):an(this)))});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{dismiss:o,close:i}=this;// istanbul ignore else @preserve -o&&n(o,_,i)});this.dismiss=x(Ei,this.element),this._toggleEventListeners(!0)}get name(){return cn}dispose(){this._toggleEventListeners(),super.dispose()}}d(Kt,"selector",$i),d(Kt,"init",yi),d(Kt,"getInstance",Ti);const C="active",rt="data-bs-toggle",Si="button",ln="Button",Pi=`[${rt}="${Si}"]`,Hi=t=>V(t,ln),xi=t=>new qt(t);class qt extends st{constructor(e){super(e);d(this,"isActive",!1);d(this,"toggle",e=>{e&&e.preventDefault();const{element:n,isActive:o}=this;!g(n,"disabled")&&!et(n,"disabled")&&((o?b:f)(n,C),O(n,Fs,o?"false":"true"),this.isActive=g(n,C))});d(this,"_toggleEventListeners",e=>{(e?B:F)(this.element,_,this.toggle)});const{element:n}=this;this.isActive=g(n,C),O(n,Fs,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return ln}dispose(){this._toggleEventListeners(),super.dispose()}}d(qt,"selector",Pi),d(qt,"init",xi),d(qt,"getInstance",Hi);const as="data-bs-target",Lt="carousel",dn="Carousel",hn="data-bs-parent",Ai="data-bs-container",q=t=>{const s=[as,hn,Ai,"href"],e=$(t);return s.map(n=>{const o=et(t,n);return o?n===hn?N(t,o):x(o,e):null}).filter(n=>n)[0]},ue=`[data-bs-ride="${Lt}"]`,G=`${Lt}-item`,ls="data-bs-slide-to",$t="data-bs-slide",Et="paused",fn={pause:"hover",keyboard:!1,touch:!0,interval:5e3},gt=t=>V(t,dn),Di=t=>new Yt(t);let me=0,Me=0,ds=0;const hs=T(`slide.bs.${Lt}`),fs=T(`slid.bs.${Lt}`),gn=t=>{const{index:s,direction:e,element:n,slides:o,options:i}=t;// istanbul ignore else @preserve -if(t.isAnimating){const c=ps(t),r=e==="left"?"next":"prev",l=e==="left"?"start":"end";f(o[s],C),b(o[s],`${G}-${r}`),b(o[s],`${G}-${l}`),b(o[c],C),b(o[c],`${G}-${l}`),E(n,fs),m.clear(n,$t),t.cycle&&!$(n).hidden&&i.interval&&!t.isPaused&&t.cycle()}};function ki(){const t=gt(this);// istanbul ignore else @preserve -t&&!t.isPaused&&!m.get(this,Et)&&f(this,Et)}function Ii(){const t=gt(this);// istanbul ignore else @preserve -t&&t.isPaused&&!m.get(this,Et)&&t.cycle()}function Li(t){t.preventDefault();const s=N(this,ue)||q(this),e=gt(s);// istanbul ignore else @preserve -if(e&&!e.isAnimating){const n=+(et(this,ls)||0);// istanbul ignore else @preserve -this&&!g(this,C)&&!Number.isNaN(n)&&e.to(n)}}function _i(t){t.preventDefault();const s=N(this,ue)||q(this),e=gt(s);// istanbul ignore else @preserve -if(e&&!e.isAnimating){const n=et(this,$t);// istanbul ignore else @preserve -n==="next"?e.next():n==="prev"&&e.prev()}}const Oi=({code:t,target:s})=>{const e=$(s),[n]=[...J(ue,e)].filter(i=>sn(i)),o=gt(n);// istanbul ignore next @preserve -if(o&&!o.isAnimating&&!/textarea|input/i.test(s.nodeName)){const i=wt(n),c=i?js:Vs,r=i?Vs:js;// istanbul ignore else @preserve -t===r?o.prev():t===c&&o.next()}};function pn(t){const{target:s}=t,e=gt(this);// istanbul ignore next @preserve -e&&e.isTouch&&(e.indicator&&!e.indicator.contains(s)||!e.controls.includes(s))&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault())}function Ni(t){const{target:s}=t,e=gt(this);// istanbul ignore else @preserve -if(e&&!e.isAnimating&&!e.isTouch){const{controls:n,indicators:o}=e;// istanbul ignore else @preserve -if(![...n,...o].every(i=>i===s||i.contains(s))){me=t.pageX;// istanbul ignore else @preserve -this.contains(s)&&(e.isTouch=!0,un(e,!0))}}}const Mi=t=>{Me=t.pageX},Bi=t=>{var o;const{target:s}=t,e=$(s),n=[...J(ue,e)].map(i=>gt(i)).find(i=>i.isTouch);// istanbul ignore else @preserve -if(n){const{element:i,index:c}=n,r=wt(i);if(ds=t.pageX,n.isTouch=!1,un(n),!((o=e.getSelection())!=null&&o.toString().length)&&i.contains(s)&&Math.abs(me-ds)>120){// istanbul ignore else @preserve -Meme&&n.to(c+(r?1:-1))}me=0,Me=0,ds=0}},gs=(t,s)=>{const{indicators:e}=t;[...e].forEach(n=>b(n,C));// istanbul ignore else @preserve -t.indicators[s]&&f(e[s],C)},un=(t,s)=>{const{element:e}=t,n=s?B:F;n($(e),Jo,Mi,ge),n($(e),Go,Bi,ge)},ps=t=>{const{slides:s,element:e}=t,n=x(`.${G}.${C}`,e);return y(n)?[...s].indexOf(n):-1};class Yt extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const{element:n,options:o,slides:i,controls:c,indicators:r}=this,{touch:l,pause:a,interval:h,keyboard:p}=o,u=e?B:F;a&&h&&(u(n,Ae,ki),u(n,Qe,Ii)),l&&i.length>2&&(u(n,Zo,Ni,ge),u(n,ts,pn,{passive:!1}),u(n,Qo,pn,{passive:!1}));// istanbul ignore else @preserve -c.length&&c.forEach(S=>{// istanbul ignore else @preserve -S&&u(S,_,_i)});// istanbul ignore else @preserve -r.length&&r.forEach(S=>{u(S,_,Li)}),p&&u($(n),xe,Oi)});const{element:o}=this;this.direction=wt(o)?"right":"left",this.isTouch=!1,this.slides=ft(G,o);const{slides:i}=this;if(i.length>=2){const c=ps(this),r=[...i].find(h=>nn(h,`.${G}-next,.${G}-next`));this.index=c;const l=$(o);this.controls=[...J(`[${$t}]`,o),...J(`[${$t}][${as}="#${o.id}"]`,l)].filter((h,p,u)=>p===u.indexOf(h)),this.indicator=x(`.${Lt}-indicators`,o),this.indicators=[...this.indicator?J(`[${ls}]`,this.indicator):[],...J(`[${ls}][${as}="#${o.id}"]`,l)].filter((h,p,u)=>p===u.indexOf(h));const{options:a}=this;this.options.interval=a.interval===!0?fn.interval:a.interval;// istanbul ignore next @preserve - impossible to test -r?this.index=[...i].indexOf(r):c<0&&(this.index=0,f(i[0],C),this.indicators.length&&gs(this,0));// istanbul ignore else @preserve -this.indicators.length&&gs(this,this.index),this._toggleEventListeners(!0),a.interval&&this.cycle()}}get name(){return dn}get defaults(){return fn}get isPaused(){return g(this.element,Et)}get isAnimating(){return x(`.${G}-next,.${G}-prev`,this.element)!==null}cycle(){const{element:e,options:n,isPaused:o,index:i}=this;m.clear(e,Lt),o&&(m.clear(e,Et),b(e,Et)),m.set(e,()=>{// istanbul ignore else @preserve -this.element&&!this.isPaused&&!this.isTouch&&sn(e)&&this.to(i+1)},n.interval,Lt)}pause(){const{element:e,options:n}=this;// istanbul ignore else @preserve -!this.isPaused&&n.interval&&(f(e,Et),m.set(e,()=>{},1,Et))}next(){// istanbul ignore else @preserve -this.isAnimating||this.to(this.index+1)}prev(){// istanbul ignore else @preserve -this.isAnimating||this.to(this.index-1)}to(e){const{element:n,slides:o,options:i}=this,c=ps(this),r=wt(n);let l=e;if(!this.isAnimating&&c!==l&&!m.get(n,$t)){// istanbul ignore else @preserve -cl||c===o.length-1&&l===0)&&(this.direction=r?"left":"right");const{direction:a}=this;l<0?l=o.length-1:l>=o.length&&(l=0);const h=a==="left"?"next":"prev",p=a==="left"?"start":"end",u={relatedTarget:o[l],from:c,to:l,direction:a};dt(hs,u),dt(fs,u),E(n,hs),hs.defaultPrevented||(this.index=l,gs(this,l),fe(o[l])&&g(n,"slide")?m.set(n,()=>{f(o[l],`${G}-${h}`),It(o[l]),f(o[l],`${G}-${p}`),f(o[c],`${G}-${p}`),k(o[l],()=>this.slides&&this.slides.length&&gn(this))},0,$t):(f(o[l],C),b(o[c],C),m.set(n,()=>{m.clear(n,$t);// istanbul ignore else @preserve -n&&i.interval&&!this.isPaused&&this.cycle(),E(n,fs)},0,$t)))}}dispose(){const{isAnimating:e}=this,n={...this,isAnimating:e};this._toggleEventListeners(),super.dispose();// istanbul ignore next @preserve - impossible to test in playwright -n.isAnimating&&k(n.slides[n.index],()=>{gn(n)})}}d(Yt,"selector",ue),d(Yt,"init",Di),d(Yt,"getInstance",gt);const _t="collapsing",Y="collapse",mn="Collapse",Fi=`.${Y}`,vn=`[${rt}="${Y}"]`,Ri={parent:null},Be=t=>V(t,mn),Wi=t=>new Ut(t),bn=T(`show.bs.${Y}`),ji=T(`shown.bs.${Y}`),wn=T(`hide.bs.${Y}`),Vi=T(`hidden.bs.${Y}`),zi=t=>{const{element:s,parent:e,triggers:n}=t;E(s,bn),bn.defaultPrevented||(m.set(s,ae,17),e&&m.set(e,ae,17),f(s,_t),b(s,Y),I(s,{height:`${s.scrollHeight}px`}),k(s,()=>{m.clear(s),e&&m.clear(e),n.forEach(o=>O(o,lt,"true")),b(s,_t),f(s,Y),f(s,v),I(s,{height:""}),E(s,ji)}))},$n=t=>{const{element:s,parent:e,triggers:n}=t;E(s,wn),wn.defaultPrevented||(m.set(s,ae,17),e&&m.set(e,ae,17),I(s,{height:`${s.scrollHeight}px`}),b(s,Y),b(s,v),f(s,_t),It(s),I(s,{height:"0px"}),k(s,()=>{m.clear(s);// istanbul ignore else @preserve -e&&m.clear(e),n.forEach(o=>O(o,lt,"false")),b(s,_t),f(s,Y),I(s,{height:""}),E(s,Vi)}))},Xi=t=>{const{target:s}=t,e=s&&N(s,vn),n=e&&q(e),o=n&&Be(n);// istanbul ignore else @preserve -o&&o.toggle(),e&&e.tagName==="A"&&t.preventDefault()};class Ut extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?B:F,{triggers:o}=this;// istanbul ignore else @preserve -o.length&&o.forEach(i=>n(i,_,Xi))});const{element:o,options:i}=this,c=$(o);this.triggers=[...J(vn,c)].filter(r=>q(r)===o),this.parent=y(i.parent)?i.parent:he(i.parent)?q(o)||x(i.parent,c):null,this._toggleEventListeners(!0)}get name(){return mn}get defaults(){return Ri}hide(){const{triggers:e,element:n}=this;// istanbul ignore else @preserve -if(!m.get(n)){$n(this);// istanbul ignore else @preserve -e.length&&e.forEach(o=>f(o,`${Y}d`))}}show(){const{element:e,parent:n,triggers:o}=this;let i,c;if(n&&(i=[...J(`.${Y}.${v}`,n)].find(r=>Be(r)),c=i&&Be(i)),(!n||!m.get(n))&&!m.get(e)){c&&i!==e&&($n(c),c.triggers.forEach(r=>{f(r,`${Y}d`)})),zi(this);// istanbul ignore else @preserve -o.length&&o.forEach(r=>b(r,`${Y}d`))}}toggle(){g(this.element,v)?this.hide():this.show()}dispose(){this._toggleEventListeners(),super.dispose()}}d(Ut,"selector",Fi),d(Ut,"init",Wi),d(Ut,"getInstance",Be);const Ot=["dropdown","dropup","dropstart","dropend"],En="Dropdown",Tn="dropdown-menu",yn=t=>{const s=N(t,"A");return t.tagName==="A"&&le(t,"href")&&et(t,"href").slice(-1)==="#"||s&&le(s,"href")&&et(s,"href").slice(-1)==="#"},[nt,us,ms,vs]=Ot,Cn=`[${rt}="${nt}"]`,Zt=t=>V(t,En),Ki=t=>new Jt(t),qi=`${Tn}-end`,Sn=[nt,us],Pn=[ms,vs],Hn=["A","BUTTON"],Yi={offset:5,display:"dynamic"},bs=T(`show.bs.${nt}`),xn=T(`shown.bs.${nt}`),ws=T(`hide.bs.${nt}`),An=T(`hidden.bs.${nt}`),Dn=T(`updated.bs.${nt}`),kn=t=>{const{element:s,menu:e,parentElement:n,options:o}=t,{offset:i}=o;// istanbul ignore else @preserve: this test requires a navbar -if(K(e,"position")!=="static"){const c=wt(s),r=g(e,qi);["margin","top","bottom","left","right"].forEach(M=>{const Ht={};Ht[M]="",I(e,Ht)});let a=Ot.find(M=>g(n,M))||nt;const h={dropdown:[i,0,0],dropup:[0,0,i],dropstart:c?[-1,0,0,i]:[-1,i,0],dropend:c?[-1,i,0]:[-1,0,0,i]},p={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:c?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:c?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:c?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:c?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:u,offsetHeight:S}=e,{clientWidth:z,clientHeight:w}=ct(s),{left:W,top:j,width:oe,height:ut}=pe(s),P=W-u-i<0,ot=W+u+oe+i>=z,at=j+S+i>=w,X=j+S+ut+i>=w,U=j-S-i<0,A=(!c&&r||c&&!r)&&W+oe-u<0,ie=(c&&r||!c&&!r)&&W+u>=z;if(Pn.includes(a)&&P&&ot&&(a=nt),a===ms&&(c?ot:P)&&(a=vs),a===vs&&(c?P:ot)&&(a=ms),a===us&&U&&!X&&(a=nt),a===nt&&X&&!U&&(a=us),Pn.includes(a)&&at&&dt(p[a],{top:"auto",bottom:0}),Sn.includes(a)&&(A||ie)){let M={left:"auto",right:"auto"};// istanbul ignore else @preserve -!A&&ie&&!c&&(M={left:"auto",right:0});// istanbul ignore else @preserve -A&&!ie&&c&&(M={left:0,right:"auto"});// istanbul ignore else @preserve -M&&dt(p[a],M)}const Pt=h[a];if(I(e,{...p[a],margin:`${Pt.map(M=>M&&`${M}px`).join(" ")}`}),Sn.includes(a)&&r){// istanbul ignore else @preserve -r&&I(e,p[!c&&A||c&&ie?"menuStart":"menuEnd"])}E(n,Dn)}},Ui=t=>[...t.children].map(s=>{if(s&&Hn.includes(s.tagName))return s;const{firstElementChild:e}=s;return e&&Hn.includes(e.tagName)?e:null}).filter(s=>s),In=t=>{const{element:s,options:e,menu:n}=t,o=t.open?B:F,i=$(s);o(i,_,Ln),o(i,Je,Ln),o(i,xe,Ji),o(i,Yo,Gi);// istanbul ignore else @preserve -e.display==="dynamic"&&(t.open?t._observer.observe(n):t._observer.disconnect())},Fe=t=>{const s=[...Ot,"btn-group","input-group"].map(e=>ft(`${e} ${v}`,$(t))).find(e=>e.length);if(s&&s.length)return[...s[0].children].find(e=>Ot.some(n=>n===et(e,rt)))},Ln=t=>{const{target:s,type:e}=t;// istanbul ignore else @preserve -if(s&&y(s)){const n=Fe(s),o=n&&Zt(n);// istanbul ignore else @preserve -if(o){const{parentElement:i,menu:c}=o,r=i&&i.contains(s)&&(s.tagName==="form"||N(s,"form")!==null);[_,Ws].includes(e)&&yn(s)&&t.preventDefault();// istanbul ignore else @preserve -!r&&e!==Je&&s!==n&&s!==c&&o.hide()}}},Zi=t=>{const{target:s}=t,e=s&&N(s,Cn),n=e&&Zt(e);// istanbul ignore else @preserve -if(n){t.stopPropagation(),n.toggle();// istanbul ignore else @preserve -e&&yn(e)&&t.preventDefault()}},Ji=t=>{// istanbul ignore else @preserve -[es,ss].includes(t.code)&&t.preventDefault()};function Gi(t){const{code:s}=t,e=Fe(this),n=e&&Zt(e),{activeElement:o}=e&&$(e);// istanbul ignore else @preserve -if(n&&o){const{menu:i,open:c}=n,r=Ui(i);if(r&&r.length&&[es,ss].includes(s)){let l=r.indexOf(o);// istanbul ignore else @preserve -o===e?l=0:s===ss?l=l>1?l-1:0:s===es&&(l=l{(e?B:F)(this.element,_,Zi)});const{parentElement:o}=this.element,[i]=ft(Tn,o);i&&(this.parentElement=o,this.menu=i,this._observer=new IntersectionObserver(([c])=>Qi(c.target),{threshold:1}),this._toggleEventListeners(!0))}get name(){return En}get defaults(){return Yi}toggle(){this.open?this.hide():this.show()}show(){const{element:e,open:n,menu:o,parentElement:i}=this;// istanbul ignore else @preserve -if(!n){const c=Fe(e),r=c&&Zt(c);r&&r.hide(),[bs,xn,Dn].forEach(l=>{l.relatedTarget=e}),E(i,bs),bs.defaultPrevented||(f(o,v),f(i,v),O(e,lt,"true"),kn(this),this.open=!n,ht(e),In(this),E(i,xn))}}hide(){const{element:e,open:n,menu:o,parentElement:i}=this;// istanbul ignore else @preserve -n&&([ws,An].forEach(c=>{c.relatedTarget=e}),E(i,ws),ws.defaultPrevented||(b(o,v),b(i,v),O(e,lt,"false"),this.open=!n,In(this),E(i,An)))}dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}d(Jt,"selector",Cn),d(Jt,"init",Ki),d(Jt,"getInstance",Zt);const Z="modal",$s="Modal",Es="Offcanvas",tc="fixed-top",ec="fixed-bottom",_n="sticky-top",On="position-sticky",Nn=t=>[...ft(tc,t),...ft(ec,t),...ft(_n,t),...ft(On,t),...ft("is-fixed",t)],sc=t=>{const s=bt(t);I(s,{paddingRight:"",overflow:""});const e=Nn(s);// istanbul ignore else @preserve -e.length&&e.forEach(n=>{I(n,{paddingRight:"",marginRight:""})})},Mn=t=>{const{clientWidth:s}=ct(t),{innerWidth:e}=pi(t);return Math.abs(e-s)},Bn=(t,s)=>{const e=bt(t),n=parseInt(K(e,"paddingRight"),10),i=K(e,"overflow")==="hidden"&&n?0:Mn(t),c=Nn(e);// istanbul ignore else @preserve -if(s){I(e,{overflow:"hidden",paddingRight:`${n+i}px`});// istanbul ignore else @preserve -c.length&&c.forEach(r=>{const l=K(r,"paddingRight");r.style.paddingRight=`${parseInt(l,10)+i}px`;// istanbul ignore else @preserve -if([_n,On].some(a=>g(r,a))){const a=K(r,"marginRight");r.style.marginRight=`${parseInt(a,10)-i}px`}})}},Q="offcanvas",Tt=mt({tagName:"div",className:"popup-container"}),Fn=(t,s)=>{const e=D(s)&&s.nodeName==="BODY",n=D(s)&&!e?s:Tt,o=e?s:bt(t);// istanbul ignore else @preserve -D(t)&&(n===Tt&&o.append(Tt),n.append(t))},Rn=(t,s)=>{const e=D(s)&&s.nodeName==="BODY",n=D(s)&&!e?s:Tt;// istanbul ignore else @preserve -D(t)&&(t.remove(),n===Tt&&!Tt.children.length&&Tt.remove())},Ts=(t,s)=>{const e=D(s)&&s.nodeName!=="BODY"?s:Tt;return D(t)&&e.contains(t)},Wn="backdrop",jn=`${Z}-${Wn}`,Vn=`${Q}-${Wn}`,zn=`.${Z}.${v}`,ys=`.${Q}.${v}`,L=mt("div"),Nt=t=>x(`${zn},${ys}`,$(t)),Cs=t=>{const s=t?jn:Vn;[jn,Vn].forEach(e=>{b(L,e)}),f(L,s)},Xn=(t,s,e)=>{Cs(e),Fn(L,bt(t)),s&&f(L,R)},Kn=()=>{g(L,v)||(f(L,v),It(L))},Re=()=>{b(L,v)},qn=t=>{Nt(t)||(b(L,R),Rn(L,bt(t)),sc(t))},Yn=t=>y(t)&&K(t,"visibility")!=="hidden"&&t.offsetParent!==null,nc=`.${Z}`,Un=`[${rt}="${Z}"]`,oc=`[${Oe}="${Z}"]`,Zn=`${Z}-static`,ic={backdrop:!0,keyboard:!0},ve=t=>V(t,$s),cc=t=>new Gt(t),We=T(`show.bs.${Z}`),Jn=T(`shown.bs.${Z}`),Ss=T(`hide.bs.${Z}`),Gn=T(`hidden.bs.${Z}`),Qn=t=>{const{element:s}=t,e=Mn(s),{clientHeight:n,scrollHeight:o}=ct(s),{clientHeight:i,scrollHeight:c}=s,r=i!==c;// istanbul ignore next @preserve: impossible to test? -if(!r&&e){const a={[wt(s)?"paddingLeft":"paddingRight"]:`${e}px`};I(s,a)}Bn(s,r||n!==o)},to=(t,s)=>{const e=s?B:F,{element:n}=t;e(n,_,lc),e($(n),xe,ac),s?t._observer.observe(n):t._observer.disconnect()},eo=t=>{const{triggers:s,element:e,relatedTarget:n}=t;qn(e),I(e,{paddingRight:"",display:""}),to(t);const o=We.relatedTarget||s.find(Yn);// istanbul ignore else @preserve -o&&ht(o),Gn.relatedTarget=n,E(e,Gn),_e(e)},so=t=>{const{element:s,relatedTarget:e}=t;ht(s),to(t,!0),Jn.relatedTarget=e,E(s,Jn),_e(s)},no=t=>{const{element:s,hasFade:e}=t;I(s,{display:"block"}),Qn(t);// istanbul ignore else @preserve -Nt(s)||I(bt(s),{overflow:"hidden"}),f(s,v),Dt(s,re),O(s,He,"true"),e?k(s,()=>so(t)):so(t)},oo=t=>{const{element:s,options:e,hasFade:n}=t;e.backdrop&&n&&g(L,v)&&!Nt(s)?(Re(),k(L,()=>eo(t))):eo(t)},rc=t=>{const{target:s}=t,e=s&&N(s,Un),n=e&&q(e),o=n&&ve(n);// istanbul ignore else @preserve -if(o){// istanbul ignore else @preserve -e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.toggle()}},ac=({code:t,target:s})=>{const e=x(zn,$(s)),n=e&&ve(e);// istanbul ignore else @preserve -if(n){const{options:o}=n;// istanbul ignore else @preserve -o.keyboard&&t===ns&&g(e,v)&&(n.relatedTarget=null,n.hide())}},lc=t=>{var n,o;const{currentTarget:s}=t,e=s&&ve(s);// istanbul ignore else @preserve -if(e&&s&&!m.get(s)){const{options:i,isStatic:c,modalDialog:r}=e,{backdrop:l}=i,{target:a}=t,h=(o=(n=$(s))==null?void 0:n.getSelection())==null?void 0:o.toString().length,p=r.contains(a),u=a&&N(a,oc);// istanbul ignore else @preserve -c&&!p?m.set(s,()=>{f(s,Zn),k(r,()=>dc(e))},17):(u||!h&&!c&&!p&&l)&&(e.relatedTarget=u||null,e.hide(),t.preventDefault())}},dc=t=>{const{element:s,modalDialog:e}=t,n=(fe(e)||0)+17;b(s,Zn),m.set(s,()=>m.clear(s),n)};class Gt extends st{constructor(e,n){super(e,n);d(this,"update",()=>{// istanbul ignore else @preserve -g(this.element,v)&&Qn(this)});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{triggers:o}=this;// istanbul ignore else @preserve -o.length&&o.forEach(i=>n(i,_,rc))});const{element:o}=this,i=x(`.${Z}-dialog`,o);// istanbul ignore else @preserve -i&&(this.modalDialog=i,this.triggers=[...J(Un,$(o))].filter(c=>q(c)===o),this.isStatic=this.options.backdrop==="static",this.hasFade=g(o,R),this.relatedTarget=null,this._observer=new ResizeObserver(()=>this.update()),this._toggleEventListeners(!0))}get name(){return $s}get defaults(){return ic}toggle(){g(this.element,v)?this.hide():this.show()}show(){const{element:e,options:n,hasFade:o,relatedTarget:i}=this,{backdrop:c}=n;let r=0;// istanbul ignore else @preserve -if(!g(e,v)&&(We.relatedTarget=i||void 0,E(e,We),!We.defaultPrevented)){const l=Nt(e);// istanbul ignore else @preserve -if(l&&l!==e){const a=ve(l)||V(l,Es);// istanbul ignore else @preserve -a&&a.hide()}if(c)Ts(L)?Cs(!0):Xn(e,o,!0),r=fe(L),Kn(),setTimeout(()=>no(this),r);else{no(this);// istanbul ignore else @preserve -l&&g(L,v)&&Re()}}}hide(){const{element:e,hasFade:n,relatedTarget:o}=this;// istanbul ignore else @preserve -if(g(e,v)){Ss.relatedTarget=o||void 0,E(e,Ss);// istanbul ignore else @preserve -Ss.defaultPrevented||(b(e,v),O(e,re,"true"),Dt(e,He),n?k(e,()=>oo(this)):oo(this))}}dispose(){const e={...this},{modalDialog:n,hasFade:o}=e,i=()=>setTimeout(()=>super.dispose(),17);this.hide(),this._toggleEventListeners(),o?k(n,i):i()}}d(Gt,"selector",nc),d(Gt,"init",cc),d(Gt,"getInstance",ve);const hc=`.${Q}`,Ps=`[${rt}="${Q}"]`,fc=`[${Oe}="${Q}"]`,je=`${Q}-toggling`,gc={backdrop:!0,keyboard:!0,scroll:!1},be=t=>V(t,Es),pc=t=>new Qt(t),Ve=T(`show.bs.${Q}`),io=T(`shown.bs.${Q}`),Hs=T(`hide.bs.${Q}`),co=T(`hidden.bs.${Q}`),uc=t=>{const{element:s}=t,{clientHeight:e,scrollHeight:n}=ct(s);Bn(s,e!==n)},ro=(t,s)=>{const e=s?B:F,n=$(t.element);e(n,xe,wc),e(n,_,bc)},ao=t=>{const{element:s,options:e}=t;// istanbul ignore else @preserve -e.scroll||(uc(t),I(bt(s),{overflow:"hidden"})),f(s,je),f(s,v),I(s,{visibility:"visible"}),k(s,()=>$c(t))},mc=t=>{const{element:s,options:e}=t,n=Nt(s);s.blur(),!n&&e.backdrop&&g(L,v)&&Re(),k(s,()=>Ec(t))},vc=t=>{const s=N(t.target,Ps),e=s&&q(s),n=e&&be(e);// istanbul ignore else @preserve -if(n){n.relatedTarget=s,n.toggle();// istanbul ignore else @preserve -s&&s.tagName==="A"&&t.preventDefault()}},bc=t=>{const{target:s}=t,e=x(ys,$(s)),n=x(fc,e),o=e&&be(e);// istanbul ignore else @preserve -if(o){const{options:i,triggers:c}=o,{backdrop:r}=i,l=N(s,Ps),a=$(e).getSelection();// istanbul ignore else: a filter is required here @preserve -if(!L.contains(s)||r!=="static"){// istanbul ignore else @preserve -!(a&&a.toString().length)&&(!e.contains(s)&&r&&(!l||c.includes(s))||n&&n.contains(s))&&(o.relatedTarget=n&&n.contains(s)?n:null,o.hide());// istanbul ignore next @preserve -l&&l.tagName==="A"&&t.preventDefault()}}},wc=({code:t,target:s})=>{const e=x(ys,$(s)),n=e&&be(e);// istanbul ignore else @preserve -if(n){// istanbul ignore else @preserve -n.options.keyboard&&t===ns&&(n.relatedTarget=null,n.hide())}},$c=t=>{const{element:s}=t;b(s,je),Dt(s,re),O(s,He,"true"),O(s,"role","dialog"),E(s,io),ro(t,!0),ht(s),_e(s)},Ec=t=>{const{element:s,triggers:e}=t;O(s,re,"true"),Dt(s,He),Dt(s,"role"),I(s,{visibility:""});const n=Ve.relatedTarget||e.find(Yn);// istanbul ignore else @preserve -n&&ht(n),qn(s),E(s,co),b(s,je),_e(s),Nt(s)||ro(t)};class Qt extends st{constructor(e,n){super(e,n);d(this,"_toggleEventListeners",e=>{const n=e?B:F;this.triggers.forEach(o=>n(o,_,vc))});const{element:o}=this;this.triggers=[...J(Ps,$(o))].filter(i=>q(i)===o),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return Es}get defaults(){return gc}toggle(){g(this.element,v)?this.hide():this.show()}show(){const{element:e,options:n,relatedTarget:o}=this;let i=0;if(!g(e,v)&&(Ve.relatedTarget=o||void 0,io.relatedTarget=o||void 0,E(e,Ve),!Ve.defaultPrevented)){const c=Nt(e);if(c&&c!==e){const r=be(c)||V(c,$s);// istanbul ignore else @preserve -r&&r.hide()}if(n.backdrop)Ts(L)?Cs():Xn(e,!0),i=fe(L),Kn(),setTimeout(()=>ao(this),i);else{ao(this);// istanbul ignore next @preserve - this test was done on Modal -c&&g(L,v)&&Re()}}}hide(){const{element:e,relatedTarget:n}=this;g(e,v)&&(Hs.relatedTarget=n||void 0,co.relatedTarget=n||void 0,E(e,Hs),Hs.defaultPrevented||(f(e,je),b(e,v),mc(this)))}dispose(){const{element:e}=this,n=g(e,v),o=()=>setTimeout(()=>super.dispose(),1);if(this.hide(),this._toggleEventListeners(),n){k(e,o);// istanbul ignore next @preserve -}else o()}}d(Qt,"selector",hc),d(Qt,"init",pc),d(Qt,"getInstance",be);const Mt="popover",ze="Popover",pt="tooltip",lo=t=>{const s=t===pt,e=s?`${t}-inner`:`${t}-body`,n=s?"":`

`,o=`
`,i=`
`;return`
${n+o+i}
`},ho={top:"top",bottom:"bottom",left:"start",right:"end"},xs=t=>{const s=/\b(top|bottom|start|end)+/,{element:e,tooltip:n,container:o,options:i,arrow:c}=t;// istanbul ignore else @preserve -if(n){const r={...ho},l=wt(e);I(n,{top:"",left:"",right:"",bottom:""});const a=t.name===ze,{offsetWidth:h,offsetHeight:p}=n,{clientWidth:u,clientHeight:S,offsetWidth:z}=ct(e);let{placement:w}=i;const{clientWidth:W,offsetWidth:j}=o,ut=K(o,"position")==="fixed",P=Math.abs(ut?W-j:u-z),ot=l&&ut?P:0,at=u-(l?0:P)-1,{width:X,height:U,left:A,right:ie,top:Pt}=pe(e,!0),{x:M,y:Ht}={x:A,y:Pt};I(c,{top:"",left:"",right:"",bottom:""});let Rt=0,Te="",xt=0,Os="",ce="",Ye="",Ns="";const Wt=c.offsetWidth||0,At=c.offsetHeight||0,Ms=Wt/2;let ye=Pt-p-At<0,Ce=Pt+p+U+At>=S,Se=A-h-Wt=at;const Ue=["left","right"],Bs=["top","bottom"];ye=Ue.includes(w)?Pt+U/2-p/2-At<0:ye,Ce=Ue.includes(w)?Pt+p/2+U/2+At>=S:Ce,Se=Bs.includes(w)?A+X/2-h/2=at:Pe,w=Ue.includes(w)&&Se&&Pe?"top":w,w=w==="top"&&ye?"bottom":w,w=w==="bottom"&&Ce?"top":w,w=w==="left"&&Se?"right":w,w=w==="right"&&Pe?"left":w,n.className.includes(w)||(n.className=n.className.replace(s,r[w]));// istanbul ignore else @preserve -Ue.includes(w)?(w==="left"?xt=M-h-(a?Wt:0):xt=M+X+(a?Wt:0),ye&&Ce?(Rt=0,Te=0,ce=Pt+U/2-At/2):ye?(Rt=Ht,Te="",ce=U/2-Wt):Ce?(Rt=Ht-p+U,Te="",ce=p-U/2-Wt):(Rt=Ht-p/2+U/2,ce=p/2-At/2)):Bs.includes(w)&&(w==="top"?Rt=Ht-p-(a?At:0):Rt=Ht+U+(a?At:0),Se?(xt=0,Ye=M+X/2-Ms):Pe?(xt="auto",Os=0,Ns=X/2+at-ie-Ms):(xt=M-h/2+X/2,Ye=h/2-Ms)),I(n,{top:`${Rt}px`,bottom:Te===""?"":`${Te}px`,left:xt==="auto"?xt:`${xt}px`,right:Os!==""?`${Os}px`:""});// istanbul ignore else @preserve -y(c)&&(ce!==""&&(c.style.top=`${ce}px`),Ye!==""?c.style.left=`${Ye}px`:Ns!==""&&(c.style.right=`${Ns}px`));const gr=T(`updated.bs.${Vt(t.name)}`);E(e,gr)}},As={template:lo(pt),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""};var Tc=Object.defineProperty,yc=(t,s,e)=>s in t?Tc(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,yt=(t,s,e)=>yc(t,typeof s!="symbol"?s+"":s,e);const Cc="DOMContentLoaded",Sc=navigator.userAgentData,Xe=Sc,{userAgent:Pc}=navigator,Ke=Pc,fo=/iPhone|iPad|iPod|Android/i;// istanbul ignore else @preserve -Xe?Xe.brands.some(t=>fo.test(t.brand)):fo.test(Ke);const go=/(iPhone|iPod|iPad)/;Xe?Xe.brands.some(t=>go.test(t.brand)):go.test(Ke),Ke&&Ke.includes("Firefox");const{head:qe}=document;["webkitPerspective","perspective"].some(t=>t in qe.style);const Hc=(t,s,e,n)=>{const o=n||!1;t.addEventListener(s,e,o)},xc=(t,s,e,n)=>{const o=n||!1;t.removeEventListener(s,e,o)},Ac=(t,s,e,n)=>{const o=i=>{// istanbul ignore else @preserve -(i.target===t||i.currentTarget===t)&&(e.apply(t,[i]),xc(t,s,o,n))};Hc(t,s,o,n)},Dc=()=>{};(()=>{let t=!1;try{const s=Object.defineProperty({},"passive",{get:()=>(t=!0,t)});// istanbul ignore next @preserve -Ac(document,Cc,Dc,s)}catch{}return t})(),["webkitTransform","transform"].some(t=>t in qe.style),["webkitAnimation","animation"].some(t=>t in qe.style),["webkitTransition","transition"].some(t=>t in qe.style);const kc=t=>t!=null&&typeof t=="object"||!1,Ic=t=>kc(t)&&typeof t.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(s=>t.nodeType===s)||!1,Lc=t=>Ic(t)&&t.nodeType===1||!1,po=(t,s)=>{const{width:e,height:n,top:o,right:i,bottom:c,left:r}=t.getBoundingClientRect();let l=1,a=1;return{width:e/l,height:n/a,top:o/a,right:i/l,bottom:c/a,left:r/l,x:r/l,y:o/a}},_c=t=>typeof t=="function"||!1,uo="PositionObserver Error";class mo{constructor(s,e){if(yt(this,"entries"),yt(this,"_tick"),yt(this,"_root"),yt(this,"_callback"),yt(this,"observe",n=>{if(!Lc(n))throw new Error(`${uo}: ${n} is not an instance of HTMLElement.`);const{clientWidth:o,clientHeight:i}=this._root,c=po(n),{left:r,top:l,bottom:a,right:h,width:p,height:u}=c,S=l>1-u&&r>1-p&&a<=i+u-1&&h<=o+p-1;this.entries.push({target:n,boundingBox:c,isVisible:S}),this._tick=requestAnimationFrame(this._runCallback)}),yt(this,"unobserve",n=>{const o=this.entries.findIndex(i=>i.target===n);this.entries.splice(o,1)}),yt(this,"_runCallback",()=>{/* istanbul ignore if @preserve - a guard must be set */if(!this.entries.length)return;const n=[],{clientWidth:o,clientHeight:i}=this._root;this.entries.forEach((c,r)=>{const{target:l,boundingBox:a}=c,h=po(l),{left:p,top:u,bottom:S,right:z,width:w,height:W}=h;if(a.left!==p||a.top!==u||a.right!==z||a.bottom!==S){const j=u>1-W&&p>1-w&&S<=i+W-1&&z<=o+w-1;this.entries[r].boundingBox=h,this.entries[r].isVisible=j,n.push({target:l,boundingBox:h,isVisible:j})}}),n.length&&this._callback(n),requestAnimationFrame(this._runCallback)}),yt(this,"disconnect",()=>{cancelAnimationFrame(this._tick),this.entries.length=0,this._tick=0}),!_c(s))throw new Error(`${uo}: ${s} is not a function.`);this.entries=[],this._callback=s,this._root=(e==null?void 0:e.root)||(document==null?void 0:document.documentElement),this._tick=0}}const vo="data-original-title",Bt="Tooltip",Ct=(t,s,e)=>{// istanbul ignore else @preserve -if(he(s)&&s.length){let n=s.trim();mi(e)&&(n=e(n));const i=new DOMParser().parseFromString(n,"text/html");t.append(...i.body.childNodes)}else y(s)?t.append(s):(vi(s)||ui(s)&&s.every(D))&&t.append(...s)},Oc=t=>{const s=t.name===Bt,{id:e,element:n,options:o}=t,{title:i,placement:c,template:r,animation:l,customClass:a,sanitizeFn:h,dismissible:p,content:u,btnClose:S}=o,z=s?pt:Mt,w={...ho};let W=[],j=[];wt(n)&&(w.left="end",w.right="start");const oe=`bs-${z}-${w[c]}`;let ut;if(y(r))ut=r;else{const ot=mt("div");Ct(ot,r,h),ut=ot.firstChild}t.tooltip=y(ut)?ut.cloneNode(!0):void 0;const{tooltip:P}=t;// istanbul ignore else @preserve -if(P){O(P,"id",e),O(P,"role",pt);const ot=s?`${pt}-inner`:`${Mt}-body`,at=s?null:x(`.${Mt}-header`,P),X=x(`.${ot}`,P);t.arrow=x(`.${z}-arrow`,P);const{arrow:U}=t;if(y(i))W=[i.cloneNode(!0)];else{const A=mt("div");Ct(A,i,h),W=[...A.childNodes]}if(y(u))j=[u.cloneNode(!0)];else{const A=mt("div");Ct(A,u,h),j=[...A.childNodes]}if(p)if(i)if(y(S))W=[...W,S.cloneNode(!0)];else{const A=mt("div");Ct(A,S,h),W=[...W,A.firstChild]}else{// istanbul ignore else @preserve -if(at&&at.remove(),y(S))j=[...j,S.cloneNode(!0)];else{const A=mt("div");Ct(A,S,h),j=[...j,A.firstChild]}}// istanbul ignore else @preserve -if(s)i&&X&&Ct(X,i,h);else{// istanbul ignore else @preserve -i&&at&&Ct(at,W,h);// istanbul ignore else @preserve -u&&X&&Ct(X,j,h),t.btn=x(".btn-close",P)||void 0}f(P,"position-fixed"),f(U,"position-absolute");// istanbul ignore else @preserve -g(P,z)||f(P,z);// istanbul ignore else @preserve -l&&!g(P,R)&&f(P,R);// istanbul ignore else @preserve -a&&!g(P,a)&&f(P,a);// istanbul ignore else @preserve -g(P,oe)||f(P,oe)}},Nc=t=>{const s=["HTML","BODY"],e=[];let{parentNode:n}=t;for(;n&&!s.includes(n.nodeName);){n=gi(n);// istanbul ignore else @preserve -Gs(n)||bi(n)||e.push(n)}return e.find((o,i)=>K(o,"position")!=="relative"&&e.slice(i+1).every(c=>K(c,"position")==="static")?o:null)||$(t).body},Mc=`[${rt}="${pt}"],[data-tip="${pt}"]`,bo="title";let wo=t=>V(t,Bt);const Bc=t=>new St(t),Fc=t=>{const{element:s,tooltip:e,container:n,offsetParent:o}=t;Dt(s,it),Rn(e,n===o?n:o)},we=t=>{const{tooltip:s,container:e,offsetParent:n}=t;return s&&Ts(s,e===n?e:n)},Rc=(t,s)=>{const{element:e}=t;t._toggleEventListeners();// istanbul ignore else @preserve -le(e,vo)&&t.name===Bt&&Co(t);// istanbul ignore else @preserve -s&&s()},$o=(t,s)=>{const e=s?B:F,{element:n}=t;e($(n),ts,t.handleTouch,ge)},Eo=t=>{const{element:s}=t,e=T(`shown.bs.${Vt(t.name)}`);$o(t,!0),E(s,e),m.clear(s,"in")},To=t=>{const{element:s}=t,e=T(`hidden.bs.${Vt(t.name)}`);$o(t),Fc(t),E(s,e),m.clear(s,"out")},yo=(t,s)=>{const e=s?B:F,{element:n}=t,o=N(n,`.${Z}`),i=N(n,`.${Q}`);s?t._observer.observe(t.element):t._observer.disconnect(),o&&e(o,`hide.bs.${Z}`,t.handleHide),i&&e(i,`hide.bs.${Q}`,t.handleHide)},Co=(t,s)=>{const e=[vo,bo],{element:n}=t;O(n,e[s?0:1],s||et(n,e[0])||""),Dt(n,e[s?1:0])};class St extends st{constructor(e,n){super(e,n);d(this,"handleFocus",()=>ht(this.element));d(this,"handleShow",()=>this.show());d(this,"handleHide",()=>this.hide());d(this,"update",()=>{xs(this)});d(this,"toggle",()=>{const{tooltip:e}=this;e&&!we(this)?this.show():this.hide()});d(this,"handleTouch",({target:e})=>{const{tooltip:n,element:o}=this;// istanbul ignore if @preserve -n&&n.contains(e)||e===o||e&&o.contains(e)||this.hide()});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{element:o,options:i,btn:c}=this,{trigger:r}=i,a=!!(this.name!==Bt&&i.dismissible);// istanbul ignore else @preserve -r.includes("manual")||(this.enabled=!!e,r.split(" ").forEach(p=>{// istanbul ignore else @preserve -if(p===Uo){n(o,Ws,this.handleShow),n(o,Ae,this.handleShow);// istanbul ignore else @preserve -a||(n(o,Qe,this.handleHide),n($(o),ts,this.handleTouch,ge))}else if(p===_)n(o,p,a?this.handleShow:this.toggle);else if(p===Je){n(o,Ge,this.handleShow);// istanbul ignore else @preserve -a||n(o,Rs,this.handleHide);// istanbul ignore else @preserve -ii&&n(o,_,this.handleFocus)}// istanbul ignore else @preserve -a&&c&&n(c,_,this.handleHide)}))});const{element:o}=this,i=this.name===Bt,c=i?pt:Mt,r=i?Bt:ze;// istanbul ignore next @preserve: this is to set Popover too -wo=a=>V(a,r),this.enabled=!0,this.id=`${c}-${en(o,c)}`;const{options:l}=this;if(!(!l.title&&i||!i&&!l.content)){dt(As,{titleAttr:""});// istanbul ignore else @preserve -le(o,bo)&&i&&typeof l.title=="string"&&Co(this,l.title),this.container=Nc(o),this.offsetParent=["sticky","fixed"].some(a=>K(this.container,"position")===a)?this.container:$(this.element).body,Oc(this),this._observer=new mo(()=>this.update()),this._toggleEventListeners(!0)}}get name(){return Bt}get defaults(){return As}show(){const{options:e,tooltip:n,element:o,container:i,offsetParent:c,id:r}=this,{animation:l}=e,a=m.get(o,"out"),h=i===c?i:c;m.clear(o,"out"),n&&!a&&!we(this)&&m.set(o,()=>{const p=T(`show.bs.${Vt(this.name)}`);E(o,p);// istanbul ignore else @preserve -if(!p.defaultPrevented){Fn(n,h),O(o,it,`#${r}`),this.update(),yo(this,!0);// istanbul ignore else @preserve -g(n,v)||f(n,v);// istanbul ignore else @preserve -l?k(n,()=>Eo(this)):Eo(this)}},17,"in")}hide(){const{options:e,tooltip:n,element:o}=this,{animation:i,delay:c}=e;m.clear(o,"in");// istanbul ignore else @preserve -n&&we(this)&&m.set(o,()=>{const r=T(`hide.bs.${Vt(this.name)}`);E(o,r);// istanbul ignore else @preserve -if(!r.defaultPrevented){this.update(),b(n,v),yo(this);// istanbul ignore else @preserve -i?k(n,()=>To(this)):To(this)}},c+17,"out")}enable(){const{enabled:e}=this;// istanbul ignore else @preserve -e||(this._toggleEventListeners(!0),this.enabled=!e)}disable(){const{tooltip:e,enabled:n}=this;// istanbul ignore else @preserve -n&&(e&&we(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!n)}toggleEnabled(){this.enabled?this.disable():this.enable()}dispose(){const{tooltip:e,options:n}=this,o={...this,name:this.name},i=()=>setTimeout(()=>Rc(o,()=>super.dispose()),17);n.animation&&we(o)?(this.options.delay=0,this.hide(),k(e,i)):i()}}d(St,"selector",Mc),d(St,"init",Bc),d(St,"getInstance",wo),d(St,"styleTip",xs);const Wc=`[${rt}="${Mt}"],[data-tip="${Mt}"]`,jc=dt({},As,{template:lo(Mt),content:"",dismissible:!1,btnClose:''}),Vc=t=>V(t,ze),zc=t=>new Ft(t);class Ft extends St{constructor(e,n){super(e,n);d(this,"show",()=>{super.show();const{options:e,btn:n}=this;// istanbul ignore else @preserve -e.dismissible&&n&&setTimeout(()=>ht(n),17)})}get name(){return ze}get defaults(){return jc}}d(Ft,"selector",Wc),d(Ft,"init",zc),d(Ft,"getInstance",Vc),d(Ft,"styleTip",xs);const Xc="scrollspy",So="ScrollSpy",Kc='[data-bs-spy="scroll"]',qc={offset:10,target:null},Yc=t=>V(t,So),Uc=t=>new te(t),Po=T(`activate.bs.${Xc}`),Zc=t=>{const{target:s,scrollTarget:e,options:n,itemsLength:o,scrollHeight:i,element:c}=t,{offset:r}=n,l=e!==c,a=s&&rs("A",s),h=$(c),p=e?Ho(e):i;t.scrollTop=e.scrollTop;// istanbul ignore else @preserve -if(a&&(p!==i||o!==a.length)){let u,S,z;t.items=[],t.targets=[],t.offsets=[],t.scrollHeight=p,t.maxScroll=t.scrollHeight-Jc(t),Array.from(a).forEach(w=>{u=et(w,"href"),S=u&&u.charAt(0)==="#"&&u.slice(-1)!=="#"&&x(u,h),S&&(t.items.push(w),t.targets.push(S),z=pe(S),t.offsets.push((l?z.top+t.scrollTop:S.offsetTop)-r))}),t.itemsLength=t.items.length}},Ho=t=>y(t)?t.scrollHeight:ct(t).scrollHeight,Jc=({element:t,scrollTarget:s})=>s!==t?s.clientHeight:pe(t).height,xo=t=>{[...rs("A",t)].forEach(s=>{g(s,C)&&b(s,C)})},Ao=(t,s)=>{const{target:e,element:n}=t;// istanbul ignore else @preserve -y(e)&&xo(e),t.activeItem=s,f(s,C);const o=[];let i=s;for(;i!==bt(n);)i=i.parentElement,(g(i,"nav")||g(i,"dropdown-menu"))&&o.push(i);o.forEach(c=>{const r=c.previousElementSibling;// istanbul ignore else @preserve -r&&!g(r,C)&&f(r,C)}),Po.relatedTarget=s,E(n,Po)};class te extends st{constructor(e,n){super(e,n);d(this,"refresh",()=>{const{target:e}=this;// istanbul ignore else @preserve -if(y(e)&&e.offsetHeight>0){Zc(this);const{scrollTop:n,maxScroll:o,itemsLength:i,items:c,activeItem:r}=this;if(n>=o){const a=c[i-1];// istanbul ignore else @preserve -r!==a&&Ao(this,a);return}const{offsets:l}=this;// istanbul ignore else @preserve -if(r&&n0){this.activeItem=null;// istanbul ignore else @preserve -e&&xo(e);return}c.forEach((a,h)=>{r!==a&&n>=l[h]&&(typeof l[h+1]>"u"||n{e?this.scrollTarget===this.element?this.targets.forEach(n=>this._observer.observe(n)):this._observer.observe(this.element):this._observer.disconnect()});const{element:o,options:i}=this;this.target=x(i.target,$(o)),this.target&&(this.scrollTarget=o.clientHeightthis.refresh(),{root:this.scrollTarget}),this._toggleEventListeners(!0))}get name(){return So}get defaults(){return qc}dispose(){this._toggleEventListeners(),super.dispose()}}d(te,"selector",Kc),d(te,"init",Uc),d(te,"getInstance",Yc);const $e="tab",Do="Tab",ko=`[${rt}="${$e}"]`,Io=t=>V(t,Do),Gc=t=>new ee(t),Ds=T(`show.bs.${$e}`),Lo=T(`shown.bs.${$e}`),ks=T(`hide.bs.${$e}`),_o=T(`hidden.bs.${$e}`),Ee=new Map,Oo=t=>{const{tabContent:s,nav:e}=t;// istanbul ignore else @preserve -s&&g(s,_t)&&(s.style.height="",b(s,_t));// istanbul ignore else @preserve -e&&m.clear(e)},No=t=>{const{element:s,tabContent:e,content:n,nav:o}=t,{tab:i}=y(o)&&Ee.get(o)||{tab:null};// istanbul ignore else @preserve -if(e&&n&&g(n,R)){const{currentHeight:c,nextHeight:r}=Ee.get(s)||{currentHeight:0,nextHeight:0};// istanbul ignore else @preserve: vitest won't validate this branch -c!==r?setTimeout(()=>{e.style.height=`${r}px`,It(e),k(e,()=>Oo(t))},50):Oo(t)}else o&&m.clear(o);Lo.relatedTarget=i,E(s,Lo)},Mo=t=>{const{element:s,content:e,tabContent:n,nav:o}=t,{tab:i,content:c}=o&&Ee.get(o)||{tab:null,content:null};let r=0;// istanbul ignore else @preserve -n&&e&&g(e,R)&&([c,e].forEach(l=>{// istanbul ignore else @preserve -y(l)&&f(l,"overflow-hidden")}),r=y(c)?c.scrollHeight:0),Ds.relatedTarget=i,_o.relatedTarget=s,E(s,Ds);// istanbul ignore else @preserve -if(!Ds.defaultPrevented){// istanbul ignore else @preserve -e&&f(e,C);// istanbul ignore else @preserve -c&&b(c,C);// istanbul ignore else @preserve -if(n&&e&&g(e,R)){const l=e.scrollHeight;Ee.set(s,{currentHeight:r,nextHeight:l,tab:null,content:null}),f(n,_t),n.style.height=`${r}px`,It(n),[c,e].forEach(a=>{// istanbul ignore else @preserve -a&&b(a,"overflow-hidden")})}if(e&&e&&g(e,R))setTimeout(()=>{f(e,v),k(e,()=>{No(t)})},1);else{// istanbul ignore else @preserve -e&&f(e,v),No(t)}// istanbul ignore else @preserve -i&&E(i,_o)}},Bo=t=>{const{nav:s}=t;// istanbul ignore next @preserve -if(!y(s))return{tab:null,content:null};const e=ft(C,s);let n=null;// istanbul ignore else @preserve -e.length===1&&!Ot.some(i=>g(e[0].parentElement,i))?[n]=e:e.length>1&&(n=e[e.length-1]);const o=y(n)?q(n):null;return{tab:n,content:o}},Fo=t=>{// istanbul ignore next @preserve -if(!y(t))return null;const s=N(t,`.${Ot.join(",.")}`);return s?x(`.${Ot[0]}-toggle`,s):null},Qc=t=>{const s=Io(t.target);// istanbul ignore else @preserve -s&&(t.preventDefault(),s.show())};class ee extends st{constructor(e){super(e);d(this,"_toggleEventListeners",e=>{(e?B:F)(this.element,_,Qc)});const{element:n}=this,o=q(n);// istanbul ignore else @preserve -if(o){const i=N(n,".nav"),c=N(o,".tab-content");this.nav=i,this.content=o,this.tabContent=c,this.dropdown=Fo(n);const{tab:r}=Bo(this);if(i&&!r){const l=x(ko,i),a=l&&q(l);// istanbul ignore else @preserve -a&&(f(l,C),f(a,v),f(a,C),O(n,Ze,"true"))}this._toggleEventListeners(!0)}}get name(){return Do}show(){const{element:e,content:n,nav:o,dropdown:i}=this;// istanbul ignore else @preserve -if(!(o&&m.get(o))&&!g(e,C)){const{tab:c,content:r}=Bo(this);// istanbul ignore else @preserve -o&&Ee.set(o,{tab:c,content:r,currentHeight:0,nextHeight:0}),ks.relatedTarget=e;// istanbul ignore else @preserve -if(y(c)){E(c,ks);// istanbul ignore else @preserve -if(!ks.defaultPrevented){f(e,C),O(e,Ze,"true");const l=y(c)&&Fo(c);l&&g(l,C)&&b(l,C);// istanbul ignore else @preserve -if(o){const a=()=>{// istanbul ignore else @preserve -c&&(b(c,C),O(c,Ze,"false")),i&&!g(i,C)&&f(i,C)};r&&(g(r,R)||n&&g(n,R))?m.set(o,a,1):a()}// istanbul ignore else @preserve -r&&(b(r,v),g(r,R)?k(r,()=>Mo(this)):Mo(this))}}}}dispose(){this._toggleEventListeners(),super.dispose()}}d(ee,"selector",ko),d(ee,"init",Gc),d(ee,"getInstance",Io);const tt="toast",Ro="Toast",tr=`.${tt}`,er=`[${Oe}="${tt}"]`,Wo=`[${rt}="${tt}"]`,se="showing",jo="hide",sr={animation:!0,autohide:!0,delay:5e3},Is=t=>V(t,Ro),nr=t=>new ne(t),Vo=T(`show.bs.${tt}`),or=T(`shown.bs.${tt}`),zo=T(`hide.bs.${tt}`),ir=T(`hidden.bs.${tt}`),Xo=t=>{const{element:s,options:e}=t;b(s,se),m.clear(s,se),E(s,or);// istanbul ignore else @preserve -e.autohide&&m.set(s,()=>t.hide(),e.delay,tt)},Ko=t=>{const{element:s}=t;b(s,se),b(s,v),f(s,jo),m.clear(s,tt),E(s,ir)},cr=t=>{const{element:s,options:e}=t;f(s,se),e.animation?(It(s),k(s,()=>Ko(t))):Ko(t)},rr=t=>{const{element:s,options:e}=t;m.set(s,()=>{b(s,jo),It(s),f(s,v),f(s,se),e.animation?k(s,()=>Xo(t)):Xo(t)},17,se)},ar=t=>{const{target:s}=t,e=s&&N(s,Wo),n=e&&q(e),o=n&&Is(n);// istanbul ignore else @preserve -if(o){// istanbul ignore else @preserve -e&&e.tagName==="A"&&t.preventDefault(),o.relatedTarget=e,o.show()}},lr=t=>{const s=t.target,e=Is(s),{type:n,relatedTarget:o}=t;// istanbul ignore else @preserve: a solid filter is required -e&&s!==o&&!s.contains(o)&&([Ae,Ge].includes(n)?m.clear(s,tt):m.set(s,()=>e.hide(),e.options.delay,tt))};class ne extends st{constructor(e,n){super(e,n);d(this,"show",()=>{const{element:e,isShown:n}=this;// istanbul ignore else @preserve -e&&!n&&(E(e,Vo),Vo.defaultPrevented||rr(this))});d(this,"hide",()=>{const{element:e,isShown:n}=this;// istanbul ignore else @preserve -e&&n&&(E(e,zo),zo.defaultPrevented||cr(this))});d(this,"_toggleEventListeners",e=>{const n=e?B:F,{element:o,triggers:i,dismiss:c,options:r,hide:l}=this;// istanbul ignore else @preserve -c&&n(c,_,l);// istanbul ignore else @preserve -r.autohide&&[Ge,Rs,Ae,Qe].forEach(a=>n(o,a,lr));// istanbul ignore else @preserve -i.length&&i.forEach(a=>n(a,_,ar))});const{element:o,options:i}=this;i.animation&&!g(o,R)?f(o,R):!i.animation&&g(o,R)&&b(o,R),this.dismiss=x(er,o),this.triggers=[...J(Wo,$(o))].filter(c=>q(c)===o),this._toggleEventListeners(!0)}get name(){return Ro}get defaults(){return sr}get isShown(){return g(this.element,v)}dispose(){const{element:e,isShown:n}=this;this._toggleEventListeners(),m.clear(e,tt),n&&b(e,v),super.dispose()}}d(ne,"selector",tr),d(ne,"init",nr),d(ne,"getInstance",Is);const Ls=new Map;[Kt,qt,Yt,Ut,Jt,Gt,Qt,Ft,te,ee,ne,St].forEach(t=>Ls.set(t.prototype.name,t));const dr=(t,s)=>{[...s].forEach(e=>t(e))},hr=(t,s)=>{const e=kt.getAllFor(t);e&&[...e].forEach(([n,o])=>{s.contains(n)&&o.dispose()})},_s=t=>{const s=t&&t.nodeName?t:document,e=[...rs("*",s)];Ls.forEach(n=>{const{init:o,selector:i}=n;dr(o,e.filter(c=>nn(c,i)))})},fr=t=>{const s=t&&t.nodeName?t:document;Ls.forEach(e=>{hr(e.prototype.name,s)})};return document.body?_s():B(document,"DOMContentLoaded",()=>_s(),{once:!0}),H.Alert=Kt,H.Button=qt,H.Carousel=Yt,H.Collapse=Ut,H.Dropdown=Jt,H.Modal=Gt,H.Offcanvas=Qt,H.Popover=Ft,H.ScrollSpy=te,H.Tab=ee,H.Toast=ne,H.Tooltip=St,H.initCallback=_s,H.removeDataAPI=fr,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),H}({}); +var BSN=function(R){"use strict";const xs="aria-describedby",de="aria-expanded",Kt="aria-hidden",he="aria-modal",Is="aria-pressed",xe="aria-selected",Ie="focus",Le="focusin",Ls="focusout",fe="keydown",Oo="keyup",L="click",Os="mousedown",No="hover",ge="mouseenter",Oe="mouseleave",ko="pointerdown",_o="pointermove",Mo="pointerup",Ne="touchstart",Bo="dragstart",Ro='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"]',ke="ArrowDown",_e="ArrowUp",Ns="ArrowLeft",ks="ArrowRight",Me="Escape",Fo="transitionDuration",Wo="transitionDelay",Be="transitionend",_s="transitionProperty",Vo=()=>{const e=/(iPhone|iPod|iPad)/;return navigator?.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(navigator?.userAgent)||!1},pe=()=>{},jo=(e,t,s,n)=>{const o=n||!1;e.addEventListener(t,s,o)},zo=(e,t,s,n)=>{const o=n||!1;e.removeEventListener(t,s,o)},tt=(e,t)=>e.getAttribute(t),Ut=(e,t)=>e.hasAttribute(t),O=(e,t,s)=>e.setAttribute(t,s),St=(e,t)=>e.removeAttribute(t),h=(e,...t)=>{e.classList.add(...t)},m=(e,...t)=>{e.classList.remove(...t)},f=(e,t)=>e.classList.contains(t),Xt=e=>e!=null&&typeof e=="object"||!1,A=e=>Xt(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,T=e=>A(e)&&e.nodeType===1||!1,_t=new Map,Dt={data:_t,set:(e,t,s)=>{T(e)&&(_t.has(t)||_t.set(t,new Map),_t.get(t).set(e,s))},getAllFor:e=>_t.get(e)||null,get:(e,t)=>{if(!T(e)||!t)return null;const s=Dt.getAllFor(t);return e&&s&&s.get(e)||null},remove:(e,t)=>{const s=Dt.getAllFor(t);!s||!T(e)||(s.delete(e),s.size===0&&_t.delete(t))}},F=(e,t)=>Dt.get(e,t),qt=e=>typeof e=="string"||!1,Ko=e=>Xt(e)&&e.constructor.name==="Window"||!1,Ms=e=>A(e)&&e.nodeType===9||!1,b=e=>Ko(e)?e.document:Ms(e)?e:A(e)?e.ownerDocument:globalThis.document,at=(e,...t)=>Object.assign(e,...t),gt=e=>{if(!e)return;if(qt(e))return b().createElement(e);const{tagName:t}=e,s=gt(t);if(!s)return;const n={...e};return delete n.tagName,at(s,n)},E=(e,t)=>e.dispatchEvent(t),j=(e,t)=>{const s=getComputedStyle(e),n=t.replace("webkit","Webkit").replace(/([A-Z])/g,"-$1").toLowerCase();return s.getPropertyValue(n)},Uo=e=>{const t=j(e,_s),s=j(e,Wo),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},Yt=e=>{const t=j(e,_s),s=j(e,Fo),n=s.includes("ms")?1:1e3,o=t&&t!=="none"?parseFloat(s)*n:0;return Number.isNaN(o)?0:o},P=(e,t)=>{let s=0;const n=new Event(Be),o=Yt(e),i=Uo(e);if(o){const a=r=>{r.target===e&&(t.apply(e,[r]),e.removeEventListener(Be,a),s=1)};e.addEventListener(Be,a),setTimeout(()=>{s||E(e,n)},o+i+17)}else t.apply(e,[n])},rt=(e,t)=>e.focus(t),Bs=e=>["true",!0].includes(e)?!0:["false",!1].includes(e)?!1:["null","",null,void 0].includes(e)?null:e!==""&&!Number.isNaN(+e)?+e:e,ue=e=>Object.entries(e),Mt=e=>e.toLowerCase(),Xo=(e,t,s,n)=>{const o={...s},i={...e.dataset},a={...t},r={},c="title";return ue(i).forEach(([l,d])=>{const g=typeof l=="string"&&l.includes(n)?l.replace(n,"").replace(/[A-Z]/g,$=>Mt($)):l;r[g]=Bs(d)}),ue(o).forEach(([l,d])=>{o[l]=Bs(d)}),ue(t).forEach(([l,d])=>{l in o?a[l]=o[l]:l in r?a[l]=r[l]:a[l]=l===c?tt(e,c):d}),a},Rs=e=>Object.keys(e),w=(e,t)=>{const s=new CustomEvent(e,{cancelable:!0,bubbles:!0});return Xt(t)&&at(s,t),s},Zt={passive:!0},Ht=e=>e.offsetHeight,x=(e,t)=>{ue(t).forEach(([s,n])=>{if(n&&qt(s)&&s.includes("--"))e.style.setProperty(s,n);else{const o={};o[s]=n,at(e.style,o)}})},Re=e=>Xt(e)&&e.constructor.name==="Map"||!1,qo=e=>typeof e=="number"||!1,pt=new Map,p={set:(e,t,s,n)=>{T(e)&&(n&&n.length?(pt.has(e)||pt.set(e,new Map),pt.get(e).set(n,setTimeout(t,s))):pt.set(e,setTimeout(t,s)))},get:(e,t)=>{if(!T(e))return null;const s=pt.get(e);return t&&s&&Re(s)?s.get(t)||null:qo(s)?s:null},clear:(e,t)=>{if(!T(e))return;const s=pt.get(e);t&&t.length&&Re(s)?(clearTimeout(s.get(t)),s.delete(t),s.size===0&&pt.delete(e)):(clearTimeout(s),pt.delete(e))}},Z=(e,t)=>(A(t)?t:b()).querySelectorAll(e),Fe=new Map;function Yo(e){const{shiftKey:t,code:s}=e,n=b(this),o=[...Z(Ro,this)].filter(r=>!Ut(r,"disabled")&&!tt(r,Kt));if(!o.length)return;const i=o[0],a=o[o.length-1];s==="Tab"&&(t&&n.activeElement===i?(a.focus(),e.preventDefault()):!t&&n.activeElement===a&&(i.focus(),e.preventDefault()))}const Zo=e=>Fe.has(e)===!0,me=e=>{const t=Zo(e);(t?zo:jo)(e,"keydown",Yo),t?Fe.delete(e):Fe.set(e,!0)},Gt=(e,t)=>{const{width:s,height:n,top:o,right:i,bottom:a,left:r}=e.getBoundingClientRect();let c=1,l=1;if(t&&T(e)){const{offsetWidth:d,offsetHeight:g}=e;c=d>0?Math.round(s)/d:1,l=g>0?Math.round(n)/g:1}return{width:s/c,height:n/l,top:o/l,right:i/c,bottom:a/l,left:r/c,x:r/c,y:o/l}},ut=e=>b(e).body,ct=e=>b(e).documentElement,Fs=e=>A(e)&&e.constructor.name==="ShadowRoot"||!1,Go=e=>e.nodeName==="HTML"?e:T(e)&&e.assignedSlot||A(e)&&e.parentNode||Fs(e)&&e.host||ct(e);let Ws=0,Vs=0;const Bt=new Map,js=(e,t)=>{let s=t?Ws:Vs;if(t){const n=js(e),o=Bt.get(n)||new Map;Bt.has(n)||Bt.set(n,o),Re(o)&&!o.has(t)?(o.set(t,s),Ws+=1):s=o.get(t)}else{const n=e.id||e;Bt.has(n)?s=Bt.get(n):(Bt.set(n,s),Vs+=1)}return s},Jo=e=>e?Ms(e)?e.defaultView:A(e)?e?.ownerDocument?.defaultView:e:window,Qo=e=>Array.isArray(e)||!1,zs=e=>{if(!A(e))return!1;const{top:t,bottom:s}=Gt(e),{clientHeight:n}=ct(e);return t<=n&&s>=0},ti=e=>typeof e=="function"||!1,ei=e=>Xt(e)&&e.constructor.name==="NodeList"||!1,mt=e=>ct(e).dir==="rtl",si=e=>A(e)&&["TABLE","TD","TH"].includes(e.nodeName)||!1,N=(e,t)=>e?e.closest(t)||N(e.getRootNode().host,t):null,S=(e,t)=>T(e)?e:(A(t)?t:b()).querySelector(e),We=(e,t)=>(A(t)?t:b()).getElementsByTagName(e),lt=(e,t)=>(t&&A(t)?t:b()).getElementsByClassName(e),Ks=(e,t)=>e.matches(t),Rt={},Us=e=>{const{type:t,currentTarget:s}=e;[...Rt[t]].forEach(([n,o])=>{s===n&&[...o].forEach(([i,a])=>{i.apply(n,[e]),typeof a=="object"&&a.once&&M(n,t,i,a)})})},_=(e,t,s,n)=>{Rt[t]||(Rt[t]=new Map);const o=Rt[t];o.has(e)||o.set(e,new Map);const i=o.get(e),{size:a}=i;i.set(s,n);a||e.addEventListener(t,Us,n)},M=(e,t,s,n)=>{const o=Rt[t],i=o&&o.get(e),a=i&&i.get(s),r=a!==void 0?a:n;i&&i.has(s)&&i.delete(s);o&&(!i||!i.size)&&o.delete(e);(!o||!o.size)&&delete Rt[t];(!i||!i.size)&&e.removeEventListener(t,Us,r)},B="fade",u="show",ve="data-bs-dismiss",be="alert",Xs="Alert",ni="5.1.0";class et{constructor(t,s){let n;try{if(T(t))n=t;else if(qt(t)){if(n=S(t),!n)throw Error(`"${t}" is not a valid selector.`)}else throw Error("your target is not an instance of HTMLElement.")}catch(i){throw Error(`${this.name} Error: ${i.message}`)}const o=Dt.get(n,this.name);o&&o._toggleEventListeners(),this.element=n,this.options=this.defaults&&Rs(this.defaults).length?Xo(n,this.defaults,s||{},"bs"):{},Dt.set(n,this.name,this)}get version(){return ni}get name(){return"BaseComponent"}get defaults(){return{}}_toggleEventListeners=()=>{};dispose(){Dt.remove(this.element,this.name),Rs(this).forEach(t=>{delete this[t]})}}const oi=`.${be}`,ii=`[${ve}="${be}"]`,ai=e=>F(e,Xs),ri=e=>new Ve(e),qs=w(`close.bs.${be}`),ci=w(`closed.bs.${be}`),Ys=e=>{const{element:t}=e;E(t,ci),e._toggleEventListeners(),e.dispose(),t.remove()};class Ve extends et{static selector=oi;static init=ri;static getInstance=ai;dismiss;constructor(t){super(t),this.dismiss=S(ii,this.element),this._toggleEventListeners(!0)}get name(){return Xs}close=()=>{const{element:t}=this;t&&f(t,u)&&(E(t,qs),qs.defaultPrevented||(m(t,u),f(t,B)?P(t,()=>Ys(this)):Ys(this)))};_toggleEventListeners=t=>{const s=t?_:M,{dismiss:n,close:o}=this;n&&s(n,L,o)};dispose(){this._toggleEventListeners(),super.dispose()}}const y="active",ot="data-bs-toggle",li="button",Zs="Button",di=`[${ot}="${li}"]`,hi=e=>F(e,Zs),fi=e=>new je(e);class je extends et{static selector=di;static init=fi;static getInstance=hi;isActive=!1;constructor(t){super(t);const{element:s}=this;this.isActive=f(s,y),O(s,Is,String(!!this.isActive)),this._toggleEventListeners(!0)}get name(){return Zs}toggle=t=>{t&&t.preventDefault();const{element:s,isActive:n}=this;!f(s,"disabled")&&!tt(s,"disabled")&&((n?m:h)(s,y),O(s,Is,n?"false":"true"),this.isActive=f(s,y))};_toggleEventListeners=t=>{(t?_:M)(this.element,L,this.toggle)};dispose(){this._toggleEventListeners(),super.dispose()}}const ze="data-bs-target",At="carousel",Gs="Carousel",Js="data-bs-parent",gi="data-bs-container",z=e=>{const t=[ze,Js,gi,"href"],s=b(e);return t.map(n=>{const o=tt(e,n);return o?n===Js?N(e,o):S(o,s):null}).filter(n=>n)[0]},Jt=`[data-bs-ride="${At}"]`,G=`${At}-item`,Ke="data-bs-slide-to",vt="data-bs-slide",bt="paused",Qs={pause:"hover",keyboard:!1,touch:!0,interval:5e3},dt=e=>F(e,Gs),pi=e=>new Ge(e);let Qt=0,Ee=0,Ue=0;const Xe=w(`slide.bs.${At}`),qe=w(`slid.bs.${At}`),tn=e=>{const{index:t,direction:s,element:n,slides:o,options:i}=e;if(e.isAnimating){const a=Ze(e),r=s==="left"?"next":"prev",c=s==="left"?"start":"end";h(o[t],y),m(o[t],`${G}-${r}`),m(o[t],`${G}-${c}`),m(o[a],y),m(o[a],`${G}-${c}`),E(n,qe),p.clear(n,vt),e.cycle&&!b(n).hidden&&i.interval&&!e.isPaused&&e.cycle()}};function ui(){const e=dt(this);e&&!e.isPaused&&!p.get(this,bt)&&h(this,bt)}function mi(){const e=dt(this);e&&e.isPaused&&!p.get(this,bt)&&e.cycle()}function vi(e){e.preventDefault();const t=N(this,Jt)||z(this),s=dt(t);if(s&&!s.isAnimating){const n=+(tt(this,Ke)||0);this&&!f(this,y)&&!Number.isNaN(n)&&s.to(n)}}function bi(e){e.preventDefault();const t=N(this,Jt)||z(this),s=dt(t);if(s&&!s.isAnimating){const n=tt(this,vt);n==="next"?s.next():n==="prev"&&s.prev()}}const Ei=({code:e,target:t})=>{const s=b(t),[n]=[...Z(Jt,s)].filter(i=>zs(i)),o=dt(n);if(o&&!o.isAnimating&&!/textarea|input/i.test(t.nodeName)){const i=mt(n);e===(i?ks:Ns)?o.prev():e===(i?Ns:ks)&&o.next()}};function en(e){const{target:t}=e,s=dt(this);s&&s.isTouch&&(s.indicator&&!s.indicator.contains(t)||!s.controls.includes(t))&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}function wi(e){const{target:t}=e,s=dt(this);if(s&&!s.isAnimating&&!s.isTouch){const{controls:n,indicators:o}=s;[...n,...o].every(i=>i===t||i.contains(t))||(Qt=e.pageX,this.contains(t)&&(s.isTouch=!0,sn(s,!0)))}}const Ti=e=>{Ee=e.pageX},yi=e=>{const{target:t}=e,s=b(t),n=[...Z(Jt,s)].map(o=>dt(o)).find(o=>o.isTouch);if(n){const{element:o,index:i}=n,a=mt(o);Ue=e.pageX,n.isTouch=!1,sn(n),!s.getSelection()?.toString().length&&o.contains(t)&&Math.abs(Qt-Ue)>120&&(EeQt&&n.to(i+(a?1:-1))),Qt=0,Ee=0,Ue=0}},Ye=(e,t)=>{const{indicators:s}=e;[...s].forEach(n=>m(n,y)),e.indicators[t]&&h(s[t],y)},sn=(e,t)=>{const{element:s}=e,n=t?_:M;n(b(s),_o,Ti,Zt),n(b(s),Mo,yi,Zt)},Ze=e=>{const{slides:t,element:s}=e,n=S(`.${G}.${y}`,s);return T(n)?[...t].indexOf(n):-1};class Ge extends et{static selector=Jt;static init=pi;static getInstance=dt;constructor(t,s){super(t,s);const{element:n}=this;this.direction=mt(n)?"right":"left",this.isTouch=!1,this.slides=lt(G,n);const{slides:o}=this;if(o.length>=2){const i=Ze(this),a=[...o].find(l=>Ks(l,`.${G}-next,.${G}-next`));this.index=i;const r=b(n);this.controls=[...Z(`[${vt}]`,n),...Z(`[${vt}][${ze}="#${n.id}"]`,r)].filter((l,d,g)=>d===g.indexOf(l)),this.indicator=S(`.${At}-indicators`,n),this.indicators=[...this.indicator?Z(`[${Ke}]`,this.indicator):[],...Z(`[${Ke}][${ze}="#${n.id}"]`,r)].filter((l,d,g)=>d===g.indexOf(l));const{options:c}=this;this.options.interval=c.interval===!0?Qs.interval:c.interval,a?this.index=[...o].indexOf(a):i<0&&(this.index=0,h(o[0],y),this.indicators.length&&Ye(this,0)),this.indicators.length&&Ye(this,this.index),this._toggleEventListeners(!0),c.interval&&this.cycle()}}get name(){return Gs}get defaults(){return Qs}get isPaused(){return f(this.element,bt)}get isAnimating(){return S(`.${G}-next,.${G}-prev`,this.element)!==null}cycle(){const{element:t,options:s,isPaused:n,index:o}=this;p.clear(t,At),n&&(p.clear(t,bt),m(t,bt)),p.set(t,()=>{this.element&&!this.isPaused&&!this.isTouch&&zs(t)&&this.to(o+1)},s.interval,At)}pause(){const{element:t,options:s}=this;!this.isPaused&&s.interval&&(h(t,bt),p.set(t,()=>{},1,bt))}next(){this.isAnimating||this.to(this.index+1)}prev(){this.isAnimating||this.to(this.index-1)}to(t){const{element:s,slides:n,options:o}=this,i=Ze(this),a=mt(s);let r=t;if(!this.isAnimating&&i!==r&&!p.get(s,vt)){ir||i===n.length-1&&r===0)&&(this.direction=a?"left":"right");const{direction:c}=this;r<0?r=n.length-1:r>=n.length&&(r=0);const l=c==="left"?"next":"prev",d=c==="left"?"start":"end",g={relatedTarget:n[r],from:i,to:r,direction:c};at(Xe,g),at(qe,g),E(s,Xe),Xe.defaultPrevented||(this.index=r,Ye(this,r),Yt(n[r])&&f(s,"slide")?p.set(s,()=>{h(n[r],`${G}-${l}`),Ht(n[r]),h(n[r],`${G}-${d}`),h(n[i],`${G}-${d}`),P(n[r],()=>this.slides&&this.slides.length&&tn(this))},0,vt):(h(n[r],y),m(n[i],y),p.set(s,()=>{p.clear(s,vt),s&&o.interval&&!this.isPaused&&this.cycle(),E(s,qe)},0,vt)))}}_toggleEventListeners=t=>{const{element:s,options:n,slides:o,controls:i,indicators:a}=this,{touch:r,pause:c,interval:l,keyboard:d}=n,g=t?_:M;c&&l&&(g(s,ge,ui),g(s,Oe,mi)),r&&o.length>2&&(g(s,ko,wi,Zt),g(s,Ne,en,{passive:!1}),g(s,Bo,en,{passive:!1})),i.length&&i.forEach($=>{$&&g($,L,bi)}),a.length&&a.forEach($=>{g($,L,vi)}),d&&g(b(s),fe,Ei)};dispose(){const{isAnimating:t}=this,s={...this,isAnimating:t};this._toggleEventListeners(),super.dispose(),s.isAnimating&&P(s.slides[s.index],()=>{tn(s)})}}const Pt="collapsing",K="collapse",nn="Collapse",$i=`.${K}`,on=`[${ot}="${K}"]`,Ci={parent:null},we=e=>F(e,nn),Si=e=>new Je(e),an=w(`show.bs.${K}`),Di=w(`shown.bs.${K}`),rn=w(`hide.bs.${K}`),Hi=w(`hidden.bs.${K}`),Ai=e=>{const{element:t,parent:s,triggers:n}=e;E(t,an),an.defaultPrevented||(p.set(t,pe,17),s&&p.set(s,pe,17),h(t,Pt),m(t,K),x(t,{height:`${t.scrollHeight}px`}),P(t,()=>{p.clear(t),s&&p.clear(s),n.forEach(o=>O(o,de,"true")),m(t,Pt),h(t,K),h(t,u),x(t,{height:""}),E(t,Di)}))},cn=e=>{const{element:t,parent:s,triggers:n}=e;E(t,rn),rn.defaultPrevented||(p.set(t,pe,17),s&&p.set(s,pe,17),x(t,{height:`${t.scrollHeight}px`}),m(t,K),m(t,u),h(t,Pt),Ht(t),x(t,{height:"0px"}),P(t,()=>{p.clear(t),s&&p.clear(s),n.forEach(o=>O(o,de,"false")),m(t,Pt),h(t,K),x(t,{height:""}),E(t,Hi)}))},Pi=e=>{const{target:t}=e,s=t&&N(t,on),n=s&&z(s),o=n&&we(n);o&&o.toggle(),s&&s.tagName==="A"&&e.preventDefault()};class Je extends et{static selector=$i;static init=Si;static getInstance=we;constructor(t,s){super(t,s);const{element:n,options:o}=this,i=b(n);this.triggers=[...Z(on,i)].filter(a=>z(a)===n),this.parent=T(o.parent)?o.parent:qt(o.parent)?z(n)||S(o.parent,i):null,this._toggleEventListeners(!0)}get name(){return nn}get defaults(){return Ci}hide(){const{triggers:t,element:s}=this;p.get(s)||(cn(this),t.length&&t.forEach(n=>h(n,`${K}d`)))}show(){const{element:t,parent:s,triggers:n}=this;let o,i;s&&(o=[...Z(`.${K}.${u}`,s)].find(a=>we(a)),i=o&&we(o)),(!s||!p.get(s))&&!p.get(t)&&(i&&o!==t&&(cn(i),i.triggers.forEach(a=>{h(a,`${K}d`)})),Ai(this),n.length&&n.forEach(a=>m(a,`${K}d`)))}toggle(){f(this.element,u)?this.hide():this.show()}_toggleEventListeners=t=>{const s=t?_:M,{triggers:n}=this;n.length&&n.forEach(o=>s(o,L,Pi))};dispose(){this._toggleEventListeners(),super.dispose()}}const xt=["dropdown","dropup","dropstart","dropend"],ln="Dropdown",dn="dropdown-menu",hn=e=>{const t=N(e,"A");return e.tagName==="A"&&Ut(e,"href")&&tt(e,"href").slice(-1)==="#"||t&&Ut(t,"href")&&tt(t,"href").slice(-1)==="#"},[st,Qe,ts,es]=xt,fn=`[${ot}="${st}"]`,Ft=e=>F(e,ln),xi=e=>new os(e),Ii=`${dn}-end`,gn=[st,Qe],pn=[ts,es],un=["A","BUTTON"],Li={offset:5,display:"dynamic"},ss=w(`show.bs.${st}`),mn=w(`shown.bs.${st}`),ns=w(`hide.bs.${st}`),vn=w(`hidden.bs.${st}`),bn=w(`updated.bs.${st}`),En=e=>{const{element:t,menu:s,parentElement:n,options:o}=e,{offset:i}=o;if(j(s,"position")!=="static"){const a=mt(t),r=f(s,Ii);["margin","top","bottom","left","right"].forEach(k=>{const yt={};yt[k]="",x(s,yt)});let l=xt.find(k=>f(n,k))||st;const d={dropdown:[i,0,0],dropup:[0,0,i],dropstart:a?[-1,0,0,i]:[-1,i,0],dropend:a?[-1,i,0]:[-1,0,0,i]},g={dropdown:{top:"100%"},dropup:{top:"auto",bottom:"100%"},dropstart:a?{left:"100%",right:"auto"}:{left:"auto",right:"100%"},dropend:a?{left:"auto",right:"100%"}:{left:"100%",right:"auto"},menuStart:a?{right:"0",left:"auto"}:{right:"auto",left:"0"},menuEnd:a?{right:"auto",left:"0"}:{right:"0",left:"auto"}},{offsetWidth:$,offsetHeight:D}=s,{clientWidth:W,clientHeight:v}=ct(t),{left:U,top:Y,width:Vt,height:ft}=Gt(t),C=U-$-i<0,nt=U+$+Vt+i>=W,it=Y+D+i>=v,V=Y+D+ft+i>=v,X=Y-D-i<0,H=(!a&&r||a&&!r)&&U+Vt-$<0,jt=(a&&r||!a&&!r)&&U+$>=W;if(pn.includes(l)&&C&&nt&&(l=st),l===ts&&(a?nt:C)&&(l=es),l===es&&(a?C:nt)&&(l=ts),l===Qe&&X&&!V&&(l=st),l===st&&V&&!X&&(l=Qe),pn.includes(l)&&it&&at(g[l],{top:"auto",bottom:0}),gn.includes(l)&&(H||jt)){let k={left:"auto",right:"auto"};!H&&jt&&!a&&(k={left:"auto",right:0}),H&&!jt&&a&&(k={left:0,right:"auto"}),k&&at(g[l],k)}const Tt=d[l];x(s,{...g[l],margin:`${Tt.map(k=>k&&`${k}px`).join(" ")}`}),gn.includes(l)&&r&&r&&x(s,g[!a&&H||a&&jt?"menuStart":"menuEnd"]),E(n,bn)}},Oi=e=>[...e.children].map(t=>{if(t&&un.includes(t.tagName))return t;const{firstElementChild:s}=t;return s&&un.includes(s.tagName)?s:null}).filter(t=>t),wn=e=>{const{element:t,options:s,menu:n}=e,o=e.open?_:M,i=b(t);o(i,L,Tn),o(i,Ie,Tn),o(i,fe,ki),o(i,Oo,_i),s.display==="dynamic"&&(e.open?e._observer.observe(n):e._observer.disconnect())},Te=e=>{const t=[...xt,"btn-group","input-group"].map(s=>lt(`${s} ${u}`,b(e))).find(s=>s.length);if(t&&t.length)return[...t[0].children].find(s=>xt.some(n=>n===tt(s,ot)))},Tn=e=>{const{target:t,type:s}=e;if(t&&T(t)){const n=Te(t),o=n&&Ft(n);if(o){const{parentElement:i,menu:a}=o,r=i&&i.contains(t)&&(t.tagName==="form"||N(t,"form")!==null);[L,Os].includes(s)&&hn(t)&&e.preventDefault(),!r&&s!==Ie&&t!==n&&t!==a&&o.hide()}}},Ni=e=>{const{target:t}=e,s=t&&N(t,fn),n=s&&Ft(s);n&&(e.stopPropagation(),n.toggle(),s&&hn(s)&&e.preventDefault())},ki=e=>{[ke,_e].includes(e.code)&&e.preventDefault()};function _i(e){const{code:t}=e,s=Te(this),n=s&&Ft(s),{activeElement:o}=s&&b(s);if(n&&o){const{menu:i,open:a}=n,r=Oi(i);if(r&&r.length&&[ke,_e].includes(t)){let c=r.indexOf(o);o===s?c=0:t===_e?c=c>1?c-1:0:t===ke&&(c=cMi(i.target),{threshold:1}),this._toggleEventListeners(!0))}get name(){return ln}get defaults(){return Li}toggle(){this.open?this.hide():this.show()}show(){const{element:t,open:s,menu:n,parentElement:o}=this;if(!s){const i=Te(t),a=i&&Ft(i);a&&a.hide(),[ss,mn,bn].forEach(r=>{r.relatedTarget=t}),E(o,ss),ss.defaultPrevented||(h(n,u),h(o,u),O(t,de,"true"),En(this),this.open=!s,rt(t),wn(this),E(o,mn))}}hide(){const{element:t,open:s,menu:n,parentElement:o}=this;s&&([ns,vn].forEach(i=>{i.relatedTarget=t}),E(o,ns),ns.defaultPrevented||(m(n,u),m(o,u),O(t,de,"false"),this.open=!s,wn(this),E(o,vn)))}_toggleEventListeners=t=>{(t?_:M)(this.element,L,Ni)};dispose(){this.open&&this.hide(),this._toggleEventListeners(),super.dispose()}}const q="modal",is="Modal",as="Offcanvas",Bi="fixed-top",Ri="fixed-bottom",yn="sticky-top",$n="position-sticky",Cn=e=>[...lt(Bi,e),...lt(Ri,e),...lt(yn,e),...lt($n,e),...lt("is-fixed",e)],Fi=e=>{const t=ut(e);x(t,{paddingRight:"",overflow:""});const s=Cn(t);s.length&&s.forEach(n=>{x(n,{paddingRight:"",marginRight:""})})},Sn=e=>{const{clientWidth:t}=ct(e),{innerWidth:s}=Jo(e);return Math.abs(s-t)},Dn=(e,t)=>{const s=ut(e),n=parseInt(j(s,"paddingRight"),10),i=j(s,"overflow")==="hidden"&&n?0:Sn(e),a=Cn(s);t&&(x(s,{overflow:"hidden",paddingRight:`${n+i}px`}),a.length&&a.forEach(r=>{const c=j(r,"paddingRight");if(r.style.paddingRight=`${parseInt(c,10)+i}px`,[yn,$n].some(l=>f(r,l))){const l=j(r,"marginRight");r.style.marginRight=`${parseInt(l,10)-i}px`}}))},J="offcanvas",Et=gt({tagName:"div",className:"popup-container"}),Hn=(e,t)=>{const s=A(t)&&t.nodeName==="BODY",n=A(t)&&!s?t:Et,o=s?t:ut(e);A(e)&&(n===Et&&o.append(Et),n.append(e))},An=(e,t)=>{const s=A(t)&&t.nodeName==="BODY",n=A(t)&&!s?t:Et;A(e)&&(e.remove(),n===Et&&!Et.children.length&&Et.remove())},rs=(e,t)=>{const s=A(t)&&t.nodeName!=="BODY"?t:Et;return A(e)&&s.contains(e)},Pn="backdrop",xn=`${q}-${Pn}`,In=`${J}-${Pn}`,Ln=`.${q}.${u}`,cs=`.${J}.${u}`,I=gt("div"),It=e=>S(`${Ln},${cs}`,b(e)),ls=e=>{const t=e?xn:In;[xn,In].forEach(s=>{m(I,s)}),h(I,t)},On=(e,t,s)=>{ls(s),Hn(I,ut(e)),t&&h(I,B)},Nn=()=>{f(I,u)||(h(I,u),Ht(I))},ye=()=>{m(I,u)},kn=e=>{It(e)||(m(I,B),An(I,ut(e)),Fi(e))},_n=e=>T(e)&&j(e,"visibility")!=="hidden"&&e.offsetParent!==null,Wi=`.${q}`,Mn=`[${ot}="${q}"]`,Vi=`[${ve}="${q}"]`,Bn=`${q}-static`,ji={backdrop:!0,keyboard:!0},te=e=>F(e,is),zi=e=>new hs(e),$e=w(`show.bs.${q}`),Rn=w(`shown.bs.${q}`),ds=w(`hide.bs.${q}`),Fn=w(`hidden.bs.${q}`),Wn=e=>{const{element:t}=e,s=Sn(t),{clientHeight:n,scrollHeight:o}=ct(t),{clientHeight:i,scrollHeight:a}=t,r=i!==a;if(!r&&s){const l={[mt(t)?"paddingLeft":"paddingRight"]:`${s}px`};x(t,l)}Dn(t,r||n!==o)},Vn=(e,t)=>{const s=t?_:M,{element:n}=e;s(n,L,Xi),s(b(n),fe,Ui),t?e._observer.observe(n):e._observer.disconnect()},jn=e=>{const{triggers:t,element:s,relatedTarget:n}=e;kn(s),x(s,{paddingRight:"",display:""}),Vn(e);const o=$e.relatedTarget||t.find(_n);o&&rt(o),Fn.relatedTarget=n,E(s,Fn),me(s)},zn=e=>{const{element:t,relatedTarget:s}=e;rt(t),Vn(e,!0),Rn.relatedTarget=s,E(t,Rn),me(t)},Kn=e=>{const{element:t,hasFade:s}=e;x(t,{display:"block"}),Wn(e),It(t)||x(ut(t),{overflow:"hidden"}),h(t,u),St(t,Kt),O(t,he,"true"),s?P(t,()=>zn(e)):zn(e)},Un=e=>{const{element:t,options:s,hasFade:n}=e;s.backdrop&&n&&f(I,u)&&!It(t)?(ye(),P(I,()=>jn(e))):jn(e)},Ki=e=>{const{target:t}=e,s=t&&N(t,Mn),n=s&&z(s),o=n&&te(n);o&&(s&&s.tagName==="A"&&e.preventDefault(),o.relatedTarget=s,o.toggle())},Ui=({code:e,target:t})=>{const s=S(Ln,b(t)),n=s&&te(s);if(n){const{options:o}=n;o.keyboard&&e===Me&&f(s,u)&&(n.relatedTarget=null,n.hide())}},Xi=e=>{const{currentTarget:t}=e,s=t&&te(t);if(s&&t&&!p.get(t)){const{options:n,isStatic:o,modalDialog:i}=s,{backdrop:a}=n,{target:r}=e,c=b(t)?.getSelection()?.toString().length,l=i.contains(r),d=r&&N(r,Vi);o&&!l?p.set(t,()=>{h(t,Bn),P(i,()=>qi(s))},17):(d||!c&&!o&&!l&&a)&&(s.relatedTarget=d||null,s.hide(),e.preventDefault())}},qi=e=>{const{element:t,modalDialog:s}=e,n=(Yt(s)||0)+17;m(t,Bn),p.set(t,()=>p.clear(t),n)};class hs extends et{static selector=Wi;static init=zi;static getInstance=te;constructor(t,s){super(t,s);const{element:n}=this,o=S(`.${q}-dialog`,n);o&&(this.modalDialog=o,this.triggers=[...Z(Mn,b(n))].filter(i=>z(i)===n),this.isStatic=this.options.backdrop==="static",this.hasFade=f(n,B),this.relatedTarget=null,this._observer=new ResizeObserver(()=>this.update()),this._toggleEventListeners(!0))}get name(){return is}get defaults(){return ji}toggle(){f(this.element,u)?this.hide():this.show()}show(){const{element:t,options:s,hasFade:n,relatedTarget:o}=this,{backdrop:i}=s;let a=0;if(!f(t,u)&&($e.relatedTarget=o||void 0,E(t,$e),!$e.defaultPrevented)){const r=It(t);if(r&&r!==t){const c=te(r)||F(r,as);c&&c.hide()}i?(rs(I)?ls(!0):On(t,n,!0),a=Yt(I),Nn(),setTimeout(()=>Kn(this),a)):(Kn(this),r&&f(I,u)&&ye())}}hide(){const{element:t,hasFade:s,relatedTarget:n}=this;f(t,u)&&(ds.relatedTarget=n||void 0,E(t,ds),ds.defaultPrevented||(m(t,u),O(t,Kt,"true"),St(t,he),s?P(t,()=>Un(this)):Un(this)))}update=()=>{f(this.element,u)&&Wn(this)};_toggleEventListeners=t=>{const s=t?_:M,{triggers:n}=this;n.length&&n.forEach(o=>s(o,L,Ki))};dispose(){const t={...this},{modalDialog:s,hasFade:n}=t,o=()=>setTimeout(()=>super.dispose(),17);this.hide(),this._toggleEventListeners(),n?P(s,o):o()}}const Yi=`.${J}`,fs=`[${ot}="${J}"]`,Zi=`[${ve}="${J}"]`,Ce=`${J}-toggling`,Gi={backdrop:!0,keyboard:!0,scroll:!1},ee=e=>F(e,as),Ji=e=>new ps(e),Se=w(`show.bs.${J}`),Xn=w(`shown.bs.${J}`),gs=w(`hide.bs.${J}`),qn=w(`hidden.bs.${J}`),Qi=e=>{const{element:t}=e,{clientHeight:s,scrollHeight:n}=ct(t);Dn(t,s!==n)},Yn=(e,t)=>{const s=t?_:M,n=b(e.element);s(n,fe,na),s(n,L,sa)},Zn=e=>{const{element:t,options:s}=e;s.scroll||(Qi(e),x(ut(t),{overflow:"hidden"})),h(t,Ce),h(t,u),x(t,{visibility:"visible"}),P(t,()=>oa(e))},ta=e=>{const{element:t,options:s}=e,n=It(t);t.blur(),!n&&s.backdrop&&f(I,u)&&ye(),P(t,()=>ia(e))},ea=e=>{const t=N(e.target,fs),s=t&&z(t),n=s&&ee(s);n&&(n.relatedTarget=t,n.toggle(),t&&t.tagName==="A"&&e.preventDefault())},sa=e=>{const{target:t}=e,s=S(cs,b(t)),n=S(Zi,s),o=s&&ee(s);if(o){const{options:i,triggers:a}=o,{backdrop:r}=i,c=N(t,fs),l=b(s).getSelection();(!I.contains(t)||r!=="static")&&(!(l&&l.toString().length)&&(!s.contains(t)&&r&&(!c||a.includes(t))||n&&n.contains(t))&&(o.relatedTarget=n&&n.contains(t)?n:null,o.hide()),c&&c.tagName==="A"&&e.preventDefault())}},na=({code:e,target:t})=>{const s=S(cs,b(t)),n=s&&ee(s);n&&n.options.keyboard&&e===Me&&(n.relatedTarget=null,n.hide())},oa=e=>{const{element:t}=e;m(t,Ce),St(t,Kt),O(t,he,"true"),O(t,"role","dialog"),E(t,Xn),Yn(e,!0),rt(t),me(t)},ia=e=>{const{element:t,triggers:s}=e;O(t,Kt,"true"),St(t,he),St(t,"role"),x(t,{visibility:""});const n=Se.relatedTarget||s.find(_n);n&&rt(n),kn(t),E(t,qn),m(t,Ce),me(t),It(t)||Yn(e)};class ps extends et{static selector=Yi;static init=Ji;static getInstance=ee;constructor(t,s){super(t,s);const{element:n}=this;this.triggers=[...Z(fs,b(n))].filter(o=>z(o)===n),this.relatedTarget=null,this._toggleEventListeners(!0)}get name(){return as}get defaults(){return Gi}toggle(){f(this.element,u)?this.hide():this.show()}show(){const{element:t,options:s,relatedTarget:n}=this;let o=0;if(!f(t,u)&&(Se.relatedTarget=n||void 0,Xn.relatedTarget=n||void 0,E(t,Se),!Se.defaultPrevented)){const i=It(t);if(i&&i!==t){const a=ee(i)||F(i,is);a&&a.hide()}s.backdrop?(rs(I)?ls():On(t,!0),o=Yt(I),Nn(),setTimeout(()=>Zn(this),o)):(Zn(this),i&&f(I,u)&&ye())}}hide(){const{element:t,relatedTarget:s}=this;f(t,u)&&(gs.relatedTarget=s||void 0,qn.relatedTarget=s||void 0,E(t,gs),gs.defaultPrevented||(h(t,Ce),m(t,u),ta(this)))}_toggleEventListeners=t=>{const s=t?_:M;this.triggers.forEach(n=>s(n,L,ea))};dispose(){const{element:t}=this,s=f(t,u),n=()=>setTimeout(()=>super.dispose(),1);this.hide(),this._toggleEventListeners(),s?P(t,n):n()}}const Lt="popover",De="Popover",ht="tooltip",Gn=e=>{const t=e===ht,s=t?`${e}-inner`:`${e}-body`,n=t?"":`

`,o=`
`,i=`
`;return`
${n+o+i}
`},Jn={top:"top",bottom:"bottom",left:"start",right:"end"},us=e=>{const t=/\b(top|bottom|start|end)+/,{element:s,tooltip:n,container:o,options:i,arrow:a}=e;if(n){const r={...Jn},c=mt(s);x(n,{top:"",left:"",right:"",bottom:""});const l=e.name===De,{offsetWidth:d,offsetHeight:g}=n,{clientWidth:$,clientHeight:D,offsetWidth:W}=ct(s);let{placement:v}=i;const{clientWidth:U,offsetWidth:Y}=o,ft=j(o,"position")==="fixed",C=Math.abs(ft?U-Y:$-W),nt=c&&ft?C:0,it=$-(c?0:C)-1,{width:V,height:X,left:H,right:jt,top:Tt}=Gt(s,!0),{x:k,y:yt}={x:H,y:Tt};x(a,{top:"",left:"",right:"",bottom:""});let Nt=0,ie="",$t=0,Ds="",zt="",Ae="",Hs="";const kt=a.offsetWidth||0,Ct=a.offsetHeight||0,As=kt/2;let ae=Tt-g-Ct<0,re=Tt+g+X+Ct>=D,ce=H-d-kt=it;const Pe=["left","right"],Ps=["top","bottom"];ae=Pe.includes(v)?Tt+X/2-g/2-Ct<0:ae,re=Pe.includes(v)?Tt+g/2+X/2+Ct>=D:re,ce=Ps.includes(v)?H+V/2-d/2=it:le,v=Pe.includes(v)&&ce&&le?"top":v,v=v==="top"&&ae?"bottom":v,v=v==="bottom"&&re?"top":v,v=v==="left"&&ce?"right":v,v=v==="right"&&le?"left":v,n.className.includes(v)||(n.className=n.className.replace(t,r[v])),Pe.includes(v)?(v==="left"?$t=k-d-(l?kt:0):$t=k+V+(l?kt:0),ae&&re?(Nt=0,ie=0,zt=Tt+X/2-Ct/2):ae?(Nt=yt,ie="",zt=X/2-kt):re?(Nt=yt-g+X,ie="",zt=g-X/2-kt):(Nt=yt-g/2+X/2,zt=g/2-Ct/2)):Ps.includes(v)&&(v==="top"?Nt=yt-g-(l?Ct:0):Nt=yt+X+(l?Ct:0),ce?($t=0,Ae=k+V/2-As):le?($t="auto",Ds=0,Hs=V/2+it-jt-As):($t=k-d/2+V/2,Ae=d/2-As)),x(n,{top:`${Nt}px`,bottom:ie===""?"":`${ie}px`,left:$t==="auto"?$t:`${$t}px`,right:Ds!==""?`${Ds}px`:""}),T(a)&&(zt!==""&&(a.style.top=`${zt}px`),Ae!==""?a.style.left=`${Ae}px`:Hs!==""&&(a.style.right=`${Hs}px`));const Va=w(`updated.bs.${Mt(e.name)}`);E(s,Va)}},ms={template:Gn(ht),title:"",customClass:"",trigger:"hover focus",placement:"top",sanitizeFn:void 0,animation:!0,delay:200,container:document.body,content:"",dismissible:!1,btnClose:""},aa=e=>e!=null&&typeof e=="object"||!1,ra=e=>aa(e)&&typeof e.nodeType=="number"&&[1,2,3,4,5,6,7,8,9,10,11].some(t=>e.nodeType===t)||!1,Qn=e=>ra(e)&&e.nodeType===1||!1,ca=e=>typeof e=="function"||!1,to="PositionObserver Error";class eo{entries;_tick;_root;_callback;constructor(t,s){if(!ca(t))throw new Error(`${to}: ${t} is not a function.`);this.entries=[],this._callback=t,this._root=Qn(s?.root)?s.root:document?.documentElement,this._tick=0}observe=t=>{if(!Qn(t))throw new Error(`${to}: ${t} is not an instance of HTMLElement.`);if(!this._root.contains(t))return;const{clientWidth:s,clientHeight:n}=this._root,o=t.getBoundingClientRect(),{left:i,top:a,bottom:r,right:c,width:l,height:d}=o,g=a>1-d&&i>1-l&&r<=n+d-1&&c<=s+l-1;this.entries.push({target:t,boundingBox:o,isVisible:g}),this._tick||(this._tick=requestAnimationFrame(this._runCallback))};unobserve=t=>{const s=this.entries.findIndex(n=>n.target===t);this.entries.splice(s,1)};_runCallback=()=>{if(!this.entries.length)return;const t=[],{clientWidth:s,clientHeight:n}=this._root;this.entries.forEach((o,i)=>{const{target:a,boundingBox:r}=o,c=a.getBoundingClientRect(),{left:l,top:d,bottom:g,right:$,width:D,height:W}=c;if(r.left!==l||r.top!==d||r.right!==$||r.bottom!==g){const v=d>1-W&&l>1-D&&g<=n+W-1&&$<=s+D-1;this.entries[i].boundingBox=c,this.entries[i].isVisible=v,t.push({target:a,boundingBox:c,isVisible:v})}}),t.length&&this._callback(t),requestAnimationFrame(this._runCallback)};disconnect=()=>{cancelAnimationFrame(this._tick),this.entries.length=0,this._tick=0}}const so="data-original-title",Ot="Tooltip",wt=(e,t,s)=>{if(qt(t)&&t.length){let n=t.trim();ti(s)&&(n=s(n));const i=new DOMParser().parseFromString(n,"text/html");e.append(...i.body.childNodes)}else T(t)?e.append(t):(ei(t)||Qo(t)&&t.every(A))&&e.append(...t)},la=e=>{const t=e.name===Ot,{id:s,element:n,options:o}=e,{title:i,placement:a,template:r,animation:c,customClass:l,sanitizeFn:d,dismissible:g,content:$,btnClose:D}=o,W=t?ht:Lt,v={...Jn};let U=[],Y=[];mt(n)&&(v.left="end",v.right="start");const Vt=`bs-${W}-${v[a]}`;let ft;if(T(r))ft=r;else{const nt=gt("div");wt(nt,r,d),ft=nt.firstChild}e.tooltip=T(ft)?ft.cloneNode(!0):void 0;const{tooltip:C}=e;if(C){O(C,"id",s),O(C,"role",ht);const nt=t?`${ht}-inner`:`${Lt}-body`,it=t?null:S(`.${Lt}-header`,C),V=S(`.${nt}`,C);e.arrow=S(`.${W}-arrow`,C);const{arrow:X}=e;if(T(i))U=[i.cloneNode(!0)];else{const H=gt("div");wt(H,i,d),U=[...H.childNodes]}if(T($))Y=[$.cloneNode(!0)];else{const H=gt("div");wt(H,$,d),Y=[...H.childNodes]}if(g)if(i)if(T(D))U=[...U,D.cloneNode(!0)];else{const H=gt("div");wt(H,D,d),U=[...U,H.firstChild]}else if(it&&it.remove(),T(D))Y=[...Y,D.cloneNode(!0)];else{const H=gt("div");wt(H,D,d),Y=[...Y,H.firstChild]}t?i&&V&&wt(V,i,d):(i&&it&&wt(it,U,d),$&&V&&wt(V,Y,d),e.btn=S(".btn-close",C)||void 0),h(C,"position-fixed"),h(X,"position-absolute"),f(C,W)||h(C,W),c&&!f(C,B)&&h(C,B),l&&!f(C,l)&&h(C,l),f(C,Vt)||h(C,Vt)}},da=e=>{const t=["HTML","BODY"],s=[];let{parentNode:n}=e;for(;n&&!t.includes(n.nodeName);)n=Go(n),Fs(n)||si(n)||s.push(n);return s.find((o,i)=>j(o,"position")!=="relative"&&s.slice(i+1).every(a=>j(a,"position")==="static")?o:null)||b(e).body},ha=`[${ot}="${ht}"],[data-tip="${ht}"]`,no="title";let oo=e=>F(e,Ot);const fa=e=>new He(e),ga=e=>{const{element:t,tooltip:s,container:n,offsetParent:o}=e;St(t,xs),An(s,n===o?n:o)},se=e=>{const{tooltip:t,container:s,offsetParent:n}=e;return t&&rs(t,s===n?s:n)},pa=(e,t)=>{const{element:s}=e;e._toggleEventListeners(),Ut(s,so)&&e.name===Ot&&lo(e),t&&t()},io=(e,t)=>{const s=t?_:M,{element:n}=e;s(b(n),Ne,e.handleTouch,Zt)},ao=e=>{const{element:t}=e,s=w(`shown.bs.${Mt(e.name)}`);io(e,!0),E(t,s),p.clear(t,"in")},ro=e=>{const{element:t}=e,s=w(`hidden.bs.${Mt(e.name)}`);io(e),ga(e),E(t,s),p.clear(t,"out")},co=(e,t)=>{const s=t?_:M,{element:n}=e,o=N(n,`.${q}`),i=N(n,`.${J}`);t?e._observer.observe(e.element):e._observer.disconnect(),o&&s(o,`hide.bs.${q}`,e.handleHide),i&&s(i,`hide.bs.${J}`,e.handleHide)},lo=(e,t)=>{const s=[so,no],{element:n}=e;O(n,s[t?0:1],t||tt(n,s[0])||""),St(n,s[t?1:0])};class He extends et{static selector=ha;static init=fa;static getInstance=oo;static styleTip=us;constructor(t,s){super(t,s);const{element:n}=this,o=this.name===Ot,i=o?ht:Lt,a=o?Ot:De;oo=c=>F(c,a),this.enabled=!0,this.id=`${i}-${js(n,i)}`;const{options:r}=this;!r.title&&o||!o&&!r.content||(at(ms,{titleAttr:""}),Ut(n,no)&&o&&typeof r.title=="string"&&lo(this,r.title),this.container=da(n),this.offsetParent=["sticky","fixed"].some(c=>j(this.container,"position")===c)?this.container:b(this.element).body,la(this),this._observer=new eo(()=>this.update()),this._toggleEventListeners(!0))}get name(){return Ot}get defaults(){return ms}handleFocus=()=>rt(this.element);handleShow=()=>this.show();show(){const{options:t,tooltip:s,element:n,container:o,offsetParent:i,id:a}=this,{animation:r}=t,c=p.get(n,"out"),l=o===i?o:i;p.clear(n,"out"),s&&!c&&!se(this)&&p.set(n,()=>{const d=w(`show.bs.${Mt(this.name)}`);E(n,d),d.defaultPrevented||(Hn(s,l),O(n,xs,`#${a}`),this.update(),co(this,!0),f(s,u)||h(s,u),r?P(s,()=>ao(this)):ao(this))},17,"in")}handleHide=()=>this.hide();hide(){const{options:t,tooltip:s,element:n}=this,{animation:o,delay:i}=t;p.clear(n,"in"),s&&se(this)&&p.set(n,()=>{const a=w(`hide.bs.${Mt(this.name)}`);E(n,a),a.defaultPrevented||(this.update(),m(s,u),co(this),o?P(s,()=>ro(this)):ro(this))},i+17,"out")}update=()=>{us(this)};toggle=()=>{const{tooltip:t}=this;t&&!se(this)?this.show():this.hide()};enable(){const{enabled:t}=this;t||(this._toggleEventListeners(!0),this.enabled=!t)}disable(){const{tooltip:t,enabled:s}=this;s&&(t&&se(this)&&this.hide(),this._toggleEventListeners(),this.enabled=!s)}toggleEnabled(){this.enabled?this.disable():this.enable()}handleTouch=({target:t})=>{const{tooltip:s,element:n}=this;s&&s.contains(t)||t===n||t&&n.contains(t)||this.hide()};_toggleEventListeners=t=>{const s=t?_:M,{element:n,options:o,btn:i}=this,{trigger:a}=o,c=!!(this.name!==Ot&&o.dismissible);a.includes("manual")||(this.enabled=!!t,a.split(" ").forEach(d=>{d===No?(s(n,Os,this.handleShow),s(n,ge,this.handleShow),c||(s(n,Oe,this.handleHide),s(b(n),Ne,this.handleTouch,Zt))):d===L?s(n,d,c?this.handleShow:this.toggle):d===Ie&&(s(n,Le,this.handleShow),c||s(n,Ls,this.handleHide),Vo()&&s(n,L,this.handleFocus)),c&&i&&s(i,L,this.handleHide)}))};dispose(){const{tooltip:t,options:s}=this,n={...this,name:this.name},o=()=>setTimeout(()=>pa(n,()=>super.dispose()),17);s.animation&&se(n)?(this.options.delay=0,this.hide(),P(t,o)):o()}}const ua=`[${ot}="${Lt}"],[data-tip="${Lt}"]`,ma=at({},ms,{template:Gn(Lt),content:"",dismissible:!1,btnClose:''}),va=e=>F(e,De),ba=e=>new vs(e);class vs extends He{static selector=ua;static init=ba;static getInstance=va;static styleTip=us;constructor(t,s){super(t,s)}get name(){return De}get defaults(){return ma}show=()=>{super.show();const{options:t,btn:s}=this;t.dismissible&&s&&setTimeout(()=>rt(s),17)}}const Ea="scrollspy",ho="ScrollSpy",wa='[data-bs-spy="scroll"]',Ta={offset:10,target:null},ya=e=>F(e,ho),$a=e=>new bs(e),fo=w(`activate.bs.${Ea}`),Ca=e=>{const{target:t,scrollTarget:s,options:n,itemsLength:o,scrollHeight:i,element:a}=e,{offset:r}=n,c=s!==a,l=t&&We("A",t),d=b(a),g=s.scrollHeight;if(e.scrollTop=s.scrollTop,l&&(g!==i||o!==l.length)){let $,D,W;e.items=[],e.targets=[],e.offsets=[],e.scrollHeight=g,e.maxScroll=e.scrollHeight-Da(e),Array.from(l).forEach(v=>{$=tt(v,"href"),D=$&&$.charAt(0)==="#"&&$.slice(-1)!=="#"&&S($,d),D&&(e.items.push(v),e.targets.push(D),W=Gt(D),e.offsets.push((c?W.top+e.scrollTop:D.offsetTop)-r))}),e.itemsLength=e.items.length}},go=({targets:e,scrollTarget:t,element:s,_observer:n},o)=>{o?t===s?e.forEach(i=>n.observe(i)):n.observe(s):n.disconnect()},Sa=e=>e.scrollHeight,Da=({element:e,scrollTarget:t})=>t!==e?t.clientHeight:Gt(e).height,po=e=>{[...We("A",e)].forEach(t=>{f(t,y)&&m(t,y)})},uo=(e,t)=>{const{target:s,element:n}=e;T(s)&&po(s),e.activeItem=t,h(t,y);const o=[];let i=t;for(;i!==ut(n);)i=i.parentElement,(f(i,"nav")||f(i,"dropdown-menu"))&&o.push(i);o.forEach(a=>{const r=a.previousElementSibling;r&&!f(r,y)&&h(r,y)}),fo.relatedTarget=t,E(n,fo)};class bs extends et{static selector=wa;static init=$a;static getInstance=ya;constructor(t,s){super(t,s);const{element:n,options:o}=this;this.target=S(o.target,b(n)),this.target&&(this.scrollTarget=n.clientHeightthis.refresh(),{root:this.scrollTarget}),go(this,!0))}get name(){return ho}get defaults(){return Ta}refresh=()=>{const{target:t}=this;if(T(t)&&t.offsetHeight>0){Ca(this);const{scrollTop:s,maxScroll:n,itemsLength:o,items:i,activeItem:a}=this;if(s>=n){const c=i[o-1];a!==c&&uo(this,c);return}const{offsets:r}=this;if(a&&s0){this.activeItem=null,t&&po(t);return}i.forEach((c,l)=>{a!==c&&s>=r[l]&&(typeof r[l+1]>"u"||sF(e,mo),Ha=e=>new Ts(e),Es=w(`show.bs.${ne}`),Eo=w(`shown.bs.${ne}`),ws=w(`hide.bs.${ne}`),wo=w(`hidden.bs.${ne}`),oe=new Map,To=e=>{const{tabContent:t,nav:s}=e;t&&f(t,Pt)&&(t.style.height="",m(t,Pt)),s&&p.clear(s)},yo=e=>{const{element:t,tabContent:s,content:n,nav:o}=e,{tab:i}=T(o)&&oe.get(o)||{tab:null};if(s&&n&&f(n,B)){const{currentHeight:a,nextHeight:r}=oe.get(t)||{currentHeight:0,nextHeight:0};a!==r?setTimeout(()=>{s.style.height=`${r}px`,Ht(s),P(s,()=>To(e))},50):To(e)}else o&&p.clear(o);Eo.relatedTarget=i,E(t,Eo)},$o=e=>{const{element:t,content:s,tabContent:n,nav:o}=e,{tab:i,content:a}=o&&oe.get(o)||{tab:null,content:null};let r=0;if(n&&s&&f(s,B)&&([a,s].forEach(c=>{T(c)&&h(c,"overflow-hidden")}),r=T(a)?a.scrollHeight:0),Es.relatedTarget=i,wo.relatedTarget=t,E(t,Es),!Es.defaultPrevented){if(s&&h(s,y),a&&m(a,y),n&&s&&f(s,B)){const c=s.scrollHeight;oe.set(t,{currentHeight:r,nextHeight:c,tab:null,content:null}),h(n,Pt),n.style.height=`${r}px`,Ht(n),[a,s].forEach(l=>{l&&m(l,"overflow-hidden")})}s&&s&&f(s,B)?setTimeout(()=>{h(s,u),P(s,()=>{yo(e)})},1):(s&&h(s,u),yo(e)),i&&E(i,wo)}},Co=e=>{const{nav:t}=e;if(!T(t))return{tab:null,content:null};const s=lt(y,t);let n=null;s.length===1&&!xt.some(i=>f(s[0].parentElement,i))?[n]=s:s.length>1&&(n=s[s.length-1]);const o=T(n)?z(n):null;return{tab:n,content:o}},So=e=>{if(!T(e))return null;const t=N(e,`.${xt.join(",.")}`);return t?S(`.${xt[0]}-toggle`,t):null},Aa=e=>{const t=bo(e.target);t&&(e.preventDefault(),t.show())};class Ts extends et{static selector=vo;static init=Ha;static getInstance=bo;constructor(t){super(t);const{element:s}=this,n=z(s);if(n){const o=N(s,".nav"),i=N(n,".tab-content");this.nav=o,this.content=n,this.tabContent=i,this.dropdown=So(s);const{tab:a}=Co(this);if(o&&!a){const r=S(vo,o),c=r&&z(r);c&&(h(r,y),h(c,u),h(c,y),O(s,xe,"true"))}this._toggleEventListeners(!0)}}get name(){return mo}show(){const{element:t,content:s,nav:n,dropdown:o}=this;if(!(n&&p.get(n))&&!f(t,y)){const{tab:i,content:a}=Co(this);if(n&&oe.set(n,{tab:i,content:a,currentHeight:0,nextHeight:0}),ws.relatedTarget=t,T(i)&&(E(i,ws),!ws.defaultPrevented)){h(t,y),O(t,xe,"true");const r=T(i)&&So(i);if(r&&f(r,y)&&m(r,y),n){const c=()=>{i&&(m(i,y),O(i,xe,"false")),o&&!f(o,y)&&h(o,y)};a&&(f(a,B)||s&&f(s,B))?p.set(n,c,1):c()}a&&(m(a,u),f(a,B)?P(a,()=>$o(this)):$o(this))}}}_toggleEventListeners=t=>{(t?_:M)(this.element,L,Aa)};dispose(){this._toggleEventListeners(),super.dispose()}}const Q="toast",Do="Toast",Pa=`.${Q}`,xa=`[${ve}="${Q}"]`,Ho=`[${ot}="${Q}"]`,Wt="showing",Ao="hide",Ia={animation:!0,autohide:!0,delay:5e3},ys=e=>F(e,Do),La=e=>new $s(e),Po=w(`show.bs.${Q}`),Oa=w(`shown.bs.${Q}`),xo=w(`hide.bs.${Q}`),Na=w(`hidden.bs.${Q}`),Io=e=>{const{element:t,options:s}=e;m(t,Wt),p.clear(t,Wt),E(t,Oa),s.autohide&&p.set(t,()=>e.hide(),s.delay,Q)},Lo=e=>{const{element:t}=e;m(t,Wt),m(t,u),h(t,Ao),p.clear(t,Q),E(t,Na)},ka=e=>{const{element:t,options:s}=e;h(t,Wt),s.animation?(Ht(t),P(t,()=>Lo(e))):Lo(e)},_a=e=>{const{element:t,options:s}=e;p.set(t,()=>{m(t,Ao),Ht(t),h(t,u),h(t,Wt),s.animation?P(t,()=>Io(e)):Io(e)},17,Wt)},Ma=e=>{const{target:t}=e,s=t&&N(t,Ho),n=s&&z(s),o=n&&ys(n);o&&(s&&s.tagName==="A"&&e.preventDefault(),o.relatedTarget=s,o.show())},Ba=e=>{const t=e.target,s=ys(t),{type:n,relatedTarget:o}=e;s&&t!==o&&!t.contains(o)&&([ge,Le].includes(n)?p.clear(t,Q):p.set(t,()=>s.hide(),s.options.delay,Q))};class $s extends et{static selector=Pa;static init=La;static getInstance=ys;constructor(t,s){super(t,s);const{element:n,options:o}=this;o.animation&&!f(n,B)?h(n,B):!o.animation&&f(n,B)&&m(n,B),this.dismiss=S(xa,n),this.triggers=[...Z(Ho,b(n))].filter(i=>z(i)===n),this._toggleEventListeners(!0)}get name(){return Do}get defaults(){return Ia}get isShown(){return f(this.element,u)}show=()=>{const{element:t,isShown:s}=this;t&&!s&&(E(t,Po),Po.defaultPrevented||_a(this))};hide=()=>{const{element:t,isShown:s}=this;t&&s&&(E(t,xo),xo.defaultPrevented||ka(this))};_toggleEventListeners=t=>{const s=t?_:M,{element:n,triggers:o,dismiss:i,options:a,hide:r}=this;i&&s(i,L,r),a.autohide&&[Le,Ls,ge,Oe].forEach(c=>s(n,c,Ba)),o.length&&o.forEach(c=>s(c,L,Ma))};dispose(){const{element:t,isShown:s}=this;this._toggleEventListeners(),p.clear(t,Q),s&&m(t,u),super.dispose()}}const Cs=new Map;[Ve,je,Ge,Je,os,hs,ps,vs,bs,Ts,$s,He].forEach(e=>Cs.set(e.prototype.name,e));const Ra=(e,t)=>{[...t].forEach(s=>e(s))},Fa=(e,t)=>{const s=Dt.getAllFor(e);s&&[...s].forEach(([n,o])=>{t.contains(n)&&o.dispose()})},Ss=e=>{const t=e&&e.nodeName?e:document,s=[...We("*",t)];Cs.forEach(n=>{const{init:o,selector:i}=n;Ra(o,s.filter(a=>Ks(a,i)))})},Wa=e=>{const t=e&&e.nodeName?e:document;Cs.forEach(s=>{Fa(s.prototype.name,t)})};return document.body?Ss():_(document,"DOMContentLoaded",()=>Ss(),{once:!0}),R.Alert=Ve,R.Button=je,R.Carousel=Ge,R.Collapse=Je,R.Dropdown=os,R.Modal=hs,R.Offcanvas=ps,R.Popover=vs,R.ScrollSpy=bs,R.Tab=Ts,R.Toast=$s,R.Tooltip=He,R.initCallback=Ss,R.removeDataAPI=Wa,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({}); //# sourceMappingURL=bootstrap-native.js.map diff --git a/docs/assets/js/bootstrap-native.js.map b/docs/assets/js/bootstrap-native.js.map index a074d6e8..f2e9413e 100644 --- a/docs/assets/js/bootstrap-native.js.map +++ b/docs/assets/js/bootstrap-native.js.map @@ -1 +1 @@ -{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.6/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.2/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const he = \"aria-checked\", ye = \"aria-description\", we = \"aria-describedby\", Ae = \"aria-expanded\", Se = \"aria-haspopup\", X = \"aria-hidden\", Ne = \"aria-label\", Te = \"aria-labelledby\", Me = \"aria-modal\", ke = \"aria-pressed\", De = \"aria-selected\", Ce = \"aria-valuemin\", Oe = \"aria-valuemax\", Le = \"aria-valuenow\", Ie = \"aria-valuetext\", Y = \"abort\", Z = \"beforeunload\", _ = \"blur\", $ = \"change\", tt = \"contextmenu\", P = \"DOMContentLoaded\", et = \"DOMMouseScroll\", nt = \"error\", ot = \"focus\", st = \"focusin\", ct = \"focusout\", rt = \"gesturechange\", at = \"gestureend\", it = \"gesturestart\", ut = \"keydown\", lt = \"keypress\", dt = \"keyup\", pt = \"load\", ft = \"click\", mt = \"dblclick\", gt = \"mousedown\", vt = \"mouseup\", Et = \"hover\", bt = \"mouseenter\", ht = \"mouseleave\", yt = \"mousein\", wt = \"mouseout\", At = \"mouseover\", St = \"mousemove\", Nt = \"mousewheel\", Tt = \"move\", Mt = \"orientationchange\", kt = \"pointercancel\", Dt = \"pointerdown\", Ct = \"pointerleave\", Ot = \"pointermove\", Lt = \"pointerup\", It = \"readystatechange\", xt = \"reset\", zt = \"resize\", Vt = \"select\", Bt = \"selectend\", Ft = \"selectstart\", Ht = \"scroll\", Pt = \"submit\", Ut = \"touchstart\", Wt = \"touchmove\", Rt = \"touchcancel\", Qt = \"touchend\", jt = \"unload\", xe = {\n DOMContentLoaded: P,\n DOMMouseScroll: et,\n abort: Y,\n beforeunload: Z,\n blur: _,\n change: $,\n click: ft,\n contextmenu: tt,\n dblclick: mt,\n error: nt,\n focus: ot,\n focusin: st,\n focusout: ct,\n gesturechange: rt,\n gestureend: at,\n gesturestart: it,\n hover: Et,\n keydown: ut,\n keypress: lt,\n keyup: dt,\n load: pt,\n mousedown: gt,\n mousemove: St,\n mousein: yt,\n mouseout: wt,\n mouseenter: bt,\n mouseleave: ht,\n mouseover: At,\n mouseup: vt,\n mousewheel: Nt,\n move: Tt,\n orientationchange: Mt,\n pointercancel: kt,\n pointerdown: Dt,\n pointerleave: Ct,\n pointermove: Ot,\n pointerup: Lt,\n readystatechange: It,\n reset: xt,\n resize: zt,\n scroll: Ht,\n select: Vt,\n selectend: Bt,\n selectstart: Ft,\n submit: Pt,\n touchcancel: Rt,\n touchend: Qt,\n touchmove: Wt,\n touchstart: Ut,\n unload: jt\n}, ze = \"drag\", Ve = \"dragstart\", Be = \"dragenter\", Fe = \"dragleave\", He = \"dragover\", Pe = \"dragend\", Ue = \"loadstart\", We = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Re = { down: \"mousedown\", up: \"mouseup\" }, Qe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), je = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, qe = { in: \"focusin\", out: \"focusout\" }, qt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', Ge = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, Ke = \"Alt\", Je = \"ArrowDown\", Xe = \"ArrowUp\", Ye = \"ArrowLeft\", Ze = \"ArrowRight\", _e = \"Backspace\", $e = \"CapsLock\", tn = \"Control\", en = \"Delete\", nn = \"Enter\", on = \"NumpadEnter\", sn = \"Escape\", cn = \"Insert\", rn = \"Meta\", an = \"Pause\", un = \"ScrollLock\", ln = \"Shift\", dn = \"Space\", pn = \"Tab\", Gt = \"animationDuration\", Kt = \"animationDelay\", U = \"animationName\", D = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", C = \"transitionend\", W = \"transitionProperty\", fn = \"addEventListener\", mn = \"removeEventListener\", gn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, vn = \"offsetHeight\", En = \"offsetWidth\", bn = \"scrollHeight\", hn = \"scrollWidth\", yn = \"tabindex\", Yt = navigator.userAgentData, A = Yt, { userAgent: Zt } = navigator, S = Zt, z = /iPhone|iPad|iPod|Android/i;\nlet O = !1;\n// istanbul ignore else @preserve\nA ? O = A.brands.some((t) => z.test(t.brand)) : O = z.test(S);\nconst wn = O, V = /(iPhone|iPod|iPad)/, An = A ? A.brands.some(\n (t) => V.test(t.brand)\n) : (\n /* istanbul ignore next @preserve */\n V.test(S)\n), Sn = S ? S.includes(\"Firefox\") : (\n /* istanbul ignore next @preserve */\n !1\n), { head: N } = document, Nn = [\"webkitPerspective\", \"perspective\"].some(\n (t) => t in N.style\n), R = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(\n e,\n n,\n s\n );\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(\n e,\n n,\n s\n );\n}, _t = (t, e, n, o) => {\n const s = (c) => {\n // istanbul ignore else @preserve\n (c.target === t || c.currentTarget === t) && (n.apply(t, [c]), Q(t, e, s, o));\n };\n R(t, e, s, o);\n}, $t = () => {\n}, Tn = (() => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n // istanbul ignore next @preserve\n _t(document, P, $t, e);\n } catch {\n }\n return t;\n})(), Mn = [\"webkitTransform\", \"transform\"].some(\n (t) => t in N.style\n), kn = \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, Dn = [\"webkitAnimation\", \"animation\"].some(\n (t) => t in N.style\n), Cn = [\"webkitTransition\", \"transition\"].some(\n (t) => t in N.style\n), j = (t, e) => t.getAttribute(e), On = (t, e, n) => e.getAttributeNS(t, n), te = (t, e) => t.hasAttribute(e), Ln = (t, e, n) => e.hasAttributeNS(t, n), In = (t, e, n) => t.setAttribute(e, n), xn = (t, e, n, o) => e.setAttributeNS(t, n, o), zn = (t, e) => t.removeAttribute(e), Vn = (t, e, n) => e.removeAttributeNS(t, n), Bn = (t, ...e) => {\n t.classList.add(...e);\n}, Fn = (t, ...e) => {\n t.classList.remove(...e);\n}, Hn = (t, e) => t.classList.contains(e), { body: Pn } = document, { documentElement: Un } = document, Wn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, i = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (e) => t.nodeType === e\n) || !1, l = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (t, e, n) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (t) => E.get(t) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (t, e) => {\n if (!l(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (t, e) => {\n const n = L.getAllFor(e);\n if (!n || !l(t)) return;\n n.delete(t);\n // istanbul ignore else @preserve\n n.size === 0 && E.delete(e);\n }\n}, Rn = (t, e) => L.get(t, e), T = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => q(t) ? t.document : G(t) ? t : i(t) ? t.ownerDocument : globalThis.document, M = (t, ...e) => Object.assign(t, ...e), ee = (t) => {\n if (!t) return;\n if (T(t))\n return d().createElement(t);\n const { tagName: e } = t, n = ee(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, M(n, o);\n}, ne = (t, e) => {\n if (!t || !e) return;\n if (T(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = ne(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, M(o, s);\n}, K = (t, e) => t.dispatchEvent(e), Qn = (t, e, n) => n.indexOf(t) === e, g = (t, e) => {\n const n = getComputedStyle(t), o = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return n.getPropertyValue(o);\n}, oe = (t) => {\n const e = g(t, U), n = g(t, Kt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, se = (t) => {\n const e = g(t, U), n = g(t, Gt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, jn = (t, e) => {\n let n = 0;\n const o = new Event(D), s = se(t), c = oe(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(D, a), n = 1);\n };\n t.addEventListener(D, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else {\n // istanbul ignore next @preserve\n e.apply(t, [o]);\n }\n}, ce = (t) => {\n const e = g(t, W), n = g(t, Xt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, re = (t) => {\n const e = g(t, W), n = g(t, Jt), o = n.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(s) ? (\n /* istanbul ignore next */\n 0\n ) : s;\n}, qn = (t, e) => {\n let n = 0;\n const o = new Event(C), s = re(t), c = ce(t);\n if (s) {\n const a = (u) => {\n // istanbul ignore else @preserve\n u.target === t && (e.apply(t, [u]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n // istanbul ignore next @preserve\n n || K(t, o);\n }, s + c + 17);\n } else\n e.apply(t, [o]);\n}, Gn = (t) => Float32Array.from(Array.from(t)), Kn = (t) => Float64Array.from(Array.from(t)), Jn = (t, e) => t.focus(e), B = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, w = (t) => Object.entries(t), ae = (t) => t.toLowerCase(), Xn = (t, e, n, o) => {\n const s = { ...n }, c = { ...t.dataset }, a = { ...e }, u = {}, p = \"title\";\n return w(c).forEach(([r, f]) => {\n const y = o && typeof r == \"string\" && r.includes(o) ? r.replace(o, \"\").replace(\n /[A-Z]/g,\n (J) => ae(J)\n ) : (\n /* istanbul ignore next @preserve */\n r\n );\n u[y] = B(f);\n }), w(s).forEach(([r, f]) => {\n s[r] = B(f);\n }), w(e).forEach(([r, f]) => {\n // istanbul ignore else @preserve\n r in s ? a[r] = s[r] : r in u ? a[r] = u[r] : a[r] = r === p ? j(t, p) : f;\n }), a;\n}, Yn = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), Zn = (t) => Object.keys(t), _n = (t) => Object.values(t), $n = (t) => Object.fromEntries(t), to = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n // istanbul ignore else @preserve\n return v(e) && M(n, e), n;\n}, eo = { passive: !0 }, no = (t) => t.offsetHeight, oo = (t, e) => {\n w(e).forEach(([n, o]) => {\n if (o && T(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, M(t.style, s);\n }\n });\n}, I = (t) => v(t) && t.constructor.name === \"Map\" || !1, ie = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), so = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (t, e, n, o) => {\n if (!l(t)) return;\n // istanbul ignore else @preserve\n if (o && o.length) {\n // istanbul ignore else @preserve\n m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n));\n } else\n m.set(t, setTimeout(e, n));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (t, e) => {\n if (!l(t)) return null;\n const n = m.get(t);\n return e && n && I(n) ? n.get(e) || /* istanbul ignore next @preserve */\n null : ie(n) ? n : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (t, e) => {\n if (!l(t)) return;\n const n = m.get(t);\n if (e && e.length && I(n)) {\n clearTimeout(n.get(e)), n.delete(e);\n // istanbul ignore else @preserve\n n.size === 0 && m.delete(t);\n } else\n clearTimeout(n), m.delete(t);\n }\n}, co = (t) => t.toUpperCase(), ue = (t, e) => (i(e) ? e : d()).querySelectorAll(t), x = /* @__PURE__ */ new Map();\nfunction le(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [\n ...ue(qt, this)\n ].filter(\n (u) => !te(u, \"disabled\") && !j(u, X)\n );\n if (!s.length) return;\n const c = s[0], a = s[s.length - 1];\n // istanbul ignore else @preserve\n n === \"Tab\" && (e && o.activeElement === c ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (c.focus(), t.preventDefault()));\n}\nconst de = (t) => x.has(t) === !0, ro = (t) => {\n const e = de(t);\n (e ? Q : R)(t, \"keydown\", le), e ? x.delete(t) : x.set(t, !0);\n}, h = (t, e) => {\n const { width: n, height: o, top: s, right: c, bottom: a, left: u } = t.getBoundingClientRect();\n let p = 1, r = 1;\n if (e && l(t)) {\n const { offsetWidth: f, offsetHeight: y } = t;\n p = f > 0 ? Math.round(n) / f : (\n /* istanbul ignore next @preserve */\n 1\n ), r = y > 0 ? Math.round(o) / y : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: n / p,\n height: o / r,\n top: s / r,\n right: c / p,\n bottom: a / r,\n left: u / p,\n x: u / p,\n y: s / r\n };\n}, ao = (t) => d(t).body, k = (t) => d(t).documentElement, io = (t) => d(t).head, uo = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, pe = (t) => i(t) && t.constructor.name === \"ShadowRoot\" || !1, lo = (t) => t.nodeName === \"HTML\" ? t : l(t) && t.assignedSlot || // step into the shadow DOM of the parent of a slotted node\ni(t) && t.parentNode || // DOM Element detected\npe(t) && t.host || // ShadowRoot detected\nk(t), fe = (t) => {\n if (!l(t)) return !1;\n const { width: e, height: n } = h(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, po = (t, e, n) => {\n const o = l(e), s = h(\n t,\n o && fe(e)\n ), c = { x: 0, y: 0 };\n // istanbul ignore else @preserve\n if (o) {\n const a = h(e, !0);\n c.x = a.x + e.clientLeft, c.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - c.x,\n y: s.top + n.y - c.y,\n width: s.width,\n height: s.height\n };\n};\nlet F = 0, H = 0;\nconst b = /* @__PURE__ */ new Map(), me = (t, e) => {\n let n = e ? F : H;\n if (e) {\n const o = me(t), s = b.get(o) || /* @__PURE__ */ new Map();\n b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), F += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);\n }\n return n;\n}, fo = (t) => t ? G(t) ? t.defaultView : i(t) ? t?.ownerDocument?.defaultView : t : window, ge = (t) => Array.isArray(t) || !1, mo = (t) => i(t) && t.nodeName === \"CANVAS\" || !1, ve = (t) => l(t) && !!t.shadowRoot || !1, go = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, vo = (t) => {\n if (!i(t)) return !1;\n const { top: e, bottom: n } = h(t), { clientHeight: o } = k(t);\n return e <= o && n >= 0;\n}, Eo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = k(t), { top: o, left: s, bottom: c, right: a } = h(t, !0);\n return o >= 0 && s >= 0 && c <= n && a <= e;\n}, bo = (t) => ge(t) && t.every(l) || !1, ho = (t) => typeof t == \"function\" || !1, yo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, wo = (t) => l(t) && t.tagName === \"IMG\" || !1, Ao = (t) => {\n if (!T(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, So = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, No = (t) => i(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (e) => t.constructor.name.includes(e)\n) || !1, To = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, Mo = (t) => k(t).dir === \"rtl\", ko = (t) => i(t) && t.constructor.name.includes(\"SVG\") || !1, Do = (t) => i(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`\nEe(t.getRootNode().host, e) : null, Co = (t, e) => l(t) ? t : (i(e) ? e : d()).querySelector(t), be = (t, e) => (i(e) ? e : d()).getElementsByTagName(\n t\n), Oo = (t) => [...be(\"*\", t)].filter(ve), Lo = (t, e) => d(e).getElementById(t) || null, Io = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(\n t\n), xo = (t, e) => t.matches(e), zo = \"2.0.6\";\nexport {\n Wn as ArrayFrom,\n P as DOMContentLoadedEvent,\n et as DOMMouseScrollEvent,\n L as Data,\n Gn as Float32ArrayFrom,\n Kn as Float64ArrayFrom,\n M as ObjectAssign,\n w as ObjectEntries,\n $n as ObjectFromEntries,\n Yn as ObjectHasOwn,\n Zn as ObjectKeys,\n _n as ObjectValues,\n so as Timer,\n Y as abortEvent,\n Bn as addClass,\n fn as addEventListener,\n Kt as animationDelay,\n Gt as animationDuration,\n D as animationEndEvent,\n U as animationName,\n he as ariaChecked,\n we as ariaDescribedBy,\n ye as ariaDescription,\n Ae as ariaExpanded,\n Se as ariaHasPopup,\n X as ariaHidden,\n Ne as ariaLabel,\n Te as ariaLabelledBy,\n Me as ariaModal,\n ke as ariaPressed,\n De as ariaSelected,\n Oe as ariaValueMax,\n Ce as ariaValueMin,\n Le as ariaValueNow,\n Ie as ariaValueText,\n Z as beforeunloadEvent,\n gn as bezierEasings,\n _ as blurEvent,\n $ as changeEvent,\n Ee as closest,\n tt as contextmenuEvent,\n to as createCustomEvent,\n ee as createElement,\n ne as createElementNS,\n K as dispatchEvent,\n Qn as distinct,\n Pn as documentBody,\n Un as documentElement,\n N as documentHead,\n ze as dragEvent,\n Pe as dragendEvent,\n Be as dragenterEvent,\n Fe as dragleaveEvent,\n He as dragoverEvent,\n Ve as dragstartEvent,\n jn as emulateAnimationEnd,\n qn as emulateTransitionEnd,\n nt as errorEvent,\n Jn as focus,\n ot as focusEvent,\n qe as focusEvents,\n qt as focusableSelector,\n st as focusinEvent,\n ct as focusoutEvent,\n rt as gesturechangeEvent,\n at as gestureendEvent,\n it as gesturestartEvent,\n j as getAttribute,\n On as getAttributeNS,\n h as getBoundingClientRect,\n Oo as getCustomElements,\n d as getDocument,\n ao as getDocumentBody,\n k as getDocumentElement,\n io as getDocumentHead,\n oe as getElementAnimationDelay,\n se as getElementAnimationDuration,\n Lo as getElementById,\n g as getElementStyle,\n ce as getElementTransitionDelay,\n re as getElementTransitionDuration,\n Io as getElementsByClassName,\n be as getElementsByTagName,\n Rn as getInstance,\n uo as getNodeScroll,\n lo as getParentNode,\n po as getRectRelativeToOffsetParent,\n me as getUID,\n fo as getWindow,\n te as hasAttribute,\n Ln as hasAttributeNS,\n Hn as hasClass,\n de as hasFocusTrap,\n An as isApple,\n ge as isArray,\n mo as isCanvas,\n ve as isCustomElement,\n G as isDocument,\n go as isElement,\n vo as isElementInScrollRange,\n Eo as isElementInViewport,\n bo as isElementsArray,\n Sn as isFirefox,\n ho as isFunction,\n yo as isHTMLCollection,\n l as isHTMLElement,\n wo as isHTMLImageElement,\n Ao as isJSON,\n I as isMap,\n No as isMedia,\n wn as isMobile,\n i as isNode,\n To as isNodeList,\n ie as isNumber,\n v as isObject,\n Mo as isRTL,\n ko as isSVGElement,\n fe as isScaledElement,\n pe as isShadowRoot,\n T as isString,\n Do as isTableElement,\n So as isWeakMap,\n q as isWindow,\n Ke as keyAlt,\n Je as keyArrowDown,\n Ye as keyArrowLeft,\n Ze as keyArrowRight,\n Xe as keyArrowUp,\n _e as keyBackspace,\n $e as keyCapsLock,\n tn as keyControl,\n en as keyDelete,\n nn as keyEnter,\n sn as keyEscape,\n cn as keyInsert,\n rn as keyMeta,\n on as keyNumpadEnter,\n an as keyPause,\n un as keyScrollLock,\n ln as keyShift,\n dn as keySpace,\n pn as keyTab,\n Ge as keyboardEventKeys,\n ut as keydownEvent,\n lt as keypressEvent,\n dt as keyupEvent,\n pt as loadEvent,\n Ue as loadstartEvent,\n xo as matches,\n Re as mouseClickEvents,\n Qe as mouseHoverEvents,\n We as mouseSwipeEvents,\n ft as mouseclickEvent,\n mt as mousedblclickEvent,\n gt as mousedownEvent,\n bt as mouseenterEvent,\n Et as mousehoverEvent,\n yt as mouseinEvent,\n ht as mouseleaveEvent,\n St as mousemoveEvent,\n wt as mouseoutEvent,\n At as mouseoverEvent,\n vt as mouseupEvent,\n Nt as mousewheelEvent,\n Tt as moveEvent,\n xe as nativeEvents,\n $t as noop,\n Xn as normalizeOptions,\n B as normalizeValue,\n Q as off,\n vn as offsetHeight,\n En as offsetWidth,\n R as on,\n _t as one,\n Mt as orientationchangeEvent,\n eo as passiveHandler,\n kt as pointercancelEvent,\n Dt as pointerdownEvent,\n Ct as pointerleaveEvent,\n Ot as pointermoveEvent,\n Lt as pointerupEvent,\n Co as querySelector,\n ue as querySelectorAll,\n It as readystatechangeEvent,\n no as reflow,\n zn as removeAttribute,\n Vn as removeAttributeNS,\n Fn as removeClass,\n mn as removeEventListener,\n xt as resetEvent,\n zt as resizeEvent,\n Ht as scrollEvent,\n bn as scrollHeight,\n hn as scrollWidth,\n Vt as selectEvent,\n Bt as selectendEvent,\n Ft as selectstartEvent,\n In as setAttribute,\n xn as setAttributeNS,\n oo as setElementStyle,\n Pt as submitEvent,\n Nn as support3DTransform,\n Dn as supportAnimation,\n Tn as supportPassive,\n kn as supportTouch,\n Mn as supportTransform,\n Cn as supportTransition,\n yn as tabindex,\n ae as toLowerCase,\n co as toUpperCase,\n ro as toggleFocusTrap,\n je as touchEvents,\n Rt as touchcancelEvent,\n Qt as touchendEvent,\n Wt as touchmoveEvent,\n Ut as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n C as transitionEndEvent,\n W as transitionProperty,\n jt as unloadEvent,\n S as userAgent,\n A as userAgentData,\n zo as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isWin = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget\n ? getScrollHeight(scrollTarget)\n // istanbul ignore next @preserve\n : scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isWin ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: Node | Window) => {\n return isHTMLElement(scrollTarget as Node)\n ? (scrollTarget as HTMLElement).scrollHeight\n : getDocumentElement(scrollTarget as Node).scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n this._toggleEventListeners(true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /**\n * Toggles on/off the component event listener.\n *\n * @param add when `true`, listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n if (add) {\n if (this.scrollTarget === this.element) {\n this.targets.forEach((targetItem) =>\n this._observer.observe(targetItem)\n );\n } else {\n this._observer.observe(this.element);\n }\n } else this._observer.disconnect();\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["we","Ae","X","Me","ke","De","P","ot","st","ct","ut","dt","ft","gt","Et","bt","ht","Dt","Ot","Lt","Ut","Ve","qt","Je","Xe","Ye","Ze","sn","Jt","Xt","C","W","Yt","A","Zt","S","z","A$1","V","An","N","R","e","n","o","s","Q","_t","c","$t","j","te","In","zn","Bn","Fn","Hn","v","i","l","E","L","Rn","T","q","G","d","M","ee","K","g","ce","re","qn","a","u","Jn","B","w","ae","Xn","p","r","f","y","J","Zn","to","eo","no","oo","I","ie","m","so","ue","x","le","de","ro","h","ao","k","pe","lo","k$1","F","H","b","me","fo","_a","ge","vo","ho","To","Mo","Do","Ee","Co","be","Io","xo","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","target","config","__publicField","element","isHTMLElement","isString","querySelector","prevInstance","Data","ObjectKeys","normalizeOptions","prop","alertSelector","alertDismissSelector","getAlertInstance","getInstance","alertInitCallback","Alert","closeAlertEvent","createCustomEvent","closedAlertEvent","alertTransitionEnd","self","dispatchEvent","hasClass","removeClass","emulateTransitionEnd","add","action","addListener","removeListener","dismiss","close","mouseclickEvent","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","getAttribute","addClass","setAttribute","ariaPressed","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","doc","getDocument","att","attValue","closest","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","options","activeItem","getActiveIndex","orientation","directionClass","Timer","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","code","querySelectorAll","isElementInScrollRange","RTL","isRTL","arrowKeyNext","keyArrowLeft","keyArrowRight","arrowKeyPrev","carouselDragHandler","carouselPointerDownHandler","controls","indicators","el","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","pointermoveEvent","passiveHandler","pointerupEvent","touch","pause","interval","keyboard","mouseenterEvent","mouseleaveEvent","pointerdownEvent","touchstartEvent","dragstartEvent","arrow","indicator","keydownEvent","getElementsByClassName","activeIndex","transitionItem","matches","ar","isPaused","idx","next","eventProperties","ObjectAssign","getElementTransitionDuration","reflow","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","parent","triggers","noop","setElementStyle","btn","ariaExpanded","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","hasAttribute","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","getElementStyle","menuEnd","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","clientHeight","getDocumentElement","targetLeft","targetTop","targetWidth","targetHeight","getBoundingClientRect","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","focusEvent","dropdownPreventScroll","keyupEvent","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","mousedownEvent","dropdownClickHandler","keyArrowDown","keyArrowUp","activeElement","open","menuItems","focus","keyEscape","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","getDocumentBody","fixedItems","fixed","measureScrollbar","innerWidth","getWindow","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","createElement","appendPopup","customContainer","containerIsBody","isNode","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","toggleFocusTrap","afterModalShow","beforeModalShow","removeAttribute","ariaHidden","ariaModal","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","duration","overlayDelay","currentOpen","that","callback","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","toLowerCase","tooltipDefaults","$","O","D","_","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","isFunction","tempDocument","isNodeList","isArray","createTip","id","title","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","getParentNode","isShadowRoot","isTableElement","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","ariaDescribedBy","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tr","mousehoverEvent","focusinEvent","focusoutEvent","isApple","tipComponent","elem","getUID","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","delay","hideTooltipEvent","enabled","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isWin","links","getElementsByTagName","scrollHEIGHT","getScrollHeight","href","targetItem","rect","getOffsetHeight","link","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","ariaSelected","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","component","context","compData","instance","initCallback","lookUp","elemCollection","cs","init","selector","removeDataAPI","comp"],"mappings":"sNAAK,MAA+CA,GAAK,mB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,UAAU,KAAMA,CAAC,CAAC,EAQxD,MAAMgpB,GAAuB,CAC3BjP,EACAkP,IACG,CACF,CAAA,GAAGA,CAAU,EAAE,QAASjmB,GAAM+W,EAAS/W,CAAC,CAAC,CAC5C,EAQMkmB,GAAyB,CAAIC,EAAmBC,IAAwB,CACtE,MAAAC,EAAW3jB,GAAK,UAAUyjB,CAAS,EAErCE,GACD,CAAA,GAAGA,CAAQ,EAAE,QAAQ,CAAC,CAAChkB,EAASikB,CAAQ,IAAM,CACzCF,EAAQ,SAAS/jB,CAAO,GACzBikB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOaC,GAAgBH,GAAyB,CACpD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SACjDK,EAAiB,CAAC,GAAGnF,GAAqB,IAAKkF,CAAM,CAAC,EAE7CT,GAAA,QAASW,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAC,CAAA,EAAaF,EAC3BV,GACEW,EACAF,EAAe,OAAQ1E,GAAShY,GAAQgY,EAAM6E,CAAQ,CAAC,CACzD,CAAA,CACD,CACH,EAOaC,GAAiBT,GAAyB,CACrD,MAAMI,EAASJ,GAAWA,EAAQ,SAAWA,EAAU,SAExCL,GAAA,QAASe,GAAS,CACRZ,GAAAY,EAAK,UAAU,KAAMN,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,GAAA,EAE9BxiB,EAAY,SAAU,mBAAoB,IAAMwiB,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1,52]} \ No newline at end of file +{"version":3,"file":"bootstrap-native.js","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.7/node_modules/@thednp/shorty/dist/shorty.mjs","../node_modules/.pnpm/@thednp+event-listener@2.0.6/node_modules/@thednp/event-listener/dist/event-listener.mjs","../src/strings/fadeClass.ts","../src/strings/showClass.ts","../src/strings/dataBsDismiss.ts","../src/strings/alertString.ts","../src/strings/alertComponent.ts","../src/version.ts","../src/components/base-component.ts","../src/components/alert.ts","../src/strings/activeClass.ts","../src/strings/dataBsToggle.ts","../src/strings/buttonString.ts","../src/strings/buttonComponent.ts","../src/components/button.ts","../src/strings/dataBsTarget.ts","../src/strings/carouselString.ts","../src/strings/carouselComponent.ts","../src/strings/dataBsParent.ts","../src/strings/dataBsContainer.ts","../src/util/getTargetElement.ts","../src/components/carousel.ts","../src/strings/collapsingClass.ts","../src/strings/collapseString.ts","../src/strings/collapseComponent.ts","../src/components/collapse.ts","../src/strings/dropdownClasses.ts","../src/strings/dropdownComponent.ts","../src/strings/dropdownMenuClass.ts","../src/util/isEmptyAnchor.ts","../src/components/dropdown.ts","../src/strings/modalString.ts","../src/strings/modalComponent.ts","../src/strings/offcanvasComponent.ts","../src/strings/fixedTopClass.ts","../src/strings/fixedBottomClass.ts","../src/strings/stickyTopClass.ts","../src/strings/positionStickyClass.ts","../src/util/scrollbar.ts","../src/strings/offcanvasString.ts","../src/util/popupContainer.ts","../src/util/backdrop.ts","../src/util/isVisible.ts","../src/components/modal.ts","../src/components/offcanvas.ts","../src/strings/popoverString.ts","../src/strings/popoverComponent.ts","../src/strings/tooltipString.ts","../src/util/getTipTemplate.ts","../src/util/tipClassPositions.ts","../src/util/styleTip.ts","../src/util/tooltipDefaults.ts","../node_modules/.pnpm/@thednp+position-observer@0.0.3/node_modules/@thednp/position-observer/dist/index.mjs","../src/strings/dataOriginalTitle.ts","../src/strings/tooltipComponent.ts","../src/util/setHtml.ts","../src/util/createTip.ts","../src/util/getElementContainer.ts","../src/components/tooltip.ts","../src/components/popover.ts","../src/strings/scrollspyString.ts","../src/strings/scrollspyComponent.ts","../src/components/scrollspy.ts","../src/strings/tabString.ts","../src/strings/tabComponent.ts","../src/components/tab.ts","../src/strings/toastString.ts","../src/strings/toastComponent.ts","../src/components/toast.ts","../src/util/init.ts"],"sourcesContent":["const ariaChecked = \"aria-checked\", ariaDescription = \"aria-description\", ariaDescribedBy = \"aria-describedby\", ariaExpanded = \"aria-expanded\", ariaHasPopup = \"aria-haspopup\", ariaHidden = \"aria-hidden\", ariaLabel = \"aria-label\", ariaLabelledBy = \"aria-labelledby\", ariaModal = \"aria-modal\", ariaPressed = \"aria-pressed\", ariaSelected = \"aria-selected\", ariaValueMin = \"aria-valuemin\", ariaValueMax = \"aria-valuemax\", ariaValueNow = \"aria-valuenow\", ariaValueText = \"aria-valuetext\", abortEvent = \"abort\", beforeunloadEvent = \"beforeunload\", blurEvent = \"blur\", changeEvent = \"change\", contextmenuEvent = \"contextmenu\", DOMContentLoadedEvent = \"DOMContentLoaded\", DOMMouseScrollEvent = \"DOMMouseScroll\", errorEvent = \"error\", focusEvent = \"focus\", focusinEvent = \"focusin\", focusoutEvent = \"focusout\", gesturechangeEvent = \"gesturechange\", gestureendEvent = \"gestureend\", gesturestartEvent = \"gesturestart\", keydownEvent = \"keydown\", keypressEvent = \"keypress\", keyupEvent = \"keyup\", loadEvent = \"load\", mouseclickEvent = \"click\", mousedblclickEvent = \"dblclick\", mousedownEvent = \"mousedown\", mouseupEvent = \"mouseup\", mousehoverEvent = \"hover\", mouseenterEvent = \"mouseenter\", mouseleaveEvent = \"mouseleave\", mouseinEvent = \"mousein\", mouseoutEvent = \"mouseout\", mouseoverEvent = \"mouseover\", mousemoveEvent = \"mousemove\", mousewheelEvent = \"mousewheel\", moveEvent = \"move\", orientationchangeEvent = \"orientationchange\", pointercancelEvent = \"pointercancel\", pointerdownEvent = \"pointerdown\", pointerleaveEvent = \"pointerleave\", pointermoveEvent = \"pointermove\", pointerupEvent = \"pointerup\", readystatechangeEvent = \"readystatechange\", resetEvent = \"reset\", resizeEvent = \"resize\", selectEvent = \"select\", selectendEvent = \"selectend\", selectstartEvent = \"selectstart\", scrollEvent = \"scroll\", submitEvent = \"submit\", touchstartEvent = \"touchstart\", touchmoveEvent = \"touchmove\", touchcancelEvent = \"touchcancel\", touchendEvent = \"touchend\", unloadEvent = \"unload\", nativeEvents = {\n DOMContentLoaded: DOMContentLoadedEvent,\n DOMMouseScroll: DOMMouseScrollEvent,\n abort: abortEvent,\n beforeunload: beforeunloadEvent,\n blur: blurEvent,\n change: changeEvent,\n click: mouseclickEvent,\n contextmenu: contextmenuEvent,\n dblclick: mousedblclickEvent,\n error: errorEvent,\n focus: focusEvent,\n focusin: focusinEvent,\n focusout: focusoutEvent,\n gesturechange: gesturechangeEvent,\n gestureend: gestureendEvent,\n gesturestart: gesturestartEvent,\n hover: mousehoverEvent,\n keydown: keydownEvent,\n keypress: keypressEvent,\n keyup: keyupEvent,\n load: loadEvent,\n mousedown: mousedownEvent,\n mousemove: mousemoveEvent,\n mousein: mouseinEvent,\n mouseout: mouseoutEvent,\n mouseenter: mouseenterEvent,\n mouseleave: mouseleaveEvent,\n mouseover: mouseoverEvent,\n mouseup: mouseupEvent,\n mousewheel: mousewheelEvent,\n move: moveEvent,\n orientationchange: orientationchangeEvent,\n pointercancel: pointercancelEvent,\n pointerdown: pointerdownEvent,\n pointerleave: pointerleaveEvent,\n pointermove: pointermoveEvent,\n pointerup: pointerupEvent,\n readystatechange: readystatechangeEvent,\n reset: resetEvent,\n resize: resizeEvent,\n scroll: scrollEvent,\n select: selectEvent,\n selectend: selectendEvent,\n selectstart: selectstartEvent,\n submit: submitEvent,\n touchcancel: touchcancelEvent,\n touchend: touchendEvent,\n touchmove: touchmoveEvent,\n touchstart: touchstartEvent,\n unload: unloadEvent\n}, dragEvent = \"drag\", dragstartEvent = \"dragstart\", dragenterEvent = \"dragenter\", dragleaveEvent = \"dragleave\", dragoverEvent = \"dragover\", dragendEvent = \"dragend\", loadstartEvent = \"loadstart\", mouseSwipeEvents = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, mouseClickEvents = { down: \"mousedown\", up: \"mouseup\" }, mouseHoverEvents = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : (\n /* istanbul ignore next @preserve */\n [\"mouseover\", \"mouseout\"]\n), touchEvents = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, focusEvents = { in: \"focusin\", out: \"focusout\" }, focusableSelector = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', keyboardEventKeys = {\n Backspace: \"Backspace\",\n // 8\n Tab: \"Tab\",\n // 9\n Enter: \"Enter\",\n // 13\n Shift: \"Shift\",\n // 16\n Control: \"Control\",\n // 17\n Alt: \"Alt\",\n // 18\n Pause: \"Pause\",\n // 19\n CapsLock: \"CapsLock\",\n // 20\n Escape: \"Escape\",\n // 27\n Scape: \"Space\",\n // 32\n ArrowLeft: \"ArrowLeft\",\n // 37\n ArrowUp: \"ArrowUp\",\n // 38\n ArrowRight: \"ArrowRight\",\n // 39\n ArrowDown: \"ArrowDown\",\n // 40\n Insert: \"Insert\",\n // 45\n Delete: \"Delete\",\n // 46\n Meta: \"Meta\",\n // 91 windows key\n ContextMenu: \"ContextMenu\",\n // 93\n ScrollLock: \"ScrollLock\"\n // 145\n}, keyAlt = \"Alt\", keyArrowDown = \"ArrowDown\", keyArrowUp = \"ArrowUp\", keyArrowLeft = \"ArrowLeft\", keyArrowRight = \"ArrowRight\", keyBackspace = \"Backspace\", keyCapsLock = \"CapsLock\", keyControl = \"Control\", keyDelete = \"Delete\", keyEnter = \"Enter\", keyNumpadEnter = \"NumpadEnter\", keyEscape = \"Escape\", keyInsert = \"Insert\", keyMeta = \"Meta\", keyPause = \"Pause\", keyScrollLock = \"ScrollLock\", keyShift = \"Shift\", keySpace = \"Space\", keyTab = \"Tab\", animationDuration = \"animationDuration\", animationDelay = \"animationDelay\", animationName = \"animationName\", animationEndEvent = \"animationend\", transitionDuration = \"transitionDuration\", transitionDelay = \"transitionDelay\", transitionEndEvent = \"transitionend\", transitionProperty = \"transitionProperty\", addEventListener = \"addEventListener\", removeEventListener = \"removeEventListener\", bezierEasings = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, offsetHeight = \"offsetHeight\", offsetWidth = \"offsetWidth\", scrollHeight = \"scrollHeight\", scrollWidth = \"scrollWidth\", tabindex = \"tabindex\", userAgentData = navigator.userAgentData, { userAgent: userAgentString } = navigator, userAgent = userAgentString, isMobile = () => {\n const mobileBrands = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (x) => mobileBrands.test(x.brand)\n ) || mobileBrands.test(navigator?.userAgent) || !1;\n}, isApple = () => {\n const appleBrands = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (x) => appleBrands.test(x.brand)\n ) || /* istanbul ignore next @preserve */\n appleBrands.test(\n navigator?.userAgent\n ) || !1;\n}, isFirefox = () => navigator?.userAgent?.includes(\"Firefox\") || /* istanbul ignore next @preserve */\n!1, support3DTransform = () => [\"webkitPerspective\", \"perspective\"].some((p) => p in document.head.style), noop = () => {\n}, on = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.addEventListener(\n eventName,\n listener,\n ops\n );\n}, off = (element, eventName, listener, options) => {\n const ops = options || !1;\n element.removeEventListener(\n eventName,\n listener,\n ops\n );\n}, one = (element, eventName, listener, options) => {\n const handlerWrapper = (e) => {\n (e.target === element || e.currentTarget === element) && (listener.apply(element, [e]), off(element, eventName, handlerWrapper, options));\n };\n on(element, eventName, handlerWrapper, options);\n}, supportPassive = () => {\n let result = !1;\n try {\n const opts = Object.defineProperty({}, \"passive\", {\n get: () => (result = !0, result)\n });\n one(document, DOMContentLoadedEvent, noop, opts);\n } catch {\n }\n return result;\n}, supportTransform = () => [\"webkitTransform\", \"transform\"].some((p) => p in document.head.style), supportTouch = () => \"ontouchstart\" in window || /* istanbul ignore next @preserve */\n\"msMaxTouchPoints\" in navigator, supportAnimation = () => [\"webkitAnimation\", \"animation\"].some((p) => p in document.head.style), supportTransition = () => [\"webkitTransition\", \"transition\"].some((p) => p in document.head.style), getAttribute = (element, att) => element.getAttribute(att), getAttributeNS = (ns, element, att) => element.getAttributeNS(ns, att), hasAttribute = (element, att) => element.hasAttribute(att), hasAttributeNS = (ns, element, att) => element.hasAttributeNS(ns, att), setAttribute = (element, att, value) => element.setAttribute(att, value), setAttributeNS = (ns, element, att, value) => element.setAttributeNS(ns, att, value), removeAttribute = (element, att) => element.removeAttribute(att), removeAttributeNS = (ns, element, att) => element.removeAttributeNS(ns, att), addClass = (element, ...classNAME) => {\n element.classList.add(...classNAME);\n}, removeClass = (element, ...classNAME) => {\n element.classList.remove(...classNAME);\n}, hasClass = (element, classNAME) => element.classList.contains(classNAME), { body: documentBody } = document, { documentElement } = document, { head: documentHead } = document, ArrayFrom = (arr) => Array.from(arr), isObject = (obj) => obj != null && typeof obj == \"object\" || !1, isNode = (node) => isObject(node) && typeof node.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (x) => node.nodeType === x\n) || !1, isHTMLElement = (element) => isNode(element) && element.nodeType === 1 || !1, componentData = /* @__PURE__ */ new Map(), Data = {\n data: componentData,\n /**\n * Sets web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @param instance the component instance\n */\n set: (element, component, instance) => {\n if (!isHTMLElement(element)) return;\n componentData.has(component) || componentData.set(component, /* @__PURE__ */ new Map()), componentData.get(component).set(element, instance);\n },\n /**\n * Returns all instances for specified component.\n *\n * @param component the component's name or a unique key\n * @returns all the component instances\n */\n getAllFor: (component) => componentData.get(component) || null,\n /**\n * Returns the instance associated with the target.\n *\n * @param element target element\n * @param component the component's name or a unique key\n * @returns the instance\n */\n get: (element, component) => {\n if (!isHTMLElement(element) || !component) return null;\n const instanceMap = Data.getAllFor(component);\n return element && instanceMap && instanceMap.get(element) || null;\n },\n /**\n * Removes web components data.\n *\n * @param element target element\n * @param component the component's name or a unique key\n */\n remove: (element, component) => {\n const instanceMap = Data.getAllFor(component);\n !instanceMap || !isHTMLElement(element) || (instanceMap.delete(element), instanceMap.size === 0 && componentData.delete(component));\n }\n}, getInstance = (target, component) => Data.get(target, component), isString = (str) => typeof str == \"string\" || !1, isWindow = (obj) => isObject(obj) && obj.constructor.name === \"Window\" || !1, isDocument = (obj) => isNode(obj) && obj.nodeType === 9 || !1, getDocument = (node) => isWindow(node) ? node.document : isDocument(node) ? node : isNode(node) ? node.ownerDocument : globalThis.document, ObjectAssign = (obj, ...source) => Object.assign(obj, ...source), createElement = (param) => {\n if (!param) return;\n if (isString(param))\n return getDocument().createElement(param);\n const { tagName } = param, newElement = createElement(tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, createElementNS = (ns, param) => {\n if (!ns || !param) return;\n if (isString(param))\n return getDocument().createElementNS(ns, param);\n const { tagName } = param, newElement = createElementNS(ns, tagName);\n if (!newElement) return;\n const attr = { ...param };\n return delete attr.tagName, ObjectAssign(newElement, attr);\n}, dispatchEvent = (element, event) => element.dispatchEvent(event), distinct = (value, index, arr) => arr.indexOf(value) === index, getElementStyle = (element, property) => {\n const computedStyle = getComputedStyle(element), prop = property.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return computedStyle.getPropertyValue(prop);\n}, getElementAnimationDelay = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDelay), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementAnimationDuration = (element) => {\n const propertyValue = getElementStyle(element, animationName), durationValue = getElementStyle(element, animationDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : 0;\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateAnimationEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(animationEndEvent), duration = getElementAnimationDuration(element), delay = getElementAnimationDelay(element);\n if (duration) {\n const animationEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(animationEndEvent, animationEndWrapper), called = 1);\n };\n element.addEventListener(animationEndEvent, animationEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, getElementTransitionDelay = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), delayValue = getElementStyle(element, transitionDelay), delayScale = delayValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(delayValue) * delayScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, getElementTransitionDuration = (element) => {\n const propertyValue = getElementStyle(element, transitionProperty), durationValue = getElementStyle(element, transitionDuration), durationScale = durationValue.includes(\"ms\") ? (\n /* istanbul ignore next */\n 1\n ) : 1e3, duration = propertyValue && propertyValue !== \"none\" ? parseFloat(durationValue) * durationScale : (\n /* istanbul ignore next */\n 0\n );\n return Number.isNaN(duration) ? (\n /* istanbul ignore next */\n 0\n ) : duration;\n}, emulateTransitionEnd = (element, handler) => {\n let called = 0;\n const endEvent = new Event(transitionEndEvent), duration = getElementTransitionDuration(element), delay = getElementTransitionDelay(element);\n if (duration) {\n const transitionEndWrapper = (e) => {\n e.target === element && (handler.apply(element, [e]), element.removeEventListener(transitionEndEvent, transitionEndWrapper), called = 1);\n };\n element.addEventListener(transitionEndEvent, transitionEndWrapper), setTimeout(() => {\n called || dispatchEvent(element, endEvent);\n }, duration + delay + 17);\n } else\n handler.apply(element, [endEvent]);\n}, Float32ArrayFrom = (arr) => Float32Array.from(Array.from(arr)), Float64ArrayFrom = (arr) => Float64Array.from(Array.from(arr)), focus = (element, options) => element.focus(options), normalizeValue = (value) => [\"true\", !0].includes(value) ? !0 : [\"false\", !1].includes(value) ? !1 : [\"null\", \"\", null, void 0].includes(value) ? null : value !== \"\" && !Number.isNaN(+value) ? +value : value, ObjectEntries = (obj) => Object.entries(obj), toLowerCase = (source) => source.toLowerCase(), normalizeOptions = (element, defaultOps, inputOps, ns) => {\n const INPUT = { ...inputOps }, data = { ...element.dataset }, normalOps = { ...defaultOps }, dataOps = {}, title = \"title\";\n return ObjectEntries(data).forEach(([k, v]) => {\n const key = ns && typeof k == \"string\" && k.includes(ns) ? k.replace(ns, \"\").replace(\n /[A-Z]/g,\n (match) => toLowerCase(match)\n ) : (\n /* istanbul ignore next @preserve */\n k\n );\n dataOps[key] = normalizeValue(v);\n }), ObjectEntries(INPUT).forEach(([k, v]) => {\n INPUT[k] = normalizeValue(v);\n }), ObjectEntries(defaultOps).forEach(([k, v]) => {\n k in INPUT ? normalOps[k] = INPUT[k] : k in dataOps ? normalOps[k] = dataOps[k] : normalOps[k] = k === title ? getAttribute(element, title) : v;\n }), normalOps;\n}, ObjectHasOwn = (obj, prop) => isObject(obj) && (Object.hasOwn(obj, prop) || prop in obj), ObjectKeys = (obj) => Object.keys(obj), ObjectValues = (obj) => Object.values(obj), ObjectFromEntries = (entries) => Object.fromEntries(entries), createCustomEvent = (eventType, config) => {\n const OriginalCustomEvent = new CustomEvent(eventType, {\n cancelable: !0,\n bubbles: !0\n });\n return isObject(config) && ObjectAssign(OriginalCustomEvent, config), OriginalCustomEvent;\n}, passiveHandler = { passive: !0 }, reflow = (element) => element.offsetHeight, setElementStyle = (element, styles) => {\n ObjectEntries(styles).forEach(([key, value]) => {\n if (value && isString(key) && key.includes(\"--\"))\n element.style.setProperty(key, value);\n else {\n const propObject = {};\n propObject[key] = value, ObjectAssign(element.style, propObject);\n }\n });\n}, isMap = (obj) => isObject(obj) && obj.constructor.name === \"Map\" || !1, isNumber = (num) => typeof num == \"number\" || !1, TimeCache = /* @__PURE__ */ new Map(), Timer = {\n /**\n * Sets a new timeout timer for an element, or element -> key association.\n *\n * @param element target element\n * @param callback the callback\n * @param delay the execution delay\n * @param key a unique key\n */\n set: (element, callback, delay, key) => {\n isHTMLElement(element) && (key && key.length ? (TimeCache.has(element) || TimeCache.set(element, /* @__PURE__ */ new Map()), TimeCache.get(element).set(key, setTimeout(callback, delay))) : TimeCache.set(element, setTimeout(callback, delay)));\n },\n /**\n * Returns the timer associated with the target.\n *\n * @param element target element\n * @param key a unique\n * @returns the timer\n */\n get: (element, key) => {\n if (!isHTMLElement(element)) return null;\n const keyTimers = TimeCache.get(element);\n return key && keyTimers && isMap(keyTimers) ? keyTimers.get(key) || /* istanbul ignore next @preserve */\n null : isNumber(keyTimers) ? keyTimers : null;\n },\n /**\n * Clears the element's timer.\n *\n * @param element target element\n * @param key a unique key\n */\n clear: (element, key) => {\n if (!isHTMLElement(element)) return;\n const keyTimers = TimeCache.get(element);\n key && key.length && isMap(keyTimers) ? (clearTimeout(keyTimers.get(key)), keyTimers.delete(key), keyTimers.size === 0 && TimeCache.delete(element)) : (clearTimeout(keyTimers), TimeCache.delete(element));\n }\n}, toUpperCase = (source) => source.toUpperCase(), querySelectorAll = (selector, parent) => (isNode(parent) ? parent : getDocument()).querySelectorAll(selector), focusTrapMap = /* @__PURE__ */ new Map();\nfunction handleKeyboardNavigation(event) {\n const { shiftKey, code } = event, doc = getDocument(this), focusableElements = [\n ...querySelectorAll(focusableSelector, this)\n ].filter(\n (el) => !hasAttribute(el, \"disabled\") && !getAttribute(el, ariaHidden)\n );\n if (!focusableElements.length) return;\n const firstFocusable = focusableElements[0], lastFocusable = focusableElements[focusableElements.length - 1];\n code === \"Tab\" && (shiftKey && doc.activeElement === firstFocusable ? (lastFocusable.focus(), event.preventDefault()) : !shiftKey && doc.activeElement === lastFocusable && (firstFocusable.focus(), event.preventDefault()));\n}\nconst hasFocusTrap = (target) => focusTrapMap.has(target) === !0, toggleFocusTrap = (target) => {\n const isCurrentlyTrapped = hasFocusTrap(target);\n (isCurrentlyTrapped ? off : on)(target, \"keydown\", handleKeyboardNavigation), isCurrentlyTrapped ? focusTrapMap.delete(target) : focusTrapMap.set(target, !0);\n}, getBoundingClientRect = (element, includeScale) => {\n const { width, height, top, right, bottom, left } = element.getBoundingClientRect();\n let scaleX = 1, scaleY = 1;\n if (includeScale && isHTMLElement(element)) {\n const { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n scaleX = offsetWidth2 > 0 ? Math.round(width) / offsetWidth2 : (\n /* istanbul ignore next @preserve */\n 1\n ), scaleY = offsetHeight2 > 0 ? Math.round(height) / offsetHeight2 : (\n /* istanbul ignore next @preserve */\n 1\n );\n }\n return {\n width: width / scaleX,\n height: height / scaleY,\n top: top / scaleY,\n right: right / scaleX,\n bottom: bottom / scaleY,\n left: left / scaleX,\n x: left / scaleX,\n y: top / scaleY\n };\n}, getDocumentBody = (node) => getDocument(node).body, getDocumentElement = (node) => getDocument(node).documentElement, getDocumentHead = (node) => getDocument(node).head, getNodeScroll = (element) => {\n const isWin = isWindow(element), x = isWin ? element.scrollX : element.scrollLeft, y = isWin ? element.scrollY : element.scrollTop;\n return { x, y };\n}, isShadowRoot = (element) => isNode(element) && element.constructor.name === \"ShadowRoot\" || !1, getParentNode = (node) => node.nodeName === \"HTML\" ? node : isHTMLElement(node) && node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\nisNode(node) && node.parentNode || // DOM Element detected\nisShadowRoot(node) && node.host || // ShadowRoot detected\ngetDocumentElement(node), isScaledElement = (element) => {\n if (!isHTMLElement(element)) return !1;\n const { width, height } = getBoundingClientRect(element), { offsetWidth: offsetWidth2, offsetHeight: offsetHeight2 } = element;\n return Math.round(width) !== offsetWidth2 || Math.round(height) !== offsetHeight2;\n}, getRectRelativeToOffsetParent = (element, offsetParent, scroll) => {\n const isParentAnElement = isHTMLElement(offsetParent), rect = getBoundingClientRect(\n element,\n isParentAnElement && isScaledElement(offsetParent)\n ), offsets = { x: 0, y: 0 };\n if (isParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, !0);\n offsets.x = offsetRect.x + offsetParent.clientLeft, offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n return {\n x: rect.left + scroll.x - offsets.x,\n y: rect.top + scroll.y - offsets.y,\n width: rect.width,\n height: rect.height\n };\n};\nlet elementUID = 0, elementMapUID = 0;\nconst elementIDMap = /* @__PURE__ */ new Map(), getUID = (element, key) => {\n let result = key ? elementUID : elementMapUID;\n if (key) {\n const elID = getUID(element), elMap = elementIDMap.get(elID) || /* @__PURE__ */ new Map();\n elementIDMap.has(elID) || elementIDMap.set(elID, elMap), isMap(elMap) && !elMap.has(key) ? (elMap.set(key, result), elementUID += 1) : result = elMap.get(key);\n } else {\n const elkey = element.id || element;\n elementIDMap.has(elkey) ? result = elementIDMap.get(elkey) : (elementIDMap.set(elkey, result), elementMapUID += 1);\n }\n return result;\n}, getWindow = (node) => node ? isDocument(node) ? node.defaultView : isNode(node) ? node?.ownerDocument?.defaultView : node : window, isArray = (obj) => Array.isArray(obj) || !1, isCanvas = (element) => isNode(element) && element.nodeName === \"CANVAS\" || !1, isCustomElement = (element) => isHTMLElement(element) && !!element.shadowRoot || !1, isElement = (element) => isNode(element) && [1, 2, 3, 4, 5, 6, 7, 8].some((x) => element.nodeType === x) || !1, isElementInScrollRange = (element) => {\n if (!isNode(element)) return !1;\n const { top, bottom } = getBoundingClientRect(element), { clientHeight } = getDocumentElement(element);\n return top <= clientHeight && bottom >= 0;\n}, isElementInViewport = (element) => {\n if (!isNode(element)) return !1;\n const { clientWidth, clientHeight } = getDocumentElement(element), { top, left, bottom, right } = getBoundingClientRect(element, !0);\n return top >= 0 && left >= 0 && bottom <= clientHeight && right <= clientWidth;\n}, isElementsArray = (obj) => isArray(obj) && obj.every(isHTMLElement) || !1, isFunction = (fn) => typeof fn == \"function\" || !1, isHTMLCollection = (obj) => isObject(obj) && obj.constructor.name === \"HTMLCollection\" || !1, isHTMLImageElement = (element) => isHTMLElement(element) && element.tagName === \"IMG\" || !1, isJSON = (str) => {\n if (!isString(str)) return !1;\n try {\n JSON.parse(str);\n } catch {\n return !1;\n }\n return !0;\n}, isWeakMap = (obj) => isObject(obj) && obj.constructor.name === \"WeakMap\" || !1, isMedia = (element) => isNode(element) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (s) => element.constructor.name.includes(s)\n) || !1, isNodeList = (obj) => isObject(obj) && obj.constructor.name === \"NodeList\" || !1, isRTL = (node) => getDocumentElement(node).dir === \"rtl\", isSVGElement = (element) => isNode(element) && element.constructor.name.includes(\"SVG\") || !1, isTableElement = (element) => isNode(element) && [\"TABLE\", \"TD\", \"TH\"].includes(element.nodeName) || !1, closest = (element, selector) => element ? element.closest(selector) || // break out of `ShadowRoot`\nclosest(element.getRootNode().host, selector) : null, querySelector = (selector, parent) => isHTMLElement(selector) ? selector : (isNode(parent) ? parent : getDocument()).querySelector(selector), getElementsByTagName = (selector, parent) => (isNode(parent) ? parent : getDocument()).getElementsByTagName(\n selector\n), getCustomElements = (parent) => [...getElementsByTagName(\"*\", parent)].filter(isCustomElement), getElementById = (id, context) => getDocument(context).getElementById(id) || null, getElementsByClassName = (selector, parent) => (parent && isNode(parent) ? parent : getDocument()).getElementsByClassName(\n selector\n), matches = (target, selector) => target.matches(selector), version = \"2.0.7\";\nexport {\n ArrayFrom,\n DOMContentLoadedEvent,\n DOMMouseScrollEvent,\n Data,\n Float32ArrayFrom,\n Float64ArrayFrom,\n ObjectAssign,\n ObjectEntries,\n ObjectFromEntries,\n ObjectHasOwn,\n ObjectKeys,\n ObjectValues,\n Timer,\n abortEvent,\n addClass,\n addEventListener,\n animationDelay,\n animationDuration,\n animationEndEvent,\n animationName,\n ariaChecked,\n ariaDescribedBy,\n ariaDescription,\n ariaExpanded,\n ariaHasPopup,\n ariaHidden,\n ariaLabel,\n ariaLabelledBy,\n ariaModal,\n ariaPressed,\n ariaSelected,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n ariaValueText,\n beforeunloadEvent,\n bezierEasings,\n blurEvent,\n changeEvent,\n closest,\n contextmenuEvent,\n createCustomEvent,\n createElement,\n createElementNS,\n dispatchEvent,\n distinct,\n documentBody,\n documentElement,\n documentHead,\n dragEvent,\n dragendEvent,\n dragenterEvent,\n dragleaveEvent,\n dragoverEvent,\n dragstartEvent,\n emulateAnimationEnd,\n emulateTransitionEnd,\n errorEvent,\n focus,\n focusEvent,\n focusEvents,\n focusableSelector,\n focusinEvent,\n focusoutEvent,\n gesturechangeEvent,\n gestureendEvent,\n gesturestartEvent,\n getAttribute,\n getAttributeNS,\n getBoundingClientRect,\n getCustomElements,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getDocumentHead,\n getElementAnimationDelay,\n getElementAnimationDuration,\n getElementById,\n getElementStyle,\n getElementTransitionDelay,\n getElementTransitionDuration,\n getElementsByClassName,\n getElementsByTagName,\n getInstance,\n getNodeScroll,\n getParentNode,\n getRectRelativeToOffsetParent,\n getUID,\n getWindow,\n hasAttribute,\n hasAttributeNS,\n hasClass,\n hasFocusTrap,\n isApple,\n isArray,\n isCanvas,\n isCustomElement,\n isDocument,\n isElement,\n isElementInScrollRange,\n isElementInViewport,\n isElementsArray,\n isFirefox,\n isFunction,\n isHTMLCollection,\n isHTMLElement,\n isHTMLImageElement,\n isJSON,\n isMap,\n isMedia,\n isMobile,\n isNode,\n isNodeList,\n isNumber,\n isObject,\n isRTL,\n isSVGElement,\n isScaledElement,\n isShadowRoot,\n isString,\n isTableElement,\n isWeakMap,\n isWindow,\n keyAlt,\n keyArrowDown,\n keyArrowLeft,\n keyArrowRight,\n keyArrowUp,\n keyBackspace,\n keyCapsLock,\n keyControl,\n keyDelete,\n keyEnter,\n keyEscape,\n keyInsert,\n keyMeta,\n keyNumpadEnter,\n keyPause,\n keyScrollLock,\n keyShift,\n keySpace,\n keyTab,\n keyboardEventKeys,\n keydownEvent,\n keypressEvent,\n keyupEvent,\n loadEvent,\n loadstartEvent,\n matches,\n mouseClickEvents,\n mouseHoverEvents,\n mouseSwipeEvents,\n mouseclickEvent,\n mousedblclickEvent,\n mousedownEvent,\n mouseenterEvent,\n mousehoverEvent,\n mouseinEvent,\n mouseleaveEvent,\n mousemoveEvent,\n mouseoutEvent,\n mouseoverEvent,\n mouseupEvent,\n mousewheelEvent,\n moveEvent,\n nativeEvents,\n noop,\n normalizeOptions,\n normalizeValue,\n off,\n offsetHeight,\n offsetWidth,\n on,\n one,\n orientationchangeEvent,\n passiveHandler,\n pointercancelEvent,\n pointerdownEvent,\n pointerleaveEvent,\n pointermoveEvent,\n pointerupEvent,\n querySelector,\n querySelectorAll,\n readystatechangeEvent,\n reflow,\n removeAttribute,\n removeAttributeNS,\n removeClass,\n removeEventListener,\n resetEvent,\n resizeEvent,\n scrollEvent,\n scrollHeight,\n scrollWidth,\n selectEvent,\n selectendEvent,\n selectstartEvent,\n setAttribute,\n setAttributeNS,\n setElementStyle,\n submitEvent,\n support3DTransform,\n supportAnimation,\n supportPassive,\n supportTouch,\n supportTransform,\n supportTransition,\n tabindex,\n toLowerCase,\n toUpperCase,\n toggleFocusTrap,\n touchEvents,\n touchcancelEvent,\n touchendEvent,\n touchmoveEvent,\n touchstartEvent,\n transitionDelay,\n transitionDuration,\n transitionEndEvent,\n transitionProperty,\n unloadEvent,\n userAgent,\n userAgentData,\n version\n};\n//# sourceMappingURL=shorty.mjs.map\n","const e = {}, f = (t) => {\n const { type: c, currentTarget: i } = t;\n [...e[c]].forEach(([n, s]) => {\n /* istanbul ignore else @preserve */\n i === n && [...s].forEach(([o, a]) => {\n o.apply(n, [t]), typeof a == \"object\" && a.once && r(n, c, o, a);\n });\n });\n}, E = (t, c, i, n) => {\n /* istanbul ignore else @preserve */\n e[c] || (e[c] = /* @__PURE__ */ new Map());\n const s = e[c];\n /* istanbul ignore else @preserve */\n s.has(t) || s.set(t, /* @__PURE__ */ new Map());\n const o = s.get(t), { size: a } = o;\n o.set(i, n);\n /* istanbul ignore else @preserve */\n a || t.addEventListener(c, f, n);\n}, r = (t, c, i, n) => {\n const s = e[c], o = s && s.get(t), a = o && o.get(i), d = a !== void 0 ? a : n;\n /* istanbul ignore else @preserve */\n o && o.has(i) && o.delete(i);\n /* istanbul ignore else @preserve */\n s && (!o || !o.size) && s.delete(t);\n /* istanbul ignore else @preserve */\n (!s || !s.size) && delete e[c];\n /* istanbul ignore else @preserve */\n (!o || !o.size) && t.removeEventListener(\n c,\n f,\n d\n );\n}, g = E, M = r;\nexport {\n E as addListener,\n f as globalListener,\n M as off,\n g as on,\n e as registry,\n r as removeListener\n};\n//# sourceMappingURL=event-listener.mjs.map\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/** @type {string} */\nconst alertString = \"alert\";\nexport default alertString;\n","/** @type {string} */\nconst alertComponent = \"Alert\";\nexport default alertComponent;\n","import { version } from \"../package.json\";\n\nconst Version = version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isHTMLElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"../interface/baseComponent\";\nimport Version from \"../version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: HTMLElement;\n declare options?: BaseOptions;\n\n /**\n * @param target `HTMLElement` or selector string\n * @param config component instance options\n */\n constructor(target: HTMLElement | string, config?: BaseOptions) {\n let element: HTMLElement | null;\n\n try {\n if (isHTMLElement(target)) {\n element = target;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get(element, this.name);\n // istanbul ignore else @preserve\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n // istanbul ignore next @preserve\n : {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Alert\n-------------------------------------------- */\nimport {\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getInstance,\n hasClass,\n mouseclickEvent,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport alertString from \"../strings/alertString\";\nimport alertComponent from \"../strings/alertComponent\";\nimport type { AlertEvent } from \"../interface/alert\";\n\nimport BaseComponent from \"./base-component\";\n\n// ALERT PRIVATE GC\n// ================\nconst alertSelector = `.${alertString}`;\nconst alertDismissSelector = `[${dataBsDismiss}=\"${alertString}\"]`;\n\n/**\n * Static method which returns an existing `Alert` instance associated\n * to a target `Element`.\n */\nconst getAlertInstance = (element: HTMLElement) =>\n getInstance(element, alertComponent);\n\n/**\n * An `Alert` initialization callback.\n */\nconst alertInitCallback = (element: HTMLElement) => new Alert(element);\n\n// ALERT CUSTOM EVENTS\n// ===================\nconst closeAlertEvent = createCustomEvent, AlertEvent>(\n `close.bs.${alertString}`,\n);\nconst closedAlertEvent = createCustomEvent, AlertEvent>(\n `closed.bs.${alertString}`,\n);\n\n// ALERT EVENT HANDLER\n// ===================\n/**\n * Alert `transitionend` callback.\n *\n * @param that target Alert instance\n */\nconst alertTransitionEnd = (self: Alert) => {\n const { element } = self;\n dispatchEvent(element, closedAlertEvent);\n\n self._toggleEventListeners();\n self.dispose();\n element.remove();\n};\n\n// ALERT DEFINITION\n// ================\n/** Creates a new Alert instance. */\nexport default class Alert extends BaseComponent {\n static selector = alertSelector;\n static init = alertInitCallback;\n static getInstance = getAlertInstance;\n dismiss: HTMLElement | null;\n\n constructor(target: HTMLElement | string) {\n super(target);\n\n // the dismiss button\n this.dismiss = querySelector(alertDismissSelector, this.element);\n\n // add event listener\n this._toggleEventListeners(true);\n }\n\n /** Returns component name string. */\n get name() {\n return alertComponent;\n }\n\n // ALERT PUBLIC METHODS\n // ====================\n /**\n * Public method that hides the `.alert` element from the user,\n * disposes the instance once animation is complete, then\n * removes the element from the DOM.\n */\n close = () => {\n const { element } = this;\n\n // istanbul ignore else @preserve\n if (element && hasClass(element, showClass)) {\n dispatchEvent(element, closeAlertEvent);\n\n if (!closeAlertEvent.defaultPrevented) {\n removeClass(element, showClass);\n\n if (hasClass(element, fadeClass)) {\n emulateTransitionEnd(element, () => alertTransitionEnd(this));\n } else alertTransitionEnd(this);\n }\n }\n };\n /**\n * Toggle on / off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { dismiss, close } = this;\n // istanbul ignore else @preserve\n if (dismiss) action(dismiss, mouseclickEvent, close);\n };\n\n /** Remove the component from target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/**\n * Global namespace for most components active class.\n */\nconst activeClass = \"active\";\nexport default activeClass;\n","/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/** @type {string} */\nconst buttonString = \"button\";\nexport default buttonString;\n","/** @type {string} */\nconst buttonComponent = \"Button\";\nexport default buttonComponent;\n","/* Native JavaScript for Bootstrap 5 | Button\n---------------------------------------------*/\nimport {\n addClass,\n ariaPressed,\n getAttribute,\n getInstance,\n hasClass,\n mouseclickEvent,\n removeClass,\n setAttribute,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport activeClass from \"../strings/activeClass\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport buttonString from \"../strings/buttonString\";\nimport buttonComponent from \"../strings/buttonComponent\";\n\nimport BaseComponent from \"./base-component\";\n\n// BUTTON PRIVATE GC\n// =================\nconst buttonSelector = `[${dataBsToggle}=\"${buttonString}\"]`;\n\n/**\n * Static method which returns an existing `Button` instance associated\n * to a target `Element`.\n */\nconst getButtonInstance = (element: HTMLElement) =>\n getInstance',\n});\n\n/**\n * Static method which returns an existing `Popover` instance associated\n * to a target `Element`.\n */\nconst getPopoverInstance = (element: HTMLElement) =>\n getInstance(element, popoverComponent);\n\n/**\n * A `Popover` initialization callback.\n */\nconst popoverInitCallback = (element: HTMLElement) => new Popover(element);\n\n// POPOVER DEFINITION\n// ==================\n/** Returns a new `Popover` instance. */\nexport default class Popover extends Tooltip {\n static selector = popoverSelector;\n static init = popoverInitCallback;\n static getInstance = getPopoverInstance;\n static styleTip = styleTip;\n declare options: PopoverOptions;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return popoverComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return popoverDefaults;\n }\n\n /* extend original `show()` */\n show = () => {\n super.show();\n // btn only exists within dismissible popover\n const { options, btn } = this;\n // istanbul ignore else @preserve\n if (options.dismissible && btn) setTimeout(() => focus(btn), 17);\n };\n}\n","/** @type {string} */\nconst scrollspyString = \"scrollspy\";\nexport default scrollspyString;\n","/** @type {string} */\nconst scrollspyComponent = \"ScrollSpy\";\nexport default scrollspyComponent;\n","/* Native JavaScript for Bootstrap 5 | ScrollSpy\n------------------------------------------------ */\nimport {\n addClass,\n createCustomEvent,\n dispatchEvent,\n getAttribute,\n getBoundingClientRect,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementsByTagName,\n getInstance,\n hasClass,\n isHTMLElement,\n querySelector,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport PositionObserver from \"@thednp/position-observer\";\n\nimport activeClass from \"../strings/activeClass\";\nimport scrollspyString from \"../strings/scrollspyString\";\nimport scrollspyComponent from \"../strings/scrollspyComponent\";\n\nimport BaseComponent from \"./base-component\";\nimport { ScrollSpyEvent, ScrollSpyOptions } from \"../interface/scrollspy\";\n\n// SCROLLSPY PRIVATE GC\n// ====================\nconst scrollspySelector = '[data-bs-spy=\"scroll\"]';\n\nconst scrollspyDefaults: ScrollSpyOptions = {\n offset: 10,\n target: null,\n};\n\ntype ScrollSpyEventProps = {\n relatedTarget: HTMLElement;\n};\n\n/**\n * Static method which returns an existing `ScrollSpy` instance associated\n * to a target `Element`.\n */\nconst getScrollSpyInstance = (element: HTMLElement) =>\n getInstance(element, scrollspyComponent);\n\n/**\n * A `ScrollSpy` initialization callback.\n */\nconst scrollspyInitCallback = (element: HTMLElement) => new ScrollSpy(element);\n\n// SCROLLSPY CUSTOM EVENT\n// ======================\nconst activateScrollSpy = createCustomEvent<\n ScrollSpyEventProps,\n ScrollSpyEvent\n>(`activate.bs.${scrollspyString}`);\n\n// SCROLLSPY PRIVATE METHODS\n// =========================\n/**\n * Update the state of all items.\n *\n * @param self the `ScrollSpy` instance\n */\nconst updateSpyTargets = (self: ScrollSpy) => {\n const { target, scrollTarget, options, itemsLength, scrollHeight, element } =\n self;\n const { offset } = options;\n const isRoot = scrollTarget !== element;\n\n const links = target && getElementsByTagName(\"A\", target);\n const doc = getDocument(element);\n const scrollHEIGHT = scrollTarget.scrollHeight;\n\n self.scrollTop = scrollTarget.scrollTop;\n\n // only update items/offsets once or with each mutation\n // istanbul ignore else @preserve\n if (\n links && (scrollHEIGHT !== scrollHeight || itemsLength !== links.length)\n ) {\n let href;\n let targetItem;\n let rect;\n\n // reset arrays & update\n self.items = [];\n self.targets = [];\n self.offsets = [];\n self.scrollHeight = scrollHEIGHT;\n self.maxScroll = self.scrollHeight - getOffsetHeight(self);\n\n Array.from(links).forEach((link) => {\n href = getAttribute(link, \"href\");\n targetItem = href && href.charAt(0) === \"#\" && href.slice(-1) !== \"#\" &&\n querySelector(href, doc);\n\n if (targetItem) {\n self.items.push(link);\n self.targets.push(targetItem);\n rect = getBoundingClientRect(targetItem);\n self.offsets.push(\n (isRoot ? rect.top + self.scrollTop : targetItem.offsetTop) - offset,\n );\n }\n });\n self.itemsLength = self.items.length;\n }\n};\n\n/**\n * Toggles on/off the component observer.\n *\n * @param self the ScrollSpy instance\n * @param add when `true`, listener is added\n */\nconst toggleObservers = (\n { targets, scrollTarget, element, _observer }: ScrollSpy,\n add?: boolean,\n) => {\n if (add) {\n if (scrollTarget === element) {\n targets.forEach((targetItem) => _observer.observe(targetItem));\n } else {\n _observer.observe(element);\n }\n } else _observer.disconnect();\n};\n\n/**\n * Returns the `scrollHeight` property of the scrolling element.\n *\n * @param scrollTarget the `ScrollSpy` instance\n * @return `scrollTarget` height\n */\nconst getScrollHeight = (scrollTarget: HTMLElement) => {\n return scrollTarget.scrollHeight;\n};\n\n/**\n * Returns the height property of the scrolling element.\n *\n * @param params the `ScrollSpy` instance\n */\nconst getOffsetHeight = ({ element, scrollTarget }: ScrollSpy) => {\n return scrollTarget !== element\n ? scrollTarget.clientHeight\n : getBoundingClientRect(element).height;\n};\n\n/**\n * Clear all items of the target.\n *\n * @param target a single item\n */\nconst clear = (target: HTMLElement) => {\n [...getElementsByTagName(\"A\", target)].forEach((item) => {\n if (hasClass(item, activeClass)) removeClass(item, activeClass);\n });\n};\n\n/**\n * Activates a new item.\n *\n * @param self the `ScrollSpy` instance\n * @param item a single item\n */\nconst activate = (self: ScrollSpy, item: HTMLElement) => {\n const { target, element } = self;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(target)) clear(target);\n\n self.activeItem = item;\n addClass(item, activeClass);\n\n // activate all parents\n const parents: HTMLElement[] = [];\n let parentItem = item;\n while (parentItem !== getDocumentBody(element)) {\n parentItem = parentItem.parentElement as HTMLElement;\n if (hasClass(parentItem, \"nav\") || hasClass(parentItem, \"dropdown-menu\")) {\n parents.push(parentItem);\n }\n }\n\n parents.forEach((menuItem) => {\n const parentLink = menuItem.previousElementSibling as HTMLElement | null;\n\n // istanbul ignore else @preserve\n if (parentLink && !hasClass(parentLink, activeClass)) {\n addClass(parentLink, activeClass);\n }\n });\n\n // dispatch\n activateScrollSpy.relatedTarget = item;\n dispatchEvent(element, activateScrollSpy);\n};\n\n// SCROLLSPY DEFINITION\n// ====================\n/** Returns a new `ScrollSpy` instance. */\nexport default class ScrollSpy extends BaseComponent {\n static selector = scrollspySelector;\n static init = scrollspyInitCallback;\n static getInstance = getScrollSpyInstance;\n declare options: ScrollSpyOptions;\n declare target: HTMLElement | null;\n declare scrollTarget: HTMLElement;\n declare scrollTop: number;\n declare maxScroll: number;\n declare scrollHeight: number;\n declare activeItem: HTMLElement | null;\n declare items: HTMLElement[];\n declare targets: HTMLElement[];\n declare itemsLength: number;\n declare offsets: number[];\n declare _observer: PositionObserver;\n\n /**\n * @param target the target element\n * @param config the instance options\n */\n constructor(\n target: HTMLElement | string,\n config?: Partial,\n ) {\n super(target, config);\n\n // initialization element & options\n const { element, options } = this;\n\n // additional properties\n this.target = querySelector(\n options.target as HTMLElement | string,\n getDocument(element),\n );\n\n // invalidate\n if (this.target) {\n // set initial state\n this.scrollTarget = element.clientHeight < element.scrollHeight\n ? element\n : getDocumentElement(element);\n this.scrollHeight = getScrollHeight(this.scrollTarget);\n\n // run an initial burst, we need to know the targets\n this.refresh();\n\n // create observer\n this._observer = new PositionObserver(() => this.refresh(), {\n root: this.scrollTarget,\n });\n\n // add event handlers\n toggleObservers(this, true);\n }\n }\n\n /* eslint-disable */\n /**\n * Returns component name string.\n */\n get name() {\n return scrollspyComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return scrollspyDefaults;\n }\n /* eslint-enable */\n\n // SCROLLSPY PUBLIC METHODS\n // ========================\n /** Updates all items. */\n refresh = () => {\n const { target } = this;\n\n // check if target is visible and invalidate\n // istanbul ignore else @preserve\n if (isHTMLElement(target) && target.offsetHeight > 0) {\n updateSpyTargets(this);\n\n const { scrollTop, maxScroll, itemsLength, items, activeItem } = this;\n\n if (scrollTop >= maxScroll) {\n const newActiveItem = items[itemsLength - 1];\n\n // istanbul ignore else @preserve\n if (activeItem !== newActiveItem) {\n activate(this, newActiveItem);\n }\n return;\n }\n\n const { offsets } = this;\n\n // istanbul ignore else @preserve\n if (activeItem && scrollTop < offsets[0] && offsets[0] > 0) {\n this.activeItem = null;\n // istanbul ignore else @preserve\n if (target) clear(target);\n return;\n }\n\n items.forEach((item, i) => {\n if (\n activeItem !== item &&\n scrollTop >= offsets[i] &&\n (typeof offsets[i + 1] === \"undefined\" || scrollTop < offsets[i + 1])\n ) {\n activate(this, item);\n }\n });\n }\n };\n\n /** Removes `ScrollSpy` from the target element. */\n dispose() {\n const clone = { ...this };\n toggleObservers(clone);\n super.dispose();\n }\n}\n","/** @type {string} */\nconst tabString = \"tab\";\nexport default tabString;\n","/** @type {string} */\nconst tabComponent = \"Tab\";\nexport default tabComponent;\n","/* Native JavaScript for Bootstrap 5 | Tab\n------------------------------------------ */\nimport {\n addClass,\n ariaSelected,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n getElementsByClassName,\n getInstance,\n hasClass,\n isHTMLElement,\n mouseclickEvent,\n querySelector,\n reflow,\n removeClass,\n setAttribute,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport collapsingClass from \"../strings/collapsingClass\";\nimport activeClass from \"../strings/activeClass\";\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dropdownClasses from \"../strings/dropdownClasses\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport tabString from \"../strings/tabString\";\nimport tabComponent from \"../strings/tabComponent\";\n\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport type { /* TabOptions, */ TabEvent } from \"../interface/tab\";\n\n// TAB PRIVATE GC\n// ================\nconst tabSelector = `[${dataBsToggle}=\"${tabString}\"]`;\n\n/**\n * Static method which returns an existing `Tab` instance associated\n * to a target `Element`.\n */\nconst getTabInstance = (element: HTMLElement) =>\n getInstance(element, tabComponent);\n\n/** A `Tab` initialization callback. */\nconst tabInitCallback = (element: HTMLElement) => new Tab(element);\n\ntype TabEventProps = {\n relatedTarget: HTMLElement | undefined;\n};\n\n// TAB CUSTOM EVENTS\n// =================\nconst showTabEvent = createCustomEvent(\n `show.bs.${tabString}`,\n);\nconst shownTabEvent = createCustomEvent(\n `shown.bs.${tabString}`,\n);\nconst hideTabEvent = createCustomEvent(\n `hide.bs.${tabString}`,\n);\nconst hiddenTabEvent = createCustomEvent(\n `hidden.bs.${tabString}`,\n);\n\ninterface TabPrivate {\n tab: HTMLElement | null;\n content: HTMLElement | null;\n currentHeight: number;\n nextHeight: number;\n}\n\n/**\n * Stores the current active tab and its content\n * for a given `.nav` element.\n */\nconst tabPrivate: Map = new Map();\n\n// TAB PRIVATE METHODS\n// ===================\n/**\n * Executes after tab transition has finished.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabEnd = (self: Tab) => {\n const { tabContent, nav } = self;\n\n // istanbul ignore else @preserve\n if (tabContent && hasClass(tabContent, collapsingClass)) {\n tabContent.style.height = \"\";\n removeClass(tabContent, collapsingClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) Timer.clear(nav);\n};\n\n/**\n * Executes before showing the tab content.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabShow = (self: Tab) => {\n const { element, tabContent, content: nextContent, nav } = self;\n const { tab } = (isHTMLElement(nav) && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null };\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const { currentHeight, nextHeight } = tabPrivate.get(element) ||\n // istanbul ignore next @preserve\n { currentHeight: 0, nextHeight: 0 };\n // istanbul ignore else @preserve: vitest won't validate this branch\n if (currentHeight !== nextHeight) {\n // enables height animation\n setTimeout(() => {\n tabContent.style.height = `${nextHeight}px`;\n reflow(tabContent);\n emulateTransitionEnd(tabContent, () => triggerTabEnd(self));\n }, 50);\n } else {\n triggerTabEnd(self);\n }\n } else if (nav) Timer.clear(nav);\n\n shownTabEvent.relatedTarget = tab as HTMLElement | undefined;\n\n dispatchEvent(element, shownTabEvent);\n};\n\n/**\n * Executes before hiding the tab.\n *\n * @param self the `Tab` instance\n */\nconst triggerTabHide = (self: Tab) => {\n const { element, content: nextContent, tabContent, nav } = self;\n const { tab, content } = (nav && tabPrivate.get(nav)) ||\n // istanbul ignore next @preserve\n { tab: null, content: null };\n let currentHeight = 0;\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (isHTMLElement(c)) addClass(c, \"overflow-hidden\");\n });\n currentHeight = isHTMLElement(content)\n ? content.scrollHeight // istanbul ignore next @preserve\n : 0;\n }\n\n // update relatedTarget and dispatch event\n showTabEvent.relatedTarget = tab as HTMLElement | undefined;\n hiddenTabEvent.relatedTarget = element;\n dispatchEvent(element, showTabEvent);\n\n // istanbul ignore else @preserve\n if (!showTabEvent.defaultPrevented) {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, activeClass);\n // istanbul ignore else @preserve\n if (content) removeClass(content, activeClass);\n\n // istanbul ignore else @preserve\n if (tabContent && nextContent && hasClass(nextContent, fadeClass)) {\n const nextHeight = nextContent.scrollHeight;\n tabPrivate.set(element, {\n currentHeight,\n nextHeight,\n tab: null,\n content: null,\n });\n\n addClass(tabContent, collapsingClass);\n tabContent.style.height = `${currentHeight}px`;\n reflow(tabContent);\n [content, nextContent].forEach((c) => {\n // istanbul ignore else @preserve\n if (c) removeClass(c, \"overflow-hidden\");\n });\n }\n\n if (nextContent && nextContent && hasClass(nextContent, fadeClass)) {\n setTimeout(() => {\n addClass(nextContent, showClass);\n emulateTransitionEnd(nextContent, () => {\n triggerTabShow(self);\n });\n }, 1);\n } else {\n // istanbul ignore else @preserve\n if (nextContent) addClass(nextContent, showClass);\n triggerTabShow(self);\n }\n\n // istanbul ignore else @preserve\n if (tab) dispatchEvent(tab, hiddenTabEvent);\n }\n};\n\n/**\n * Returns the current active tab and its target content.\n *\n * @param self the `Tab` instance\n * @returns the query result\n */\nconst getActiveTab = (\n self: Tab,\n): { tab: HTMLElement | null; content: HTMLElement | null } => {\n const { nav } = self;\n // istanbul ignore next @preserve\n if (!isHTMLElement(nav as HTMLElement | undefined)) {\n return { tab: null, content: null };\n }\n\n const activeTabs = getElementsByClassName(activeClass, nav as HTMLElement);\n let tab: HTMLElement | null = null;\n // istanbul ignore else @preserve\n if (\n activeTabs.length === 1 &&\n !dropdownClasses.some((c) =>\n hasClass(activeTabs[0].parentElement as HTMLElement, c)\n )\n ) {\n [tab] = activeTabs;\n } else if (activeTabs.length > 1) {\n tab = activeTabs[activeTabs.length - 1];\n }\n const content = isHTMLElement(tab as HTMLElement)\n ? getTargetElement(tab as HTMLElement)\n : null;\n return { tab, content };\n};\n\n/**\n * Returns a parent dropdown.\n *\n * @param element the `Tab` element\n * @returns the parent dropdown\n */\nconst getParentDropdown = (element?: HTMLElement): HTMLElement | null => {\n // istanbul ignore next @preserve\n if (!isHTMLElement(element)) return null;\n const dropdown = closest(element, `.${dropdownClasses.join(\",.\")}`);\n return dropdown\n ? querySelector(`.${dropdownClasses[0]}-toggle`, dropdown)\n : null;\n};\n\n// TAB EVENT HANDLER\n// =================\n/**\n * Handles the `click` event listener.\n *\n * @param e the `Event` object\n */\nconst tabClickHandler = (e: Event) => {\n const self = getTabInstance(e.target as HTMLElement);\n\n // istanbul ignore else @preserve\n if (self) {\n e.preventDefault();\n self.show();\n }\n};\n\n// TAB DEFINITION\n// ==============\n/** Creates a new `Tab` instance. */\nexport default class Tab extends BaseComponent {\n static selector = tabSelector;\n static init = tabInitCallback;\n static getInstance = getTabInstance;\n declare nav: HTMLElement | null;\n declare content: HTMLElement | null;\n declare tabContent: HTMLElement | null;\n declare nextContent: HTMLElement | null;\n declare dropdown: HTMLElement | null;\n\n /** @param target the target element */\n constructor(target: HTMLElement | string) {\n super(target);\n\n // initialization element\n const { element } = this;\n const content = getTargetElement(element);\n\n // no point initializing a tab without a corresponding content\n // istanbul ignore else @preserve\n if (content) {\n const nav = closest(element, \".nav\");\n const container = closest(content, \".tab-content\");\n\n this.nav = nav;\n this.content = content;\n this.tabContent = container;\n\n // event targets\n this.dropdown = getParentDropdown(element);\n\n // show first Tab instance of none is shown\n // suggested on #432\n const { tab } = getActiveTab(this);\n if (nav && !tab) {\n const firstTab = querySelector(tabSelector, nav);\n const firstTabContent = firstTab && getTargetElement(firstTab);\n\n // istanbul ignore else @preserve\n if (firstTabContent) {\n addClass(firstTab, activeClass);\n addClass(firstTabContent, showClass);\n addClass(firstTabContent, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n }\n }\n\n // add event listener\n this._toggleEventListeners(true);\n }\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return tabComponent;\n }\n\n // TAB PUBLIC METHODS\n // ==================\n /** Shows the tab to the user. */\n show() {\n const { element, content: nextContent, nav, dropdown } = this;\n\n // istanbul ignore else @preserve\n if (!(nav && Timer.get(nav)) && !hasClass(element, activeClass)) {\n const { tab, content } = getActiveTab(this);\n\n // istanbul ignore else @preserve\n if (nav) {\n tabPrivate.set(nav, { tab, content, currentHeight: 0, nextHeight: 0 });\n }\n\n // update relatedTarget and dispatch\n hideTabEvent.relatedTarget = element;\n\n // istanbul ignore else @preserve\n if (isHTMLElement(tab)) {\n dispatchEvent(tab as EventTarget, hideTabEvent);\n // istanbul ignore else @preserve\n if (!hideTabEvent.defaultPrevented) {\n addClass(element, activeClass);\n setAttribute(element, ariaSelected, \"true\");\n\n const activeDropdown = isHTMLElement(tab) && getParentDropdown(tab);\n if (activeDropdown && hasClass(activeDropdown, activeClass)) {\n removeClass(activeDropdown, activeClass);\n }\n\n // istanbul ignore else @preserve\n if (nav) {\n const toggleTab = () => {\n // istanbul ignore else @preserve\n if (tab) {\n removeClass(tab, activeClass);\n setAttribute(tab, ariaSelected, \"false\");\n }\n if (dropdown && !hasClass(dropdown, activeClass)) {\n addClass(dropdown, activeClass);\n }\n };\n\n if (\n content &&\n (hasClass(content, fadeClass) ||\n (nextContent && hasClass(nextContent, fadeClass)))\n ) {\n Timer.set(nav, toggleTab, 1);\n } else toggleTab();\n }\n\n // istanbul ignore else @preserve\n if (content) {\n removeClass(content, showClass);\n if (hasClass(content, fadeClass)) {\n emulateTransitionEnd(content, () => triggerTabHide(this));\n } else {\n triggerTabHide(this);\n }\n }\n }\n }\n }\n }\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, event listener is added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n action(this.element, mouseclickEvent, tabClickHandler);\n };\n\n /** Removes the `Tab` component from the target element. */\n dispose() {\n this._toggleEventListeners();\n super.dispose();\n }\n}\n","/** @type {string} */\nconst toastString = \"toast\";\nexport default toastString;\n","/** @type {string} */\nconst toastComponent = \"Toast\";\nexport default toastComponent;\n","/* Native JavaScript for Bootstrap 5 | Toast\n-------------------------------------------- */\nimport {\n addClass,\n closest,\n createCustomEvent,\n dispatchEvent,\n emulateTransitionEnd,\n focusinEvent,\n focusoutEvent,\n getDocument,\n getInstance,\n hasClass,\n mouseclickEvent,\n mouseenterEvent,\n mouseleaveEvent,\n querySelector,\n querySelectorAll,\n reflow,\n removeClass,\n Timer,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport dataBsDismiss from \"../strings/dataBsDismiss\";\nimport dataBsToggle from \"../strings/dataBsToggle\";\nimport toastString from \"../strings/toastString\";\nimport toastComponent from \"../strings/toastComponent\";\nimport getTargetElement from \"../util/getTargetElement\";\nimport BaseComponent from \"./base-component\";\nimport { ToastEvent, ToastOptions } from \"../interface/toast\";\n\n// TOAST PRIVATE GC\n// ================\nconst toastSelector = `.${toastString}`;\nconst toastDismissSelector = `[${dataBsDismiss}=\"${toastString}\"]`;\nconst toastToggleSelector = `[${dataBsToggle}=\"${toastString}\"]`;\nconst showingClass = \"showing\";\n/** @deprecated */\nconst hideClass = \"hide\";\n\nconst toastDefaults = {\n animation: true,\n autohide: true,\n delay: 5000,\n};\n\n/**\n * Static method which returns an existing `Toast` instance associated\n * to a target `Element`.\n */\nconst getToastInstance = (element: HTMLElement) =>\n getInstance(element, toastComponent);\n\n/**\n * A `Toast` initialization callback.\n */\nconst toastInitCallback = (element: HTMLElement) => new Toast(element);\n\n// TOAST CUSTOM EVENTS\n// ===================\nconst showToastEvent = createCustomEvent, ToastEvent>(\n `show.bs.${toastString}`,\n);\nconst shownToastEvent = createCustomEvent, ToastEvent>(\n `shown.bs.${toastString}`,\n);\nconst hideToastEvent = createCustomEvent, ToastEvent>(\n `hide.bs.${toastString}`,\n);\nconst hiddenToastEvent = createCustomEvent, ToastEvent>(\n `hidden.bs.${toastString}`,\n);\n\n// TOAST PRIVATE METHODS\n// =====================\n/**\n * Executes after the toast is shown to the user.\n *\n * @param self the `Toast` instance\n */\nconst showToastComplete = (self: Toast) => {\n const { element, options } = self;\n removeClass(element, showingClass);\n Timer.clear(element, showingClass);\n\n dispatchEvent(element, shownToastEvent);\n // istanbul ignore else @preserve\n if (options.autohide) {\n Timer.set(element, () => self.hide(), options.delay, toastString);\n }\n};\n\n/**\n * Executes after the toast is hidden to the user.\n *\n * @param self the `Toast` instance\n */\nconst hideToastComplete = (self: Toast) => {\n const { element } = self;\n removeClass(element, showingClass);\n removeClass(element, showClass);\n addClass(element, hideClass); // B/C\n Timer.clear(element, toastString);\n dispatchEvent(element, hiddenToastEvent);\n};\n\n/**\n * Executes before hiding the toast.\n *\n * @param self the `Toast` instance\n */\nconst hideToast = (self: Toast) => {\n const { element, options } = self;\n addClass(element, showingClass);\n\n if (options.animation) {\n reflow(element);\n emulateTransitionEnd(element, () => hideToastComplete(self));\n } else {\n hideToastComplete(self);\n }\n};\n\n/**\n * Executes before showing the toast.\n *\n * @param self the `Toast` instance\n */\nconst showToast = (self: Toast) => {\n const { element, options } = self;\n Timer.set(\n element,\n () => {\n removeClass(element, hideClass); // B/C\n reflow(element);\n addClass(element, showClass);\n addClass(element, showingClass);\n\n if (options.animation) {\n emulateTransitionEnd(element, () => showToastComplete(self));\n } else {\n showToastComplete(self);\n }\n },\n 17,\n showingClass,\n );\n};\n\n// TOAST EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for toast.\n *\n * @param e the `Event` object\n */\nconst toastClickHandler = (e: Event) => {\n const { target } = e;\n\n const trigger = target && closest(target as HTMLElement, toastToggleSelector);\n const element = trigger && getTargetElement(trigger);\n const self = element && getToastInstance(element);\n\n // istanbul ignore else @preserve\n if (self) {\n // istanbul ignore else @preserve\n if (trigger && trigger.tagName === \"A\") e.preventDefault();\n self.relatedTarget = trigger;\n self.show();\n }\n};\n\n/**\n * Executes when user interacts with the toast without closing it,\n * usually by hovering or focusing it.\n *\n * @param e the `Toast` instance\n */\nconst interactiveToastHandler = (e: MouseEvent) => {\n const element = e.target as HTMLElement;\n const self = getToastInstance(element);\n const { type, relatedTarget } = e;\n\n // istanbul ignore else @preserve: a solid filter is required\n if (\n self && element !== relatedTarget &&\n !element.contains(relatedTarget as Node)\n ) {\n if ([mouseenterEvent, focusinEvent].includes(type)) {\n Timer.clear(element, toastString);\n } else {\n Timer.set(element, () => self.hide(), self.options.delay, toastString);\n }\n }\n};\n\n// TOAST DEFINITION\n// ================\n/** Creates a new `Toast` instance. */\nexport default class Toast extends BaseComponent {\n static selector = toastSelector;\n static init = toastInitCallback;\n static getInstance = getToastInstance;\n declare options: ToastOptions;\n declare dismiss: HTMLElement | null;\n declare triggers: HTMLElement[];\n declare relatedTarget: HTMLElement | null;\n\n /**\n * @param target the target `.toast` element\n * @param config the instance options\n */\n constructor(target: HTMLElement | string, config?: Partial) {\n super(target, config);\n const { element, options } = this;\n\n // set fadeClass, the options.animation will override the markup\n if (options.animation && !hasClass(element, fadeClass)) {\n addClass(element, fadeClass);\n } else if (!options.animation && hasClass(element, fadeClass)) {\n removeClass(element, fadeClass);\n }\n\n // dismiss button\n this.dismiss = querySelector(toastDismissSelector, element);\n\n // toast can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll(toastToggleSelector, getDocument(element)),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // add event listener\n this._toggleEventListeners(true);\n }\n /**\n * Returns component name string.\n */\n get name() {\n return toastComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return toastDefaults;\n }\n /**\n * Returns *true* when toast is visible.\n */\n get isShown() {\n return hasClass(this.element, showClass);\n }\n\n // TOAST PUBLIC METHODS\n // ====================\n /** Shows the toast. */\n show = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && !isShown) {\n dispatchEvent(element, showToastEvent);\n if (!showToastEvent.defaultPrevented) {\n showToast(this);\n }\n }\n };\n\n /** Hides the toast. */\n hide = () => {\n const { element, isShown } = this;\n\n // istanbul ignore else @preserve\n if (element && isShown) {\n dispatchEvent(element, hideToastEvent);\n if (!hideToastEvent.defaultPrevented) {\n hideToast(this);\n }\n }\n };\n\n /**\n * Toggles on/off the `click` event listener.\n *\n * @param add when `true`, it will add the listener\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element, triggers, dismiss, options, hide } = this;\n\n // istanbul ignore else @preserve\n if (dismiss) {\n action(dismiss, mouseclickEvent, hide);\n }\n\n // istanbul ignore else @preserve\n if (options.autohide) {\n [focusinEvent, focusoutEvent, mouseenterEvent, mouseleaveEvent].forEach(\n (e) => action(element, e, interactiveToastHandler),\n );\n }\n // istanbul ignore else @preserve\n if (triggers.length) {\n triggers.forEach((btn) =>\n action(btn, mouseclickEvent, toastClickHandler)\n );\n }\n };\n\n /** Removes the `Toast` component from the target element. */\n dispose() {\n const { element, isShown } = this;\n this._toggleEventListeners();\n Timer.clear(element, toastString);\n\n if (isShown) {\n removeClass(element, showClass);\n }\n super.dispose();\n }\n}\n","import { Data, getElementsByTagName, matches } from \"@thednp/shorty\";\n\nimport { addListener } from \"@thednp/event-listener\";\n\nimport Alert from \"../components/alert\";\nimport Button from \"../components/button\";\nimport Carousel from \"../components/carousel\";\nimport Collapse from \"../components/collapse\";\nimport Dropdown from \"../components/dropdown\";\nimport Modal from \"../components/modal\";\nimport Offcanvas from \"../components/offcanvas\";\nimport Popover from \"../components/popover\";\nimport ScrollSpy from \"../components/scrollspy\";\nimport Tab from \"../components/tab\";\nimport Toast from \"../components/toast\";\nimport Tooltip from \"../components/tooltip\";\n\nconst componentsList = new Map<\n string,\n | typeof Alert\n | typeof Button\n | typeof Carousel\n | typeof Collapse\n | typeof Dropdown\n | typeof Modal\n | typeof Offcanvas\n | typeof Popover\n | typeof ScrollSpy\n | typeof Tab\n | typeof Toast\n | typeof Tooltip\n>();\n\ntype Component =\n | Alert\n | Button\n | Carousel\n | Collapse\n | Dropdown\n | Modal\n | Offcanvas\n | Popover\n | ScrollSpy\n | Tab\n | Toast\n | Tooltip;\n\n[\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip,\n].forEach((c) => componentsList.set(c.prototype.name, c));\n\n/**\n * Initialize all matched `Element`s for one component.\n *\n * @param callback\n * @param collection\n */\nconst initComponentDataAPI = (\n callback: (el: HTMLElement) => Component,\n collection: HTMLCollectionOf | HTMLElement[],\n) => {\n [...collection].forEach((x) => callback(x));\n};\n\n/**\n * Remove one component from a target container element or all in the page.\n *\n * @param component the component name\n * @param context parent `Node`\n */\nconst removeComponentDataAPI = (component: string, context: ParentNode) => {\n const compData = Data.getAllFor(component) as Map;\n\n if (compData) {\n [...compData].forEach(([element, instance]) => {\n if (context.contains(element)) {\n (instance as T & { dispose: () => void }).dispose();\n }\n });\n }\n};\n\n/**\n * Initialize all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const initCallback = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n const elemCollection = [...getElementsByTagName(\"*\", lookUp)];\n\n componentsList.forEach((cs) => {\n const { init, selector } = cs;\n initComponentDataAPI(\n init,\n elemCollection.filter((item) => matches(item, selector)),\n );\n });\n};\n\n/**\n * Remove all BSN components for a target container.\n *\n * @param context parent `Node`\n */\nexport const removeDataAPI = (context?: ParentNode) => {\n const lookUp = context && context.nodeName ? context : document;\n\n componentsList.forEach((comp) => {\n removeComponentDataAPI(comp.prototype.name, lookUp);\n });\n};\n\n// Bulk initialize all components\nif (document.body) initCallback();\nelse {\n addListener(document, \"DOMContentLoaded\", () => initCallback(), {\n once: true,\n });\n}\n"],"names":["ariaDescribedBy","ariaExpanded","ariaHidden","ariaModal","ariaPressed","ariaSelected","focusEvent","focusinEvent","focusoutEvent","keydownEvent","keyupEvent","mouseclickEvent","mousedownEvent","mousehoverEvent","mouseenterEvent","mouseleaveEvent","pointerdownEvent","pointermoveEvent","pointerupEvent","touchstartEvent","dragstartEvent","focusableSelector","keyArrowDown","keyArrowUp","keyArrowLeft","keyArrowRight","keyEscape","transitionDuration","transitionDelay","transitionEndEvent","transitionProperty","isApple","appleBrands","x","noop","on","element","eventName","listener","options","ops","off","getAttribute","att","hasAttribute","setAttribute","value","removeAttribute","addClass","classNAME","removeClass","hasClass","isObject","obj","isNode","node","isHTMLElement","componentData","Data","component","instance","instanceMap","getInstance","target","isString","str","isWindow","isDocument","getDocument","ObjectAssign","source","createElement","param","tagName","newElement","attr","dispatchEvent","event","getElementStyle","property","computedStyle","prop","getElementTransitionDelay","propertyValue","delayValue","delayScale","duration","getElementTransitionDuration","durationValue","durationScale","emulateTransitionEnd","handler","called","endEvent","delay","transitionEndWrapper","e","focus","normalizeValue","ObjectEntries","toLowerCase","normalizeOptions","defaultOps","inputOps","ns","INPUT","data","normalOps","dataOps","title","k","v","key","match","ObjectKeys","createCustomEvent","eventType","config","OriginalCustomEvent","passiveHandler","reflow","setElementStyle","styles","propObject","isMap","isNumber","num","TimeCache","Timer","callback","keyTimers","querySelectorAll","selector","parent","focusTrapMap","handleKeyboardNavigation","shiftKey","code","doc","focusableElements","el","firstFocusable","lastFocusable","hasFocusTrap","toggleFocusTrap","isCurrentlyTrapped","getBoundingClientRect","includeScale","width","height","top","right","bottom","left","scaleX","scaleY","offsetWidth2","offsetHeight2","getDocumentBody","getDocumentElement","isShadowRoot","getParentNode","elementUID","elementMapUID","elementIDMap","getUID","result","elID","elMap","elkey","getWindow","isArray","isElementInScrollRange","clientHeight","isFunction","fn","isNodeList","isRTL","isTableElement","closest","querySelector","getElementsByTagName","getElementsByClassName","matches","f","t","c","i","s","o","r","E","d","fadeClass","showClass","dataBsDismiss","alertString","alertComponent","Version","BaseComponent","prevInstance","alertSelector","alertDismissSelector","getAlertInstance","alertInitCallback","Alert","closeAlertEvent","closedAlertEvent","alertTransitionEnd","self","add","action","addListener","removeListener","dismiss","close","activeClass","dataBsToggle","buttonString","buttonComponent","buttonSelector","getButtonInstance","buttonInitCallback","Button","isActive","dataBsTarget","carouselString","carouselComponent","dataBsParent","dataBsContainer","getTargetElement","targetAttr","attValue","carouselSelector","carouselItem","dataBsSlideTo","dataBsSlide","pausedClass","carouselDefaults","getCarouselInstance","carouselInitCallback","Carousel","startX","currentX","endX","carouselSlideEvent","carouselSlidEvent","carouselTransitionEndHandler","index","direction","slides","activeItem","getActiveIndex","orientation","directionClass","carouselPauseHandler","carouselResumeHandler","carouselIndicatorHandler","newIndex","carouselControlsHandler","carouselKeyHandler","RTL","carouselDragHandler","carouselPointerDownHandler","controls","indicators","toggleCarouselTouchHandlers","carouselPointerMoveHandler","carouselPointerUpHandler","activateCarouselIndicator","activeIndex","transitionItem","ar","isPaused","idx","next","eventProperties","touch","pause","interval","keyboard","arrow","indicator","isAnimating","clone","collapsingClass","collapseString","collapseComponent","collapseSelector","collapseToggleSelector","collapseDefaults","getCollapseInstance","collapseInitCallback","Collapse","showCollapseEvent","shownCollapseEvent","hideCollapseEvent","hiddenCollapseEvent","expandCollapse","triggers","btn","collapseContent","collapseClickHandler","trigger","activeCollapse","activeCollapseInstance","dropdownMenuClasses","dropdownComponent","dropdownMenuClass","isEmptyAnchor","parentAnchor","dropdownString","dropupString","dropstartString","dropendString","dropdownClasses","dropdownSelector","getDropdownInstance","dropdownInitCallback","Dropdown","dropdownMenuEndClass","verticalClass","horizontalClass","menuFocusTags","dropdownDefaults","showDropdownEvent","shownDropdownEvent","hideDropdownEvent","hiddenDropdownEvent","updatedDropdownEvent","styleDropdown","menu","parentElement","offset","menuEnd","p","style","positionClass","dropdownMargin","dropdownPosition","menuWidth","menuHeight","clientWidth","targetLeft","targetTop","targetWidth","targetHeight","leftFullExceed","rightFullExceed","bottomExceed","bottomFullExceed","topExceed","leftExceed","rightExceed","posAjust","margins","getMenuItems","firstElementChild","toggleDropdownDismiss","dropdownDismissHandler","dropdownPreventScroll","dropdownKeyHandler","getCurrentOpenDropdown","currentParent","type","isForm","dropdownClickHandler","activeElement","open","menuItems","dropdownIntersectionHandler","entry","currentElement","currentInstance","modalString","modalComponent","offcanvasComponent","fixedTopClass","fixedBottomClass","stickyTopClass","positionStickyClass","getFixedItems","resetScrollbar","bd","fixedItems","fixed","measureScrollbar","innerWidth","setScrollbar","overflow","bodyPad","sbWidth","itemPadValue","itemMValue","offcanvasString","popupContainer","appendPopup","customContainer","containerIsBody","lookup","BODY","removePopup","hasPopup","backdropString","modalBackdropClass","offcanvasBackdropClass","modalActiveSelector","offcanvasActiveSelector","overlay","getCurrentOpen","toggleOverlayType","isModal","targetClass","appendOverlay","hasFade","showOverlay","hideOverlay","removeOverlay","isVisible","modalSelector","modalToggleSelector","modalDismissSelector","modalStaticClass","modalDefaults","getModalInstance","modalInitCallback","Modal","showModalEvent","shownModalEvent","hideModalEvent","hiddenModalEvent","setModalScrollbar","scrollbarWidth","scrollHeight","modalHeight","modalScrollHeight","modalOverflow","padStyle","toggleModalDismiss","modalDismissHandler","modalKeyHandler","afterModalHide","relatedTarget","focusElement","afterModalShow","beforeModalShow","beforeModalHide","modalClickHandler","currentTarget","isStatic","modalDialog","backdrop","selectedText","targetInsideDialog","staticTransitionEnd","overlayDelay","currentOpen","that","offcanvasSelector","offcanvasToggleSelector","offcanvasDismissSelector","offcanvasTogglingClass","offcanvasDefaults","getOffcanvasInstance","offcanvasInitCallback","Offcanvas","showOffcanvasEvent","shownOffcanvasEvent","hideOffcanvasEvent","hiddenOffcanvasEvent","setOffCanvasScrollbar","toggleOffCanvasDismiss","offcanvasKeyDismissHandler","offcanvasDismissHandler","beforeOffcanvasShow","showOffcanvasComplete","beforeOffcanvasHide","hideOffcanvasComplete","offcanvasTriggerHandler","offCanvasDismiss","selection","visibleTrigger","isOpen","popoverString","popoverComponent","tooltipString","getTipTemplate","tipType","isTooltip","bodyClass","header","body","tipClassPositions","styleTip","tipClasses","tooltip","container","tipPositions","isPopover","tipWidth","tipHeight","htmlcw","htmlch","htmlow","placement","parentCWidth","parentOWidth","fixedParent","leftBoundry","rightBoundry","elemWidth","elemHeight","elemRectLeft","elemRectRight","elemRectTop","y","topPosition","bottomPosition","leftPosition","rightPosition","arrowTop","arrowLeft","arrowRight","arrowWidth","arrowHeight","arrowAdjust","horizontals","verticals","updatedTooltipEvent","tooltipDefaults","_","B","m","n","h","l","u","a","b","g","dataOriginalTitle","tooltipComponent","setHtml","content","sanitizeFn","dirty","tempDocument","createTip","id","template","animation","customClass","dismissible","btnClose","tipString","titleParts","contentParts","placementClass","tooltipTemplate","htmlMarkup","tooltipHeader","tooltipBody","tempTitle","tempContent","tempBtn","getElementContainer","majorBlockTags","containers","parentNode","tooltipSelector","titleAttr","getTooltipInstance","tooltipInitCallback","Tooltip","removeTooltip","offsetParent","hasTip","disposeTooltipComplete","toggleTooltipTitle","toggleTooltipAction","tooltipShownAction","shownTooltipEvent","tooltipHiddenAction","hiddenTooltipEvent","toggleTooltipOpenHandlers","parentModal","parentOffcanvas","titleAtt","tipComponent","elem","position","PositionObserver","outTimer","tipContainer","showTooltipEvent","hideTooltipEvent","enabled","tr","popoverSelector","popoverDefaults","getPopoverInstance","popoverInitCallback","Popover","scrollspyString","scrollspyComponent","scrollspySelector","scrollspyDefaults","getScrollSpyInstance","scrollspyInitCallback","ScrollSpy","activateScrollSpy","updateSpyTargets","scrollTarget","itemsLength","isRoot","links","scrollHEIGHT","href","targetItem","rect","getOffsetHeight","link","toggleObservers","targets","_observer","getScrollHeight","clear","item","activate","parents","parentItem","menuItem","parentLink","scrollTop","maxScroll","items","newActiveItem","offsets","tabString","tabComponent","tabSelector","getTabInstance","tabInitCallback","Tab","showTabEvent","shownTabEvent","hideTabEvent","hiddenTabEvent","tabPrivate","triggerTabEnd","tabContent","nav","triggerTabShow","nextContent","tab","currentHeight","nextHeight","triggerTabHide","getActiveTab","activeTabs","getParentDropdown","dropdown","tabClickHandler","firstTab","firstTabContent","activeDropdown","toggleTab","toastString","toastComponent","toastSelector","toastDismissSelector","toastToggleSelector","showingClass","hideClass","toastDefaults","getToastInstance","toastInitCallback","Toast","showToastEvent","shownToastEvent","hideToastEvent","hiddenToastEvent","showToastComplete","hideToastComplete","hideToast","showToast","toastClickHandler","interactiveToastHandler","isShown","hide","componentsList","initComponentDataAPI","collection","removeComponentDataAPI","context","compData","initCallback","lookUp","elemCollection","cs","init","removeDataAPI","comp"],"mappings":"iCAAK,MAAqEA,GAAkB,mBAAoBC,GAAe,gBAAiDC,GAAa,cAA6EC,GAAY,aAAcC,GAAc,eAAgBC,GAAe,gBAAqYC,GAAa,QAASC,GAAe,UAAWC,GAAgB,WAAsHC,GAAe,UAAuCC,GAAa,QAA6BC,EAAkB,QAA0CC,GAAiB,YAAuCC,GAAkB,QAASC,GAAkB,aAAcC,GAAkB,aAAwQC,GAAmB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AAM,CACzC0nB,EAAQ,SAASlpB,CAAO,GACzBwB,EAAyC,QAAQ,CACpD,CACD,CAEL,EAOa4nB,GAAgBF,GAAyB,CACpD,MAAMG,EAASH,GAAWA,EAAQ,SAAWA,EAAU,SACjDI,EAAiB,CAAC,GAAGrgB,GAAqB,IAAKogB,CAAM,CAAC,EAE7CP,GAAA,QAASS,GAAO,CACvB,KAAA,CAAE,KAAAC,EAAM,SAAAxjB,CAAA,EAAaujB,EAC3BR,GACES,EACAF,EAAe,OAAQvE,GAAS5b,GAAQ4b,EAAM/e,CAAQ,CAAC,CACzD,CAAA,CACD,CACH,EAOayjB,GAAiBP,GAAyB,CACrD,MAAMG,EAASH,GAAWA,EAAQ,SAAWA,EAAU,SAExCJ,GAAA,QAASY,GAAS,CACRT,GAAAS,EAAK,UAAU,KAAML,CAAM,CAAA,CACnD,CACH,EAGA,OAAI,SAAS,KAAmBD,GAAA,EAE9Bpe,EAAY,SAAU,mBAAoB,IAAMoe,GAAA,EAAgB,CAC9D,KAAM,EAAA,CACP","x_google_ignoreList":[0,1,52]} \ No newline at end of file diff --git a/dts.config.cjs b/dts.config.cjs deleted file mode 100644 index 93a13d39..00000000 --- a/dts.config.cjs +++ /dev/null @@ -1,41 +0,0 @@ -const packageJson = require("./package.json"); - -const getPackageName = () => { - return (packageJson.name.includes('@') ? packageJson.name.split('/')[1] : packageJson.name).replace('.', '-'); -}; - -const components = ['alert', 'button', 'carousel', 'collapse', 'dropdown', 'modal', 'offcanvas', 'popover', 'scrollspy', 'tab', 'toast', 'tooltip']; - -/** @param {string} component */ -const componentName = (component) => { - if (component === 'scrollspy') return 'ScrollSpy'; - return component[0].toUpperCase() + component.slice(1); -} - -const config = { - compilationOptions: { - preferredConfigPath: './tsconfig.json', - }, - entries: [ - { - filePath: "src/index.ts", - outFile: `dist/${getPackageName()}.d.ts`, - // noCheck: false, - output: { - umdModuleName: 'BSN', - noBanner: true, - } - }, - ...components.map((component) => ({ - filePath: `src/components/${component}.ts`, - outFile: `dist/components/${component}.d.ts`, - noCheck: false, - output: { - umdModuleName: componentName(component), - noBanner: true, - } - })), - ], -}; - -module.exports = config; diff --git a/package.json b/package.json index b8d561b5..0f50b171 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bootstrap.native", - "version": "5.0.15", + "version": "5.1.0", "author": "thednp", "license": "MIT", "description": "Bootstrap components build with Typescript", @@ -82,11 +82,9 @@ "test-ui": "pnpm pre-test && vitest --config vitest.config-ui.mts --browser=chrome", "clean-coverage": "rm -rf coverage .nyc_output", "badges": "npx -p dependency-version-badge update-badge typescript vitest vite", - "build": "pnpm build-vite && pnpm build-components && pnpm dts && pnpm copy-docs", - "build-vite-with-dts": "vite build && pnpm copy-docs", + "build": "pnpm build-vite && pnpm build-components && pnpm copy-docs", "build-vite": "vite build && pnpm copy-docs", "build-components": "vite build --config vite.config.components.mts", - "dts": "dts-bundle-generator --config ./dts.config.cjs --project ./tsconfig.json", "copy-docs": "cp dist/bootstrap-native.js docs/assets/js/bootstrap-native.js && cp dist/bootstrap-native.js.map docs/assets/js/bootstrap-native.js.map", "lint": "deno lint src && pnpm check:ts", "check:ts": "tsc --noEmit", @@ -111,19 +109,19 @@ ], "dependencies": { "@thednp/event-listener": "^2.0.6", - "@thednp/position-observer": "^0.0.2", - "@thednp/shorty": "^2.0.6" + "@thednp/position-observer": "^0.0.3", + "@thednp/shorty": "^2.0.7" }, "devDependencies": { "@types/node": "^20.17.1", - "@vitest/browser": "^2.1.3", - "@vitest/coverage-istanbul": "^2.1.3", - "@vitest/ui": "^2.1.3", - "dts-bundle-generator": "^9.5.1", + "@vitest/browser": "^2.1.4", + "@vitest/coverage-istanbul": "^2.1.4", + "@vitest/ui": "^2.1.4", "playwright": "^1.48.2", "typescript": "^5.6.3", "vite": "^5.4.10", - "vitest": "^2.1.3" + "vite-plugin-dts": "^4.3.0", + "vitest": "^2.1.4" }, "packageManager": "pnpm@8.6.12", "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e5dcbbb4..af14e73d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,27 +12,24 @@ importers: specifier: ^2.0.6 version: 2.0.6 '@thednp/position-observer': - specifier: ^0.0.2 - version: 0.0.2 + specifier: ^0.0.3 + version: 0.0.3 '@thednp/shorty': - specifier: ^2.0.6 - version: 2.0.6 + specifier: ^2.0.7 + version: 2.0.7 devDependencies: '@types/node': specifier: ^20.17.1 version: 20.17.1 '@vitest/browser': - specifier: ^2.1.3 - version: 2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3) + specifier: ^2.1.4 + version: 2.1.4(@types/node@20.17.1)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.4) '@vitest/coverage-istanbul': - specifier: ^2.1.3 - version: 2.1.3(vitest@2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0)) + specifier: ^2.1.4 + version: 2.1.4(vitest@2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0)) '@vitest/ui': - specifier: ^2.1.3 - version: 2.1.3(vitest@2.1.3) - dts-bundle-generator: - specifier: ^9.5.1 - version: 9.5.1 + specifier: ^2.1.4 + version: 2.1.4(vitest@2.1.4) playwright: specifier: ^1.48.2 version: 1.48.2 @@ -42,9 +39,12 @@ importers: vite: specifier: ^5.4.10 version: 5.4.10(@types/node@20.17.1)(terser@5.33.0) + vite-plugin-dts: + specifier: ^4.3.0 + version: 4.3.0(@types/node@20.17.1)(rollup@4.24.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0)) vitest: - specifier: ^2.1.3 - version: 2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) + specifier: ^2.1.4 + version: 2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) packages: @@ -315,6 +315,19 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@microsoft/api-extractor-model@7.29.8': + resolution: {integrity: sha512-t3Z/xcO6TRbMcnKGVMs4uMzv/gd5j0NhMiJIGjD4cJMeFJ1Hf8wnLSx37vxlRlL0GWlGJhnFgxvnaL6JlS+73g==} + + '@microsoft/api-extractor@7.47.11': + resolution: {integrity: sha512-lrudfbPub5wzBhymfFtgZKuBvXxoSIAdrvS2UbHjoMT2TjIEddq6Z13pcve7A03BAouw0x8sW8G4txdgfiSwpQ==} + hasBin: true + + '@microsoft/tsdoc-config@0.17.0': + resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} + + '@microsoft/tsdoc@0.15.0': + resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + '@mswjs/interceptors@0.36.6': resolution: {integrity: sha512-issnYydStyH0wPEeU7CMwfO7kI668ffVtzKRMRS7H7BliOYuPuwEZxh9dwiXV+oeHBxT5SXT0wPwV8T7V2PJUA==} engines: {node: '>=18'} @@ -335,6 +348,15 @@ packages: '@polka/url@1.0.0-next.28': resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.24.2': resolution: {integrity: sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==} cpu: [arm] @@ -425,6 +447,28 @@ packages: cpu: [x64] os: [win32] + '@rushstack/node-core-library@5.9.0': + resolution: {integrity: sha512-MMsshEWkTbXqxqFxD4gcIUWQOCeBChlGczdZbHfqmNZQFLHB3yWxDFSMHFUdu2/OB9NUk7Awn5qRL+rws4HQNg==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@rushstack/rig-package@0.5.3': + resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} + + '@rushstack/terminal@0.14.2': + resolution: {integrity: sha512-2fC1wqu1VCExKC0/L+0noVcFQEXEnoBOtCIex1TOjBzEDWcw8KzJjjj7aTP6mLxepG0XIyn9OufeFb6SFsa+sg==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@rushstack/ts-command-line@4.23.0': + resolution: {integrity: sha512-jYREBtsxduPV6ptNq8jOKp9+yx0ld1Tb/Tkdnlj8gTjazl1sF3DwX2VbluyYrNd0meWIL0bNeer7WDf5tKFjaQ==} + '@testing-library/dom@10.4.0': resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} engines: {node: '>=18'} @@ -439,14 +483,17 @@ packages: resolution: {integrity: sha512-6u55ydv4+2VHwHU8EJaJXa40QzZ7XOXVo74MMPnGCSzbl0q3yqHfQh8r0Sw/50rutHxecLVQBM/C9Fr0c+m+ew==} engines: {node: '>=16', pnpm: '>=8.6.0'} - '@thednp/position-observer@0.0.2': - resolution: {integrity: sha512-Nd6U18zOhXmfCjsTkvIT8wz7gE+IVubKdRVj+hwPUCT9TW2zN+ZsxKnc94tlxTRa29Ftd0GkuBNjOPofIzb2Bw==} + '@thednp/position-observer@0.0.3': + resolution: {integrity: sha512-O2ukulmlcPhqo0alSn2lvKg9V4k2D/6HpXtD5qYbZyYCEBG1Nd2m97oqRfw5+ivIAh7DxC+wmkWGBkybknU2aA==} engines: {node: '>=16', pnpm: '>=8.6.0'} - '@thednp/shorty@2.0.6': - resolution: {integrity: sha512-yeFSKO7gpw8k9XV84uPbfveiSy38A/1H9HF0QyDb1HBSG0GvPnpZVwyOkMgvkbVTrNXVc/Q6cXbbBnPeaqAWWg==} + '@thednp/shorty@2.0.7': + resolution: {integrity: sha512-PQ388ZznrgnkikwkDCqqFfkGAYWXS2ijFmXD63Ej47Md6VrV5WJqhgQilhu3tSkzddtbDJlz4tQTj4RYVrWUoA==} engines: {node: '>=16', pnpm: '>=8.6.0'} + '@types/argparse@1.0.38': + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + '@types/aria-query@5.0.4': resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} @@ -465,12 +512,12 @@ packages: '@types/tough-cookie@4.0.5': resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - '@vitest/browser@2.1.3': - resolution: {integrity: sha512-PQ2kLLc9q8ukJutuuYsynHSr31E78/dtYEvPy4jCHLht1LmITqXTVTqu7THWdZ1kXNGrWwtdMqtt3z2mvSKdIg==} + '@vitest/browser@2.1.4': + resolution: {integrity: sha512-89SrvShW6kWzmEYtBj5k1gBq88emoC2qrngw5hE1vNpRFteQ5/1URbKIVww391rIALTpzhhCt5yJt5tjLPZxYw==} peerDependencies: playwright: '*' safaridriver: '*' - vitest: 2.1.3 + vitest: 2.1.4 webdriverio: '*' peerDependenciesMeta: playwright: @@ -480,19 +527,18 @@ packages: webdriverio: optional: true - '@vitest/coverage-istanbul@2.1.3': - resolution: {integrity: sha512-FByj6ni54EzA4SXl5X3ugSeeBSI6MSEQBbvPefF6x6GCajePLeZSNYt7u0NOKUQbWpQpAdHHstrqR9ALEpnAxA==} + '@vitest/coverage-istanbul@2.1.4': + resolution: {integrity: sha512-NLmfjzXnRSmLF/h4hYkzjvd7hZ85DRZzPUqXu0McPFCMczDfNmOjMoM3KaxjFaEmOc1YzX9HHbU/Rr9VO+35ow==} peerDependencies: - vitest: 2.1.3 + vitest: 2.1.4 - '@vitest/expect@2.1.3': - resolution: {integrity: sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==} + '@vitest/expect@2.1.4': + resolution: {integrity: sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==} - '@vitest/mocker@2.1.3': - resolution: {integrity: sha512-eSpdY/eJDuOvuTA3ASzCjdithHa+GIF1L4PqtEELl6Qa3XafdMLBpBlZCIUCX2J+Q6sNmjmxtosAG62fK4BlqQ==} + '@vitest/mocker@2.1.4': + resolution: {integrity: sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==} peerDependencies: - '@vitest/spy': 2.1.3 - msw: ^2.3.5 + msw: ^2.4.9 vite: ^5.0.0 peerDependenciesMeta: msw: @@ -500,31 +546,82 @@ packages: vite: optional: true - '@vitest/pretty-format@2.1.3': - resolution: {integrity: sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==} + '@vitest/pretty-format@2.1.4': + resolution: {integrity: sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==} - '@vitest/runner@2.1.3': - resolution: {integrity: sha512-JGzpWqmFJ4fq5ZKHtVO3Xuy1iF2rHGV4d/pdzgkYHm1+gOzNZtqjvyiaDGJytRyMU54qkxpNzCx+PErzJ1/JqQ==} + '@vitest/runner@2.1.4': + resolution: {integrity: sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==} - '@vitest/snapshot@2.1.3': - resolution: {integrity: sha512-qWC2mWc7VAXmjAkEKxrScWHWFyCQx/cmiZtuGqMi+WwqQJ2iURsVY4ZfAK6dVo6K2smKRU6l3BPwqEBvhnpQGg==} + '@vitest/snapshot@2.1.4': + resolution: {integrity: sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==} - '@vitest/spy@2.1.3': - resolution: {integrity: sha512-Nb2UzbcUswzeSP7JksMDaqsI43Sj5+Kry6ry6jQJT4b5gAK+NS9NED6mDb8FlMRCX8m5guaHCDZmqYMMWRy5nQ==} + '@vitest/spy@2.1.4': + resolution: {integrity: sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==} - '@vitest/ui@2.1.3': - resolution: {integrity: sha512-2XwTrHVJw3t9NYES26LQUYy51ZB8W4bRPgqUH2Eyda3kIuOlYw1ZdPNU22qcVlUVx4WKgECFQOSXuopsczuVjQ==} + '@vitest/ui@2.1.4': + resolution: {integrity: sha512-Zd9e5oU063c+j9N9XzGJagCLNvG71x/2tOme3Js4JEZKX55zsgxhJwUgLI8hkN6NjMLpdJO8d7nVUUuPGAA58Q==} peerDependencies: - vitest: 2.1.3 + vitest: 2.1.4 - '@vitest/utils@2.1.3': - resolution: {integrity: sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==} + '@vitest/utils@2.1.4': + resolution: {integrity: sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==} + + '@volar/language-core@2.4.8': + resolution: {integrity: sha512-K/GxMOXGq997bO00cdFhTNuR85xPxj0BEEAy+BaqqayTmy9Tmhfgmq2wpJcVspRhcwfgPoE2/mEJa26emUhG/g==} + + '@volar/source-map@2.4.8': + resolution: {integrity: sha512-jeWJBkC/WivdelMwxKkpFL811uH/jJ1kVxa+c7OvG48DXc3VrP7pplSWPP2W1dLMqBxD+awRlg55FQQfiup4cA==} + + '@volar/typescript@2.4.8': + resolution: {integrity: sha512-6xkIYJ5xxghVBhVywMoPMidDDAFT1OoQeXwa27HSgJ6AiIKRe61RXLoik+14Z7r0JvnblXVsjsRLmCr42SGzqg==} + + '@vue/compiler-core@3.5.12': + resolution: {integrity: sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==} + + '@vue/compiler-dom@3.5.12': + resolution: {integrity: sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==} + + '@vue/compiler-vue2@2.7.16': + resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} + + '@vue/language-core@2.1.6': + resolution: {integrity: sha512-MW569cSky9R/ooKMh6xa2g1D0AtRKbL56k83dzus/bx//RDJk24RHWkMzbAlXjMdDNyxAaagKPRquBIxkxlCkg==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@vue/shared@3.5.12': + resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + + ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -549,6 +646,9 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + aria-query@5.3.0: resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} @@ -559,6 +659,9 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} @@ -607,6 +710,18 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + compare-versions@6.1.1: + resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} + + computeds@0.0.1: + resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -618,6 +733,9 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -638,11 +756,6 @@ packages: dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} - dts-bundle-generator@9.5.1: - resolution: {integrity: sha512-DxpJOb2FNnEyOzMkG11sxO2dmxPjthoVWxfKqWYJ/bI/rT1rvTMktF5EKjAYrRZu6Z6t3NhOUZ0sZ5ZXevOfbA==} - engines: {node: '>=14.0.0'} - hasBin: true - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -655,6 +768,10 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -664,9 +781,19 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + expect-type@1.1.0: + resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fdir@6.4.2: resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} peerDependencies: @@ -685,6 +812,10 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -695,6 +826,9 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -711,6 +845,9 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphql@16.9.0: resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} @@ -719,12 +856,28 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + headers-polyfill@4.0.3: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -758,6 +911,9 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -766,11 +922,27 @@ packages: engines: {node: '>=6'} hasBin: true + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + + local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + loupe@3.1.2: resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} @@ -780,6 +952,10 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -794,6 +970,9 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} + minimatch@3.0.8: + resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -802,6 +981,9 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mlly@1.7.2: + resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==} + mrmime@2.0.0: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} @@ -819,6 +1001,9 @@ packages: typescript: optional: true + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + mute-stream@2.0.0: resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} engines: {node: ^18.17.0 || >=20.5.0} @@ -837,10 +1022,16 @@ packages: package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-scurry@1.11.1: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} @@ -862,6 +1053,9 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + pkg-types@1.2.1: + resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + playwright-core@1.48.2: resolution: {integrity: sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==} engines: {node: '>=18'} @@ -900,9 +1094,17 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + rollup@4.24.2: resolution: {integrity: sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -912,6 +1114,11 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + semver@7.6.3: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} @@ -932,9 +1139,9 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - sirv@2.0.4: - resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} - engines: {node: '>= 10'} + sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} @@ -947,6 +1154,9 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} @@ -960,6 +1170,10 @@ packages: strict-event-emitter@0.5.1: resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -976,10 +1190,22 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + terser@5.33.0: resolution: {integrity: sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g==} engines: {node: '>=10'} @@ -1027,14 +1253,26 @@ packages: resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} engines: {node: '>=16'} + typescript@5.4.2: + resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.6.3: resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -1045,14 +1283,27 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - vite-node@2.1.3: - resolution: {integrity: sha512-I1JadzO+xYX887S39Do+paRePCKoiDrWRRjp9kkG5he0t7RXNvPAJPCQSJqbGN4uCrFFeS3Kj3sLqY8NMYBEdA==} + vite-node@2.1.4: + resolution: {integrity: sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true + vite-plugin-dts@4.3.0: + resolution: {integrity: sha512-LkBJh9IbLwL6/rxh0C1/bOurDrIEmRE7joC+jFdOEEciAFPbpEKOLSAr5nNh5R7CJ45cMbksTrFfy52szzC5eA==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + typescript: '*' + vite: '*' + peerDependenciesMeta: + vite: + optional: true + vite@5.4.10: resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1084,15 +1335,15 @@ packages: terser: optional: true - vitest@2.1.3: - resolution: {integrity: sha512-Zrxbg/WiIvUP2uEzelDNTXmEMJXuzJ1kCpbDvaKByFA9MNeO95V+7r/3ti0qzJzrxdyuUw5VduN7k+D3VmVOSA==} + vitest@2.1.4: + resolution: {integrity: sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.3 - '@vitest/ui': 2.1.3 + '@vitest/browser': 2.1.4 + '@vitest/ui': 2.1.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -1109,6 +1360,9 @@ packages: jsdom: optional: true + vscode-uri@3.0.8: + resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1150,6 +1404,9 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -1413,6 +1670,41 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@microsoft/api-extractor-model@7.29.8(@types/node@20.17.1)': + dependencies: + '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc-config': 0.17.0 + '@rushstack/node-core-library': 5.9.0(@types/node@20.17.1) + transitivePeerDependencies: + - '@types/node' + + '@microsoft/api-extractor@7.47.11(@types/node@20.17.1)': + dependencies: + '@microsoft/api-extractor-model': 7.29.8(@types/node@20.17.1) + '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc-config': 0.17.0 + '@rushstack/node-core-library': 5.9.0(@types/node@20.17.1) + '@rushstack/rig-package': 0.5.3 + '@rushstack/terminal': 0.14.2(@types/node@20.17.1) + '@rushstack/ts-command-line': 4.23.0(@types/node@20.17.1) + lodash: 4.17.21 + minimatch: 3.0.8 + resolve: 1.22.8 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.4.2 + transitivePeerDependencies: + - '@types/node' + + '@microsoft/tsdoc-config@0.17.0': + dependencies: + '@microsoft/tsdoc': 0.15.0 + ajv: 8.12.0 + jju: 1.4.0 + resolve: 1.22.8 + + '@microsoft/tsdoc@0.15.0': {} + '@mswjs/interceptors@0.36.6': dependencies: '@open-draft/deferred-promise': 2.2.0 @@ -1436,6 +1728,14 @@ snapshots: '@polka/url@1.0.0-next.28': {} + '@rollup/pluginutils@5.1.3(rollup@4.24.2)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.24.2 + '@rollup/rollup-android-arm-eabi@4.24.2': optional: true @@ -1490,6 +1790,40 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.24.2': optional: true + '@rushstack/node-core-library@5.9.0(@types/node@20.17.1)': + dependencies: + ajv: 8.13.0 + ajv-draft-04: 1.0.0(ajv@8.13.0) + ajv-formats: 3.0.1(ajv@8.13.0) + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.8 + semver: 7.5.4 + optionalDependencies: + '@types/node': 20.17.1 + + '@rushstack/rig-package@0.5.3': + dependencies: + resolve: 1.22.8 + strip-json-comments: 3.1.1 + + '@rushstack/terminal@0.14.2(@types/node@20.17.1)': + dependencies: + '@rushstack/node-core-library': 5.9.0(@types/node@20.17.1) + supports-color: 8.1.1 + optionalDependencies: + '@types/node': 20.17.1 + + '@rushstack/ts-command-line@4.23.0(@types/node@20.17.1)': + dependencies: + '@rushstack/terminal': 0.14.2(@types/node@20.17.1) + '@types/argparse': 1.0.38 + argparse: 1.0.10 + string-argv: 0.3.2 + transitivePeerDependencies: + - '@types/node' + '@testing-library/dom@10.4.0': dependencies: '@babel/code-frame': 7.26.0 @@ -1507,11 +1841,13 @@ snapshots: '@thednp/event-listener@2.0.6': {} - '@thednp/position-observer@0.0.2': + '@thednp/position-observer@0.0.3': dependencies: - '@thednp/shorty': 2.0.6 + '@thednp/shorty': 2.0.7 - '@thednp/shorty@2.0.6': {} + '@thednp/shorty@2.0.7': {} + + '@types/argparse@1.0.38': {} '@types/aria-query@5.0.4': {} @@ -1527,29 +1863,28 @@ snapshots: '@types/tough-cookie@4.0.5': {} - '@vitest/browser@2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3)': + '@vitest/browser@2.1.4(@types/node@20.17.1)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.4)': dependencies: '@testing-library/dom': 10.4.0 '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) - '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0)) - '@vitest/utils': 2.1.3 + '@vitest/mocker': 2.1.4(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0)) + '@vitest/utils': 2.1.4 magic-string: 0.30.12 msw: 2.5.2(@types/node@20.17.1)(typescript@5.6.3) - sirv: 2.0.4 + sirv: 3.0.0 tinyrainbow: 1.2.0 - vitest: 2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) + vitest: 2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) ws: 8.18.0 optionalDependencies: playwright: 1.48.2 transitivePeerDependencies: - '@types/node' - - '@vitest/spy' - bufferutil - typescript - utf-8-validate - vite - '@vitest/coverage-istanbul@2.1.3(vitest@2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0))': + '@vitest/coverage-istanbul@2.1.4(vitest@2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0))': dependencies: '@istanbuljs/schema': 0.1.3 debug: 4.3.7 @@ -1561,64 +1896,130 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) + vitest: 2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) transitivePeerDependencies: - supports-color - '@vitest/expect@2.1.3': + '@vitest/expect@2.1.4': dependencies: - '@vitest/spy': 2.1.3 - '@vitest/utils': 2.1.3 + '@vitest/spy': 2.1.4 + '@vitest/utils': 2.1.4 chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))': + '@vitest/mocker@2.1.4(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))': dependencies: - '@vitest/spy': 2.1.3 + '@vitest/spy': 2.1.4 estree-walker: 3.0.3 magic-string: 0.30.12 optionalDependencies: msw: 2.5.2(@types/node@20.17.1)(typescript@5.6.3) vite: 5.4.10(@types/node@20.17.1)(terser@5.33.0) - '@vitest/pretty-format@2.1.3': + '@vitest/pretty-format@2.1.4': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.1.3': + '@vitest/runner@2.1.4': dependencies: - '@vitest/utils': 2.1.3 + '@vitest/utils': 2.1.4 pathe: 1.1.2 - '@vitest/snapshot@2.1.3': + '@vitest/snapshot@2.1.4': dependencies: - '@vitest/pretty-format': 2.1.3 + '@vitest/pretty-format': 2.1.4 magic-string: 0.30.12 pathe: 1.1.2 - '@vitest/spy@2.1.3': + '@vitest/spy@2.1.4': dependencies: tinyspy: 3.0.2 - '@vitest/ui@2.1.3(vitest@2.1.3)': + '@vitest/ui@2.1.4(vitest@2.1.4)': dependencies: - '@vitest/utils': 2.1.3 + '@vitest/utils': 2.1.4 fflate: 0.8.2 flatted: 3.3.1 pathe: 1.1.2 - sirv: 2.0.4 + sirv: 3.0.0 tinyglobby: 0.2.10 tinyrainbow: 1.2.0 - vitest: 2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) + vitest: 2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0) - '@vitest/utils@2.1.3': + '@vitest/utils@2.1.4': dependencies: - '@vitest/pretty-format': 2.1.3 + '@vitest/pretty-format': 2.1.4 loupe: 3.1.2 tinyrainbow: 1.2.0 - acorn@8.14.0: - optional: true + '@volar/language-core@2.4.8': + dependencies: + '@volar/source-map': 2.4.8 + + '@volar/source-map@2.4.8': {} + + '@volar/typescript@2.4.8': + dependencies: + '@volar/language-core': 2.4.8 + path-browserify: 1.0.1 + vscode-uri: 3.0.8 + + '@vue/compiler-core@3.5.12': + dependencies: + '@babel/parser': 7.26.1 + '@vue/shared': 3.5.12 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.12': + dependencies: + '@vue/compiler-core': 3.5.12 + '@vue/shared': 3.5.12 + + '@vue/compiler-vue2@2.7.16': + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + + '@vue/language-core@2.1.6(typescript@5.6.3)': + dependencies: + '@volar/language-core': 2.4.8 + '@vue/compiler-dom': 3.5.12 + '@vue/compiler-vue2': 2.7.16 + '@vue/shared': 3.5.12 + computeds: 0.0.1 + minimatch: 9.0.5 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + optionalDependencies: + typescript: 5.6.3 + + '@vue/shared@3.5.12': {} + + acorn@8.14.0: {} + + ajv-draft-04@1.0.0(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv-formats@3.0.1(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv@8.12.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + ajv@8.13.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 ansi-escapes@4.3.2: dependencies: @@ -1636,6 +2037,10 @@ snapshots: ansi-styles@6.2.1: {} + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + aria-query@5.3.0: dependencies: dequal: 2.0.3 @@ -1644,6 +2049,11 @@ snapshots: balanced-match@1.0.2: {} + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 @@ -1694,6 +2104,14 @@ snapshots: commander@2.20.3: optional: true + compare-versions@6.1.1: {} + + computeds@0.0.1: {} + + concat-map@0.0.1: {} + + confbox@0.1.8: {} + convert-source-map@2.0.0: {} cookie@0.5.0: {} @@ -1704,6 +2122,8 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + de-indent@1.0.2: {} + debug@4.3.7: dependencies: ms: 2.1.3 @@ -1714,11 +2134,6 @@ snapshots: dom-accessibility-api@0.5.16: {} - dts-bundle-generator@9.5.1: - dependencies: - typescript: 5.6.3 - yargs: 17.7.2 - eastasianwidth@0.2.0: {} electron-to-chromium@1.5.47: {} @@ -1727,6 +2142,8 @@ snapshots: emoji-regex@9.2.2: {} + entities@4.5.0: {} + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -1755,10 +2172,16 @@ snapshots: escalade@3.2.0: {} + estree-walker@2.0.2: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.6 + expect-type@1.1.0: {} + + fast-deep-equal@3.1.3: {} + fdir@6.4.2(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 @@ -1772,12 +2195,20 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + fsevents@2.3.2: optional: true fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -1793,14 +2224,28 @@ snapshots: globals@11.12.0: {} + graceful-fs@4.2.11: {} + graphql@16.9.0: {} has-flag@4.0.0: {} + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + headers-polyfill@4.0.3: {} html-escaper@2.0.2: {} + import-lazy@4.0.0: {} + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + is-fullwidth-code-point@3.0.0: {} is-node-process@1.2.0: {} @@ -1844,12 +2289,29 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 + jju@1.4.0: {} + js-tokens@4.0.0: {} jsesc@3.0.2: {} + json-schema-traverse@1.0.0: {} + json5@2.2.3: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + + kolorist@1.8.0: {} + + local-pkg@0.5.0: + dependencies: + mlly: 1.7.2 + pkg-types: 1.2.1 + + lodash@4.17.21: {} + loupe@3.1.2: {} lru-cache@10.4.3: {} @@ -1858,6 +2320,10 @@ snapshots: dependencies: yallist: 3.1.1 + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + lz-string@1.5.0: {} magic-string@0.30.12: @@ -1874,12 +2340,23 @@ snapshots: dependencies: semver: 7.6.3 + minimatch@3.0.8: + dependencies: + brace-expansion: 1.1.11 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 minipass@7.1.2: {} + mlly@1.7.2: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + mrmime@2.0.0: {} ms@2.1.3: {} @@ -1908,6 +2385,8 @@ snapshots: transitivePeerDependencies: - '@types/node' + muggle-string@0.4.1: {} + mute-stream@2.0.0: {} nanoid@3.3.7: {} @@ -1918,8 +2397,12 @@ snapshots: package-json-from-dist@1.0.1: {} + path-browserify@1.0.1: {} + path-key@3.1.1: {} + path-parse@1.0.7: {} + path-scurry@1.11.1: dependencies: lru-cache: 10.4.3 @@ -1935,6 +2418,12 @@ snapshots: picomatch@4.0.2: {} + pkg-types@1.2.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.2 + pathe: 1.1.2 + playwright-core@1.48.2: {} playwright@1.48.2: @@ -1967,8 +2456,16 @@ snapshots: require-directory@2.1.1: {} + require-from-string@2.0.2: {} + requires-port@1.0.0: {} + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + rollup@4.24.2: dependencies: '@types/estree': 1.0.6 @@ -1995,6 +2492,10 @@ snapshots: semver@6.3.1: {} + semver@7.5.4: + dependencies: + lru-cache: 6.0.0 + semver@7.6.3: {} shebang-command@2.0.0: @@ -2007,7 +2508,7 @@ snapshots: signal-exit@4.1.0: {} - sirv@2.0.4: + sirv@3.0.0: dependencies: '@polka/url': 1.0.0-next.28 mrmime: 2.0.0 @@ -2021,8 +2522,9 @@ snapshots: source-map: 0.6.1 optional: true - source-map@0.6.1: - optional: true + source-map@0.6.1: {} + + sprintf-js@1.0.3: {} stackback@0.0.2: {} @@ -2032,6 +2534,8 @@ snapshots: strict-event-emitter@0.5.1: {} + string-argv@0.3.2: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -2052,10 +2556,18 @@ snapshots: dependencies: ansi-regex: 6.1.0 + strip-json-comments@3.1.1: {} + supports-color@7.2.0: dependencies: has-flag: 4.0.0 + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + terser@5.33.0: dependencies: '@jridgewell/source-map': 0.3.6 @@ -2098,10 +2610,16 @@ snapshots: type-fest@4.26.1: {} + typescript@5.4.2: {} + typescript@5.6.3: {} + ufo@1.5.4: {} + undici-types@6.19.8: {} + universalify@0.1.2: {} + universalify@0.2.0: {} update-browserslist-db@1.1.1(browserslist@4.24.2): @@ -2110,12 +2628,16 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + url-parse@1.5.10: dependencies: querystringify: 2.2.0 requires-port: 1.0.0 - vite-node@2.1.3(@types/node@20.17.1)(terser@5.33.0): + vite-node@2.1.4(@types/node@20.17.1)(terser@5.33.0): dependencies: cac: 6.7.14 debug: 4.3.7 @@ -2132,6 +2654,25 @@ snapshots: - supports-color - terser + vite-plugin-dts@4.3.0(@types/node@20.17.1)(rollup@4.24.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0)): + dependencies: + '@microsoft/api-extractor': 7.47.11(@types/node@20.17.1) + '@rollup/pluginutils': 5.1.3(rollup@4.24.2) + '@volar/typescript': 2.4.8 + '@vue/language-core': 2.1.6(typescript@5.6.3) + compare-versions: 6.1.1 + debug: 4.3.7 + kolorist: 1.8.0 + local-pkg: 0.5.0 + magic-string: 0.30.12 + typescript: 5.6.3 + optionalDependencies: + vite: 5.4.10(@types/node@20.17.1)(terser@5.33.0) + transitivePeerDependencies: + - '@types/node' + - rollup + - supports-color + vite@5.4.10(@types/node@20.17.1)(terser@5.33.0): dependencies: esbuild: 0.21.5 @@ -2142,17 +2683,18 @@ snapshots: fsevents: 2.3.3 terser: 5.33.0 - vitest@2.1.3(@types/node@20.17.1)(@vitest/browser@2.1.3)(@vitest/ui@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0): + vitest@2.1.4(@types/node@20.17.1)(@vitest/browser@2.1.4)(@vitest/ui@2.1.4)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(terser@5.33.0): dependencies: - '@vitest/expect': 2.1.3 - '@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0)) - '@vitest/pretty-format': 2.1.3 - '@vitest/runner': 2.1.3 - '@vitest/snapshot': 2.1.3 - '@vitest/spy': 2.1.3 - '@vitest/utils': 2.1.3 + '@vitest/expect': 2.1.4 + '@vitest/mocker': 2.1.4(msw@2.5.2(@types/node@20.17.1)(typescript@5.6.3))(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0)) + '@vitest/pretty-format': 2.1.4 + '@vitest/runner': 2.1.4 + '@vitest/snapshot': 2.1.4 + '@vitest/spy': 2.1.4 + '@vitest/utils': 2.1.4 chai: 5.1.2 debug: 4.3.7 + expect-type: 1.1.0 magic-string: 0.30.12 pathe: 1.1.2 std-env: 3.7.0 @@ -2161,12 +2703,12 @@ snapshots: tinypool: 1.0.1 tinyrainbow: 1.2.0 vite: 5.4.10(@types/node@20.17.1)(terser@5.33.0) - vite-node: 2.1.3(@types/node@20.17.1)(terser@5.33.0) + vite-node: 2.1.4(@types/node@20.17.1)(terser@5.33.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.17.1 - '@vitest/browser': 2.1.3(@types/node@20.17.1)(@vitest/spy@2.1.3)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.3) - '@vitest/ui': 2.1.3(vitest@2.1.3) + '@vitest/browser': 2.1.4(@types/node@20.17.1)(playwright@1.48.2)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.1)(terser@5.33.0))(vitest@2.1.4) + '@vitest/ui': 2.1.4(vitest@2.1.4) transitivePeerDependencies: - less - lightningcss @@ -2178,6 +2720,8 @@ snapshots: - supports-color - terser + vscode-uri@3.0.8: {} + which@2.0.2: dependencies: isexe: 2.0.0 @@ -2211,6 +2755,8 @@ snapshots: yallist@3.1.1: {} + yallist@4.0.0: {} + yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/src/components/tooltip.ts b/src/components/tooltip.ts index 11b4ac18..9bf4607d 100644 --- a/src/components/tooltip.ts +++ b/src/components/tooltip.ts @@ -512,7 +512,7 @@ export default class Tooltip extends BaseComponent { // istanbul ignore else @preserve if (!dismissible) action(element, focusoutEvent, this.handleHide); // istanbul ignore else @preserve - if (isApple) { + if (isApple()) { action(element, mouseclickEvent, this.handleFocus); } } diff --git a/vite.config.components.mts b/vite.config.components.mts index 4e36e0d6..a4b61ff7 100644 --- a/vite.config.components.mts +++ b/vite.config.components.mts @@ -1,22 +1,37 @@ import { resolve } from 'path'; import { defineConfig } from 'vite'; +import dts from "vite-plugin-dts"; const components = ['alert', 'button', 'carousel', 'collapse', 'dropdown', 'modal', 'offcanvas', 'popover', 'scrollspy', 'tab', 'toast', 'tooltip']; +const componentNames = {}; + +components.forEach(c => { + componentNames[c] = c === 'scrollspy' ? 'ScrollSpy' : c[0].toUpperCase() + c.slice(1); +}) const componentFile = (entry: string, format: string) => { const ext = format === 'iife' ? 'js' : format === 'es' ? 'mjs' : format; - // const [fileName] = entry.split('/').slice(-1)[0].split('.').slice(0, -1); - // console.log(entry, ext); return `${entry}.${ext}` }; export default defineConfig({ base: './', - build: { + esbuild: { + legalComments: 'none', + }, + plugins: [ + dts({ + outDir: 'dist/components', + copyDtsFiles: true, + rollupTypes: true, + }) + ], + build: { + target: 'ESNext', lib: { // banner: 'BSN', entry: components.map((component) => resolve(__dirname, `src/components/${component}.ts`)), - // name: NAME, + // name: (entry) => componentNames[entry], formats: ['es', 'cjs'], fileName: (format, entry) => componentFile(entry, format), @@ -24,7 +39,7 @@ export default defineConfig({ sourcemap: true, rollupOptions: { treeshake: true, - external: ['@thednp/event-listener', '@thednp/shorty'], + // external: ['@thednp/event-listener', '@thednp/shorty'], output: { dir: resolve(__dirname, 'dist/components'), }, diff --git a/vite.config.mts b/vite.config.mts index 40fb82df..0a3520c2 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -1,6 +1,7 @@ import { resolve } from 'path'; import { defineConfig } from 'vite'; import { name } from './package.json'; +import dts from "vite-plugin-dts"; const getPackageName = () => { return (name.includes('@') ? name.split('/')[1] : name).replace('.', '-'); @@ -20,16 +21,27 @@ export default defineConfig({ "~": resolve(__dirname, "src"), }, }, + esbuild: { + legalComments: 'none', + }, + plugins: [ + dts({ + outDir: 'dist', + copyDtsFiles: true, + rollupTypes: true, + }) + ], base: './', build: { emptyOutDir: true, + target: 'ESNext', lib: { entry: [ resolve(__dirname, 'src/index.ts'), // main file ], name: NAME, formats: ['es', 'cjs', 'iife'], - fileName: (format, entry) => mainFile[format] + fileName: (format) => mainFile[format] }, sourcemap: true, },