Files
omni-parse/web/vendor/tabler/tabler.min.js
Vlad Gothbreach cad71c065c
Some checks failed
ci / test (3.10) (push) Has been cancelled
ci / test (3.11) (push) Has been cancelled
ci / test (3.12) (push) Has been cancelled
ui: локальный Tabler dashboard + 150 проверенных TG-источников и probe 595 каналов
2026-10-27 02:54:29 +03:00

8 lines
145 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* Tabler v1.7.1 (https://tabler.io)
* Copyright 2018-2026 The Tabler Authors
* Copyright 2018-2026 codecalm.net Paweł Kuna
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).tabler={})}(this,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});var e=Object.defineProperty,i=(t,i)=>{let n={};for(var s in t)e(n,s,{get:t[s],enumerable:!0});return i||e(n,Symbol.toStringTag,{value:"Module"}),n},n=new Map,s={set(t,e,i){n.has(t)||n.set(t,new Map);const s=n.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>n.has(t)&&n.get(t).get(e)||null,remove(t,e){if(!n.has(t))return;const i=n.get(t);i.delete(e),0===i.size&&n.delete(t)}},r="transitionend",o=t=>(t&&"undefined"!=typeof CSS&&"function"==typeof CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),a=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),l=t=>{t.dispatchEvent(new Event(r))},c=t=>t&&"object"==typeof t&&void 0!==t.jquery?t[0]:t,h=t=>!(!(t=c(t))||"object"!=typeof t)&&void 0!==t.nodeType,u=t=>(t=c(t),h(t)?t:"string"==typeof t&&t.length>0?document.querySelector(o(t)):null),d=(t,e)=>{const i=c(t);if(h(i)&&!e.contains(i))return i;let n=document.activeElement;for(;n?.shadowRoot?.activeElement;)n=n.shadowRoot.activeElement;return(n instanceof HTMLElement||n instanceof SVGElement)&&n!==document.body&&!e.contains(n)?n:null},p=(t,e)=>{if(!t||!f(t))return;const{activeElement:i}=document;i&&i!==document.body&&!e.contains(i)||t.focus()},f=t=>{if(!h(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},m=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||("disabled"in t&&void 0!==t.disabled?Boolean(t.disabled):t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),_=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?_(t.parentNode):null},g=()=>{},b=t=>{t.offsetHeight},v=()=>"rtl"===document.documentElement.dir,y=()=>!window.jQuery||document.body.hasAttribute("data-bs-no-jquery")||document.body.hasAttribute("data-tblr-no-jquery")?null:window.jQuery,w=[],A=t=>{"loading"===document.readyState?(w.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of w)t()}),w.push(t)):t()},E=t=>{A(()=>{const e=y();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}})},x=(t,e=[],i=t)=>"function"==typeof t?t.call(e[0],...e.slice(1)):i,T=(t,e,i=!0)=>{if(!i)return void x(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);return Number.parseFloat(e)||Number.parseFloat(i)?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(r,o),x(t))};e.addEventListener(r,o),setTimeout(()=>{s||l(e)},n)},C=(t,e,i,n)=>{const s=t.length;let r=t.indexOf(e);return-1===r?!i&&n?t[s-1]:t[0]:(r+=i?1:-1,n&&(r=(r+s)%s),t[Math.max(0,Math.min(r,s-1))])},k=/[^.]*(?=\..*)\.|.*/,S=/\..*/,I=/::\d+$/,O={},D=1,L={mouseenter:"mouseover",mouseleave:"mouseout"},M=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function $(t,e){return e&&`${e}::${D++}`||t.uidEvent||D++}function N(t){const e=$(t);return t.uidEvent=e,O[e]=O[e]||{},O[e]}function P(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function j(t,e,i){const n="string"==typeof e,s=n?i:e||i;let r=W(t);return M.has(r)||(r=t),[n,s,r]}function F(t,e,i,n,s){if("string"!=typeof e||!t)return;let[r,o,a]=j(e,i,n);if(e in L){const t=t=>function(e){const i=e;if(!i.relatedTarget||i.relatedTarget!==i.delegateTarget&&!i.delegateTarget.contains(i.relatedTarget))return t.call(this,e)};o=t(o)}const l=N(t),c=l[a]||(l[a]={}),h=P(c,o,r?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const u=$(o,e.replace(k,"")),d=r?function(t,e,i){return function n(s){const r=t.querySelectorAll(e);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return R(s,{delegateTarget:o}),n.oneOff&&H.off(t,s.type,e,i),i.apply(o,[s])}}(t,i,o):function(t,e){return function i(n){return R(n,{delegateTarget:t}),i.oneOff&&H.off(t,n.type,e),e.apply(t,[n])}}(t,o);d.delegationSelector=r?i:null,d.callable=o,d.oneOff=s,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,r)}function z(t,e,i,n,s){const r=P(e[i],n,s??null);r&&(t.removeEventListener(i,r,Boolean(s)),delete e[i][r.uidEvent])}function B(t,e,i,n){const s=e[i]||{};for(const[r,o]of Object.entries(s))r.includes(n)&&z(t,e,i,o.callable,o.delegationSelector)}function W(t){return t=t.replace(S,""),L[t]||t}var H={on(t,e,i,n){F(t,e,i,n,!1)},one(t,e,i,n){F(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,r,o]=j(e,i,n),a=o!==e,l=N(t),c=l[o]||{},h=e.startsWith(".");if(void 0===r){if(h)for(const i of Object.keys(l))B(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(I,"");a&&!e.includes(s)||z(t,l,o,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;z(t,l,o,r,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=y();let s=null,r=!0,o=!0,a=!1;e!==W(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),r=!s.isPropagationStopped(),o=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=R(new Event(e,{bubbles:r,cancelable:!0}),i);return a&&l.preventDefault(),o&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function R(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function V(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function q(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}var Y=["tblr","bs"],U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${q(e)}`,i)},removeDataAttribute(t,e){for(const i of Y)t.removeAttribute(`data-${i}-${q(e)}`)},getDataAttributes(t){if(!t)return{};const e={};for(const i of Y){const n=Object.keys(t.dataset).filter(t=>t.startsWith(i)&&!t.startsWith(`${i}Config`));for(const s of n){let n=s.replace(new RegExp(`^${i}`),"");n=n.charAt(0).toLowerCase()+n.slice(1),n in e||(e[n]=V(t.dataset[s]))}}return e},getDataAttribute(t,e){for(const i of Y){const n=t.getAttribute(`data-${i}-${q(e)}`);if(null!==n)return V(n)}return null}},K=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=h(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...h(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e){const i=this.constructor,n=e||i.DefaultType;for(const[e,s]of Object.entries(n)){const n=t[e],r=h(n)?"element":a(n);if(!new RegExp(s).test(r))throw new TypeError(`${i.NAME.toUpperCase()}: Option "${e}" provided type "${r}" but expected type "${s}".`)}}},G=class extends K{constructor(t,e){super();const i=u(t);if(!i)return;const n=this.constructor;s.get(i,n.DATA_KEY)?.dispose(),this._element=i,this._config=this._getConfig(e),s.set(this._element,n.DATA_KEY,this)}dispose(){const t=this.constructor;s.remove(this._element,t.DATA_KEY),H.off(this._element,t.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){T(()=>{this._element&&t()},e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return s.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:void 0)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}},X=t=>{let e=t.getAttribute("data-tblr-target")||t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map(t=>o(t)).join(","):null},Q={find:(t,e=document.documentElement)=>Array.from(e.querySelectorAll(t)),findOne:(t,e=document.documentElement)=>e.querySelector(t),children:(t,e)=>Array.from(t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode&&t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode&&n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!m(t)&&f(t))},getSelectorFromElement(t){const e=X(t);return e&&Q.findOne(e)?e:null},getElementFromSelector(t){const e=X(t);return e?Q.findOne(e):null},getMultipleElementsFromSelector(t){const e=X(t);return e?Q.find(e):[]}},Z=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;H.on(document,i,`[data-bs-dismiss="${n}"], [data-tblr-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),m(this))return;const s=Q.getElementFromSelector(this)||this.closest(`.${n}`);((t,e)=>{const i=t[e];"function"==typeof i&&i.call(t)})(t.getOrCreateInstance(s),e)})},J=(t,e,i=null)=>{for(const n of Q.find(t))if(!i||i(n))try{e.getOrCreateInstance(n)}catch(t){console.error(t)}},tt="autosize",et=`resized.bs.${tt}`,it=`[data-bs-toggle="${tt}"], [data-tblr-toggle="${tt}"]`,nt={},st={},rt=class extends G{constructor(t,e){super(t,e),this._observer=null,this._inlineStyle="",this._width=0,this._onInput=()=>this.update(),this._element&&(this._inlineStyle=this._element.getAttribute("style")??"",this._element.style.resize="none",this._element.style.overflowY="hidden",this._element.addEventListener("input",this._onInput),"undefined"!=typeof ResizeObserver&&(this._observer=new ResizeObserver(()=>{this._element.offsetWidth!==this._width&&(this._width=this._element.offsetWidth,this.update())}),this._observer.observe(this._element)),this.update())}static get Default(){return nt}static get DefaultType(){return st}static get NAME(){return tt}update(){const t=this._element;if(!t.isConnected||0===t.getClientRects().length)return;const{scrollTop:e}=document.documentElement,i=getComputedStyle(t),n="border-box"===i.boxSizing?Number.parseFloat(i.borderTopWidth)+Number.parseFloat(i.borderBottomWidth):-(Number.parseFloat(i.paddingTop)+Number.parseFloat(i.paddingBottom)),s=t.style.height;t.style.overflowY="hidden",t.style.height="auto";const r=`${t.scrollHeight+n}px`;t.style.height=r,t.style.overflowY=t.scrollHeight>t.clientHeight?"auto":"hidden",document.documentElement.scrollTop=e,r!==s&&H.trigger(t,et)}dispose(){this._element.removeEventListener("input",this._onInput),this._observer?.disconnect(),this._inlineStyle?this._element.setAttribute("style",this._inlineStyle):this._element.removeAttribute("style"),super.dispose()}};J(it,rt);var ot="clipboard",at=`.bs.${ot}`,lt=`copied${at}`,ct=`error${at}`,ht=`[data-bs-toggle="${ot}"], [data-tblr-toggle="${ot}"]`,ut=`.${ot}-label`,dt=`.${ot}-feedback`,pt={target:null,text:null,delay:2e3},ft={target:"(string|null)",text:"(string|number|null)",delay:"number"},mt=(t,e)=>{e?t.setAttribute("hidden",""):t.removeAttribute("hidden")},_t=class extends G{constructor(t,e){if(super(t,e),this._labels=[],this._feedbacks=[],this._timeout=0,this._element){this._labels=Q.find(ut,this._element),this._feedbacks=Q.find(dt,this._element);for(const t of this._feedbacks)mt(t,!0),t.hasAttribute("role")||t.setAttribute("role","status");H.on(this._element,`click${at}`,t=>{t.preventDefault(),this.copy()})}}static get Default(){return pt}static get DefaultType(){return ft}static get NAME(){return ot}get text(){const{text:t,target:e}=this._config;if(null!==t&&""!==t)return String(t);const i=e?u(e):null;return i?i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement?i.value:(i instanceof HTMLElement?i.innerText:i.textContent??"").trim():""}async copy(){const{text:t}=this;if(t&&navigator.clipboard){try{await navigator.clipboard.writeText(t)}catch{return void H.trigger(this._element,ct)}this._showCopied(),H.trigger(this._element,lt)}else H.trigger(this._element,ct)}reset(){window.clearTimeout(this._timeout),this._toggleCopied(!1)}dispose(){window.clearTimeout(this._timeout),super.dispose()}_mergeConfigObj(t,e){const i=e?.getAttribute("data-bs-text")??e?.getAttribute("data-tblr-text"),n=null==i?{}:{text:i};return super._mergeConfigObj({...n,...t},e)}_showCopied(){window.clearTimeout(this._timeout),this._toggleCopied(!0),this._config.delay>0&&(this._timeout=window.setTimeout(()=>this._toggleCopied(!1),this._config.delay))}_toggleCopied(t){this._element.classList.toggle("copied",t);for(const e of this._labels)mt(e,t);for(const e of this._feedbacks)mt(e,!t)}};J(ht,_t);var gt=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,bt="confetti",vt=`.bs.${bt}`,yt=`start${vt}`,wt=`end${vt}`,At=`click${vt}.data-api`,Et=`${bt}-canvas`,xt=`[data-bs-toggle="${bt}"], [data-tblr-toggle="${bt}"]`,Tt=[["blue","#066fd1"],["azure","#4299e1"],["indigo","#4263eb"],["purple","#ae3ec9"],["pink","#d6336c"],["red","#d63939"],["orange","#f76707"],["yellow","#f59f00"],["lime","#74b816"],["green","#2fb344"],["teal","#0ca678"],["cyan","#17a2b8"]],Ct=1e3/60,kt={count:220,duration:3500,decay:3.5,fade:.15,speed:1,colors:null},St={count:"number",duration:"number",decay:"number",fade:"number",speed:"number",colors:"(array|string|null)"},It={canvas:null,context:null,particles:[],emitters:[],frame:0,lastTick:0,add(t){return this._mount(),!!this.context&&(this.emitters.push(t),this.frame||(this.lastTick=performance.now(),this.frame=requestAnimationFrame(t=>this._tick(t))),!0)},_mount(){if(this.canvas)return;const t=document.createElement("canvas");t.className=Et,t.setAttribute("aria-hidden","true"),Object.assign(t.style,{position:"fixed",inset:"0",width:"100%",height:"100%",zIndex:"9999",pointerEvents:"none",display:"block"});const e=t.getContext("2d");e&&(document.body.append(t),this.canvas=t,this.context=e,this._resize(),window.addEventListener("resize",this._onResize))},_unmount(){cancelAnimationFrame(this.frame),this.frame=0,window.removeEventListener("resize",this._onResize),this.canvas?.remove(),this.canvas=null,this.context=null,this.particles=[],this.emitters=[]},_onResize:()=>{It._resize()},_resize(){if(!this.canvas||!this.context)return;const t=Math.min(window.devicePixelRatio||1,2);this.canvas.width=document.documentElement.clientWidth*t,this.canvas.height=window.innerHeight*t,this.context.setTransform(t,0,0,t,0,0)},_spawn(t){const{colors:e,config:i}=t,n=window.innerHeight/800*i.speed;return{emitter:t,x:Math.random()*window.innerWidth,y:-20-30*Math.random(),w:6+3.6*Math.random(),h:10+4.4*Math.random(),color:e[Math.floor(Math.random()*e.length)]??"#000",vx:1.2*(Math.random()-.5),vy:(1.5+2.1*Math.random())*n,speed:n,angle:Math.random()*Math.PI*2,spin:.25*(Math.random()-.5),flip:Math.random()*Math.PI*2,flipSpeed:.12+.15*Math.random(),sway:Math.random()*Math.PI*2,alpha:1}},_pour(t,e){const{count:i,duration:n,decay:s}=t.config,r=e-t.startedAt;if(t.stopped||r>=n)return;const o=r/n,a=Math.round(i*(1-Math.exp(-s*o))/(1-Math.exp(-s)));for(;t.emitted<a;)this.particles.push(this._spawn(t)),t.emitted++},_tick(t){const e=this.context;if(!e)return;const i=Math.min((t-this.lastTick)/Ct,3);this.lastTick=t;const n=window.innerWidth,s=window.innerHeight;e.clearRect(0,0,n,s);for(const e of this.emitters)this._pour(e,t);for(let t=this.particles.length-1;t>=0;t--){const n=this.particles[t],r=s*(1-n.emitter.config.fade);n.sway+=.05*i,n.vy=Math.min(n.vy+.025*n.speed*i,4.2*n.speed),n.x+=(n.vx+.7*Math.sin(n.sway))*i,n.y+=n.vy*i,n.angle+=n.spin*i,n.flip+=n.flipSpeed*i,n.y>r&&(n.alpha=Math.max(0,1-(n.y-r)/(s-r))),0!==n.alpha?(e.save(),e.globalAlpha=n.alpha,e.translate(n.x,n.y),e.rotate(n.angle),e.scale(1,Math.cos(n.flip)),e.fillStyle=n.color,e.fillRect(-n.w/2,-n.h/2,n.w,n.h),e.restore()):this.particles.splice(t,1)}this._settle(t),0!==this.emitters.length?this.frame=requestAnimationFrame(t=>this._tick(t)):this._unmount()},_settle(t){for(let e=this.emitters.length-1;e>=0;e--){const i=this.emitters[e],n=!i.stopped&&t-i.startedAt<i.config.duration,s=this.particles.some(t=>t.emitter===i);n||s||(this.emitters.splice(e,1),i.done=!0,i.detached||H.trigger(i.element,wt))}}},Ot=class extends G{constructor(t,e){super(t,e),this._emitter=null}static get Default(){return kt}static get DefaultType(){return St}static get NAME(){return bt}burst(){H.trigger(this._element,yt)?.defaultPrevented||(this.stop(),gt()?H.trigger(this._element,wt):(this._emitter={element:this._element,config:this._config,colors:this._colors(),startedAt:performance.now(),emitted:0,stopped:!1,done:!1,detached:!1},It.add(this._emitter)||(this._emitter=null,H.trigger(this._element,wt))))}stop(){this._emitter&&!this._emitter.done&&(this._emitter.stopped=!0),this._emitter=null}dispose(){this._emitter&&(this._emitter.detached=!0),this.stop(),super.dispose()}_configAfterMerge(t){return"string"==typeof t.colors&&(t.colors=t.colors.split(",").map(t=>t.trim()).filter(Boolean)),t}_colors(){const{colors:t}=this._config;if(t&&t.length>0)return t;const e=getComputedStyle(document.documentElement);return Tt.map(([t,i])=>e.getPropertyValue(`--tblr-${t}`).trim()||i)}};H.on(document,At,xt,function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this))return;const e=Q.getElementFromSelector(this)||this,i=U.getDataAttributes(this),n=Ot.getOrCreateInstance(e,i);e!==this&&(n._config=n._getConfig(i)),n.burst()});var Dt="countup",Lt=`.bs.${Dt}`,Mt=`data-${Dt}`,$t=`start${Lt}`,Nt=`complete${Lt}`,Pt=`data-tblr-${Dt}`,jt=`[${Mt}], [${Pt}]`,Ft={autoAnimate:!0,startVal:0,duration:2,decimalPlaces:0,useEasing:!0,useGrouping:!0,separator:",",decimal:".",prefix:"",suffix:"",format:"number",formatter:null},zt={autoAnimate:"boolean",startVal:"number",duration:"number",decimalPlaces:"number",useEasing:"boolean",useGrouping:"boolean",separator:"string",decimal:"string",prefix:"string",suffix:"string",format:"string",formatter:"(function|null)"},Bt=t=>{const e={...t};for(const[i,n]of Object.entries(t)){const t=zt[i];"string"!=typeof n||"number"!==t||""===n.trim()||Number.isNaN(Number(n))?"string"!=typeof n||"boolean"!==t||"true"!==n&&"false"!==n?"number"==typeof n&&"string"===t&&(e[i]=String(n)):e[i]="true"===n:e[i]=Number(n)}return e},Wt=(t,e)=>{if("number"==typeof t)return t;if("time"===e){const e=/^\D{0,32}(\d{1,4}):(\d{1,2})/.exec(t);return e?60*Number(e[1])+Number(e[2]):NaN}return Number.parseFloat(t.replace(/[^0-9.-]/g,""))},Ht=class extends G{constructor(t,e){if(super(t,e),this._endVal=0,this._value=0,this._frame=0,this._observer=null,this._from=0,this._elapsed=0,this._running=!1,this._paused=!1,this._started=!1,!this._element)return;const i=Wt(this._element.textContent??"",this._config.format);Number.isNaN(i)||(this._endVal=i,this._value=this._config.startVal,this._print(this._value),this._config.autoAnimate&&"undefined"!=typeof IntersectionObserver?(this._observer=new IntersectionObserver(t=>this._observerCallback(t)),this._observer.observe(this._element)):this.start())}static get Default(){return Ft}static get DefaultType(){return zt}static get NAME(){return Dt}start(){this._animate(this._value,this._endVal)}reset(){this._stop(),this._started=!1,this._value=this._config.startVal,this._print(this._value)}update(t){const e=Wt(t,this._config.format);Number.isNaN(e)||(this._endVal=e,this._animate(this._value,this._endVal))}pauseResume(){this._paused?(this._paused=!1,this._run()):this._running&&(this._paused=!0,cancelAnimationFrame(this._frame))}dispose(){this._stop(),this._observer?.disconnect(),super.dispose()}_mergeConfigObj(t,e){let i={};const n=e?.getAttribute(Mt)??e?.getAttribute(Pt);if(n)try{const t=JSON.parse(n);t&&"object"==typeof t&&!Array.isArray(t)&&(i=t)}catch{}return super._mergeConfigObj({...Bt(i),...t},e)}_observerCallback(t){t.some(t=>t.isIntersecting)&&(this._observer?.disconnect(),this._observer=null,this._started||this.start())}_animate(t,e){this._stop(),this._started=!0,t===e||this._config.duration<=0||gt()?this._finish(e):(this._from=t,this._elapsed=0,this._running=!0,H.trigger(this._element,$t),this._run())}_run(){const t=1e3*this._config.duration;let e=performance.now();const i=n=>{this._elapsed+=n-e,e=n;const s=Math.min(1,this._elapsed/t),r=this._config.useEasing?(t=>t>=1?1:1024*(1-2**(-10*t))/1023)(s):s;this._value=this._from+(this._endVal-this._from)*r,this._print(this._value),s<1?this._frame=requestAnimationFrame(i):this._finish(this._endVal)};this._frame=requestAnimationFrame(i)}_finish(t){this._running=!1,this._paused=!1,this._value=t,this._print(t),H.trigger(this._element,Nt)}_stop(){cancelAnimationFrame(this._frame),this._running=!1,this._paused=!1}_print(t){this._element.textContent=this._format(t)}_format(t){const{decimalPlaces:e,useGrouping:i,separator:n,decimal:s,prefix:r,suffix:o,format:a,formatter:l}=this._config;if(l)return l(t);if("time"===a){const e=Math.sign(t)*Math.round(Math.abs(t)),i=Math.abs(e);return`${e<0?"-":""}${r}${Math.floor(i/60)}:${String(i%60).padStart(2,"0")}${o}`}const c=t.toFixed(e),[h,u]=c.replace("-","").split("."),d=i?h.replace(/\B(?=(\d{3})+(?!\d))/g,n):h;return`${Number(c)<0?"-":""}${r}${d}${u?s+u:""}${o}`}};J(jt,Ht);var Rt="datepicker",Vt=`.bs.${Rt}`,qt=".data-api",Yt=`change${Vt}`,Ut=`show${Vt}`,Kt=`shown${Vt}`,Gt=`hide${Vt}`,Xt=`hidden${Vt}`,Qt=`focusin${Vt}`,Zt=`click${Vt}${qt}`,Jt=`focusin${Vt}${qt}`,te='[data-bs-toggle="datepicker"], [data-tblr-toggle="datepicker"]',ee='input[type="hidden"], input[name]',ie=/^(\d{4})-(\d{2})-(\d{2})$/,ne=/YYYY|MM|M|DD|D/g,se=["annotations","months","motion","time","weeks"],re=new WeakMap,oe={boundInput:null,datepickerTheme:null,dateMin:null,dateMax:null,dateFormat:null,displayElement:null,displayMonthsCount:1,firstWeekday:1,inline:!1,locale:"default",positionElement:null,selectedDates:[],selectionMode:"single",placement:"left",weekNumbers:!1,vcpOptions:{}},ae={boundInput:"(null|string|element)",datepickerTheme:"(null|string)",dateMin:"(null|string|number|object|date)",dateMax:"(null|string|number|object|date)",dateFormat:"(null|string|object|function)",displayElement:"(null|string|element|boolean)",displayMonthsCount:"number",firstWeekday:"number",inline:"boolean",locale:"string",positionElement:"(null|string|element)",selectedDates:"array",selectionMode:"string",placement:"string",weekNumbers:"boolean",vcpOptions:"object"},le=(t,e=2)=>String(t).padStart(e,"0"),ce=t=>{setTimeout(()=>setTimeout(t))},he=class extends G{constructor(t,e){super(t,e),this._calendar=null,this._isShown=!1,this._isShowing=!1,this._isHiding=!1,this._isSilent=!1,this._skipPluginShow=!1,this._resolveShown=null,this._hideTimeout=0,this._isInput=!1,this._isInline=!1,this._boundInput=null,this._boundInputInside=!1,this._positionElement=null,this._displayElement=null,this._themeObserver=null,this._onFocusIn=null,this._onResize=()=>this._alignToPositionElement(),this._selectedDates=[],this._element&&window.VanillaCalendarPro&&this._initCalendar()}static get Default(){return oe}static get DefaultType(){return ae}static get NAME(){return Rt}get calendar(){return this._calendar}toggle(){return this._config.inline?Promise.resolve():this._isShown?this.hide():this.show()}async show(){if(!this._config.inline&&this._calendar&&!m(this._element)&&!this._isShown&&!this._isShowing&&!H.trigger(this._element,Ut)?.defaultPrevented){this._isShowing=!0,this._skipPluginShow=!1;try{this._calendar.show(),this._isShown||await new Promise(t=>{this._resolveShown=t,ce(t)})}finally{this._resolveShown=null,this._isShowing=!1}}}async hide(){if(!this._config.inline&&this._calendar&&this._isShown&&!H.trigger(this._element,Gt)?.defaultPrevented){this._skipPluginShow=!0,ce(()=>{this._skipPluginShow=!1}),this._isHiding=!0;try{this._calendar.hide()}finally{this._isHiding=!1}}}dispose(){if(window.clearTimeout(this._hideTimeout),this._themeObserver?.disconnect(),window.removeEventListener("resize",this._onResize),this._onFocusIn&&H.off(document,Qt,this._onFocusIn),this._calendar){this._calendar.destroy();const t=this._calendar.context.mainElement;if(t&&t!==this._element&&t.isConnected)if(this._isInput)t.replaceWith(this._element);else if(this._boundInput&&this._boundInputInside){const e=Q.findOne(ee,t);e?e.replaceWith(this._boundInput):t.append(this._boundInput)}}super.dispose()}getSelectedDates(){const t=this._calendar?.context?.selectedDates;return t&&t.length>0?[...t]:[...this._selectedDates]}setSelectedDates(t){this._select(t.map(t=>this._toIsoDate(t))),this._writeSelection(this._selectedDates)}_initCalendar(){this._isInput="INPUT"===this._element.tagName,this._isInline=this._config.inline,this._boundInput=this._resolveBoundInput(),this._boundInputInside=Boolean(this._boundInput&&this._element.contains(this._boundInput)),this._positionElement=this._resolvePositionElement(),this._displayElement=this._resolveDisplayElement(),this._selectedDates=[...this._config.selectedDates],this._calendar=new window.VanillaCalendarPro.Calendar(this._element,this._buildCalendarOptions()),this._calendar.init(),this._boundInput&&!this._boundInput.isConnected&&this._element.after(this._boundInput),this._setupThemeObserver(),this._setupDismissOnFocus(),this._isInput&&this._element.value&&this._parseInputValue();const t=this._boundInput?.value.split(",").filter(t=>ie.test(t));0===this._selectedDates.length&&t?.length&&this._select(t),this._updateDisplayWithSelectedDates()}_updateDisplayWithSelectedDates(){0!==this._selectedDates.length&&this._writeSelection(this._selectedDates)}_writeSelection(t){const e=this._formatDateForInput(t);this._isInput&&(this._element.value=e,re.set(this._element,{text:e,dates:[...t]})),this._boundInput&&(this._boundInput.value=t.join(",")),this._displayElement&&(this._displayElement.textContent=e)}_resolveBoundInput(){const{boundInput:t}=this._config;return t?u(t):this._isInline&&!this._isInput?Q.findOne(ee,this._element):null}_resolvePositionElement(){let{positionElement:t}=this._config;return"string"==typeof t&&(t=u(t)),t||!this._isInput||this._isInline||(t=this._element.closest(".input-icon, .input-group")),t||this._element}_resolveDisplayElement(){const{displayElement:t}=this._config;return"string"==typeof t?u(t):!0===t||null===t&&!this._isInput&&!this._isInline?Q.findOne("[data-bs-datepicker-display], [data-tblr-datepicker-display]",this._element)||this._element:t}_alignToPositionElement(){const t=this._calendar?.context?.mainElement;if(!t||this._isInline||!this._positionElement||this._positionElement===this._element)return;const e=this._positionElement.getBoundingClientRect(),i=t.getBoundingClientRect();let{placement:n}=this._config;"auto"===n&&(n=e.left+i.width>document.documentElement.clientWidth?"right":"left");const s="right"===n?e.right-i.width:"center"===n?e.left+(e.width-i.width)/2:e.left;t.style.left=`${s+window.scrollX}px`}_getThemeAncestor(){return this._element.closest("[data-bs-theme]")}_getEffectiveTheme(){const{datepickerTheme:t}=this._config;return t||this._getThemeAncestor()?.getAttribute("data-bs-theme")||null}_syncThemeAttribute(t){if(!t)return;const e=this._getEffectiveTheme();e?t.setAttribute("data-bs-theme",e):t.removeAttribute("data-bs-theme")}_setupThemeObserver(){const t=this._getThemeAncestor();t&&!this._config.datepickerTheme&&(this._themeObserver=new MutationObserver(()=>{this._syncThemeAttribute(this._calendar?.context?.mainElement)}),this._themeObserver.observe(t,{attributes:!0,attributeFilter:["data-bs-theme"]}))}_setupDismissOnFocus(){this._isInline||(this._onFocusIn=t=>{if(!this._isShown)return;const{target:e}=t,i=this._calendar?.context?.mainElement;e instanceof Node&&(this._element.contains(e)||i?.contains(e))||this.hide()},H.on(document,Qt,this._onFocusIn))}_silently(t){this._isSilent=!0,t(),this._isSilent=!1}_handlePluginShow(){const t=this._calendar;if(!t)return;if(!this._isSilent&&!this._isShown&&(this._skipPluginShow||!this._isShowing&&H.trigger(this._element,Ut)?.defaultPrevented))return void this._silently(()=>t.hide());const e=this._isShown;this._isShown=!0,this._syncThemeAttribute(t.context.mainElement),this._alignToPositionElement(),window.removeEventListener("resize",this._onResize),window.addEventListener("resize",this._onResize),e||H.trigger(this._element,Kt),this._resolveShown?.()}_handlePluginHide(){const t=this._calendar;t&&!this._isSilent&&this._isShown&&(this._isHiding||!H.trigger(this._element,Gt)?.defaultPrevented?(this._isShown=!1,window.removeEventListener("resize",this._onResize),H.trigger(this._element,Xt)):this._silently(()=>t.show()))}_calendarExtensions(t=[]){const e=window.VanillaCalendarPro,i=[...t];for(const t of se){const n=e?.[t];n&&"object"==typeof n&&!i.includes(n)&&i.push(n)}return i}_buildCalendarOptions(){const t=this._getEffectiveTheme(),e=t&&"auto"!==t?t:"system",i=this._config.vcpOptions,n=this._calendarExtensions(i.extensions),s={...i,...n.length>0?{extensions:n}:{},inputMode:!this._isInline,positionToInput:this._config.placement,firstWeekday:this._config.firstWeekday,locale:this._config.locale,selectionDatesMode:this._config.selectionMode,selectedDates:this._config.selectedDates,displayMonthsCount:this._config.displayMonthsCount,enableWeekNumbers:this._config.weekNumbers||Boolean(i.enableWeekNumbers),type:this._config.displayMonthsCount>1?"multiple":"default",selectedTheme:e,themeAttrDetect:"[data-bs-theme]",onClickDate:(t,e)=>this._handleDateClick(t,e),onInit:t=>{this._syncThemeAttribute(t.context.mainElement)},onShow:()=>this._handlePluginShow(),onHide:()=>this._handlePluginHide()},[r]=this._config.selectedDates;if(r){const t=this._parseDate(r);s.selectedMonth=t.getMonth(),s.selectedYear=t.getFullYear()}return this._config.dateMin&&(s.dateMin=this._config.dateMin),this._config.dateMax&&(s.dateMax=this._config.dateMax),s}_handleDateClick(t,e){const i=[...t.context.selectedDates];this._selectedDates=i,this._writeSelection(i);const n={dates:i,event:e};H.trigger(this._element,Yt,n),this._maybeHideAfterSelection(i)}_maybeHideAfterSelection(t){this._isInline||("single"===this._config.selectionMode&&t.length>0||"multiple-ranged"===this._config.selectionMode&&t.length>=2)&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=window.setTimeout(()=>{this.hide()},100))}_parseDate(t){const[e=0,i=1,n=1]=t.split("-").map(Number);return new Date(e,i-1,n)}_formatDate(t){const e=this._parseDate(t),i="default"===this._config.locale?void 0:this._config.locale,{dateFormat:n}=this._config;return"string"==typeof n?((t,e)=>{const i={YYYY:le(t.getFullYear(),4),MM:le(t.getMonth()+1),M:String(t.getMonth()+1),DD:le(t.getDate()),D:String(t.getDate())};return e.replace(ne,t=>i[t])})(e,this._formatPattern()):"function"==typeof n?n(e,i):n&&"object"==typeof n?new Intl.DateTimeFormat(i,n).format(e):e.toLocaleDateString(i)}_formatPattern(){const{dateFormat:t}=this._config;return"string"!=typeof t?null:"iso"===t.toLowerCase()?"YYYY-MM-DD":t}_dateSeparator(){return"multiple-ranged"===this._config.selectionMode?" – ":", "}_formatDateForInput(t){return 0===t.length?"":1===t.length?this._formatDate(t[0]):t.map(t=>this._formatDate(t)).join(this._dateSeparator())}_parseInputValue(){const t=this._element.value.trim();if(!t)return;const e=re.get(this._element);if(e&&e.text.trim()===t)return void this._select(e.dates);const i=this._formatPattern();if(i){const e=("single"===this._config.selectionMode?[t]:t.split(this._dateSeparator())).map(t=>((t,e)=>{const i=[],n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(ne,t=>(i.push(t[0]),"YYYY"===t?"(\\d{4})":2===t.length?"(\\d{2})":"(\\d{1,2})")),s=new RegExp(`^${n}$`).exec(t);if(!s)return null;const r={Y:0,M:1,D:1};i.forEach((t,e)=>{r[t]=Number(s[e+1])});const{Y:o=0,M:a=1,D:l=1}=r,c=new Date(o,a-1,l);return c.getMonth()===a-1&&c.getDate()===l?`${le(o,4)}-${le(a)}-${le(l)}`:null})(t.trim(),i));if(e.every(Boolean))return void this._select(e)}const n=ie.test(t)?this._parseDate(t):new Date(t);Number.isNaN(n.getTime())||this._select([this._toIsoDate(n)])}_select(t){this._selectedDates=[...t],this._calendar?.set({selectedDates:this._selectedDates,...this._monthOf(this._selectedDates[0])})}_toIsoDate(t){if("string"==typeof t&&ie.test(t))return t;const e=t instanceof Date?t:"string"==typeof t&&ie.test(t)?this._parseDate(t):new Date(t);return Number.isNaN(e.getTime())?String(t):`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}_monthOf(t){if(!t||!ie.test(t))return{};const e=this._parseDate(t);return{selectedMonth:e.getMonth(),selectedYear:e.getFullYear()}}};H.on(document,Zt,te,function(t){"INPUT"!==this.tagName&&"true"!==this.dataset.bsInline&&"true"!==this.dataset.tblrInline&&(t.preventDefault(),he.getOrCreateInstance(this).toggle())}),H.on(document,Jt,te,function(){"INPUT"===this.tagName&&he.getOrCreateInstance(this).show()}),J(te,he,t=>{const{dataset:e}=t;return"true"===e.bsInline||"true"===e.tblrInline||"bsSelectedDates"in e||"tblrSelectedDates"in e||"bsBoundInput"in e||"tblrBoundInput"in e||Boolean(t.value)});var ue="data-mask",de="data-mask-visible",pe=`[${ue}]`,fe={mask:"",lazy:!0},me={mask:"(string|function|regexp|object|array)",lazy:"boolean"},_e=class extends G{constructor(t,e){super(t,e),this._mask=null,this._element&&this._config.mask&&window.IMask&&(this._mask=new window.IMask(this._element,{...this._config}))}static get Default(){return fe}static get DefaultType(){return me}static get NAME(){return"input-mask"}get mask(){return this._mask}update(){this._mask?.updateValue()}dispose(){this._mask?.destroy(),super.dispose()}_mergeConfigObj(t,e){const i={},n=e?.getAttribute(ue);return n&&(i.mask=n),e?.hasAttribute(de)&&(i.lazy="false"===e.getAttribute(de)),super._mergeConfigObj({...i,...t},e)}};J(pe,_e);var ge="bottom",be="right",ve="left",ye="auto",we=["top",ge,be,ve],Ae="start",Ee="clippingParents",xe="viewport",Te="popper",Ce="reference",ke=we.reduce(function(t,e){return t.concat([e+"-"+Ae,e+"-end"])},[]),Se=[].concat(we,[ye]).reduce(function(t,e){return t.concat([e,e+"-"+Ae,e+"-end"])},[]),Ie="beforeRead",Oe="read",De="afterRead",Le="beforeMain",Me="main",$e="afterMain",Ne="beforeWrite",Pe="write",je="afterWrite",Fe=[Ie,Oe,De,Le,Me,$e,Ne,Pe,je];function ze(t){return t?(t.nodeName||"").toLowerCase():null}function Be(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function We(t){return t instanceof Be(t).Element||t instanceof Element}function He(t){return t instanceof Be(t).HTMLElement||t instanceof HTMLElement}function Re(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Be(t).ShadowRoot||t instanceof ShadowRoot)}var Ve={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];He(s)&&ze(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});He(n)&&ze(n)&&(Object.assign(n.style,r),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function qe(t){return t.split("-")[0]}var Ye=Math.max,Ue=Math.min,Ke=Math.round;function Ge(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Xe(){return!/^((?!chrome|android).)*safari/i.test(Ge())}function Qe(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,r=1;e&&He(t)&&(s=t.offsetWidth>0&&Ke(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&Ke(n.height)/t.offsetHeight||1);var o=(We(t)?Be(t):window).visualViewport,a=!Xe()&&i,l=(n.left+(a&&o?o.offsetLeft:0))/s,c=(n.top+(a&&o?o.offsetTop:0))/r,h=n.width/s,u=n.height/r;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function Ze(t){var e=Qe(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Je(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Re(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ti(t){return Be(t).getComputedStyle(t)}function ei(t){return["table","td","th"].indexOf(ze(t))>=0}function ii(t){return((We(t)?t.ownerDocument:t.document)||window.document).documentElement}function ni(t){return"html"===ze(t)?t:t.assignedSlot||t.parentNode||(Re(t)?t.host:null)||ii(t)}function si(t){return He(t)&&"fixed"!==ti(t).position?t.offsetParent:null}function ri(t){for(var e=Be(t),i=si(t);i&&ei(i)&&"static"===ti(i).position;)i=si(i);return i&&("html"===ze(i)||"body"===ze(i)&&"static"===ti(i).position)?e:i||function(t){var e=/firefox/i.test(Ge());if(/Trident/i.test(Ge())&&He(t)&&"fixed"===ti(t).position)return null;var i=ni(t);for(Re(i)&&(i=i.host);He(i)&&["html","body"].indexOf(ze(i))<0;){var n=ti(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function oi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ai(t,e,i){return Ye(t,Ue(e,i))}function li(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ci(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}var hi={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,r=i.elements.arrow,o=i.modifiersData.popperOffsets,a=qe(i.placement),l=oi(a),c=["left","right"].indexOf(a)>=0?"height":"width";if(r&&o){var h=function(t,e){return li("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ci(t,we))}(s.padding,i),u=Ze(r),d="y"===l?"top":ve,p="y"===l?ge:be,f=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],m=o[l]-i.rects.reference[l],_=ri(r),g=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,b=f/2-m/2,v=h[d],y=g-u[c]-h[p],w=g/2-u[c]/2+b,A=ai(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Je(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ui(t){return t.split("-")[1]}var di={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pi(t){var e,i=t.popper,n=t.popperRect,s=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=t.isFixed,d=o.x,p=void 0===d?0:d,f=o.y,m=void 0===f?0:f,_="function"==typeof h?h({x:p,y:m}):{x:p,y:m};p=_.x,m=_.y;var g=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=ve,y="top",w=window;if(c){var A=ri(i),E="clientHeight",x="clientWidth";A===Be(i)&&"static"!==ti(A=ii(i)).position&&"absolute"===a&&(E="scrollHeight",x="scrollWidth"),("top"===s||("left"===s||"right"===s)&&"end"===r)&&(y=ge,m-=(u&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,m*=l?1:-1),"left"!==s&&("top"!==s&&"bottom"!==s||"end"!==r)||(v=be,p-=(u&&A===w&&w.visualViewport?w.visualViewport.width:A[x])-n.width,p*=l?1:-1)}var T,C=Object.assign({position:a},c&&di),k=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Ke(i*s)/s||0,y:Ke(n*s)/s||0}}({x:p,y:m},Be(i)):{x:p,y:m};return p=k.x,m=k.y,l?Object.assign({},C,((T={})[y]=b?"0":"",T[v]=g?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",T)):Object.assign({},C,((e={})[y]=b?m+"px":"",e[v]=g?p+"px":"",e.transform="",e))}var fi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,r=i.adaptive,o=void 0===r||r,a=i.roundOffsets,l=void 0===a||a,c={placement:qe(e.placement),variation:ui(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,pi(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,pi(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},mi={passive:!0},_i={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,r=void 0===s||s,o=n.resize,a=void 0===o||o,l=Be(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(t){t.addEventListener("scroll",i.update,mi)}),a&&l.addEventListener("resize",i.update,mi),function(){r&&c.forEach(function(t){t.removeEventListener("scroll",i.update,mi)}),a&&l.removeEventListener("resize",i.update,mi)}},data:{}},gi={left:"right",right:"left",bottom:"top",top:"bottom"};function bi(t){return t.replace(/left|right|bottom|top/g,function(t){return gi[t]})}var vi={start:"end",end:"start"};function yi(t){return t.replace(/start|end/g,function(t){return vi[t]})}function wi(t){var e=Be(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ai(t){return Qe(ii(t)).left+wi(t).scrollLeft}function Ei(t){var e=ti(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function xi(t){return["html","body","#document"].indexOf(ze(t))>=0?t.ownerDocument.body:He(t)&&Ei(t)?t:xi(ni(t))}function Ti(t,e){var i;void 0===e&&(e=[]);var n=xi(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),r=Be(n),o=s?[r].concat(r.visualViewport||[],Ei(n)?n:[]):n,a=e.concat(o);return s?a:a.concat(Ti(ni(o)))}function Ci(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ki(t,e,i){return"viewport"===e?Ci(function(t,e){var i=Be(t),n=ii(t),s=i.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=Xe();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+Ai(t),y:l}}(t,i)):We(e)?function(t,e){var i=Qe(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Ci(function(t){var e,i=ii(t),n=wi(t),s=null==(e=t.ownerDocument)?void 0:e.body,r=Ye(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Ye(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Ai(t),l=-n.scrollTop;return"rtl"===ti(s||i).direction&&(a+=Ye(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}(ii(t)))}function Si(t){var e,i=t.reference,n=t.element,s=t.placement,r=s?qe(s):null,o=s?ui(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(r){case"top":e={x:a,y:i.y-n.height};break;case ge:e={x:a,y:i.y+i.height};break;case be:e={x:i.x+i.width,y:l};break;case ve:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=r?oi(r):null;if(null!=c){var h="y"===c?"height":"width";switch(o){case Ae:e[c]=e[c]-(i[h]/2-n[h]/2);break;case"end":e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function Ii(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,r=i.strategy,o=void 0===r?t.strategy:r,a=i.boundary,l=void 0===a?Ee:a,c=i.rootBoundary,h=void 0===c?xe:c,u=i.elementContext,d=void 0===u?Te:u,p=i.altBoundary,f=void 0!==p&&p,m=i.padding,_=void 0===m?0:m,g=li("number"!=typeof _?_:ci(_,we)),b="popper"===d?Ce:Te,v=t.rects.popper,y=t.elements[f?b:d],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=Ti(ni(t)),i=["absolute","fixed"].indexOf(ti(t).position)>=0&&He(t)?ri(t):t;return We(i)?e.filter(function(t){return We(t)&&Je(t,i)&&"body"!==ze(t)}):[]}(t):[].concat(e),r=[].concat(s,[i]),o=r[0],a=r.reduce(function(e,i){var s=ki(t,i,n);return e.top=Ye(s.top,e.top),e.right=Ue(s.right,e.right),e.bottom=Ue(s.bottom,e.bottom),e.left=Ye(s.left,e.left),e},ki(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(We(y)?y:y.contextElement||ii(t.elements.popper),l,h,o),A=Qe(t.elements.reference),E=Si({reference:A,element:v,strategy:"absolute",placement:s}),x=Ci(Object.assign({},v,E)),T="popper"===d?x:A,C={top:w.top-T.top+g.top,bottom:T.bottom-w.bottom+g.bottom,left:w.left-T.left+g.left,right:T.right-w.right+g.right},k=t.modifiersData.offset;if("popper"===d&&k){var S=k[s];Object.keys(C).forEach(function(t){var e=["right","bottom"].indexOf(t)>=0?1:-1,i=["top","bottom"].indexOf(t)>=0?"y":"x";C[t]+=S[i]*e})}return C}function Oi(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,r=i.rootBoundary,o=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Se:l,h=ui(n),u=h?a?ke:ke.filter(function(t){return ui(t)===h}):we,d=u.filter(function(t){return c.indexOf(t)>=0});0===d.length&&(d=u);var p=d.reduce(function(e,i){return e[i]=Ii(t,{placement:i,boundary:s,rootBoundary:r,padding:o})[qe(i)],e},{});return Object.keys(p).sort(function(t,e){return p[t]-p[e]})}var Di={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,r=void 0===s||s,o=i.altAxis,a=void 0===o||o,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,m=i.allowedAutoPlacements,_=e.options.placement,g=qe(_)===_,b=l||(g||!f?[bi(_)]:function(t){if("auto"===qe(t))return[];var e=bi(t);return[yi(t),e,yi(e)]}(_)),v=[_].concat(b).reduce(function(t,i){return t.concat("auto"===qe(i)?Oi(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:m}):i)},[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,x=v[0],T=0;T<v.length;T++){var C=v[T],k=qe(C),S=ui(C)===Ae,I=["top",ge].indexOf(k)>=0,O=I?"width":"height",D=Ii(e,{placement:C,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),L=I?S?be:ve:S?ge:"top";y[O]>w[O]&&(L=bi(L));var M=bi(L),$=[];if(r&&$.push(D[k]<=0),a&&$.push(D[L]<=0,D[M]<=0),$.every(function(t){return t})){x=C,E=!1;break}A.set(C,$)}if(E)for(var N=function(t){var e=v.find(function(e){var i=A.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return x=e,"break"},P=f?3:1;P>0&&"break"!==N(P);P--);e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Li(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Mi(t){return["top",be,ge,ve].some(function(e){return t[e]>=0})}var $i={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=Ii(e,{elementContext:"reference"}),a=Ii(e,{altBoundary:!0}),l=Li(o,n),c=Li(a,s,r),h=Mi(l),u=Mi(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}},Ni={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,r=void 0===s?[0,0]:s,o=Se.reduce(function(t,i){return t[i]=function(t,e,i){var n=qe(t),s=["left","top"].indexOf(n)>=0?-1:1,r="function"==typeof i?i(Object.assign({},e,{placement:t})):i,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,["left","right"].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}(i,e.rects,r),t},{}),a=o[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=o}},Pi={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=Si({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},ji={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,r=void 0===s||s,o=i.altAxis,a=void 0!==o&&o,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,_=Ii(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),g=qe(e.placement),b=ui(e.placement),v=!b,y=oi(g),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,x=e.rects.popper,T="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,C="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),k=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(A){if(r){var I,O="y"===y?"top":ve,D="y"===y?ge:be,L="y"===y?"height":"width",M=A[y],$=M+_[O],N=M-_[D],P=p?-x[L]/2:0,j="start"===b?E[L]:x[L],F="start"===b?-x[L]:-E[L],z=e.elements.arrow,B=p&&z?Ze(z):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=W[O],R=W[D],V=ai(0,E[L],B[L]),q=v?E[L]/2-P-V-H-C.mainAxis:j-V-H-C.mainAxis,Y=v?-E[L]/2+P+V+R+C.mainAxis:F+V+R+C.mainAxis,U=e.elements.arrow&&ri(e.elements.arrow),K=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,G=null!=(I=null==k?void 0:k[y])?I:0,X=M+Y-G,Q=ai(p?Ue($,M+q-G-K):$,M,p?Ye(N,X):N);A[y]=Q,S[y]=Q-M}if(a){var Z,J="x"===y?"top":ve,tt="x"===y?ge:be,et=A[w],it="y"===w?"height":"width",nt=et+_[J],st=et-_[tt],rt=-1!==["top",ve].indexOf(g),ot=null!=(Z=null==k?void 0:k[w])?Z:0,at=rt?nt:et-E[it]-x[it]-ot+C.altAxis,lt=rt?et+E[it]+x[it]-ot-C.altAxis:st,ct=p&&rt?function(t,e,i){var n=ai(t,e,i);return n>i?i:n}(at,et,lt):ai(p?at:nt,et,p?lt:st);A[w]=ct,S[w]=ct-et}e.modifiersData[n]=S}},requiresIfExists:["offset"]};function Fi(t,e,i){void 0===i&&(i=!1);var n,s,r=He(e),o=He(e)&&function(t){var e=t.getBoundingClientRect(),i=Ke(e.width)/t.offsetWidth||1,n=Ke(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=ii(e),l=Qe(t,o,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(r||!r&&!i)&&(("body"!==ze(e)||Ei(a))&&(c=(n=e)!==Be(n)&&He(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:wi(n)),He(e)?((h=Qe(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Ai(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function zi(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var Bi={placement:"bottom",modifiers:[],strategy:"absolute"};function Wi(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Hi(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,r=void 0===s?Bi:s;return function(t,e,i){void 0===i&&(i=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Bi,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:We(t)?Ti(t):t.contextElement?Ti(t.contextElement):[],popper:Ti(e)};var o,c,d=function(t){var e=zi(t);return Fe.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((o=[].concat(n,a.options.modifiers),c=o.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=d.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var r=s({state:a,name:e,instance:h,options:n});l.push(r||function(){})}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(Wi(e,i)){a.rects={reference:Fi(e,ri(i),"fixed"===a.options.strategy),popper:Ze(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],r=s.fn,o=s.options,l=void 0===o?{}:o,u=s.name;"function"==typeof r&&(a=r({state:a,options:l,name:u,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){u(),c=!0}};if(!Wi(t,e))return h;function u(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var Ri=Hi(),Vi=Hi({defaultModifiers:[_i,Pi,fi,Ve]}),qi=Hi({defaultModifiers:[_i,Pi,fi,Ve,Ni,Di,ji,hi,$i]}),Yi=i({afterMain:()=>$e,afterRead:()=>De,afterWrite:()=>je,applyStyles:()=>Ve,arrow:()=>hi,auto:()=>ye,basePlacements:()=>we,beforeMain:()=>Le,beforeRead:()=>Ie,beforeWrite:()=>Ne,bottom:()=>ge,clippingParents:()=>Ee,computeStyles:()=>fi,createPopper:()=>qi,createPopperBase:()=>Ri,createPopperLite:()=>Vi,detectOverflow:()=>Ii,end:()=>"end",eventListeners:()=>_i,flip:()=>Di,hide:()=>$i,left:()=>ve,main:()=>Me,modifierPhases:()=>Fe,offset:()=>Ni,placements:()=>Se,popper:()=>Te,popperGenerator:()=>Hi,popperOffsets:()=>Pi,preventOverflow:()=>ji,read:()=>Oe,reference:()=>Ce,right:()=>be,start:()=>Ae,top:()=>"top",variationPlacements:()=>ke,viewport:()=>xe,write:()=>Pe}),Ui=".bs.alert",Ki=`close${Ui}`,Gi=`closed${Ui}`,Xi=class t extends G{static get NAME(){return"alert"}close(){if(H.trigger(this._element,Ki)?.defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),H.trigger(this._element,Gi),this.dispose()}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e](this)}})}};Z(Xi,"close"),E(Xi);var Qi='[data-bs-toggle="button"], [data-tblr-toggle="button"]',Zi=class t extends G{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",String(this._element.classList.toggle("active")))}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this);"toggle"===e&&i.toggle()})}};H.on(document,"click.bs.button.data-api",Qi,t=>{t.preventDefault();const e=t.target?.closest(Qi);e&&Zi.getOrCreateInstance(e).toggle()}),E(Zi);var Ji=".bs.swipe",tn=`touchstart${Ji}`,en=`touchmove${Ji}`,nn=`touchend${Ji}`,sn=`pointerdown${Ji}`,rn=`pointerup${Ji}`,on={endCallback:null,leftCallback:null,rightCallback:null},an={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},ln=class t extends K{constructor(e,i){super(),this._element=e,e&&t.isSupported()&&(this._config=this._getConfig(i),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return on}static get DefaultType(){return an}static get NAME(){return"swipe"}dispose(){H.off(this._element,Ji)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),x(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&x(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(H.on(this._element,sn,t=>this._start(t)),H.on(this._element,rn,t=>this._end(t)),this._element.classList.add("pointer-event")):(H.on(this._element,tn,t=>this._start(t)),H.on(this._element,en,t=>this._move(t)),H.on(this._element,nn,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}},cn=".bs.carousel",hn=".data-api",un="ArrowLeft",dn="ArrowRight",pn="next",fn="prev",mn="left",_n="right",gn=`slide${cn}`,bn=`slid${cn}`,vn=`keydown${cn}`,yn=`mouseenter${cn}`,wn=`mouseleave${cn}`,An=`dragstart${cn}`,En=`load${cn}${hn}`,xn=`click${cn}${hn}`,Tn="carousel",Cn="active",kn={[un]:_n,[dn]:mn},Sn={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},In={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},On=class t extends G{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Tn&&this.cycle()}static get Default(){return Sn}static get DefaultType(){return In}static get NAME(){return"carousel"}next(){this._slide(pn)}nextWhenVisible(){!document.hidden&&f(this._element)&&this.next()}prev(){this._slide(fn)}pause(){this._isSliding&&l(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?H.one(this._element,bn,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void H.one(this._element,bn,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?pn:fn;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&H.on(this._element,vn,t=>this._keydown(t)),"hover"===this._config.pause&&(H.on(this._element,yn,()=>this.pause()),H.on(this._element,wn,()=>this._maybeEnableCycle())),this._config.touch&&ln.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Q.find(".carousel-item img",this._element))H.on(t,An,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(mn)),rightCallback:()=>this._slide(this._directionToOrder(_n)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ln(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=kn[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Q.findOne(".active",this._indicatorsElement);e.classList.remove(Cn),e.removeAttribute("aria-current");const i=Q.findOne(`[data-bs-slide-to="${t}"], [data-tblr-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Cn),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval")||t.getAttribute("data-tblr-interval")||"",10);this._config.interval=e||(this._config.defaultInterval??this._config.interval)}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===pn,s=e||C(this._getItems(),i,n,this._config.wrap);if(s===i)return;const r=this._getItemIndex(s),o=e=>H.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:r});if(o(gn)?.defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),b(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Cn),i.classList.remove(Cn,c,l),this._isSliding=!1,o(bn)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Q.findOne(".active.carousel-item",this._element)}_getItems(){return Q.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return v()?t===mn?fn:pn:t===mn?pn:fn}_orderToDirection(t){return v()?t===fn?mn:_n:t===fn?_n:mn}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e]()}}else i.to(e)})}};H.on(document,xn,"[data-bs-slide], [data-bs-slide-to], [data-tblr-slide], [data-tblr-slide-to]",function(t){const e=Q.getElementFromSelector(this);if(!e||!e.classList.contains(Tn))return;t.preventDefault();const i=On.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to")||this.getAttribute("data-tblr-slide-to");return n?(i.to(Number(n)),void i._maybeEnableCycle()):"next"===U.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),H.on(window,En,()=>{const t=Q.find('[data-bs-ride="carousel"], [data-tblr-ride="carousel"]');for(const e of t)On.getOrCreateInstance(e)}),E(On);var Dn=".bs.collapse",Ln=`show${Dn}`,Mn=`shown${Dn}`,$n=`hide${Dn}`,Nn=`hidden${Dn}`,Pn=`click${Dn}.data-api`,jn="show",Fn="collapse",zn="collapsing",Bn=`:scope .${Fn} .${Fn}`,Wn='[data-bs-toggle="collapse"], [data-tblr-toggle="collapse"]',Hn={parent:null,toggle:!0},Rn={parent:"(null|element)",toggle:"boolean"},Vn=class t extends G{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=Q.find(Wn);for(const t of i){const e=Q.getSelectorFromElement(t),i=Q.find(e).filter(t=>t===this._element);null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Hn}static get DefaultType(){return Rn}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(e=>t.getOrCreateInstance(e,{toggle:!1}))),e.length&&e[0]._isTransitioning)return;if(H.trigger(this._element,Ln)?.defaultPrevented)return;for(const t of e)t.hide();const i=this._getDimension();this._element.classList.remove(Fn),this._element.classList.add(zn),this._element.style[i]="0",this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(zn),this._element.classList.add(Fn,jn),this._element.style[i]="",H.trigger(this._element,Mn)},this._element,!0),this._element.style[i]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(H.trigger(this._element,$n)?.defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,b(this._element),this._element.classList.add(zn),this._element.classList.remove(Fn,jn);for(const t of this._triggerArray){const e=Q.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(zn),this._element.classList.add(Fn),H.trigger(this._element,Nn)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(jn)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Wn);for(const e of t){const t=Q.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Q.find(Bn,this._config.parent);return Q.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",String(e))}static jQueryInterface(e){const i={};return"string"==typeof e&&/show|hide/.test(e)&&(i.toggle=!1),this.each(function(){const n=t.getOrCreateInstance(this,i);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}})}};H.on(document,Pn,Wn,function(t){const{delegateTarget:e}=t;("A"===t.target.tagName||e&&"A"===e.tagName)&&t.preventDefault();for(const t of Q.getMultipleElementsFromSelector(this))Vn.getOrCreateInstance(t,{toggle:!1}).toggle()}),E(Vn);var qn="dropdown",Yn=".bs.dropdown",Un=".data-api",Kn="ArrowUp",Gn="ArrowDown",Xn=`hide${Yn}`,Qn=`hidden${Yn}`,Zn=`show${Yn}`,Jn=`shown${Yn}`,ts=`click${Yn}${Un}`,es=`keydown${Yn}${Un}`,is=`keyup${Yn}${Un}`,ns="show",ss='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled), [data-tblr-toggle="dropdown"]:not(.disabled):not(:disabled)',rs=ss.split(", ").map(t=>`${t}.${ns}`).join(", "),os=".dropdown-menu",as=v()?"top-end":"top-start",ls=v()?"top-start":"top-end",cs=v()?"bottom-end":"bottom-start",hs=v()?"bottom-start":"bottom-end",us=v()?"left-start":"right-start",ds=v()?"right-start":"left-start",ps={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},fs={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"},ms=class t extends G{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Q.next(this._element,os)[0]||Q.prev(this._element,os)[0]||Q.findOne(os,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ps}static get DefaultType(){return fs}static get NAME(){return qn}toggle(){this._isShown()?this.hide():this.show()}show(){if(m(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!H.trigger(this._element,Zn,t)?.defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of Array.from(document.body.children))H.on(t,"mouseover",g);this._element.focus(),this._element.setAttribute("aria-expanded","true"),this._menu.classList.add(ns),this._element.classList.add(ns),H.trigger(this._element,Jn,t)}}hide(){if(m(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!H.trigger(this._element,Xn,t)?.defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of Array.from(document.body.children))H.off(t,"mouseover",g);this._popper&&this._popper.destroy(),this._menu.classList.remove(ns),this._element.classList.remove(ns),this._element.setAttribute("aria-expanded","false"),U.removeDataAttribute(this._menu,"popper"),H.trigger(this._element,Qn,t)}}_getConfig(t){const e=super._getConfig(t);if("object"==typeof e.reference&&!h(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${qn.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===Yi)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let t=this._element;"parent"===this._config.reference?t=this._parent:h(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=qi(t,this._menu,e)}_isShown(){return this._menu.classList.contains(ns)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return us;if(t.classList.contains("dropstart"))return ds;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ls:as:e?hs:cs}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};(this._inNavbar||"static"===this._config.display)&&(U.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]);const e=x(this._config.popperConfig,[void 0,t]);return{...t,..."object"==typeof e&&null!==e?e:{}}}_selectMenuItem({key:t,target:e}){const i=Q.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>f(t));if(!i.length)return;const n=e;C(i,n,t===Gn,!i.includes(n)).focus()}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const i=Q.find(rs);for(const n of i){const i=t.getInstance(n);if(!i||!1===i._config.autoClose)continue;const s=e.composedPath(),r=s.includes(i._menu);if(s.includes(i._element)||"inside"===i._config.autoClose&&!r||"outside"===i._config.autoClose&&r)continue;if(i._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:i._element};"click"===e.type&&(o.clickEvent=e),i._completeHide(o)}}static dataApiKeydownHandler(e){const i=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,s=[Kn,Gn].includes(e.key);if(!s&&!n)return;if(i&&!n)return;e.preventDefault();const r=this.matches(ss)?this:Q.prev(this,ss)[0]||Q.next(this,ss)[0]||Q.findOne(ss,e.delegateTarget.parentNode),o=t.getOrCreateInstance(r);if(s)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),r.focus())}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}})}};H.on(document,es,ss,ms.dataApiKeydownHandler),H.on(document,es,os,ms.dataApiKeydownHandler),H.on(document,ts,ms.clearMenus),H.on(document,is,ms.clearMenus),H.on(document,ts,ss,function(t){t.preventDefault(),ms.getOrCreateInstance(this).toggle()}),E(ms);var _s="backdrop",gs="show",bs=`mousedown.bs.${_s}`,vs={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ys={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"},ws=class extends K{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return vs}static get DefaultType(){return ys}static get NAME(){return _s}show(t){if(!this._config.isVisible)return void x(t);this._append();const e=this._getElement();this._config.isAnimated&&b(e),e.classList.add(gs),this._emulateAnimation(()=>{x(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(gs),this._emulateAnimation(()=>{this.dispose(),x(t)})):x(t)}dispose(){this._isAppended&&(H.off(this._element,bs),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),H.on(t,bs,()=>{x(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){T(t,this._getElement(),this._config.isAnimated)}},As=".bs.focustrap",Es=`focusin${As}`,xs=`keydown.tab${As}`,Ts="backward",Cs={autofocus:!0,trapElement:null},ks={autofocus:"boolean",trapElement:"element"},Ss=class extends K{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Cs}static get DefaultType(){return ks}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),H.off(document,As),H.on(document,Es,t=>this._handleFocusin(t)),H.on(document,xs,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,H.off(document,As))}_handleFocusin(t){const{trapElement:e}=this._config;if(!e||t.target===document||t.target===e||e.contains(t.target))return;const i=Q.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Ts?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ts:"forward")}},Is=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Os=".sticky-top",Ds="padding-right",Ls="margin-right",Ms=class{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ds,e=>e+t),this._setElementAttributes(Is,Ds,e=>e+t),this._setElementAttributes(Os,Ls,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ds),this._resetElementAttributes(Is,Ds),this._resetElementAttributes(Os,Ls)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=U.getDataAttribute(t,e);null!==i?(U.removeDataAttribute(t,e),t.style.setProperty(e,String(i))):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(h(t))e(t);else for(const i of Q.find(t,this._element))e(i)}},$s=".bs.modal",Ns=`hide${$s}`,Ps=`hidePrevented${$s}`,js=`hidden${$s}`,Fs=`show${$s}`,zs=`shown${$s}`,Bs=`resize${$s}`,Ws=`click.dismiss${$s}`,Hs=`mousedown.dismiss${$s}`,Rs=`keydown.dismiss${$s}`,Vs=`click${$s}.data-api`,qs="modal-open",Ys="show",Us="modal-static",Ks={backdrop:!0,focus:!0,keyboard:!0},Gs={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"},Xs=class t extends G{constructor(t,e){super(t,e),this._dialog=Q.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._returnFocusTarget=null,this._scrollBar=new Ms,this._addEventListeners()}static get Default(){return Ks}static get DefaultType(){return Gs}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||H.trigger(this._element,Fs,{relatedTarget:t})?.defaultPrevented||(this._returnFocusTarget=d(t,this._element),this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(qs),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){if(!this._isShown||this._isTransitioning)return;if(H.trigger(this._element,Ns)?.defaultPrevented)return;this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ys);const t=this._returnFocusTarget;this._returnFocusTarget=null,this._queueCallback(()=>this._hideModal(t),this._element,this._isAnimated())}dispose(){H.off(window,$s),H.off(this._dialog,$s),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ws({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ss({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal","true"),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=this._dialog?Q.findOne(".modal-body",this._dialog):null;e&&(e.scrollTop=0),b(this._element),this._element.classList.add(Ys),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,H.trigger(this._element,zs,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){H.on(this._element,Rs,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),H.on(window,Bs,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),H.on(this._element,Hs,t=>{H.one(this._element,Ws,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(e){this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(qs),this._resetAdjustments(),this._scrollBar.reset();const i=this._element;H.trigger(i,js),t.getInstance(i)?._isShown||p(e,i)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(H.trigger(this._element,Ps)?.defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Us)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Us),this._queueCallback(()=>{this._element.classList.remove(Us),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=v()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=v()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,i){return this.each(function(){const n=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](i)}})}};H.on(document,Vs,'[data-bs-toggle="modal"], [data-tblr-toggle="modal"]',function(t){const e=Q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),!e)return;const i=Q.findOne(".modal.show");i&&Xs.getInstance(i).hide(),Xs.getOrCreateInstance(e).toggle(this)}),Z(Xs),E(Xs);var Qs=/^aria-[\w-]*$/i,Zs={"*":["class","dir","id","lang","role",Qs],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],kbd:[],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Js={"*":["class","role",Qs],svg:["xmlns","width","height","viewbox","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","focusable"],path:["d","fill","stroke","stroke-width","fill-rule","clip-rule"],line:["x1","y1","x2","y2","stroke","stroke-width","stroke-linecap"],circle:["cx","cy","r","fill","stroke","stroke-width"],rect:["x","y","width","height","rx","ry","fill","stroke","stroke-width"],polyline:["points","fill","stroke","stroke-width"],polygon:["points","fill","stroke","stroke-width"],g:["fill","stroke","stroke-width","transform"],span:[],i:[]},tr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),er=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ir=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!tr.has(i)||Boolean(er.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))};function nr(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=Array.from(n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=Array.from(t.attributes),s=[...e["*"]||[],...e[i]||[]];for(const e of n)ir(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}var sr=".bs.navoverflow",rr=`update${sr}`,or=`overflow${sr}`,ar=`resize${sr}`,lr=`click${sr}`,cr="nav-overflow",hr="nav-overflow-menu",ur="d-none",dr="nav-overflow-keep",pr="nav-overflow-initialized",fr="dropdown-menu-end",mr="show",_r="active",gr=".nav, .navbar-nav",br=".nav-item",vr=".nav-link",yr=".nav-overflow-toggle",wr=".dropdown-menu",Ar='[data-bs-toggle="dropdown"], [data-tblr-toggle="dropdown"]',Er="More",xr={collapseBelow:0,iconPlacement:"start",menuPlacement:"bottom-end",menuStrategy:"absolute",moreText:Er,moreIcon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>',threshold:0},Tr={collapseBelow:"(number|string)",iconPlacement:"string",menuPlacement:"string",menuStrategy:"string",moreText:"(string|boolean)",moreIcon:"string",threshold:"number"},Cr=class t extends G{constructor(t,e){super(t,e);const i=Q.findOne(gr,this._element);if(!i)throw new TypeError(`${this._element.outerHTML} has no child ${gr} to collapse`);this._nav=i,this._items=[],this._overflowItems=[],this._lastOverflow=[],this._overflowMenu=null,this._overflowToggle=null,this._ownsToggle=!1,this._ownsClass=!1,this._clones=new Map,this._resizeObserver=null,this._resizeHandler=null,this._collapseBelow=0,this._itemMenus=new Map,this._relocatedMenus=new Map,this._init()}static get Default(){return xr}static get DefaultType(){return Tr}static get NAME(){return"navoverflow"}update(){this._calculateOverflow(),H.trigger(this._element,rr)}dispose(){this._resizeObserver?.disconnect(),this._resizeHandler&&H.off(window,ar,this._resizeHandler),H.off(this._element,sr),this._restoreItems(),this._ownsToggle&&this._overflowToggle?.closest(br)?.remove(),this._element.classList.remove(pr),this._ownsClass&&this._element.classList.remove(cr),super.dispose()}_init(){this._ownsClass=!this._element.classList.contains(cr),this._element.classList.add(cr),this._items=Q.find(br,this._nav).filter(t=>t.parentElement===this._nav&&!t.querySelector(yr));for(const t of this._items){const e=Q.findOne(vr,t);e?.matches(Ar)&&this._findItemMenu(t,e)}H.on(this._element,`shown.bs.tab${sr}`,()=>this._syncStates()),this._collapseBelow=this._resolveCollapseBelow(),this._createOverflowMenu(),this._setupResizeObserver(),this._calculateOverflow(),this._element.classList.add(pr)}_createOverflowMenu(){if(this._overflowToggle=Q.findOne(yr,this._element),this._overflowToggle)return void(this._overflowMenu=Q.findOne(".nav-overflow-menu",this._element));const{moreText:t,menuPlacement:e,iconPlacement:i}=this._config,n="string"==typeof t?t:"",s=document.createElement("li");s.className="nav-item dropdown nav-overflow-item",e.startsWith("top")&&s.classList.add("dropup");const r=document.createElement("button");r.type="button",r.className="nav-link nav-overflow-toggle",r.setAttribute("data-bs-toggle","dropdown"),r.setAttribute("aria-expanded","false"),""===n&&r.setAttribute("aria-label",Er);const o=document.createElement("span");if(o.className="nav-overflow-icon",o.innerHTML=nr(this._resolveIcon(),Js),""===n)r.append(o);else{const t=document.createElement("span");t.className="nav-overflow-text",t.textContent=n,"end"===i?r.append(t,o):r.append(o,t)}const a=document.createElement("div");a.className=`dropdown-menu ${hr}`,e.endsWith("end")&&a.classList.add(fr),s.append(r,a),this._nav.append(s),this._overflowToggle=r,this._overflowMenu=a,this._ownsToggle=!0}_resolveIcon(){const t=Q.findOne("[data-bs-overflow-icon], [data-tblr-overflow-icon]",this._element);if(!t)return this._config.moreIcon;const e=t.cloneNode(!0);return e.removeAttribute("data-bs-overflow-icon"),e.removeAttribute("data-tblr-overflow-icon"),t.remove(),e.outerHTML}_resolveCollapseBelow(){const t=this._config.collapseBelow;if("number"==typeof t)return t;if(""===t)return 0;const e=Number(t);if(!Number.isNaN(e))return e;const i=getComputedStyle(document.documentElement).getPropertyValue(`--tblr-breakpoint-${t}`);return Number.parseFloat(i)||0}_setupResizeObserver(){if("undefined"==typeof ResizeObserver)return this._resizeHandler=()=>this._calculateOverflow(),void H.on(window,ar,this._resizeHandler);this._resizeObserver=new ResizeObserver(()=>{this._calculateOverflow()}),this._resizeObserver.observe(this._element)}_availableWidth(){const{paddingInlineStart:t,paddingInlineEnd:e}=getComputedStyle(this._element),i=(Number.parseFloat(t)||0)+(Number.parseFloat(e)||0);return this._element.clientWidth-i}_navGap(){return Number.parseFloat(getComputedStyle(this._nav).columnGap)||0}_calculateOverflow(){const t=this._overflowToggle?.closest(br)??null;this._setHidden([],t,!1);const e=this._getItemsToOverflow(t);e.length===this._lastOverflow.length&&e.every((t,e)=>t===this._lastOverflow[e])?this._setHidden(this._overflowItems,t):(this._restoreItems(),this._lastOverflow=e,this._applyOverflow(e,t))}_getItemsToOverflow(t){if(getComputedStyle(this._nav).flexDirection.startsWith("column"))return[];const e=this._availableWidth(),i=this._items.filter(t=>!t.classList.contains(dr));if(this._collapseBelow>0&&e<this._collapseBelow)return i;const n=this._navGap(),s=this._items.filter(t=>t.classList.contains(dr)).reduce((t,e)=>t+e.offsetWidth+n,0),r=e-s-(t?t.offsetWidth+n:0);let o=0,a=[];for(const t of i)o+=t.offsetWidth+n,o>r+1&&a.push(t);a.length>0&&o<=e-s+1&&(a=[]);const{threshold:l}=this._config;return this._items.length-a.length<l&&this._items.length>l&&(a=this._items.slice(l).filter(t=>!t.classList.contains(dr))),a}_setHidden(t,e,i=0===t.length){for(const e of this._items){const i=t.includes(e);e.classList.toggle(ur,i),i?e.dataset.bsNavOverflow="true":delete e.dataset.bsNavOverflow}e?.classList.toggle(ur,i)}_applyOverflow(t,e){const i=this._moveToOverflow(t);this._setHidden(this._overflowItems,e),this._overflowToggle&&this._ownsToggle&&ms.getOrCreateInstance(this._overflowToggle,{autoClose:!i||"outside",popperConfig:{strategy:this._config.menuStrategy}}),t.length>0&&H.trigger(this._element,or,{overflowCount:t.length,visibleCount:this._items.length-t.length})}_moveToOverflow(t){let e=!1;if(!this._overflowMenu)return e;this._clearMenu();for(const i of t){const t=Q.findOne(vr,i);if(!t)continue;const n=this._findItemMenu(i,t);n&&t.matches(Ar)?(this._overflowMenu.append(this._relocateAsSubmenu(i,t,n)),e=!0):this._overflowMenu.append(this._cloneAsProxy(t)),this._overflowItems.push(i)}return e}_relocateAsSubmenu(t,e,i){this._resetMenu(e,i),t.classList.remove(mr),this._relocatedMenus.set(t,{menu:i,parent:i.parentNode,nextSibling:i.nextSibling});const n=document.createElement("div");return n.className=this._overflowMenu?.classList.contains(fr)?"dropstart":"dropend",n.append(this._cloneAsMenuItem(e,!0),i),n}_cloneAsProxy(t){const e=this._cloneAsMenuItem(t);return t.matches("[data-bs-toggle], [data-tblr-toggle]")&&(this._removeDataAttributes(e),H.on(e,lr,e=>{e.preventDefault(),t.click(),this._syncStates()})),e}_removeDataAttributes(t){for(const e of t.getAttributeNames())!e.startsWith("data-bs-")&&!e.startsWith("data-tblr-")||e.endsWith("-theme")||t.removeAttribute(e)}_isActive(t){return t.classList.contains(_r)||Boolean(t.closest(br)?.classList.contains(_r))}_syncStates(){for(const[t,e]of this._clones)t.classList.toggle(_r,this._isActive(e))}_cloneAsMenuItem(t,e=!1){const i=t.cloneNode(!0);return i.className="dropdown-item",i.removeAttribute("id"),this._clones.set(i,t),this._isActive(t)&&i.classList.add(_r),(t.classList.contains("disabled")||t.hasAttribute("disabled"))&&i.classList.add("disabled"),e&&(this._removeDataAttributes(i),i.classList.add("dropdown-toggle"),i.removeAttribute("href"),i.setAttribute("data-bs-toggle","dropdown"),i.setAttribute("data-bs-auto-close","outside"),i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded","false"),"A"===i.tagName&&(i.setAttribute("role","button"),i.hasAttribute("tabindex")||i.setAttribute("tabindex","0"))),i}_findItemMenu(t,e){const i=Q.next(e,wr)[0];if(i&&!i.classList.contains(hr))return this._itemMenus.set(t,i),i;const n=Q.findOne(wr,t);if(n&&!n.classList.contains(hr))return this._itemMenus.set(t,n),n;const s=this._itemMenus.get(t);return s?.isConnected?s:(this._itemMenus.delete(t),null)}_resetMenu(t,e){ms.getInstance(t)?.dispose(),t.classList.remove(mr),t.setAttribute("aria-expanded","false"),t.parentElement?.classList.remove(mr),e.classList.remove(mr)}_restoreRelocatedMenus(){for(const{menu:t,parent:e,nextSibling:i}of this._relocatedMenus.values()){const n=t.previousElementSibling;n?.matches(Ar)&&this._resetMenu(n,t),i?i.before(t):e.append(t)}this._relocatedMenus.clear()}_restoreItems(){this._overflowToggle&&this._overflowMenu&&this._resetMenu(this._overflowToggle,this._overflowMenu),this._restoreRelocatedMenus(),this._setHidden([],this._overflowToggle?.closest(br)??null,!1),this._clearMenu()}_clearMenu(){for(const t of this._clones.keys())H.off(t,sr);this._clones.clear(),this._overflowMenu?.replaceChildren(),this._overflowItems=[]}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e]()}})}};A(()=>{for(const t of Q.find('[data-bs-toggle="nav-overflow"], [data-tblr-toggle="nav-overflow"]'))Cr.getOrCreateInstance(t)}),E(Cr);var kr=".bs.offcanvas",Sr=".data-api",Ir=`load${kr}${Sr}`,Or="show",Dr="showing",Lr="hiding",Mr=".offcanvas.show",$r=`show${kr}`,Nr=`shown${kr}`,Pr=`hide${kr}`,jr=`hidePrevented${kr}`,Fr=`hidden${kr}`,zr=`resize${kr}`,Br=`click${kr}${Sr}`,Wr=`keydown.dismiss${kr}`,Hr={backdrop:!0,keyboard:!0,scroll:!1},Rr={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"},Vr=class t extends G{constructor(t,e){super(t,e),this._isShown=!1,this._returnFocusTarget=null,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Hr}static get DefaultType(){return Rr}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||H.trigger(this._element,$r,{relatedTarget:t})?.defaultPrevented||(this._returnFocusTarget=d(t,this._element),this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ms).hide(),this._element.setAttribute("aria-modal","true"),this._element.setAttribute("role","dialog"),this._element.classList.add(Dr),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Or),this._element.classList.remove(Dr),H.trigger(this._element,Nr,{relatedTarget:t})},this._element,!0))}hide(){if(!this._isShown)return;if(H.trigger(this._element,Pr)?.defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Lr),this._backdrop.hide();const e=this._element,i=this._returnFocusTarget;this._returnFocusTarget=null,this._queueCallback(()=>{this._element.classList.remove(Or,Lr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ms).reset(),H.trigger(e,Fr),t.getInstance(e)?._isShown||p(i,e)},this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new ws({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():H.trigger(this._element,jr)}:null})}_initializeFocusTrap(){return new Ss({trapElement:this._element})}_addEventListeners(){H.on(this._element,Wr,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():H.trigger(this._element,jr))})}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e](this)}})}};H.on(document,Br,'[data-bs-toggle="offcanvas"], [data-tblr-toggle="offcanvas"]',function(t){const e=Q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),!e)return;if(m(this))return;const i=Q.findOne(Mr);i&&i!==e&&Vr.getInstance(i).hide(),Vr.getOrCreateInstance(e).toggle(this)}),H.on(window,Ir,()=>{for(const t of Q.find(Mr))Vr.getOrCreateInstance(t).show()}),H.on(window,zr,()=>{for(const t of Q.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Vr.getOrCreateInstance(t).hide()}),Z(Vr),E(Vr);var qr={allowList:Zs,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Yr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Ur={entry:"(string|element|function|null)",selector:"(string|element)"},Kr=class extends K{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return qr}static get DefaultType(){return Yr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Ur)}_setContent(t,e,i){const n=Q.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?h(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?nr(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return x(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}},Gr=new Set(["sanitize","allowList","sanitizeFn"]),Xr="fade",Qr="show",Zr=".tooltip-inner",Jr=".modal",to="hide.bs.modal",eo="hover",io="focus",no="click",so={AUTO:"auto",TOP:"top",RIGHT:v()?"left":"right",BOTTOM:"bottom",LEFT:v()?"right":"left"},ro={allowList:Zs,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},oo={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},ao=class t extends G{constructor(t,e){if(void 0===Yi)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._hideModalHandler=()=>{this._element&&this.hide()},this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ro}static get DefaultType(){return oo}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),H.off(this._element.closest(Jr),to,this._hideModalHandler),(this._element.getAttribute("data-bs-original-title")||this._element.getAttribute("data-tblr-original-title"))&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")||this._element.getAttribute("data-tblr-original-title")||""),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=H.trigger(this._element,this.constructor.eventName("show")),e=(_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t?.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),H.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Qr),"ontouchstart"in document.documentElement)for(const t of Array.from(document.body.children))H.on(t,"mouseover",g);this._queueCallback(()=>{H.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!H.trigger(this._element,this.constructor.eventName("hide"))?.defaultPrevented){if(this._getTipElement().classList.remove(Qr),"ontouchstart"in document.documentElement)for(const t of Array.from(document.body.children))H.off(t,"mouseover",g);this._activeTrigger[no]=!1,this._activeTrigger[io]=!1,this._activeTrigger[eo]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),H.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Xr,Qr),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Xr),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Kr({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Zr]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")||this._element.getAttribute("data-tblr-original-title")||""}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||null!==this.tip&&this.tip.classList.contains(Xr)}_isShown(){return null!==this.tip&&this.tip.classList.contains(Qr)}_createPopper(t){const e=so[x(this._config.placement,[this,t,this._element]).toUpperCase()];return qi(this._element,t,this._getPopperConfig(e))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return x(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]},i=x(this._config.popperConfig,[void 0,e]);return{...e,..."object"==typeof i&&null!==i?i:{}}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)H.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[no]=!(e._isShown()&&e._activeTrigger[no]),e.toggle()});else if("manual"!==e){const t=e===eo?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===eo?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");H.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?io:eo]=!0,e._enter()}),H.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?io:eo]=e._element.contains(t.relatedTarget),e._leave()})}H.on(this._element.closest(Jr),to,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._getDelay().show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._getDelay().hide))}_getDelay(){const{delay:t}=this._config;return"number"==typeof t?{show:t,hide:t}:t}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=U.getDataAttributes(this._element);for(const t of Object.keys(e))Gr.has(t)&&delete e[t];let i={...e,..."object"==typeof t&&t?t:{}};return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(t){t.container=!1===t.container?document.body:u(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay});const e=t;return"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),t}_getDelegateConfig(){const t={},e=this.constructor.Default;for(const[i,n]of Object.entries(this._config))e[i]!==n&&(t[i]=n);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}})}};E(ao);var lo=".popover-header",co=".popover-body",ho={...ao.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},uo={...ao.DefaultType,content:"(null|string|element|function)"},po=class t extends ao{constructor(t,e){super(t,e)}static get Default(){return ho}static get DefaultType(){return uo}static get NAME(){return"popover"}_isWithContent(){return Boolean(this._getTitle()||this._getContent())}_getContentForTemplate(){return{[lo]:this._getTitle(),[co]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}})}};E(po);var fo=".bs.scrollspy",mo=`activate${fo}`,_o=`click${fo}`,go=`load${fo}.data-api`,bo="active",vo="[href]",yo=".nav-link",wo=`${yo}, .nav-item > ${yo}, .list-group-item`,Ao={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Eo={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"},xo=class t extends G{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ao}static get DefaultType(){return Eo}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){t.target=u(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin;const e=t.threshold;return"string"==typeof e&&(t.threshold=e.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(H.off(this._config.target,_o),H.on(this._config.target,_o,vo,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if("scrollTo"in i)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const r of t){if(!r.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(r));continue}const t=r.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(r),!n)return}else s||t||i(r)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Q.find(vo,this._config.target);for(const e of t){if(!e.hash||m(e))continue;const t=Q.findOne(o(decodeURI(e.hash)),this._element);f(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(bo),this._activateParents(t),H.trigger(this._element,mo,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Q.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(bo);else for(const e of Q.parents(t,".nav, .list-group"))for(const t of Q.prev(e,wo))t.classList.add(bo)}_clearActiveClass(t){t.classList.remove(bo);const e=Q.find(`${vo}.${bo}`,t);for(const t of e)t.classList.remove(bo)}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e]()}})}};H.on(window,go,()=>{for(const t of Q.find('[data-bs-spy="scroll"], [data-tblr-spy="scroll"]'))xo.getOrCreateInstance(t)}),E(xo);var To=".bs.tab",Co=`hide${To}`,ko=`hidden${To}`,So=`show${To}`,Io=`shown${To}`,Oo=`click${To}`,Do=`keydown${To}`,Lo=`load${To}`,Mo="ArrowLeft",$o="ArrowRight",No="ArrowUp",Po="ArrowDown",jo="Home",Fo="End",zo="active",Bo="fade",Wo="show",Ho=".dropdown-toggle",Ro=`:not(${Ho})`,Vo='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"], [data-tblr-toggle="tab"], [data-tblr-toggle="pill"], [data-tblr-toggle="list"]',qo=`.nav-link${Ro}, .list-group-item${Ro}, [role="tab"]${Ro}, ${Vo}`,Yo=`.${zo}[data-bs-toggle="tab"], .${zo}[data-bs-toggle="pill"], .${zo}[data-bs-toggle="list"], .${zo}[data-tblr-toggle="tab"], .${zo}[data-tblr-toggle="pill"], .${zo}[data-tblr-toggle="list"]`,Uo=class t extends G{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),H.on(this._element,Do,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?H.trigger(e,Co,{relatedTarget:t}):null;H.trigger(t,So,{relatedTarget:e})?.defaultPrevented||i?.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(zo),this._activate(Q.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),this._toggleDropDown(t,!0),H.trigger(t,Io,{relatedTarget:e})):t.classList.add(Wo)},t,t.classList.contains(Bo)))}_deactivate(t,e){t&&(t.classList.remove(zo),t.blur(),this._deactivate(Q.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),H.trigger(t,ko,{relatedTarget:e})):t.classList.remove(Wo)},t,t.classList.contains(Bo)))}_keydown(e){if(![Mo,$o,No,Po,jo,Fo].includes(e.key))return;e.stopPropagation(),e.preventDefault();const i=this._getChildren().filter(t=>!m(t));let n;if([jo,Fo].includes(e.key))n=i[e.key===jo?0:i.length-1];else{const t=[$o,Po].includes(e.key);n=C(i,e.target,t,!0)}n&&(n.focus({preventScroll:!0}),t.getOrCreateInstance(n).show())}_getChildren(){return Q.find(qo,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",String(e)),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Q.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=Q.findOne(t,i);s&&s.classList.toggle(n,e)};n(Ho,zo),n(".dropdown-menu",Wo),i.setAttribute("aria-expanded",String(e))}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(zo)}_getInnerElement(t){return t.matches(qo)?t:Q.findOne(qo,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e]()}})}};H.on(document,Oo,Vo,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),m(this)||Uo.getOrCreateInstance(this).show()}),H.on(window,Lo,()=>{for(const t of Q.find(Yo))Uo.getOrCreateInstance(t)}),E(Uo);var Ko=".bs.toast",Go=`mouseover${Ko}`,Xo=`mouseout${Ko}`,Qo=`focusin${Ko}`,Zo=`focusout${Ko}`,Jo=`hide${Ko}`,ta=`hidden${Ko}`,ea=`show${Ko}`,ia=`shown${Ko}`,na="hide",sa="show",ra="showing",oa={animation:"boolean",autohide:"boolean",delay:"number"},aa={animation:!0,autohide:!0,delay:5e3},la=class t extends G{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return aa}static get DefaultType(){return oa}static get NAME(){return"toast"}show(){H.trigger(this._element,ea)?.defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(na),b(this._element),this._element.classList.add(sa,ra),this._queueCallback(()=>{this._element.classList.remove(ra),H.trigger(this._element,ia),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(H.trigger(this._element,Jo)?.defaultPrevented||(this._element.classList.add(ra),this._queueCallback(()=>{this._element.classList.add(na),this._element.classList.remove(ra,sa),H.trigger(this._element,ta)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(sa),super.dispose()}isShown(){return this._element.classList.contains(sa)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){H.on(this._element,Go,t=>this._onInteraction(t,!0)),H.on(this._element,Xo,t=>this._onInteraction(t,!1)),H.on(this._element,Qo,t=>this._onInteraction(t,!0)),H.on(this._element,Zo,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](this)}})}};Z(la),E(la);var ca={Alert:Xi,Button:Zi,Carousel:On,Collapse:Vn,Dropdown:ms,Modal:Xs,NavOverflow:Cr,Offcanvas:Vr,Popover:po,ScrollSpy:xo,Tab:Uo,Toast:la,Tooltip:ao};A(()=>{for(const t of document.querySelectorAll('[data-bs-toggle="dropdown"], [data-tblr-toggle="dropdown"]'))try{const e={boundary:"viewport"===U.getDataAttribute(t,"boundary")?document.documentElement:"clippingParents"};ms.getOrCreateInstance(t,e)}catch(t){console.error(t)}});var ha=t=>{for(const e of document.querySelectorAll('[data-bs-toggle="sidebar-folded"], [data-tblr-toggle="sidebar-folded"]'))e.setAttribute("aria-pressed",String(t))},ua=t=>{for(const e of document.querySelectorAll('.navbar-vertical [data-bs-toggle="dropdown"][aria-expanded="true"]'))e!==t&&ms.getInstance(e)?.hide()};document.addEventListener("click",t=>{if(!(document.documentElement.getAttribute("data-bs-sidebar")??"").startsWith("folded")&&!document.querySelector(".navbar-vertical.navbar-folded, .navbar-vertical.navbar-folded-hover"))return;const e=t.target;e instanceof Element&&!e.closest(".navbar-vertical .dropdown-menu")&&ua(e.closest('.navbar-vertical [data-bs-toggle="dropdown"]'))}),document.addEventListener("mouseleave",t=>{const e=t.target;e instanceof Element&&e.matches(".navbar-vertical")&&("folded-hover"===document.documentElement.getAttribute("data-bs-sidebar")||e.classList.contains("navbar-folded-hover"))&&ua()},!0),A(()=>{const t=(document.documentElement.getAttribute("data-bs-sidebar")??"").startsWith("folded");if(ha(t),t)for(const t of document.querySelectorAll(".navbar-vertical .dropdown-menu.show"))t.classList.remove("show"),t.parentElement?.querySelector('[data-bs-toggle="dropdown"]')?.setAttribute("aria-expanded","false")}),document.addEventListener("click",t=>{if(!(t.target instanceof Element&&t.target.closest('[data-bs-toggle="sidebar-folded"], [data-tblr-toggle="sidebar-folded"]')))return;const e=document.documentElement,i=!(e.getAttribute("data-bs-sidebar")??"").startsWith("folded");i?e.setAttribute("data-bs-sidebar","folded-hover"):e.removeAttribute("data-bs-sidebar");try{localStorage.setItem("tabler-sidebar",i?"folded-hover":"default")}catch{}ha(i),ua(),document.dispatchEvent(new CustomEvent("tabler:sidebar-folded",{detail:{folded:i}}))}),A(()=>{for(const t of document.querySelectorAll('[data-bs-toggle="tooltip"], [data-tblr-toggle="tooltip"]'))try{const e={delay:U.getDataAttribute(t,"delay")??{show:50,hide:50},placement:U.getDataAttribute(t,"placement")??"auto"};ao.getOrCreateInstance(t,e)}catch(t){console.error(t)}}),A(()=>{for(const t of document.querySelectorAll('[data-bs-toggle="popover"], [data-tblr-toggle="popover"]'))try{const e={delay:U.getDataAttribute(t,"delay")??{show:50,hide:50},placement:U.getDataAttribute(t,"placement")??"auto"};po.getOrCreateInstance(t,e)}catch(t){console.error(t)}});var da="switch-icon",pa=`.bs.${da}`,fa=`click${pa}`,ma=`toggle${pa}`,_a=`change${pa}`,ga="active",ba="switch-icon-loading",va=".switch-icon",ya=`[data-bs-toggle="${da}"], [data-tblr-toggle="${da}"]`,wa={},Aa={},Ea=class extends G{#t;constructor(t,e){super(t,e),this._element&&(this.#t=this._element.matches(va)?this._element:Q.findOne(va,this._element)??this._element,this._element.hasAttribute("aria-pressed")||this._element.setAttribute("aria-pressed",String(this.isActive)),H.on(this._element,fa,t=>{t.stopPropagation(),this._element.classList.contains("disabled")||"true"===this._element.getAttribute("aria-disabled")||this.toggle()}))}static get Default(){return wa}static get DefaultType(){return Aa}static get NAME(){return da}get isActive(){return this.#t.classList.contains(ga)}get isLoading(){return this.#t.classList.contains(ba)}toggle(t){if(this.isLoading)return;const e=t??!this.isActive;let i;H.trigger(this._element,ma,{active:e,wait:t=>{i=t}})?.defaultPrevented||(i?(this.#e(!0),i.then(()=>this.#i(e),()=>{}).finally(()=>this.#e(!1))):this.#i(e))}dispose(){this.#e(!1),super.dispose()}#i(t){this._element&&(this.#t.classList.toggle(ga,t),this._element.setAttribute("aria-pressed",String(t)),H.trigger(this._element,_a,{active:t}))}#e(t){this._element&&(this.#t.classList.toggle(ba,t),t?this._element.setAttribute("aria-busy","true"):this._element.removeAttribute("aria-busy"))}};J(ya,Ea),A(()=>{const t=window.location.hash;if(t)for(const e of document.querySelectorAll('[data-bs-toggle="tab"], [data-tblr-toggle="tab"]'))if(e.hash===t)try{Uo.getOrCreateInstance(e).show()}catch(t){console.error(t)}}),A(()=>{for(const t of document.querySelectorAll('[data-bs-toggle="toast"], [data-tblr-toggle="toast"]'))try{const e=Q.getElementFromSelector(t);if(!e)continue;const i=la.getOrCreateInstance(e);t.addEventListener("click",()=>{i.show()})}catch(t){console.error(t)}});var xa="sortable",Ta=`data-${xa}`,Ca=`[${Ta}]`,ka={},Sa={},Ia=class extends G{constructor(t,e){super(t,e),this._sortable=null,this._element&&window.Sortable&&(this._sortable=new window.Sortable(this._element,this._config))}static get Default(){return ka}static get DefaultType(){return Sa}static get NAME(){return xa}get sortable(){return this._sortable}toArray(){return this._sortable?.toArray()??[]}sort(t,e){this._sortable?.sort(t,e)}dispose(){this._sortable?.destroy(),super.dispose()}_mergeConfigObj(t,e){let i={};const n=e?.getAttribute(Ta);if(n)try{const t=JSON.parse(n);t&&"object"==typeof t&&!Array.isArray(t)&&(i=t)}catch{}return super._mergeConfigObj({...i,...t},e)}};J(Ca,Ia);var Oa="otpInput",Da=`.bs.${Oa}`,La=`input${Da}`,Ma=`complete${Da}`,$a="otp-rendered",Na=["blur","keyup","select"],Pa=["click","pointercancel"],ja={numeric:{inputmode:"numeric",pattern:"[0-9]*",filter:/[^0-9]/g},alphanumeric:{inputmode:"text",pattern:"[A-Za-z0-9]*",filter:/[^A-Za-z0-9]/g},alpha:{inputmode:"text",pattern:"[A-Za-z]*",filter:/[^A-Za-z]/g}},Fa={groups:null,length:null,mask:!1,separator:"·",type:"numeric"},za={groups:"(array|null)",length:"(number|null)",mask:"boolean",separator:"string",type:"string"},Ba=class extends G{constructor(t,e){if(super(t,e),this._length=0,this._wasComplete=!1,this._slots=[],this._slotsContainer=null,this._pointerActive=!1,this._pointerIndex=0,this._composedValue=null,this._onInput=t=>{if(t.isComposing)return;const e=this._composedValue;this._composedValue=null,null!==e&&e===this._input.value||this._handleInput()},this._onCompositionEnd=()=>{this._handleInput(),this._composedValue=this._input.value},this._onBeforeInput=t=>this._handleBeforeInput(t),this._onFocus=()=>this._handleFocus(),this._onPointerDown=t=>this._handlePointerDown(t),this._onPointerEnd=()=>{this._pointerActive=!1},this._onSync=()=>this._render(),this._onSelectionChange=()=>{document.activeElement===this._input&&this._render()},!this._element)return;const i=Q.findOne("input",this._element);i&&(this._input=i,this._type=ja[this._config.type]??ja.numeric,this._length=this._resolveLength(),this._setupInput(),this._renderSlots(),this._addEventListeners(),this._render(),this._wasComplete=this._input.value.length===this._length)}static get Default(){return Fa}static get DefaultType(){return za}static get NAME(){return Oa}getValue(){return this._input.value}setValue(t){this._input.value=this._sanitize(String(t)),this._render(),this._checkComplete()}clear(){this._input.value="",this._render(),this._input.focus()}focus(){this._pointerActive=!1,this._input.focus(),this._selectSlot(this._firstEmptyIndex()),this._render()}dispose(){if(this._input){this._input.removeEventListener("input",this._onInput),this._input.removeEventListener("beforeinput",this._onBeforeInput),this._input.removeEventListener("focus",this._onFocus),this._input.removeEventListener("pointerdown",this._onPointerDown),this._input.removeEventListener("compositionend",this._onCompositionEnd);for(const t of Pa)this._input.removeEventListener(t,this._onPointerEnd);for(const t of Na)this._input.removeEventListener(t,this._onSync);document.removeEventListener("selectionchange",this._onSelectionChange),this._slotsContainer?.remove(),this._element.classList.remove($a),super.dispose()}else super.dispose()}_resolveLength(){const t=[this._config.length,Number.parseInt(this._input.getAttribute("maxlength")??"",10)],{groups:e}=this._config;Array.isArray(e)&&e.length>0&&t.push(e.reduce((t,e)=>t+Number(e),0));for(const e of t)if("number"==typeof e&&Number.isInteger(e)&&e>0)return Math.min(e,32);return 6}_setupInput(){const t=this._input;"text"!==t.type&&"tel"!==t.type&&(t.type="text"),t.classList.add("otp-input"),t.setAttribute("maxlength",String(this._length)),t.setAttribute("inputmode",this._type.inputmode),t.setAttribute("pattern",this._type.pattern),t.getAttribute("autocomplete")||t.setAttribute("autocomplete","one-time-code"),t.value&&(t.value=this._sanitize(t.value))}_renderSlots(){const t=document.createElement("div");t.className="otp-slots",t.setAttribute("aria-hidden","true");const{groups:e,separator:i}=this._config;let n=0,s=0;for(let r=0;r<this._length;r++){const o=document.createElement("div");if(o.className="otp-slot",t.append(o),this._slots.push(o),e&&e.length>0&&(s++,s===e[n]&&r<this._length-1)){const r=document.createElement("div");r.className="otp-separator",r.textContent=i,t.append(r),n=Math.min(n+1,e.length-1),s=0}}this._slotsContainer=t,this._element.append(t),this._element.classList.add($a)}_addEventListeners(){this._input.addEventListener("input",this._onInput),this._input.addEventListener("beforeinput",this._onBeforeInput),this._input.addEventListener("focus",this._onFocus),this._input.addEventListener("pointerdown",this._onPointerDown),this._input.addEventListener("compositionend",this._onCompositionEnd);for(const t of Pa)this._input.addEventListener(t,this._onPointerEnd);document.addEventListener("selectionchange",this._onSelectionChange);for(const t of Na)this._input.addEventListener(t,this._onSync)}_handleFocus(){if(this._pointerActive)return this._pointerActive=!1,this._selectSlot(this._pointerIndex),void this._render();this._selectSlot(this._firstEmptyIndex()),this._render()}_handleInput(){const t=this._sanitize(this._input.value);t!==this._input.value&&(this._input.value=t),document.activeElement===this._input&&this._selectSlot(this._firstEmptyIndex()),this._afterValueChange()}_handleBeforeInput(t){const{inputType:e,data:i}=t;if("insertText"===e&&i&&1===i.length){t.preventDefault();const e=this._sanitize(i);if(!e)return;const n=Math.min(this._input.selectionStart??0,this._length-1),s=Math.max(this._input.selectionEnd??n,n+1),r=[...this._input.value];return r.splice(n,s-n,e),this._input.value=r.join("").slice(0,this._length),this._selectSlot(n+1),void this._afterValueChange()}if("deleteContentBackward"===e){t.preventDefault();const e=this._input.value,i=this._input.selectionStart??0,n=this._input.selectionEnd??i,s=[...this._input.value];return n>i?(s.splice(i,n-i),this._input.value=s.join(""),this._selectSlot(i)):i>0&&(s.splice(i-1,1),this._input.value=s.join(""),this._selectSlot(i-1)),void this._afterValueChange(e)}if("deleteContentForward"===e){t.preventDefault();const e=this._input.value,i=this._input.selectionStart??0,n=this._input.selectionEnd??i,s=[...this._input.value];n>i?(s.splice(i,n-i),this._input.value=s.join("")):i<s.length&&(s.splice(i,1),this._input.value=s.join("")),this._selectSlot(i),this._afterValueChange(e)}}_handlePointerDown(t){const e=this._slotIndexFromPoint(t.clientX);if(null===e)return;const i=Math.min(e,this._firstEmptyIndex());if(document.activeElement===this._input)return t.preventDefault(),this._selectSlot(i),void this._render();this._pointerActive=!0,this._pointerIndex=i}_slotIndexFromPoint(t){const e="rtl"===getComputedStyle(this._element).direction;for(const[i,n]of this._slots.entries()){const s=n.getBoundingClientRect();if((e?t>=s.left:t<=s.right)||i===this._slots.length-1)return i}return null}_afterValueChange(t){this._render(),void 0!==t&&t===this._input.value||(H.trigger(this._element,La,{value:this._input.value}),this._checkComplete())}_firstEmptyIndex(){return Math.min(this._input.value.length,this._length-1)}_selectSlot(t){const e=Math.max(0,Math.min(t,this._length-1)),i=e<this._input.value.length?e+1:e;this._input.setSelectionRange(e,i)}_sanitize(t){return t.replace(this._type.filter,"").slice(0,this._length)}_render(){const{value:t}=this._input,e=document.activeElement===this._input,i=Math.min(this._input.selectionStart??t.length,this._length-1);for(const[n,s]of this._slots.entries()){const r=t[n]??"";s.textContent=r&&this._config.mask?"•":r,s.classList.toggle("otp-slot-filled",Boolean(r)),s.classList.toggle("otp-slot-active",e&&n===i)}}_checkComplete(){const{value:t}=this._input,e=t.length===this._length;e&&!this._wasComplete&&H.trigger(this._element,Ma,{value:t}),this._wasComplete=e}};J('[data-bs-toggle="otp"], [data-tblr-toggle="otp"]',Ba);var Wa="sparkline",Ha=`.bs.${Wa}`,Ra=`rendered${Ha}`,Va=`updated${Ha}`,qa="sparkline-label",Ya=`[data-bs-toggle="${Wa}"], [data-tblr-toggle="${Wa}"]`,Ua="--tblr-sparkline",Ka={type:"line",values:[],width:80,height:24,min:null,max:null,fill:"none",spot:"none",pad:2,barGap:2,barRadius:2,label:null,threshold:null,animation:300},Ga={type:"string",values:"array",width:"number",height:"number",min:"(number|null)",max:"(number|null)",fill:"string",spot:"string",pad:"number",barGap:"number",barRadius:"number",label:"(string|number|boolean|null)",threshold:"(number|null)",animation:"number"},Xa=t=>document.createElementNS("http://www.w3.org/2000/svg",t),Qa=(t,e)=>{for(const[i,n]of Object.entries(e))null!=n&&t.setAttribute(i,String(n))},Za=t=>`var(${Ua}-${t})`,Ja=(t,e)=>{const i=e-t;return 0===i?1:i},tl=(t,e,i,...n)=>{const s=e??Math.min(...t,...n),r=i??Math.max(...t,...n);return{min:s,max:r,span:Ja(s,r)}},el=/-?\d*\.?\d+(?:e[-+]?\d+)?/g,il=(t,e,i)=>{const n=t.match(el),s=e.match(el);if(!n||!s||n.length!==s.length||t.replace(el,"#")!==e.replace(el,"#"))return e;let r=0;return e.replace(el,()=>{const t=Number(n[r])+(Number(s[r])-Number(n[r]))*i;return r++,String(Math.round(1e3*t)/1e3)})},nl=(t,e,i)=>{const n=getComputedStyle(t).getPropertyValue(`${Ua}-${e}`).trim(),s=Number.parseFloat(n);return Number.isFinite(s)?s:i},sl=class extends G{constructor(t,e){super(t,e),this._userConfig={},this._frame=0,this._element&&(this._userConfig={...e},this.render())}static get Default(){return Ka}static get DefaultType(){return Ga}static get NAME(){return Wa}update(t){const e=Array.isArray(t)?t.join(","):String(t),i=this._element.hasAttribute("data-tblr-values")?"data-tblr-values":"data-bs-values";this._element.setAttribute(i,e),delete this._userConfig.values,this.render(),H.trigger(this._element,Va)}render(){this._config=this._getConfig(this._userConfig);const t=this._element.querySelector("svg");if(this._element.querySelector(`.${qa}`)?.remove(),0===this._config.values.length)return cancelAnimationFrame(this._frame),t?.remove(),void H.trigger(this._element,Ra);let e;switch(this._config.type){case"bar":e=this._renderBars();break;case"tristate":e=this._renderTristate();break;case"circle":e=this._renderCircle();break;default:e=this._renderLine()}t&&this._canAnimate(t,e)?this._animate(t,e):(cancelAnimationFrame(this._frame),t?.remove(),this._element.append(e));const i=this._labelText();if(""!==i){const t=document.createElement("span");t.className=qa,t.textContent=i,this._element.append(t)}H.trigger(this._element,Ra)}dispose(){cancelAnimationFrame(this._frame),this._element.querySelector("svg")?.remove(),this._element.querySelector(`.${qa}`)?.remove(),super.dispose()}_configAfterMerge(t){return t.values=(e=t.values,Array.isArray(e)?e.map(Number).filter(Number.isFinite):"number"==typeof e?Number.isFinite(e)?[e]:[]:(t=>{const e="string"==typeof t?t.trim():"";if(!e)return[];if(e.startsWith("["))try{const t=JSON.parse(e);return Array.isArray(t)?t.map(Number).filter(Number.isFinite):[]}catch{return[]}return e.split(",").map(t=>Number(t.trim())).filter(Number.isFinite)})(e)),t;var e}_labelText(){const{label:t,values:e,type:i}=this._config;return null===t||!1===t||""===t?"":"auto"!==t&&!0!==t?String(t):"circle"===i?`${Math.round(100*this._circleRatio())}%`:String(e[e.length-1])}_circleRatio(){const t=this._config,e=t.values[0]??0,i=t.max??(t.values.length>1?t.values[1]:100),n=t.min??0;return Math.max(0,Math.min(1,(e-n)/Ja(n,i)))}_canAnimate(t,e){return!(this._config.animation<=0||gt())&&t.getAttribute("viewBox")===e.getAttribute("viewBox")&&t.children.length===e.children.length&&Array.from(t.children).every((t,i)=>t.tagName===e.children[i].tagName)}_animate(t,e){cancelAnimationFrame(this._frame);const i=Array.from(e.children).map((e,i)=>{const n=t.children[i],s=[];for(const{name:t}of Array.from(n.attributes))e.hasAttribute(t)||n.removeAttribute(t);for(const{name:t,value:i}of Array.from(e.attributes)){const e=n.getAttribute(t);null===e||e===i?n.setAttribute(t,i):s.push([t,e,i])}return{source:n,tweens:s}}),n=this._config.animation,s=performance.now(),r=t=>{const e=(t=>1-(1-t)**3)(Math.min(1,(t-s)/n));for(const{source:t,tweens:n}of i)for(const[i,s,r]of n)t.setAttribute(i,e>=1?r:il(s,r,e));e<1&&(this._frame=requestAnimationFrame(r))};this._frame=requestAnimationFrame(r)}_hairline(t,e,i,n=!1){const s=Xa("line");Qa(s,{x1:0,x2:this._config.width,y1:e,y2:e,stroke:Za(i),"stroke-width":1,"stroke-dasharray":n?"3 2":null,"vector-effect":"non-scaling-stroke"}),t.append(s)}_createSvg(){const{width:t,height:e}=this._config,i=Xa("svg");return Qa(i,{viewBox:`0 0 ${t} ${e}`,preserveAspectRatio:"none",width:t,height:e,class:"sparkline-svg","aria-hidden":"true"}),i}_renderLine(){const t=this._config,e=this._createSvg(),{min:i,span:n}=tl(t.values,t.min,t.max,...null===t.threshold?[]:[t.threshold]),s=e=>t.pad+(1-(e-i)/n)*(t.height-2*t.pad),r=1===t.values.length?[s(t.values[0]),s(t.values[0])]:t.values.map(s),o=t.width/(r.length-1);if(null!==t.threshold&&this._hairline(e,s(t.threshold),"threshold",!0),"auto"===t.fill){const i=Xa("path");Qa(i,{d:this._areaPath(r,o,t.height),fill:Za("fill"),stroke:"none"}),e.append(i)}const a=Xa("polyline");Qa(a,{points:r.map((t,e)=>`${e*o},${t}`).join(" "),fill:"none",stroke:Za("stroke"),"stroke-width":Za("stroke-width"),"stroke-linecap":"round","stroke-linejoin":"round"}),e.append(a);const l=((t,e)=>{if(0===t.length||"none"===e)return-1;if("last"===e)return t.length-1;let i=0;for(let n=1;n<t.length;n++)("min"===e?t[n]<t[i]:t[n]>t[i])&&(i=n);return i})(t.values,t.spot);if(l>=0){const i=Xa("circle");Qa(i,{cx:1===t.values.length?t.width/2:l*o,cy:r[l],r:nl(this._element,"spot-size",2),fill:Za("spot")}),e.append(i)}return e}_areaPath(t,e,i){return`${t.map((t,i)=>`${0===i?"M":"L"} ${i*e} ${t}`).join(" ")} L ${(t.length-1)*e} ${i} L 0 ${i} Z`}_renderBars(){const t=this._config,e=this._createSvg(),{min:i,span:n}=tl(t.values,t.min,t.max,0,...null===t.threshold?[]:[t.threshold]),s=e=>t.height-(e-i)/n*t.height,r=t.values.length,o=(t.width-t.barGap*(r-1))/r,a=s(0);i<0&&this._hairline(e,a,"zero"),null!==t.threshold&&this._hairline(e,s(t.threshold),"threshold",!0);const l=e=>Math.max(0,Math.min(t.height,e));return t.values.forEach((i,n)=>{const r=l(s(Math.max(i,0))),a=l(s(Math.min(i,0))),c=null===t.threshold?i<0:i<t.threshold,h=Xa("rect");Qa(h,{x:n*(o+t.barGap),y:r,width:o,height:a-r,rx:t.barRadius,fill:Za(c?"negative":"stroke")}),e.append(h)}),e}_renderTristate(){const t=this._config,e=this._createSvg(),i=t.values.length,n=(t.width-t.barGap*(i-1))/i,s=t.height/2,r=Math.min(2,s);return this._hairline(e,s,"zero"),t.values.forEach((i,o)=>{const a=Xa("rect"),l=i>0?{y:0,height:s,fill:"stroke"}:i<0?{y:s,height:s,fill:"negative"}:{y:s-r/2,height:r,fill:"track"};Qa(a,{x:o*(n+t.barGap),y:l.y,width:n,height:l.height,rx:t.barRadius,fill:Za(l.fill)}),e.append(a)}),e}_renderCircle(){const t=this._config,e=this._createSvg(),i=nl(this._element,"stroke-width",2),n=Math.max(0,Math.min(t.width,t.height)/2-i/2),s=t.width/2,r=t.height/2,o=this._circleRatio(),a=2*Math.PI*n,l=Xa("circle");Qa(l,{cx:s,cy:r,r:n,fill:"none",stroke:Za("track"),"stroke-width":i}),e.append(l);const c=Xa("circle");return Qa(c,{cx:s,cy:r,r:n,fill:"none",stroke:Za("stroke"),"stroke-width":i,"stroke-linecap":"round","stroke-dasharray":a,"stroke-dashoffset":a*(1-o),transform:`rotate(-90 ${s} ${r})`}),e.append(c),e}};J(Ya,sl);var rl="strength",ol=`change.bs.${rl}`,al=`[data-bs-${rl}], [data-tblr-${rl}]`,ll=`.${rl}-segment`,cl=`.${rl}-text`,hl=["weak","fair","good","strong"],ul={input:null,minLength:8,messages:{weak:"Weak",fair:"Fair",good:"Good",strong:"Strong"},weights:{minLength:1,extraLength:1,longPassword:1,lowercase:1,uppercase:1,numbers:1,special:1,multipleSpecial:1},thresholds:[2,4,6],scorer:null},dl={input:"(string|null)",minLength:"number",messages:"object",weights:"object",thresholds:"array",scorer:"(function|null)"},pl=class extends G{constructor(t,e){super(t,e),this._input=null,this._segments=[],this._text=null,this._emptyText="",this._level=null,this._onInput=()=>this.evaluate(),this._element&&(this._input=this._getInput(),this._segments=Q.find(ll,this._element),this._text=this._getText(),this._emptyText=this._text?.textContent?.trim()??"",this._setUpAria(),this._input&&(this._input.addEventListener("input",this._onInput),this.evaluate()))}static get Default(){return ul}static get DefaultType(){return dl}static get NAME(){return rl}get level(){return this._level}evaluate(){if(!this._input)return;const t=this._input.value,e=this._score(t),i=this._level_(e);i!==this._level&&(this._level=i,this._render(i),H.trigger(this._element,ol,{strength:i,score:e}))}dispose(){this._input?.removeEventListener("input",this._onInput),super.dispose()}_configAfterMerge(t){return{...t,messages:{...ul.messages,...t.messages},weights:{...ul.weights,...t.weights}}}_getInput(){const{input:t}=this._config;if(t)return u(t);const e=this._element.parentElement,i=e?Q.find('input[type="password"]',e):[],n=i.filter(t=>Boolean(t.compareDocumentPosition(this._element)&Node.DOCUMENT_POSITION_FOLLOWING));return n[n.length-1]??i[0]??null}_getText(){const t=this._element.parentElement;return t?Q.findOne(cl,t):null}_setUpAria(){const t=this._element;t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(hl.length)),t.setAttribute("aria-valuenow","0"),t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")||t.setAttribute("aria-label","Password strength");for(const t of this._segments)t.setAttribute("aria-hidden","true");this._text?.setAttribute("aria-live","polite")}_score(t){if(!t)return 0;const{scorer:e,weights:i,minLength:n}=this._config;return"function"==typeof e?e(t):[[t.length>=n,i.minLength],[t.length>=n+4,i.extraLength],[t.length>=16,i.longPassword],[/[a-z]/.test(t),i.lowercase],[/[A-Z]/.test(t),i.uppercase],[/\d/.test(t),i.numbers],[/[^\dA-Za-z]/.test(t),i.special],[(t.match(/[^\dA-Za-z]/g)??[]).length>1,i.multipleSpecial]].reduce((t,[e,i])=>t+(e?i??0:0),0)}_level_(t){if(t<=0)return null;const e=this._config.thresholds.findIndex(e=>t<=e);return hl[-1===e?hl.length-1:e]??null}_render(t){const e=this._element,i=t?hl.indexOf(t):-1;e.dataset.bsStrength=t??"",e.setAttribute("aria-valuenow",String(i+1)),t?e.setAttribute("aria-valuetext",this._config.messages[t]??t):e.removeAttribute("aria-valuetext");const n=t?Math.ceil((i+1)/hl.length*this._segments.length):0;for(const[t,e]of this._segments.entries())e.classList.toggle("active",t<n);this._text&&(this._text.textContent=t?this._config.messages[t]??"":this._emptyText,this._text.dataset.bsStrength=t??"")}};J(al,pl);var fl="numberInput",ml="number-input",_l=`change.bs.${fl}`,gl="number-input",bl=`[data-bs-toggle="${ml}"], [data-tblr-toggle="${ml}"]`,vl=`[data-bs-${ml}-action], [data-tblr-${ml}-action]`,yl=[`data-bs-${ml}-action`,`data-tblr-${ml}-action`],wl=yl[0],Al=["sm","lg"],El="ArrowUp",xl="ArrowDown",Tl="Home",Cl="End",kl=["pointerup","pointercancel","pointerleave"],Sl={min:null,max:null,step:null,repeat:!0,repeatDelay:400,repeatInterval:80,decrementLabel:"Decrease",incrementLabel:"Increase"},Il={min:"(number|null)",max:"(number|null)",step:"(number|null)",repeat:"boolean",repeatDelay:"number",repeatInterval:"number",decrementLabel:"string",incrementLabel:"string"},Ol=class extends G{constructor(t,e){if(super(t,e),this._input=null,this._buttons=[],this._wrapper=null,this._min=Number.NEGATIVE_INFINITY,this._max=Number.POSITIVE_INFINITY,this._step=1,this._precision=0,this._disallowed=/[^0-9]/g,this._holdTimer=null,this._repeatTimer=null,this._held=!1,this._lastValue="",this._onClick=t=>this._handleClick(t),this._onPointerDown=t=>this._handlePointerDown(t),this._onPointerEnd=()=>this._stopRepeat(),this._onKeyDown=t=>this._handleKeyDown(t),this._onBeforeInput=t=>this._handleBeforeInput(t),this._onInputChange=()=>this._handleInputChange(),!this._element)return;const i=this._element instanceof HTMLInputElement?this._element:Q.findOne("input",this._element);i&&(this._input=i,this._element===i?this._renderWrapper():this._buttons=Q.find(vl,this._element),this._resolveBounds(),this._setUpInput(),this._addEventListeners(),this._update())}static get Default(){return Sl}static get DefaultType(){return Il}static get NAME(){return fl}getValue(){return this._parse(this._input?.value??"")}setValue(t){const e=this._parse(String(t));null!==e&&this._commit(e)}increment(){this._stepBy(1)}decrement(){this._stepBy(-1)}dispose(){this._stopRepeat(),this._input&&(this._input.removeEventListener("keydown",this._onKeyDown),this._input.removeEventListener("beforeinput",this._onBeforeInput),this._input.removeEventListener("change",this._onInputChange),this._input.removeEventListener("blur",this._onInputChange));for(const t of this._buttons){t.removeEventListener("click",this._onClick),t.removeEventListener("pointerdown",this._onPointerDown);for(const e of kl)t.removeEventListener(e,this._onPointerEnd)}this._wrapper&&this._input&&this._wrapper.replaceWith(this._input),super.dispose()}_renderWrapper(){const t=this._input,e=document.createElement("div");e.className=gl;for(const i of Al)t.classList.contains(`form-control-${i}`)&&e.classList.add(`${gl}-${i}`);const i=(t,e)=>{const i=document.createElement("button");return i.type="button",i.className="btn btn-icon",i.setAttribute(wl,t),i.setAttribute("aria-label",e),i},n=i("decrement",this._config.decrementLabel),s=i("increment",this._config.incrementLabel);t.replaceWith(e),e.append(n,t,s),this._wrapper=e,this._buttons=[n,s]}_resolveBounds(){const t=this._input,e=e=>{const i=Number.parseFloat(t.getAttribute(e)??"");return Number.isFinite(i)?i:null};this._min=this._config.min??e("min")??Number.NEGATIVE_INFINITY,this._max=this._config.max??e("max")??Number.POSITIVE_INFINITY;const i=this._config.step??e("step");this._step=null!==i&&i>0?i:1;const n=String(this._step).split(".")[1];this._precision=n?n.length:0;const s=`0-9${this._min<0?"-":""}${this._precision>0?".,":""}`;this._disallowed=new RegExp(`[^${s}]`,"g")}_setUpInput(){const t=this._input;"number"!==t.type&&(t.setAttribute("role","spinbutton"),t.hasAttribute("inputmode")||t.setAttribute("inputmode",this._precision>0?"decimal":"numeric"));const e=this._parse(t.value);null!==e&&(t.value=this._format(this._clamp(e))),this._lastValue=t.value}_addEventListeners(){const t=this._input;t.addEventListener("keydown",this._onKeyDown),t.addEventListener("beforeinput",this._onBeforeInput),t.addEventListener("change",this._onInputChange),t.addEventListener("blur",this._onInputChange);for(const t of this._buttons){t.addEventListener("click",this._onClick),t.addEventListener("pointerdown",this._onPointerDown);for(const e of kl)t.addEventListener(e,this._onPointerEnd)}}_actionOf(t){for(const e of yl){const i=t.getAttribute(e);if("increment"===i||"decrement"===i)return i}return null}_handleClick(t){const e=t.currentTarget;t.preventDefault(),this._held?this._held=!1:this._runAction(this._actionOf(e))}_handlePointerDown(t){const e=t.currentTarget,i=this._actionOf(e);this._stopRepeat(),this._config.repeat&&i&&!m(e)&&!this._isLocked()&&("mouse"===t.pointerType&&t.preventDefault(),this._holdTimer=setTimeout(()=>{this._holdTimer=null,this._held=!0,this._runAction(i),this._repeatTimer=setInterval(()=>this._runAction(i),this._config.repeatInterval)},this._config.repeatDelay))}_stopRepeat(){null!==this._holdTimer&&(clearTimeout(this._holdTimer),this._holdTimer=null),null!==this._repeatTimer&&(clearInterval(this._repeatTimer),this._repeatTimer=null)}_runAction(t){"increment"===t?this.increment():"decrement"===t&&this.decrement()}_handleKeyDown(t){const e={[El]:()=>this.increment(),[xl]:()=>this.decrement(),[Tl]:()=>this._commit(this._min),[Cl]:()=>this._commit(this._max)}[t.key];e&&(t.key===Tl&&!Number.isFinite(this._min)||"End"===t.key&&!Number.isFinite(this._max)||(t.preventDefault(),e()))}_handleBeforeInput(t){const{data:e,inputType:i}=t;if(!e||!i.startsWith("insert"))return;const n=e.replace(this._disallowed,"");if(n===e)return;if(t.preventDefault(),""===n)return;const s=this._input,r=s.selectionStart??s.value.length,o=s.selectionEnd??r;s.setRangeText(n,r,o,"end"),s.dispatchEvent(new Event("input",{bubbles:!0}))}_handleInputChange(){const t=this._input;if(t.value===this._lastValue)return;const e=this._parse(t.value);if(null===e)return t.value=this._lastValue,void this._update();this._commit(e)}_stepBy(t){if(this._isLocked())return;const e=this.getValue()??this._fallbackValue();this._commit(e+t*this._step)}_fallbackValue(){return Number.isFinite(this._min)&&this._min>0?this._min:Number.isFinite(this._max)&&this._max<0?this._max:0}_commit(t){const e=this._input,i=this.getValue(),n=this._clamp(t),s=this._format(n),r=e.value!==s;e.value=s,this._lastValue=s,this._update(),r&&(e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),H.trigger(this._element,_l,{value:n,previousValue:i}),n!==this._min&&n!==this._max||this._stopRepeat())}_isLocked(){const t=this._input;return t.disabled||t.readOnly}_clamp(t){return Math.min(this._max,Math.max(this._min,t))}_parse(t){const e=t.trim().replace(",",".");if(""===e)return null;const i=Number(e);return Number.isFinite(i)?i:null}_format(t){return t.toFixed(this._precision)}_update(){const t=this._input,e=this.getValue(),i=this._isLocked();for(const t of this._buttons){const n=this._actionOf(t),s=null!==e&&("increment"===n&&e>=this._max||"decrement"===n&&e<=this._min);t.disabled=i||s}"spinbutton"===t.getAttribute("role")&&(Number.isFinite(this._min)&&t.setAttribute("aria-valuemin",this._format(this._min)),Number.isFinite(this._max)&&t.setAttribute("aria-valuemax",this._format(this._max)),null===e?t.removeAttribute("aria-valuenow"):t.setAttribute("aria-valuenow",this._format(e)))}};J(bl,Ol);var Dl=i({getColor:()=>$l,hexToRgba:()=>Ml,prefix:()=>Ll}),Ll="tblr-",Ml=(t,e)=>{const i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?`rgba(${parseInt(i[1],16)}, ${parseInt(i[2],16)}, ${parseInt(i[3],16)}, ${e})`:null},$l=(t,e=1)=>{const i=getComputedStyle(document.body).getPropertyValue(`--${Ll}${t}`).trim();return 1===e?i:Ml(i,e)??(i?`color-mix(in srgb, ${i} ${100*e}%, transparent)`:null)};t.Alert=Xi,t.Autosize=rt,t.Button=Zi,t.Carousel=On,t.Clipboard=_t,t.Collapse=Vn,t.Confetti=Ot,t.CountUp=Ht,t.Datepicker=he,t.Dropdown=ms,t.InputMask=_e,t.Modal=Xs,t.NavOverflow=Cr,t.NumberInput=Ol,t.Offcanvas=Vr,t.OtpInput=Ba,t.Popover=po,Object.defineProperty(t,"Popper",{enumerable:!0,get:function(){return Yi}}),t.ScrollSpy=xo,t.Sortable=Ia,t.Sparkline=sl,t.Strength=pl,t.SwitchIcon=Ea,t.Tab=Uo,t.Toast=la,t.Tooltip=ao,t.bootstrap=ca,Object.defineProperty(t,"tabler",{enumerable:!0,get:function(){return Dl}})});
//# sourceMappingURL=tabler.min.js.map