@thebase/ui 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -269
- package/LICENSE +1 -1
- package/README.md +96 -105
- package/bin/{create-baseui-app.mjs → create-nodexui-app.mjs} +65 -65
- package/dist/{baseui.apidoc.esm.js → nodexui.apidoc.esm.js} +136 -136
- package/dist/{baseui.apidoc.min.js → nodexui.apidoc.min.js} +137 -137
- package/dist/nodexui.esm.js +58 -0
- package/dist/nodexui.icons.esm.js +1 -0
- package/dist/{baseui.min.css → nodexui.min.css} +1 -1
- package/dist/nodexui.min.js +77 -0
- package/dist/{baseui.pwa.esm.js → nodexui.pwa.esm.js} +5 -5
- package/dist/{baseui.registry.json → nodexui.registry.json} +162 -162
- package/dist/{baseui.templates.xml → nodexui.templates.xml} +573 -573
- package/dist/{baseui.vite.esm.js → nodexui.vite.esm.js} +6 -6
- package/dist/runtime/mermaid/mermaid.esm.min.mjs +2 -2
- package/dist/runtime/milkdown/milkdown-editor.js +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
- package/dist/themes/{baseui-dark.css → nodexui-dark.css} +2 -2
- package/dist/themes/{baseui-light.css → nodexui-light.css} +2 -2
- package/dist/types/analytics.d.ts +12 -12
- package/dist/types/apidoc.d.ts +1 -1
- package/dist/types/i18n.d.ts +7 -7
- package/dist/types/index.d.ts +15 -15
- package/dist/types/vite.d.ts +2 -2
- package/docs/analytics.md +12 -12
- package/docs/base-ui-skill.md +4 -4
- package/docs/blocks.md +6 -6
- package/docs/components/accordion.md +4 -4
- package/docs/components/alert-dialog.md +2 -2
- package/docs/components/alert.md +5 -5
- package/docs/components/apidoc.md +14 -14
- package/docs/components/aspect-ratio.md +2 -2
- package/docs/components/attachment.md +5 -5
- package/docs/components/avatar.md +7 -7
- package/docs/components/badge.md +2 -2
- package/docs/components/block-viewer.md +8 -8
- package/docs/components/breadcrumb.md +3 -3
- package/docs/components/bubble.md +2 -2
- package/docs/components/button-group.md +2 -2
- package/docs/components/button.md +2 -2
- package/docs/components/calendar.md +7 -7
- package/docs/components/card.md +2 -2
- package/docs/components/carousel.md +9 -9
- package/docs/components/chart.md +7 -7
- package/docs/components/checkbox.md +2 -2
- package/docs/components/clipboard-button.md +7 -7
- package/docs/components/code-editor.md +1 -1
- package/docs/components/collapsible.md +4 -4
- package/docs/components/combobox.md +7 -7
- package/docs/components/command.md +7 -7
- package/docs/components/context-menu.md +7 -7
- package/docs/components/data-table.md +9 -9
- package/docs/components/date-picker.md +7 -7
- package/docs/components/dialog.md +5 -5
- package/docs/components/direction.md +2 -2
- package/docs/components/drawer.md +4 -4
- package/docs/components/dropdown-menu.md +3 -3
- package/docs/components/empty.md +3 -3
- package/docs/components/field.md +1 -1
- package/docs/components/form.md +3 -3
- package/docs/components/hover-card.md +2 -2
- package/docs/components/icon.md +3 -3
- package/docs/components/input-otp.md +7 -7
- package/docs/components/input.md +6 -6
- package/docs/components/item.md +3 -3
- package/docs/components/kbd.md +2 -2
- package/docs/components/label.md +2 -2
- package/docs/components/markdown.md +13 -13
- package/docs/components/marker.md +2 -2
- package/docs/components/menubar.md +2 -2
- package/docs/components/message-scroller.md +7 -7
- package/docs/components/message.md +7 -7
- package/docs/components/native-select.md +3 -3
- package/docs/components/navigation-menu.md +3 -3
- package/docs/components/pagination.md +3 -3
- package/docs/components/popover.md +10 -10
- package/docs/components/progress.md +2 -2
- package/docs/components/pwa.md +4 -4
- package/docs/components/questionnaire.md +7 -7
- package/docs/components/radio-group.md +2 -2
- package/docs/components/resizable.md +7 -7
- package/docs/components/scroll-area.md +7 -7
- package/docs/components/select.md +2 -2
- package/docs/components/separator.md +2 -2
- package/docs/components/sheet.md +3 -3
- package/docs/components/shell.md +7 -7
- package/docs/components/sidebar.md +3 -3
- package/docs/components/skeleton.md +2 -2
- package/docs/components/slider.md +2 -2
- package/docs/components/spinner.md +4 -4
- package/docs/components/switch.md +2 -2
- package/docs/components/table.md +2 -2
- package/docs/components/tabs.md +6 -6
- package/docs/components/text-editor.md +6 -6
- package/docs/components/textarea.md +3 -3
- package/docs/components/theme-button.md +6 -6
- package/docs/components/toast.md +6 -6
- package/docs/components/toggle-group.md +7 -7
- package/docs/components/toggle.md +7 -7
- package/docs/components/tooltip.md +9 -9
- package/docs/components/typography.md +9 -9
- package/docs/i18n.md +10 -10
- package/docs/icons.md +9 -9
- package/docs/installation.md +31 -33
- package/docs/owl-components.md +36 -38
- package/docs/registry.md +14 -14
- package/docs/runtime-api.md +12 -12
- package/docs/theming.md +15 -15
- package/docs/usage-guide.md +54 -56
- package/package.json +48 -39
- package/dist/baseui.esm.js +0 -58
- package/dist/baseui.icons.esm.js +0 -1
- package/dist/baseui.min.js +0 -77
- /package/dist/{baseui.analytics.esm.js → nodexui.analytics.esm.js} +0 -0
- /package/dist/{baseui.analytics.min.js → nodexui.analytics.min.js} +0 -0
- /package/dist/{baseui.i18n.esm.js → nodexui.i18n.esm.js} +0 -0
- /package/dist/{baseui.i18n.min.js → nodexui.i18n.min.js} +0 -0
- /package/dist/themes/{baseui-dark.min.css → nodexui-dark.min.css} +0 -0
- /package/dist/themes/{baseui-light.min.css → nodexui-light.min.css} +0 -0
package/dist/baseui.min.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Bootstrap v5.3.8 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
4
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
|
-
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),s=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),o=t=>{t.dispatchEvent(new Event(i))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),a=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,l=t=>{if(!r(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},c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),h=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?h(t.parentNode):null},d=()=>{},u=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,p=[],m=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=f();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)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of p)t()}),p.push(e)):e()},_=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,b=(t,e,n=!0)=>{if(!n)return void _(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),_(t))};e.addEventListener(i,a),setTimeout(()=>{r||o(e)},s)},v=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},y=/[^.]*(?=\..*)\.|.*/,w=/\..*/,A=/::\d+$/,E={};let T=1;const C={mouseenter:"mouseover",mouseleave:"mouseout"},O=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 x(t,e){return e&&`${e}::${T++}`||t.uidEvent||T++}function k(t){const e=x(t);return t.uidEvent=e,E[e]=E[e]||{},E[e]}function L(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function S(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=N(t);return O.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=S(e,i,n);if(e in C){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=k(t),c=l[a]||(l[a]={}),h=L(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=x(r,e.replace(y,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function $(t,e,i,n,s){const o=L(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&$(t,e,i,r.callable,r.delegationSelector)}function N(t){return t=t.replace(w,""),C[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=S(e,i,n),a=r!==e,l=k(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(A,"");a&&!e.includes(s)||$(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;$(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=f();let s=null,o=!0,r=!0,a=!1;e!==N(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=j(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function j(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function M(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(e){return t}}function F(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const H={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${F(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${F(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=M(t.dataset[n])}return e},getDataAttribute:(t,e)=>M(t.getAttribute(`data-bs-${F(e)}`))};class W{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=r(e)?H.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...r(e)?H.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],o=r(e)?"element":s(e);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${n}".`)}}}class B extends W{constructor(t,i){super(),(t=a(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){b(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(a(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}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}`}}const z=t=>{let e=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=>n(t)).join(","):null},R={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=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=>!c(t)&&l(t))},getSelectorFromElement(t){const e=z(t);return e&&R.findOne(e)?e:null},getElementFromSelector(t){const e=z(t);return e?R.findOne(e):null},getMultipleElementsFromSelector(t){const e=z(t);return e?R.find(e):[]}},q=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;P.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const s=R.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},V=".bs.alert",K=`close${V}`,Q=`closed${V}`;class X extends B{static get NAME(){return"alert"}close(){if(P.trigger(this._element,K).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(),P.trigger(this._element,Q),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=X.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}q(X,"close"),g(X);const Y='[data-bs-toggle="button"]';class U extends B{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=U.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}P.on(document,"click.bs.button.data-api",Y,t=>{t.preventDefault();const e=t.target.closest(Y);U.getOrCreateInstance(e).toggle()}),g(U);const G=".bs.swipe",J=`touchstart${G}`,Z=`touchmove${G}`,tt=`touchend${G}`,et=`pointerdown${G}`,it=`pointerup${G}`,nt={endCallback:null,leftCallback:null,rightCallback:null},st={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ot extends W{constructor(t,e){super(),this._element=t,t&&ot.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return nt}static get DefaultType(){return st}static get NAME(){return"swipe"}dispose(){P.off(this._element,G)}_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(),_(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&&_(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,et,t=>this._start(t)),P.on(this._element,it,t=>this._end(t)),this._element.classList.add("pointer-event")):(P.on(this._element,J,t=>this._start(t)),P.on(this._element,Z,t=>this._move(t)),P.on(this._element,tt,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}}const rt=".bs.carousel",at=".data-api",lt="ArrowLeft",ct="ArrowRight",ht="next",dt="prev",ut="left",ft="right",pt=`slide${rt}`,mt=`slid${rt}`,gt=`keydown${rt}`,_t=`mouseenter${rt}`,bt=`mouseleave${rt}`,vt=`dragstart${rt}`,yt=`load${rt}${at}`,wt=`click${rt}${at}`,At="carousel",Et="active",Tt=".active",Ct=".carousel-item",Ot=Tt+Ct,xt={[lt]:ft,[ct]:ut},kt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Lt={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class St extends B{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=R.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===At&&this.cycle()}static get Default(){return kt}static get DefaultType(){return Lt}static get NAME(){return"carousel"}next(){this._slide(ht)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(dt)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,mt,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void P.one(this._element,mt,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?ht:dt;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&&P.on(this._element,gt,t=>this._keydown(t)),"hover"===this._config.pause&&(P.on(this._element,_t,()=>this.pause()),P.on(this._element,bt,()=>this._maybeEnableCycle())),this._config.touch&&ot.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of R.find(".carousel-item img",this._element))P.on(t,vt,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(ut)),rightCallback:()=>this._slide(this._directionToOrder(ft)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ot(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=xt[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=R.findOne(Tt,this._indicatorsElement);e.classList.remove(Et),e.removeAttribute("aria-current");const i=R.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Et),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===ht,s=e||v(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>P.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),u(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(Et),i.classList.remove(Et,c,l),this._isSliding=!1,r(mt)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return R.findOne(Ot,this._element)}_getItems(){return R.find(Ct,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return m()?t===ut?dt:ht:t===ut?ht:dt}_orderToDirection(t){return m()?t===dt?ut:ft:t===dt?ft:ut}static jQueryInterface(t){return this.each(function(){const e=St.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}P.on(document,wt,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=R.getElementFromSelector(this);if(!e||!e.classList.contains(At))return;t.preventDefault();const i=St.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===H.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),P.on(window,yt,()=>{const t=R.find('[data-bs-ride="carousel"]');for(const e of t)St.getOrCreateInstance(e)}),g(St);const Dt=".bs.collapse",$t=`show${Dt}`,It=`shown${Dt}`,Nt=`hide${Dt}`,Pt=`hidden${Dt}`,jt=`click${Dt}.data-api`,Mt="show",Ft="collapse",Ht="collapsing",Wt=`:scope .${Ft} .${Ft}`,Bt='[data-bs-toggle="collapse"]',zt={parent:null,toggle:!0},Rt={parent:"(null|element)",toggle:"boolean"};class qt extends B{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=R.find(Bt);for(const t of i){const e=R.getSelectorFromElement(t),i=R.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 zt}static get DefaultType(){return Rt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>qt.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(P.trigger(this._element,$t).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Ft),this._element.classList.add(Ht),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Ht),this._element.classList.add(Ft,Mt),this._element.style[e]="",P.trigger(this._element,It)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,Nt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(Ht),this._element.classList.remove(Ft,Mt);for(const t of this._triggerArray){const e=R.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(Ht),this._element.classList.add(Ft),P.trigger(this._element,Pt)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(Mt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=a(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Bt);for(const e of t){const t=R.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=R.find(Wt,this._config.parent);return R.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",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const i=qt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}P.on(document,jt,Bt,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of R.getMultipleElementsFromSelector(this))qt.getOrCreateInstance(t,{toggle:!1}).toggle()}),g(qt);var Vt="top",Kt="bottom",Qt="right",Xt="left",Yt="auto",Ut=[Vt,Kt,Qt,Xt],Gt="start",Jt="end",Zt="clippingParents",te="viewport",ee="popper",ie="reference",ne=Ut.reduce(function(t,e){return t.concat([e+"-"+Gt,e+"-"+Jt])},[]),se=[].concat(Ut,[Yt]).reduce(function(t,e){return t.concat([e,e+"-"+Gt,e+"-"+Jt])},[]),oe="beforeRead",re="read",ae="afterRead",le="beforeMain",ce="main",he="afterMain",de="beforeWrite",ue="write",fe="afterWrite",pe=[oe,re,ae,le,ce,he,de,ue,fe];function me(t){return t?(t.nodeName||"").toLowerCase():null}function ge(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function _e(t){return t instanceof ge(t).Element||t instanceof Element}function be(t){return t instanceof ge(t).HTMLElement||t instanceof HTMLElement}function ve(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ge(t).ShadowRoot||t instanceof ShadowRoot)}const ye={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];be(s)&&me(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]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});be(n)&&me(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function we(t){return t.split("-")[0]}var Ae=Math.max,Ee=Math.min,Te=Math.round;function Ce(){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 Oe(){return!/^((?!chrome|android).)*safari/i.test(Ce())}function xe(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&be(t)&&(s=t.offsetWidth>0&&Te(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Te(n.height)/t.offsetHeight||1);var r=(_e(t)?ge(t):window).visualViewport,a=!Oe()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function ke(t){var e=xe(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 Le(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ve(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Se(t){return ge(t).getComputedStyle(t)}function De(t){return["table","td","th"].indexOf(me(t))>=0}function $e(t){return((_e(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ie(t){return"html"===me(t)?t:t.assignedSlot||t.parentNode||(ve(t)?t.host:null)||$e(t)}function Ne(t){return be(t)&&"fixed"!==Se(t).position?t.offsetParent:null}function Pe(t){for(var e=ge(t),i=Ne(t);i&&De(i)&&"static"===Se(i).position;)i=Ne(i);return i&&("html"===me(i)||"body"===me(i)&&"static"===Se(i).position)?e:i||function(t){var e=/firefox/i.test(Ce());if(/Trident/i.test(Ce())&&be(t)&&"fixed"===Se(t).position)return null;var i=Ie(t);for(ve(i)&&(i=i.host);be(i)&&["html","body"].indexOf(me(i))<0;){var n=Se(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 je(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Me(t,e,i){return Ae(t,Ee(e,i))}function Fe(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function He(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}const We={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=we(i.placement),l=je(a),c=[Xt,Qt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Fe("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:He(t,Ut))}(s.padding,i),d=ke(o),u="y"===l?Vt:Xt,f="y"===l?Kt:Qt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=Pe(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=Me(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)))&&Le(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Be(t){return t.split("-")[1]}var ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Re(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,m=void 0===p?0:p,g="function"==typeof h?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Xt,y=Vt,w=window;if(c){var A=Pe(i),E="clientHeight",T="clientWidth";A===ge(i)&&"static"!==Se(A=$e(i)).position&&"absolute"===a&&(E="scrollHeight",T="scrollWidth"),(s===Vt||(s===Xt||s===Qt)&&o===Jt)&&(y=Kt,m-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,m*=l?1:-1),s!==Xt&&(s!==Vt&&s!==Kt||o!==Jt)||(v=Qt,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&ze),x=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Te(i*s)/s||0,y:Te(n*s)/s||0}}({x:f,y:m},ge(i)):{x:f,y:m};return f=x.x,m=x.y,l?Object.assign({},O,((C={})[y]=b?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((e={})[y]=b?m+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const qe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:we(e.placement),variation:Be(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,Re(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Re(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:{}};var Ve={passive:!0};const Ke={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=ge(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,Ve)}),a&&l.addEventListener("resize",i.update,Ve),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,Ve)}),a&&l.removeEventListener("resize",i.update,Ve)}},data:{}};var Qe={left:"right",right:"left",bottom:"top",top:"bottom"};function Xe(t){return t.replace(/left|right|bottom|top/g,function(t){return Qe[t]})}var Ye={start:"end",end:"start"};function Ue(t){return t.replace(/start|end/g,function(t){return Ye[t]})}function Ge(t){var e=ge(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Je(t){return xe($e(t)).left+Ge(t).scrollLeft}function Ze(t){var e=Se(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ti(t){return["html","body","#document"].indexOf(me(t))>=0?t.ownerDocument.body:be(t)&&Ze(t)?t:ti(Ie(t))}function ei(t,e){var i;void 0===e&&(e=[]);var n=ti(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=ge(n),r=s?[o].concat(o.visualViewport||[],Ze(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ei(Ie(r)))}function ii(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ni(t,e,i){return e===te?ii(function(t,e){var i=ge(t),n=$e(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Oe();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Je(t),y:l}}(t,i)):_e(e)?function(t,e){var i=xe(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):ii(function(t){var e,i=$e(t),n=Ge(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Ae(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Ae(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Je(t),l=-n.scrollTop;return"rtl"===Se(s||i).direction&&(a+=Ae(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}($e(t)))}function si(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?we(s):null,r=s?Be(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Vt:e={x:a,y:i.y-n.height};break;case Kt:e={x:a,y:i.y+i.height};break;case Qt:e={x:i.x+i.width,y:l};break;case Xt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?je(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Gt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Jt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function oi(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Zt:a,c=i.rootBoundary,h=void 0===c?te:c,d=i.elementContext,u=void 0===d?ee:d,f=i.altBoundary,p=void 0!==f&&f,m=i.padding,g=void 0===m?0:m,_=Fe("number"!=typeof g?g:He(g,Ut)),b=u===ee?ie:ee,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ei(Ie(t)),i=["absolute","fixed"].indexOf(Se(t).position)>=0&&be(t)?Pe(t):t;return _e(i)?e.filter(function(t){return _e(t)&&Le(t,i)&&"body"!==me(t)}):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(e,i){var s=ni(t,i,n);return e.top=Ae(s.top,e.top),e.right=Ee(s.right,e.right),e.bottom=Ee(s.bottom,e.bottom),e.left=Ae(s.left,e.left),e},ni(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(_e(y)?y:y.contextElement||$e(t.elements.popper),l,h,r),A=xe(t.elements.reference),E=si({reference:A,element:v,placement:s}),T=ii(Object.assign({},v,E)),C=u===ee?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===ee&&x){var k=x[s];Object.keys(O).forEach(function(t){var e=[Qt,Kt].indexOf(t)>=0?1:-1,i=[Vt,Kt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e})}return O}function ri(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?se:l,h=Be(n),d=h?a?ne:ne.filter(function(t){return Be(t)===h}):Ut,u=d.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=d);var f=u.reduce(function(e,i){return e[i]=oi(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[we(i)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}const ai={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,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=we(g),b=l||(_!==g&&p?function(t){if(we(t)===Yt)return[];var e=Xe(t);return[Ue(t),e,Ue(e)]}(g):[Xe(g)]),v=[g].concat(b).reduce(function(t,i){return t.concat(we(i)===Yt?ri(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)},[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C<v.length;C++){var O=v[C],x=we(O),k=Be(O)===Gt,L=[Vt,Kt].indexOf(x)>=0,S=L?"width":"height",D=oi(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),$=L?k?Qt:Xt:k?Kt:Vt;y[S]>w[S]&&($=Xe($));var I=Xe($),N=[];if(o&&N.push(D[x]<=0),a&&N.push(D[$]<=0,D[I]<=0),N.every(function(t){return t})){T=O,E=!1;break}A.set(O,N)}if(E)for(var P=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 T=e,"break"},j=p?3:1;j>0&&"break"!==P(j);j--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,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 ci(t){return[Vt,Qt,Kt,Xt].some(function(e){return t[e]>=0})}const hi={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,o=e.modifiersData.preventOverflow,r=oi(e,{elementContext:"reference"}),a=oi(e,{altBoundary:!0}),l=li(r,n),c=li(a,s,o),h=ci(l),d=ci(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},di={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=se.reduce(function(t,i){return t[i]=function(t,e,i){var n=we(t),s=[Xt,Vt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Xt,Qt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t},{}),a=r[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]=r}},ui={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,placement:e.placement})},data:{}},fi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=oi(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=we(e.placement),b=Be(e.placement),v=!b,y=je(_),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,C="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,S="y"===y?Vt:Xt,D="y"===y?Kt:Qt,$="y"===y?"height":"width",I=A[y],N=I+g[S],P=I-g[D],j=f?-T[$]/2:0,M=b===Gt?E[$]:T[$],F=b===Gt?-T[$]:-E[$],H=e.elements.arrow,W=f&&H?ke(H):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=B[S],R=B[D],q=Me(0,E[$],W[$]),V=v?E[$]/2-j-q-z-O.mainAxis:M-q-z-O.mainAxis,K=v?-E[$]/2+j+q+R+O.mainAxis:F+q+R+O.mainAxis,Q=e.elements.arrow&&Pe(e.elements.arrow),X=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=I+K-Y,G=Me(f?Ee(N,I+V-Y-X):N,I,f?Ae(P,U):P);A[y]=G,k[y]=G-I}if(a){var J,Z="x"===y?Vt:Xt,tt="x"===y?Kt:Qt,et=A[w],it="y"===w?"height":"width",nt=et+g[Z],st=et-g[tt],ot=-1!==[Vt,Xt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=Me(t,e,i);return n>i?i:n}(at,et,lt):Me(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:["offset"]};function pi(t,e,i){void 0===i&&(i=!1);var n,s,o=be(e),r=be(e)&&function(t){var e=t.getBoundingClientRect(),i=Te(e.width)/t.offsetWidth||1,n=Te(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=$e(e),l=xe(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==me(e)||Ze(a))&&(c=(n=e)!==ge(n)&&be(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Ge(n)),be(e)?((h=xe(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Je(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function mi(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 gi={placement:"bottom",modifiers:[],strategy:"absolute"};function _i(){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 bi(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?gi:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},gi,o),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;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:_e(t)?ei(t):t.contextElement?ei(t.contextElement):[],popper:ei(e)};var r,c,u=function(t){var e=mi(t);return pe.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.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=u.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 o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(_i(e,i)){a.rects={reference:pi(e,Pe(i),"fixed"===a.options.strategy),popper:ke(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],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return r||(r=new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(s())})})),r}),destroy:function(){d(),c=!0}};if(!_i(t,e))return h;function d(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var vi=bi(),yi=bi({defaultModifiers:[Ke,ui,qe,ye]}),wi=bi({defaultModifiers:[Ke,ui,qe,ye,di,ai,fi,We,hi]});const Ai=Object.freeze(Object.defineProperty({__proto__:null,afterMain:he,afterRead:ae,afterWrite:fe,applyStyles:ye,arrow:We,auto:Yt,basePlacements:Ut,beforeMain:le,beforeRead:oe,beforeWrite:de,bottom:Kt,clippingParents:Zt,computeStyles:qe,createPopper:wi,createPopperBase:vi,createPopperLite:yi,detectOverflow:oi,end:Jt,eventListeners:Ke,flip:ai,hide:hi,left:Xt,main:ce,modifierPhases:pe,offset:di,placements:se,popper:ee,popperGenerator:bi,popperOffsets:ui,preventOverflow:fi,read:re,reference:ie,right:Qt,start:Gt,top:Vt,variationPlacements:ne,viewport:te,write:ue},Symbol.toStringTag,{value:"Module"})),Ei="dropdown",Ti=".bs.dropdown",Ci=".data-api",Oi="ArrowUp",xi="ArrowDown",ki=`hide${Ti}`,Li=`hidden${Ti}`,Si=`show${Ti}`,Di=`shown${Ti}`,$i=`click${Ti}${Ci}`,Ii=`keydown${Ti}${Ci}`,Ni=`keyup${Ti}${Ci}`,Pi="show",ji='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Mi=`${ji}.${Pi}`,Fi=".dropdown-menu",Hi=m()?"top-end":"top-start",Wi=m()?"top-start":"top-end",Bi=m()?"bottom-end":"bottom-start",zi=m()?"bottom-start":"bottom-end",Ri=m()?"left-start":"right-start",qi=m()?"right-start":"left-start",Vi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ki={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Qi extends B{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=R.next(this._element,Fi)[0]||R.prev(this._element,Fi)[0]||R.findOne(Fi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vi}static get DefaultType(){return Ki}static get NAME(){return Ei}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!P.trigger(this._element,Si,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))P.on(t,"mouseover",d);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pi),this._element.classList.add(Pi),P.trigger(this._element,Di,t)}}hide(){if(c(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(!P.trigger(this._element,ki,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",d);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pi),this._element.classList.remove(Pi),this._element.setAttribute("aria-expanded","false"),H.removeDataAttribute(this._menu,"popper"),P.trigger(this._element,Li,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ei.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Ai)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:r(this._config.reference)?t=a(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=wi(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Pi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Ri;if(t.classList.contains("dropstart"))return qi;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?Wi:Hi:e?zi:Bi}_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()}}]};return(this._inNavbar||"static"===this._config.display)&&(H.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..._(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=R.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>l(t));i.length&&v(i,e,t===xi,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=R.find(Mi);for(const i of e){const e=Qi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Oi,xi].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(ji)?this:R.prev(this,ji)[0]||R.next(this,ji)[0]||R.findOne(ji,t.delegateTarget.parentNode),o=Qi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}P.on(document,Ii,ji,Qi.dataApiKeydownHandler),P.on(document,Ii,Fi,Qi.dataApiKeydownHandler),P.on(document,$i,Qi.clearMenus),P.on(document,Ni,Qi.clearMenus),P.on(document,$i,ji,function(t){t.preventDefault(),Qi.getOrCreateInstance(this).toggle()}),g(Qi);const Xi="backdrop",Yi="show",Ui=`mousedown.bs.${Xi}`,Gi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ji={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zi extends W{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return Xi}show(t){if(!this._config.isVisible)return void _(t);this._append();const e=this._getElement();this._config.isAnimated&&u(e),e.classList.add(Yi),this._emulateAnimation(()=>{_(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yi),this._emulateAnimation(()=>{this.dispose(),_(t)})):_(t)}dispose(){this._isAppended&&(P.off(this._element,Ui),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=a(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),P.on(t,Ui,()=>{_(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){b(t,this._getElement(),this._config.isAnimated)}}const tn=".bs.focustrap",en=`focusin${tn}`,nn=`keydown.tab${tn}`,sn="backward",on={autofocus:!0,trapElement:null},rn={autofocus:"boolean",trapElement:"element"};class an extends W{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return on}static get DefaultType(){return rn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),P.off(document,tn),P.on(document,en,t=>this._handleFocusin(t)),P.on(document,nn,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,tn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=R.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?sn:"forward")}}const ln=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cn=".sticky-top",hn="padding-right",dn="margin-right";class un{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,hn,e=>e+t),this._setElementAttributes(ln,hn,e=>e+t),this._setElementAttributes(cn,dn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,hn),this._resetElementAttributes(ln,hn),this._resetElementAttributes(cn,dn)}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&&H.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=H.getDataAttribute(t,e);null!==i?(H.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(r(t))e(t);else for(const i of R.find(t,this._element))e(i)}}const fn=".bs.modal",pn=`hide${fn}`,mn=`hidePrevented${fn}`,gn=`hidden${fn}`,_n=`show${fn}`,bn=`shown${fn}`,vn=`resize${fn}`,yn=`click.dismiss${fn}`,wn=`mousedown.dismiss${fn}`,An=`keydown.dismiss${fn}`,En=`click${fn}.data-api`,Tn="modal-open",Cn="show",On="modal-static",xn={backdrop:!0,focus:!0,keyboard:!0},kn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ln extends B{constructor(t,e){super(t,e),this._dialog=R.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new un,this._addEventListeners()}static get Default(){return xn}static get DefaultType(){return kn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||P.trigger(this._element,_n,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Tn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(P.trigger(this._element,pn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Cn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){P.off(window,fn),P.off(this._dialog,fn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new an({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",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=R.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),u(this._element),this._element.classList.add(Cn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,bn,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){P.on(this._element,An,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),P.on(window,vn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),P.on(this._element,wn,t=>{P.one(this._element,yn,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Tn),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,gn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(P.trigger(this._element,mn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(On)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(On),this._queueCallback(()=>{this._element.classList.remove(On),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=m()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=m()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=Ln.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}})}}P.on(document,En,'[data-bs-toggle="modal"]',function(t){const e=R.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),P.one(e,_n,t=>{t.defaultPrevented||P.one(e,gn,()=>{l(this)&&this.focus()})});const i=R.findOne(".modal.show");i&&Ln.getInstance(i).hide(),Ln.getOrCreateInstance(e).toggle(this)}),q(Ln),g(Ln);const Sn=".bs.offcanvas",Dn=".data-api",$n=`load${Sn}${Dn}`,In="show",Nn="showing",Pn="hiding",jn=".offcanvas.show",Mn=`show${Sn}`,Fn=`shown${Sn}`,Hn=`hide${Sn}`,Wn=`hidePrevented${Sn}`,Bn=`hidden${Sn}`,zn=`resize${Sn}`,Rn=`click${Sn}${Dn}`,qn=`keydown.dismiss${Sn}`,Vn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Qn extends B{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Vn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||P.trigger(this._element,Mn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new un).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Nn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(In),this._element.classList.remove(Nn),P.trigger(this._element,Fn,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,Hn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Pn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(In,Pn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new un).reset(),P.trigger(this._element,Bn)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():P.trigger(this._element,Wn)}:null})}_initializeFocusTrap(){return new an({trapElement:this._element})}_addEventListeners(){P.on(this._element,qn,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():P.trigger(this._element,Wn))})}static jQueryInterface(t){return this.each(function(){const e=Qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}P.on(document,Rn,'[data-bs-toggle="offcanvas"]',function(t){const e=R.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;P.one(e,Bn,()=>{l(this)&&this.focus()});const i=R.findOne(jn);i&&i!==e&&Qn.getInstance(i).hide(),Qn.getOrCreateInstance(e).toggle(this)}),P.on(window,$n,()=>{for(const t of R.find(jn))Qn.getOrCreateInstance(t).show()}),P.on(window,zn,()=>{for(const t of R.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Qn.getOrCreateInstance(t).hide()}),q(Qn),g(Qn);const Xn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],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"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Yn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Un=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Gn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Yn.has(i)||Boolean(Un.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},Jn={allowList:Xn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Zn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ts={entry:"(string|element|function|null)",selector:"(string|element)"};class es extends W{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Jn}static get DefaultType(){return Zn}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},ts)}_setContent(t,e,i){const n=R.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?r(e)?this._putElementInTemplate(a(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(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=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Gn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return _(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const is=new Set(["sanitize","allowList","sanitizeFn"]),ns="fade",ss="show",os=".tooltip-inner",rs=".modal",as="hide.bs.modal",ls="hover",cs="focus",hs="click",ds={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},us={allowList:Xn,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"},fs={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"};class ps extends B{constructor(t,e){if(void 0===Ai)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._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return us}static get DefaultType(){return fs}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),P.off(this._element.closest(rs),as,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-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=P.trigger(this._element,this.constructor.eventName("show")),e=(h(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),P.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.on(t,"mouseover",d);this._queueCallback(()=>{P.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!P.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,"mouseover",d);this._activeTrigger[hs]=!1,this._activeTrigger[cs]=!1,this._activeTrigger[ls]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),P.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(ns,ss),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(ns),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new es({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[os]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ns)}_isShown(){return this.tip&&this.tip.classList.contains(ss)}_createPopper(t){const e=_(this._config.placement,[this,t,this._element]),i=ds[e.toUpperCase()];return wi(this._element,t,this._getPopperConfig(i))}_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 _(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)}}]};return{...e,..._(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)P.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[hs]=!(e._isShown()&&e._activeTrigger[hs]),e.toggle()});else if("manual"!==e){const t=e===ls?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ls?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");P.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?cs:ls]=!0,e._enter()}),P.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?cs:ls]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(rs),as,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._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=H.getDataAttributes(this._element);for(const t of Object.keys(e))is.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:a(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);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(t){return this.each(function(){const e=ps.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}g(ps);const ms=".popover-header",gs=".popover-body",_s={...ps.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"},bs={...ps.DefaultType,content:"(null|string|element|function)"};class vs extends ps{static get Default(){return _s}static get DefaultType(){return bs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ms]:this._getTitle(),[gs]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}g(vs);const ys=".bs.scrollspy",ws=`activate${ys}`,As=`click${ys}`,Es=`load${ys}.data-api`,Ts="active",Cs="[href]",Os=".nav-link",xs=`${Os}, .nav-item > ${Os}, .list-group-item`,ks={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ls={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ss extends B{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 ks}static get DefaultType(){return Ls}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){return t.target=a(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(P.off(this._config.target,As),P.on(this._config.target,As,Cs,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(i.scrollTo)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 o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=R.find(Cs,this._config.target);for(const e of t){if(!e.hash||c(e))continue;const t=R.findOne(decodeURI(e.hash),this._element);l(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(Ts),this._activateParents(t),P.trigger(this._element,ws,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))R.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Ts);else for(const e of R.parents(t,".nav, .list-group"))for(const t of R.prev(e,xs))t.classList.add(Ts)}_clearActiveClass(t){t.classList.remove(Ts);const e=R.find(`${Cs}.${Ts}`,t);for(const t of e)t.classList.remove(Ts)}static jQueryInterface(t){return this.each(function(){const e=Ss.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}P.on(window,Es,()=>{for(const t of R.find('[data-bs-spy="scroll"]'))Ss.getOrCreateInstance(t)}),g(Ss);const Ds=".bs.tab",$s=`hide${Ds}`,Is=`hidden${Ds}`,Ns=`show${Ds}`,Ps=`shown${Ds}`,js=`click${Ds}`,Ms=`keydown${Ds}`,Fs=`load${Ds}`,Hs="ArrowLeft",Ws="ArrowRight",Bs="ArrowUp",zs="ArrowDown",Rs="Home",qs="End",Vs="active",Ks="fade",Qs="show",Xs=".dropdown-toggle",Ys=`:not(${Xs})`,Us='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gs=`.nav-link${Ys}, .list-group-item${Ys}, [role="tab"]${Ys}, ${Us}`,Js=`.${Vs}[data-bs-toggle="tab"], .${Vs}[data-bs-toggle="pill"], .${Vs}[data-bs-toggle="list"]`;class Zs extends B{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),P.on(this._element,Ms,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?P.trigger(e,$s,{relatedTarget:t}):null;P.trigger(t,Ns,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Vs),this._activate(R.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),P.trigger(t,Ps,{relatedTarget:e})):t.classList.add(Qs)},t,t.classList.contains(Ks)))}_deactivate(t,e){t&&(t.classList.remove(Vs),t.blur(),this._deactivate(R.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),P.trigger(t,Is,{relatedTarget:e})):t.classList.remove(Qs)},t,t.classList.contains(Ks)))}_keydown(t){if(![Hs,Ws,Bs,zs,Rs,qs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!c(t));let i;if([Rs,qs].includes(t.key))i=e[t.key===Rs?0:e.length-1];else{const n=[Ws,zs].includes(t.key);i=v(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Zs.getOrCreateInstance(i).show())}_getChildren(){return R.find(Gs,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",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=R.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=R.findOne(t,i);s&&s.classList.toggle(n,e)};n(Xs,Vs),n(".dropdown-menu",Qs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Vs)}_getInnerElement(t){return t.matches(Gs)?t:R.findOne(Gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Zs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}P.on(document,js,Us,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||Zs.getOrCreateInstance(this).show()}),P.on(window,Fs,()=>{for(const t of R.find(Js))Zs.getOrCreateInstance(t)}),g(Zs);const to=".bs.toast",eo=`mouseover${to}`,io=`mouseout${to}`,no=`focusin${to}`,so=`focusout${to}`,oo=`hide${to}`,ro=`hidden${to}`,ao=`show${to}`,lo=`shown${to}`,co="hide",ho="show",uo="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},po={animation:!0,autohide:!0,delay:5e3};class mo extends B{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return po}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){P.trigger(this._element,ao).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(co),u(this._element),this._element.classList.add(ho,uo),this._queueCallback(()=>{this._element.classList.remove(uo),P.trigger(this._element,lo),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(P.trigger(this._element,oo).defaultPrevented||(this._element.classList.add(uo),this._queueCallback(()=>{this._element.classList.add(co),this._element.classList.remove(uo,ho),P.trigger(this._element,ro)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ho),super.dispose()}isShown(){return this._element.classList.contains(ho)}_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(){P.on(this._element,eo,t=>this._onInteraction(t,!0)),P.on(this._element,io,t=>this._onInteraction(t,!1)),P.on(this._element,no,t=>this._onInteraction(t,!0)),P.on(this._element,so,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=mo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}return q(mo),g(mo),{Alert:X,Button:U,Carousel:St,Collapse:qt,Dropdown:Qi,Modal:Ln,Offcanvas:Qn,Popover:vs,ScrollSpy:Ss,Tab:Zs,Toast:mo,Tooltip:ps}});
|
|
7
|
-
/* Vendored from @odoo/owl@2.8.3's dist/owl.iife.min.js, patched to key off globalThis instead of top-level `this` (safe in both classic scripts and ES modules) — see scripts/build.mjs and src/owl/owl-dev-shim.js. */
|
|
8
|
-
!function(t){"use strict";function e(t){t=t.slice();const e=[];let n;for(;(n=t[0])&&"string"==typeof n;)e.push(t.shift());return{modifiers:e,data:t}}const n={shouldNormalizeDom:!0,mainEventHandler:(t,n,o)=>("function"==typeof t?t(n):Array.isArray(t)&&(t=e(t).data)[0](t[1],n),!1)};class o{constructor(t,e){this.key=t,this.child=e}mount(t,e){this.parentEl=t,this.child.mount(t,e)}moveBeforeDOMNode(t,e){this.child.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.moveBeforeDOMNode(t&&t.firstNode()||e)}patch(t,e){if(this===t)return;let n=this.child,o=t.child;this.key===t.key?n.patch(o,e):(o.mount(this.parentEl,n.firstNode()),e&&n.beforeRemove(),n.remove(),this.child=o,this.key=t.key)}beforeRemove(){this.child.beforeRemove()}remove(){this.child.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}function s(t,e){return new o(t,e)}class r extends Error{}let i,l,a,c;if("undefined"!=typeof Element){({setAttribute:i,removeAttribute:l}=Element.prototype);const t=DOMTokenList.prototype;a=t.add,c=t.remove}const h=Array.isArray,{split:u,trim:d}=String.prototype,f=/\s+/;function p(t,e){switch(e){case!1:case void 0:l.call(this,t);break;case!0:i.call(this,t,"");break;default:i.call(this,t,e)}}function m(t){return function(e){p.call(this,t,e)}}function g(t){if(h(t))"class"===t[0]?y.call(this,t[1]):p.call(this,t[0],t[1]);else for(let e in t)"class"===e?y.call(this,t[e]):p.call(this,e,t[e])}function b(t,e){if(h(t)){const n=t[0],o=t[1];if(n===e[0]){if(o===e[1])return;"class"===n?w.call(this,o,e[1]):p.call(this,n,o)}else l.call(this,e[0]),p.call(this,n,o)}else{for(let n in e)n in t||("class"===n?w.call(this,"",e[n]):l.call(this,n));for(let n in t){const o=t[n];o!==e[n]&&("class"===n?w.call(this,o,e[n]):p.call(this,n,o))}}}function v(t){const e={};switch(typeof t){case"string":const n=d.call(t);if(!n)return{};let o=u.call(n,f);for(let t=0,n=o.length;t<n;t++)e[o[t]]=!0;return e;case"object":for(let n in t){const o=t[n];if(o){if(n=d.call(n),!n)continue;const t=u.call(n,f);for(let n of t)e[n]=o}}return e;case"undefined":return{};case"number":return{[t]:!0};default:return{[t]:!0}}}function y(t){t=""===t?{}:v(t);const e=this.classList;for(let n in t)a.call(e,n)}function w(t,e){e=""===e?{}:v(e),t=""===t?{}:v(t);const n=this.classList;for(let o in e)o in t||c.call(n,o);for(let o in t)o in e||a.call(n,o)}function $(t){let e=!1;return async(...n)=>{e||(e=!0,await Promise.resolve(),e=!1,t(...n))}}function x(t){if(!t)return!1;if(t.ownerDocument.contains(t))return!0;const e=t.getRootNode();return e instanceof ShadowRoot&&t.ownerDocument.contains(e.host)}class N extends EventTarget{trigger(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e}))}}class k extends String{}function T(t){return t instanceof k?t:void 0===t?E(""):"number"==typeof t?E(String(t)):([["&","&"],["<","<"],[">",">"],["'","'"],['"',"""],["`","`"]].forEach((e=>{t=String(t).replace(new RegExp(e[0],"g"),e[1])})),E(t))}function E(t,...e){if(!Array.isArray(t))return new k(t);const n=t;let o="",s=0;for(;s<e.length;++s)o+=n[s]+T(e[s]);return o+=n[s],new k(o)}function A(t){const e=t.split(".")[0],o=t.includes(".capture");return t.includes(".synthetic")?function(t,e=!1){let o=`__event__synthetic_${t}`;e&&(o=`${o}_capture`);!function(t,e,o=!1){if(D[e])return;document.addEventListener(t,(t=>function(t,e){let o=e.target;for(;null!==o;){const s=o[t];if(s)for(const t of Object.values(s)){if(n.mainEventHandler(t,e,o))return}o=o.parentNode}}(e,t)),{capture:o}),D[e]=!0}(t,o,e);const s=C++;function r(t){const e=this[o]||{};e[s]=t,this[o]=e}function i(){delete this[o]}return{setup:r,update:r,remove:i}}(e,o):function(t,e=!1){let o=`__event__${t}_${_++}`;e&&(o=`${o}_capture`);function s(t){const e=t.currentTarget;if(!e||!x(e))return;const s=e[o];s&&n.mainEventHandler(s,t,e)}function r(n){this[o]=n,this.addEventListener(t,s,{capture:e})}function i(){delete this[o],this.removeEventListener(t,s,{capture:e})}function l(t){this[o]=t}return{setup:r,update:l,remove:i}}(e,o)}let _=1;let C=1;const D={};let S,O,R;if("undefined"!=typeof Node){const t=Node.prototype;S=t.insertBefore,O=(L=t,B="textContent",Object.getOwnPropertyDescriptor(L,B)).set,R=t.removeChild}var L,B;class P{constructor(t){this.children=t}mount(t,e){const n=this.children,o=n.length,s=new Array(o);for(let r=0;r<o;r++){let o=n[r];if(o)o.mount(t,e);else{const n=document.createTextNode("");s[r]=n,S.call(t,n,e)}}this.anchors=s,this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children,o=this.anchors;for(let s=0,r=n.length;s<r;s++){let r=n[s];if(r)r.moveBeforeDOMNode(t,e);else{const n=o[s];S.call(e,n,t)}}}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchors[0])||null}const n=this.children,o=this.parentEl,s=this.anchors;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r)r.moveBeforeVNode(null,e);else{const n=s[t];S.call(o,n,e)}}}patch(t,e){if(this===t)return;const n=this.children,o=t.children,s=this.anchors,r=this.parentEl;for(let t=0,i=n.length;t<i;t++){const i=n[t],l=o[t];if(i)if(l)i.patch(l,e);else{const o=i.firstNode(),l=document.createTextNode("");s[t]=l,S.call(r,l,o),e&&i.beforeRemove(),i.remove(),n[t]=void 0}else if(l){n[t]=l;const e=s[t];l.mount(r,e),R.call(r,e)}}}beforeRemove(){const t=this.children;for(let e=0,n=t.length;e<n;e++){const n=t[e];n&&n.beforeRemove()}}remove(){const t=this.parentEl;if(this.isOnlyChild)O.call(t,"");else{const e=this.children,n=this.anchors;for(let o=0,s=e.length;o<s;o++){const s=e[o];s?s.remove():R.call(t,n[o])}}}firstNode(){const t=this.children[0];return t?t.firstNode():this.anchors[0]}toString(){return this.children.map((t=>t?t.toString():"")).join("")}}function j(t){return new P(t)}let M,I,W;if("undefined"!=typeof Node){const t=Node.prototype;M=t.insertBefore,W=t.removeChild,I=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(CharacterData.prototype,"data").set}class V{constructor(t){this.text=t}mountNode(t,e,n){this.parentEl=e,M.call(e,t,n),this.el=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,M.call(e,this.el,t)}moveBeforeVNode(t,e){M.call(this.parentEl,this.el,t?t.el:e)}beforeRemove(){}remove(){W.call(this.parentEl,this.el)}firstNode(){return this.el}toString(){return this.text}}class F extends V{mount(t,e){this.mountNode(document.createTextNode(U(this.text)),t,e)}patch(t){const e=t.text;this.text!==e&&(I.call(this.el,U(e)),this.text=e)}}class K extends V{mount(t,e){this.mountNode(document.createComment(U(this.text)),t,e)}patch(){}}function z(t){return new F(t)}function H(t){return new K(t)}function U(t){switch(typeof t){case"string":return t;case"number":return String(t);case"boolean":return t?"true":"false";default:return t||""}}const q=(t,e)=>Object.getOwnPropertyDescriptor(t,e);let G,X,Y,Z,J;"undefined"!=typeof Node&&(G=Node.prototype,X=Element.prototype,Y=q(CharacterData.prototype,"data").set,Z=q(G,"firstChild").get,J=q(G,"nextSibling").get);const Q=()=>{};function tt(t){return function(e){this[t]=0===e?0:e?e.valueOf():""}}const et={};function nt(t){if(t in et)return et[t];const e=(new DOMParser).parseFromString(`<t>${t}</t>`,"text/xml").firstChild.firstChild;n.shouldNormalizeDom&&ot(e);const o=st(e),s=lt(o),r=function(t,e){let n=function(t,e){const{refN:n,collectors:o,children:s}=e,r=o.length;e.locations.sort(((t,e)=>t.idx-e.idx));const i=e.locations.map((t=>({refIdx:t.refIdx,setData:t.setData,updateData:t.updateData}))),l=i.length,a=s.length,c=s,h=n>0,u=G.cloneNode,d=G.insertBefore,f=X.remove;class p{constructor(t){this.data=t}beforeRemove(){}remove(){f.call(this.el)}firstNode(){return this.el}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,d.call(e,this.el,t)}moveBeforeVNode(t,e){d.call(this.parentEl,this.el,t?t.el:e)}toString(){const t=document.createElement("div");return this.mount(t,null),t.innerHTML}mount(e,n){const o=u.call(t,!0);d.call(e,o,n),this.el=o,this.parentEl=e}patch(t,e){}}h&&(p.prototype.mount=function(e,s){const h=u.call(t,!0),f=new Array(n);this.refs=f,f[0]=h;for(let t=0;t<r;t++){const e=o[t];f[e.idx]=e.getVal.call(f[e.prevIdx])}if(l){const t=this.data;for(let e=0;e<l;e++){const n=i[e];n.setData.call(f[n.refIdx],t[e])}}if(d.call(e,h,s),a){const t=this.children;for(let e=0;e<a;e++){const n=t[e];if(n){const t=c[e],o=t.afterRefIdx?f[t.afterRefIdx]:null;n.isOnlyChild=t.isOnlyChild,n.mount(f[t.parentRefIdx],o)}}}this.el=h,this.parentEl=e},p.prototype.patch=function(t,e){if(this===t)return;const n=this.refs;if(l){const e=this.data,o=t.data;for(let t=0;t<l;t++){const s=e[t],r=o[t];if(s!==r){const e=i[t];e.updateData.call(n[e.refIdx],r,s)}}this.data=o}if(a){let o=this.children;const s=t.children;for(let t=0;t<a;t++){const r=o[t],i=s[t];if(r)i?r.patch(i,e):(e&&r.beforeRemove(),r.remove(),o[t]=void 0);else if(i){const e=c[t],s=e.afterRefIdx?n[e.afterRefIdx]:null;i.mount(n[e.parentRefIdx],s),o[t]=i}}}});return p}(t,e);if(e.cbRefs.length){const t=e.cbRefs,o=e.refList;let s=t.length;n=class extends n{mount(t,e){o.push(new Array(s)),super.mount(t,e);for(let t of o.pop())t()}remove(){super.remove();for(let e of t){(0,this.data[e])(null)}}}}if(e.children.length)return n=class extends n{constructor(t,e){super(t),this.children=e}},n.prototype.beforeRemove=P.prototype.beforeRemove,(t,e=[])=>new n(t,e);return t=>new n(t)}(o.el,s);return et[t]=r,r}function ot(t){if(t.nodeType!==Node.TEXT_NODE||/\S/.test(t.textContent)){if(t.nodeType!==Node.ELEMENT_NODE||"pre"!==t.tagName)for(let e=t.childNodes.length-1;e>=0;--e)ot(t.childNodes.item(e))}else t.remove()}function st(t,e=null,n=null){switch(t.nodeType){case Node.ELEMENT_NODE:{let o=n&&n.currentNS;const s=t.tagName;let r;const i=[];if(s.startsWith("block-text-")){const t=parseInt(s.slice(11),10);i.push({type:"text",idx:t}),r=document.createTextNode("")}if(s.startsWith("block-child-")){n.isRef||rt(n);const t=parseInt(s.slice(12),10);i.push({type:"child",idx:t}),r=document.createTextNode("")}if(o||(o=t.namespaceURI),r||(r=o?document.createElementNS(o,s):document.createElement(s)),r instanceof Element){if(!n){document.createElement("template").content.appendChild(r)}const e=t.attributes;for(let t=0;t<e.length;t++){const n=e[t].name,o=e[t].value;if(n.startsWith("block-handler-")){const t=parseInt(n.slice(14),10);i.push({type:"handler",idx:t,event:o})}else if(n.startsWith("block-attribute-")){const t=parseInt(n.slice(16),10);i.push({type:"attribute",idx:t,name:o,tag:s})}else if(n.startsWith("block-property-")){const t=parseInt(n.slice(15),10);i.push({type:"property",idx:t,name:o,tag:s})}else"block-attributes"===n?i.push({type:"attributes",idx:parseInt(o,10)}):"block-ref"===n?i.push({type:"ref",idx:parseInt(o,10)}):r.setAttribute(e[t].name,o)}}const l={parent:e,firstChild:null,nextSibling:null,el:r,info:i,refN:0,currentNS:o};if(t.firstChild){const e=t.childNodes[0];if(1===t.childNodes.length&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.startsWith("block-child-")){const t=e.tagName,n=parseInt(t.slice(12),10);i.push({idx:n,type:"child",isOnlyChild:!0})}else{l.firstChild=st(t.firstChild,l,l),r.appendChild(l.firstChild.el);let e=t.firstChild,n=l.firstChild;for(;e=e.nextSibling;)n.nextSibling=st(e,n,l),r.appendChild(n.nextSibling.el),n=n.nextSibling}}return l.info.length&&rt(l),l}case Node.TEXT_NODE:case Node.COMMENT_NODE:return{parent:e,firstChild:null,nextSibling:null,el:t.nodeType===Node.TEXT_NODE?document.createTextNode(t.textContent):document.createComment(t.textContent),info:[],refN:0,currentNS:null}}throw new r("boom")}function rt(t){t.isRef=!0;do{t.refN++}while(t=t.parent)}function it(t){let e=t.parent;for(;e&&e.nextSibling===t;)t=e,e=e.parent;return e}function lt(t,e,n){if(!e){e={collectors:[],locations:[],children:new Array(t.info.filter((t=>"child"===t.type)).length),cbRefs:[],refN:t.refN,refList:[]},n=0}if(t.refN){const o=n,s=t.isRef,r=t.firstChild?t.firstChild.refN:0,i=t.nextSibling?t.nextSibling.refN:0;if(s){for(let e of t.info)e.refIdx=o;t.refIdx=o,function(t,e){for(let n of e.info)switch(n.type){case"text":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:at,updateData:at});break;case"child":n.isOnlyChild?t.children[n.idx]={parentRefIdx:n.refIdx,isOnlyChild:!0}:t.children[n.idx]={parentRefIdx:it(e).refIdx,afterRefIdx:n.refIdx};break;case"property":{const e=n.refIdx,o=tt(n.name);t.locations.push({idx:n.idx,refIdx:e,setData:o,updateData:o});break}case"attribute":{const e=n.refIdx;let o,s;"class"===n.name?(s=y,o=w):(s=m(n.name),o=s),t.locations.push({idx:n.idx,refIdx:e,setData:s,updateData:o});break}case"attributes":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:g,updateData:b});break;case"handler":{const{setup:e,update:o}=A(n.event);t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:e,updateData:o});break}case"ref":const o=t.cbRefs.push(n.idx)-1;t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:ct(o,t.refList),updateData:Q})}}(e,t),n++}if(i){const s=n+r;e.collectors.push({idx:s,prevIdx:o,getVal:J}),lt(t.nextSibling,e,s)}r&&(e.collectors.push({idx:n,prevIdx:o,getVal:Z}),lt(t.firstChild,e,n))}return e}function at(t){Y.call(this,U(t))}function ct(t,e){return function(n){e[e.length-1][t]=()=>n(this)}}let ht,ut,dt,ft,pt,mt;if("undefined"!=typeof Node){const t=Node.prototype;ht=t.insertBefore,ut=t.appendChild,dt=t.removeChild,ft=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(t,"textContent").set}class gt{constructor(t){this.children=t}mount(t,e){const n=this.children,o=document.createTextNode("");this.anchor=o,ht.call(t,o,e);const s=n.length;if(s){const e=n[0].mount;for(let r=0;r<s;r++)e.call(n[r],t,o)}this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children;for(let o=0,s=n.length;o<s;o++)n[o].moveBeforeDOMNode(t,e);e.insertBefore(this.anchor,t)}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchor)||null}const n=this.children;for(let t=0,o=n.length;t<o;t++)n[t].moveBeforeVNode(null,e);this.parentEl.insertBefore(this.anchor,e)}patch(t,e){if(this===t)return;const n=this.children,o=t.children;if(0===o.length&&0===n.length)return;this.children=o;const s=o[0]||n[0],{mount:r,patch:i,remove:l,beforeRemove:a,moveBeforeVNode:c,firstNode:h}=s,u=this.anchor,d=this.isOnlyChild,f=this.parentEl;if(0===o.length&&d){if(e)for(let t=0,e=n.length;t<e;t++)a.call(n[t]);return ft.call(f,""),void ut.call(f,u)}let p,m=0,g=0,b=n[0],v=o[0],y=n.length-1,w=o.length-1,$=n[y],x=o[w];for(;m<=y&&g<=w;){if(null===b){b=n[++m];continue}if(null===$){$=n[--y];continue}let t=b.key,s=v.key;if(t===s){i.call(b,v,e),o[g]=b,b=n[++m],v=o[++g];continue}let l=$.key,a=x.key;if(l===a){i.call($,x,e),o[w]=$,$=n[--y],x=o[--w];continue}if(t===a){i.call(b,x,e),o[w]=b;const t=o[w+1];c.call(b,t,u),b=n[++m],x=o[--w];continue}if(l===s){i.call($,v,e),o[g]=$;const t=n[m];c.call($,t,u),$=n[--y],v=o[++g];continue}p=p||vt(n,m,y);let d=p[s];if(void 0===d)r.call(v,f,h.call(b)||null);else{const t=n[d];c.call(t,b,null),i.call(t,v,e),o[g]=t,n[d]=null}v=o[++g]}if(m<=y||g<=w)if(m>y){const t=o[w+1],e=t?h.call(t)||null:u;for(let t=g;t<=w;t++)r.call(o[t],f,e)}else for(let t=m;t<=y;t++){let o=n[t];o&&(e&&a.call(o),l.call(o))}}beforeRemove(){const t=this.children,e=t.length;if(e){const n=t[0].beforeRemove;for(let o=0;o<e;o++)n.call(t[o])}}remove(){const{parentEl:t,anchor:e}=this;if(this.isOnlyChild)ft.call(t,"");else{const n=this.children,o=n.length;if(o){const t=n[0].remove;for(let e=0;e<o;e++)t.call(n[e])}dt.call(t,e)}}firstNode(){const t=this.children[0];return t?t.firstNode():void 0}toString(){return this.children.map((t=>t.toString())).join("")}}function bt(t){return new gt(t)}function vt(t,e,n){let o={};for(let s=e;s<=n;s++)o[t[s].key]=s;return o}if("undefined"!=typeof Node){const t=Node.prototype;pt=t.insertBefore,mt=t.removeChild}class yt{constructor(t){this.content=[],this.html=t}mount(t,e){this.parentEl=t;const n=document.createElement("template");n.innerHTML=this.html,this.content=[...n.content.childNodes];for(let n of this.content)pt.call(t,n,e);if(!this.content.length){const n=document.createTextNode("");this.content.push(n),pt.call(t,n,e)}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;for(let n of this.content)pt.call(e,n,t)}moveBeforeVNode(t,e){const n=t?t.content[0]:e;this.moveBeforeDOMNode(n)}patch(t){if(this===t)return;const e=t.html;if(this.html!==e){const n=this.parentEl,o=this.content[0],s=document.createElement("template");s.innerHTML=e;const r=[...s.content.childNodes];for(let t of r)pt.call(n,t,o);if(!r.length){const t=document.createTextNode("");r.push(t),pt.call(n,t,o)}this.remove(),this.content=r,this.html=t.html}}beforeRemove(){}remove(){const t=this.parentEl;for(let e of this.content)mt.call(t,e)}firstNode(){return this.content[0]}toString(){return this.html}}function wt(t){return new yt(t)}function $t(t,e,n=null){t.mount(e,n)}const xt=new WeakMap,Nt=new WeakMap;function kt(t,e){if(!t)return!1;const n=t.fiber;n&&xt.set(n,e);const o=Nt.get(t);if(o){let t=!1;for(let n=o.length-1;n>=0;n--)try{o[n](e),t=!0;break}catch(t){e=t}if(t)return!0}return kt(t.parent,e)}function Tt(t){let{error:e}=t;e instanceof r||(e=Object.assign(new r('An error occured in the owl lifecycle (see this Error\'s "cause" property)'),{cause:e}));const n="node"in t?t.node:t.fiber.node,o="fiber"in t?t.fiber:n.fiber;if(o){let t=o;do{t.node.fiber=t,xt.set(t,e),t=t.parent}while(t);xt.set(o.root,e)}if(!kt(n,e)){console.warn("[Owl] Unhandled error. Destroying the root component");try{n.app.destroy()}catch(t){console.error(t)}throw e}}function Et(){throw new r("Attempted to render cancelled fiber")}function At(t){let e=0;for(let n of t){let t=n.node;n.render=Et,0===t.status&&t.cancel(),t.fiber=null,n.bdom?t.forceNextRender=!0:e++,e+=At(n.children)}return e}class _t{constructor(t,e){if(this.bdom=null,this.children=[],this.appliedToDom=!1,this.deep=!1,this.childrenMap={},this.node=t,this.parent=e,e){this.deep=e.deep;const t=e.root;t.setCounter(t.counter+1),this.root=t,e.children.push(this)}else this.root=this}render(){let t=this.root.node,e=t.app.scheduler,n=t.parent;for(;n;){if(n.fiber){let o=n.fiber.root;if(0!==o.counter||!(t.parentKey in n.fiber.childrenMap))return void e.delayedRenders.push(this);n=o.node}t=n,n=n.parent}this._render()}_render(){const t=this.node,e=this.root;if(e){try{this.bdom=!0,this.bdom=t.renderFn()}catch(e){t.app.handleError({node:t,error:e})}e.setCounter(e.counter-1)}}}class Ct extends _t{constructor(){super(...arguments),this.counter=1,this.willPatch=[],this.patched=[],this.mounted=[],this.locked=!1}complete(){const t=this.node;let e;this.locked=!0;let n=this.mounted;try{for(e of this.willPatch){let t=e.node;if(t.fiber===e){const e=t.component;for(let n of t.willPatch)n.call(e)}}for(e=void 0,t._patch(),this.locked=!1;e=n.pop();)if(e.appliedToDom)for(let t of e.node.mounted)t();let o=this.patched;for(;e=o.pop();)if(e.appliedToDom)for(let t of e.node.patched)t()}catch(o){for(let t of n)t.node.willUnmount=[];this.locked=!1,t.app.handleError({fiber:e||this,error:o})}}setCounter(t){this.counter=t,0===t&&this.node.app.scheduler.flush()}}class Dt extends Ct{constructor(t,e,n={}){super(t,null),this.target=e,this.position=n.position||"last-child"}complete(){let t=this;try{const e=this.node;if(e.children=this.childrenMap,e.app.constructor.validateTarget(this.target),e.bdom)e.updateDom();else if(e.bdom=this.bdom,"last-child"===this.position||0===this.target.childNodes.length)$t(e.bdom,this.target);else{const t=this.target.childNodes[0];$t(e.bdom,this.target,t)}e.fiber=null,e.status=1,this.appliedToDom=!0;let n=this.mounted;for(;t=n.pop();)if(t.appliedToDom)for(let e of t.node.mounted)e()}catch(e){this.node.app.handleError({fiber:t,error:e})}}}const St=Symbol("Key changes"),Ot=()=>{throw new Error("Called NO_CALLBACK. Owl is broken, please report this to the maintainers.")},Rt=Object.prototype.toString,Lt=Object.prototype.hasOwnProperty,Bt=["Object","Array","Set","Map","WeakMap"],Pt=["Set","Map","WeakMap"];function jt(t){return Rt.call(Ft(t)).slice(8,-1)}function Mt(t){return"object"==typeof t&&Bt.includes(jt(t))}function It(t,e){return Mt(t)?Yt(t,e):t}const Wt=new WeakSet;function Vt(t){return Wt.add(t),t}function Ft(t){return Gt.has(t)?Gt.get(t):t}const Kt=new WeakMap;function zt(t,e,n){if(n===Ot)return;Kt.get(t)||Kt.set(t,new Map);const o=Kt.get(t);o.get(e)||o.set(e,new Set),o.get(e).add(n),Ut.has(n)||Ut.set(n,new Set),Ut.get(n).add(t)}function Ht(t,e){const n=Kt.get(t);if(!n)return;const o=n.get(e);if(o)for(const t of[...o])qt(t),t()}const Ut=new WeakMap;function qt(t){const e=Ut.get(t);if(e){for(const n of e){const e=Kt.get(n);if(e)for(const[n,o]of e.entries())o.delete(t),o.size||e.delete(n)}e.clear()}}const Gt=new WeakMap,Xt=new WeakMap;function Yt(t,e=Ot){if(!Mt(t))throw new r("Cannot make the given value reactive");if(Wt.has(t))return t;if(Gt.has(t))return Yt(Gt.get(t),e);Xt.has(t)||Xt.set(t,new WeakMap);const n=Xt.get(t);if(!n.has(e)){const o=jt(t),s=Pt.includes(o)?function(t,e,n){const o=oe[n](t,e);return Object.assign(Zt(e),{get:(t,n)=>Lt.call(o,n)?o[n]:(zt(t,n,e),It(t[n],e))})}(t,e,o):Zt(e),r=new Proxy(t,s);n.set(e,r),Gt.set(r,t)}return n.get(e)}function Zt(t){return{get(e,n,o){const s=Object.getOwnPropertyDescriptor(e,n);return!s||s.writable||s.configurable?(zt(e,n,t),It(Reflect.get(e,n,o),t)):Reflect.get(e,n,o)},set(t,e,n,o){const s=Lt.call(t,e),r=Reflect.get(t,e,o),i=Reflect.set(t,e,Ft(n),o);return!s&&Lt.call(t,e)&&Ht(t,St),(r!==Reflect.get(t,e,o)||"length"===e&&Array.isArray(t))&&Ht(t,e),i},deleteProperty(t,e){const n=Reflect.deleteProperty(t,e);return Ht(t,St),Ht(t,e),n},ownKeys:e=>(zt(e,St,t),Reflect.ownKeys(e)),has:(e,n)=>(zt(e,St,t),Reflect.has(e,n))}}function Jt(t,e,n){return o=>(o=Ft(o),zt(e,o,n),It(e[t](o),n))}function Qt(t,e,n){return function*(){zt(e,St,n);const o=e.keys();for(const s of e[t]()){const t=o.next().value;zt(e,t,n),yield It(s,n)}}}function te(t,e){return function(n,o){zt(t,St,e),t.forEach((function(s,r,i){zt(t,r,e),n.call(o,It(s,e),It(r,e),It(i,e))}),o)}}function ee(t,e,n){return(o,s)=>{o=Ft(o);const r=n.has(o),i=n[e](o),l=n[t](o,s);return r!==n.has(o)&&Ht(n,St),i!==n[e](o)&&Ht(n,o),l}}function ne(t){return()=>{const e=[...t.keys()];t.clear(),Ht(t,St);for(const n of e)Ht(t,n)}}const oe={Set:(t,e)=>({has:Jt("has",t,e),add:ee("add","has",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),Map:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),WeakMap:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t)})};let se=null;function re(){if(!se)throw new r("No active component (a hook function should only be called in 'setup')");return se}function ie(t,e){for(let n in e)void 0===t[n]&&(t[n]=e[n])}const le=new WeakMap;function ae(t){const e=re();let n=le.get(e);if(!n){const t={fn:$(e.render.bind(e,!1))};n=(...e)=>t.fn(...e),le.set(e,n),e.willDestroy.push(he.bind(null,t,n))}return Yt(t,n)}const ce=()=>{};function he(t,e){t.fn=ce,qt(e)}class ue{constructor(t,e,n,o,s){this.fiber=null,this.bdom=null,this.status=0,this.forceNextRender=!1,this.nextProps=null,this.children=Object.create(null),this.refs={},this.willStart=[],this.willUpdateProps=[],this.willUnmount=[],this.mounted=[],this.willPatch=[],this.patched=[],this.willDestroy=[],se=this,this.app=n,this.parent=o,this.props=e,this.parentKey=s;const r=t.defaultProps;e=Object.assign({},e),r&&ie(e,r);const i=o&&o.childEnv||n.env;this.childEnv=i;for(const t in e){const n=e[t];n&&"object"==typeof n&&Gt.has(n)&&(e[t]=ae(n))}this.component=new t(e,i,this);const l=Object.assign(Object.create(this.component),{this:this.component});this.renderFn=n.getTemplate(t.template).bind(this.component,l,this),this.component.setup(),se=null}mountComponent(t,e){const n=new Dt(this,t,e);this.app.scheduler.addFiber(n),this.initiateRender(n)}async initiateRender(t){this.fiber=t,this.mounted.length&&t.root.mounted.push(t);const e=this.component;try{await Promise.all(this.willStart.map((t=>t.call(e))))}catch(t){return void this.app.handleError({node:this,error:t})}0===this.status&&this.fiber===t&&t.render()}async render(t){if(this.status>=2)return;let e=this.fiber;if(e&&(e.root.locked||!0===e.bdom)&&(await Promise.resolve(),e=this.fiber),e){if(!e.bdom&&!xt.has(e))return void(t&&(e.deep=t));t=t||e.deep}else if(!this.bdom)return;const n=function(t){let e=t.fiber;if(e){let t=e.root;return t.locked=!0,t.setCounter(t.counter+1-At(e.children)),t.locked=!1,e.children=[],e.childrenMap={},e.bdom=null,xt.has(e)&&(xt.delete(e),xt.delete(t),e.appliedToDom=!1,e instanceof Ct&&(e.mounted=e instanceof Dt?[e]:[])),e}const n=new Ct(t,null);return t.willPatch.length&&n.willPatch.push(n),t.patched.length&&n.patched.push(n),n}(this);n.deep=t,this.fiber=n,this.app.scheduler.addFiber(n),await Promise.resolve(),this.status>=2||this.fiber!==n||!e&&n.parent||n.render()}cancel(){this._cancel(),delete this.parent.children[this.parentKey],this.app.scheduler.scheduleDestroy(this)}_cancel(){this.status=2;const t=this.children;for(let e in t)t[e]._cancel()}destroy(){let t=1===this.status;this._destroy(),t&&this.bdom.remove()}_destroy(){const t=this.component;if(1===this.status)for(let e of this.willUnmount)e.call(t);for(let t of Object.values(this.children))t._destroy();if(this.willDestroy.length)try{for(let e of this.willDestroy)e.call(t)}catch(t){this.app.handleError({error:t,node:this})}this.status=3}async updateAndRender(t,e){this.nextProps=t,t=Object.assign({},t);const n=function(t,e){let n=t.fiber;return n&&(At(n.children),n.root=null),new _t(t,e)}(this,e);this.fiber=n;const o=this.component,s=o.constructor.defaultProps;s&&ie(t,s),se=this;for(const e in t){const n=t[e];n&&"object"==typeof n&&Gt.has(n)&&(t[e]=ae(n))}se=null;const r=Promise.all(this.willUpdateProps.map((e=>e.call(o,t))));if(await r,n!==this.fiber)return;o.props=t,n.render();const i=e.root;this.willPatch.length&&i.willPatch.push(n),this.patched.length&&i.patched.push(n)}updateDom(){if(this.fiber)if(this.bdom===this.fiber.bdom)for(let t in this.children){this.children[t].updateDom()}else this.bdom.patch(this.fiber.bdom,!1),this.fiber.appliedToDom=!0,this.fiber=null}setRef(t,e){e&&(this.refs[t]=e)}firstNode(){const t=this.bdom;return t?t.firstNode():void 0}mount(t,e){const n=this.fiber.bdom;this.bdom=n,n.mount(t,e),this.status=1,this.fiber.appliedToDom=!0,this.children=this.fiber.childrenMap,this.fiber=null}moveBeforeDOMNode(t,e){this.bdom.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.bdom.moveBeforeVNode(t?t.bdom:null,e)}patch(){this.fiber&&this.fiber.parent&&(this._patch(),this.props=this.nextProps)}_patch(){let t=!1;for(let e in this.children){t=!0;break}const e=this.fiber;this.children=e.childrenMap,this.bdom.patch(e.bdom,t),e.appliedToDom=!0,this.fiber=null}beforeRemove(){this._destroy()}remove(){this.bdom.remove()}get name(){return this.component.constructor.name}get subscriptions(){const t=le.get(this);return t?(e=t,[...Ut.get(e)||[]].map((t=>{const n=Kt.get(t);let o=[];if(n)for(const[t,s]of n)s.has(e)&&o.push(t);return{target:t,keys:o}}))):[];var e}}const de=Symbol("timeout"),fe={onWillStart:3e3,onWillUpdateProps:3e3};function pe(t,e){const n=new r,o=new r,s=re();return(...r)=>{const i=t=>{throw n.cause=t,n.message=t instanceof Error?`The following error occurred in ${e}: "${t.message}"`:`Something that is not an Error was thrown in ${e} (see this Error's "cause" property)`,n};let l;try{l=t(...r)}catch(t){i(t)}if(!(l instanceof Promise))return l;const a=fe[e];if(a){const t=s.fiber;Promise.race([l.catch((()=>{})),new Promise((t=>setTimeout((()=>t(de)),a)))]).then((n=>{n===de&&s.fiber===t&&s.status<=2&&(o.message=`${e}'s promise hasn't resolved after ${a/1e3} seconds`,console.log(o))}))}return l.catch(i)}}function me(t){const e=re(),n=e.app.dev?pe:t=>t;e.mounted.push(n(t.bind(e.component),"onMounted"))}function ge(t){const e=re(),n=e.app.dev?pe:t=>t;e.patched.push(n(t.bind(e.component),"onPatched"))}function be(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUnmount.unshift(n(t.bind(e.component),"onWillUnmount"))}class ve{constructor(t,e,n){this.props=t,this.env=e,this.__owl__=n}setup(){}render(t=!1){this.__owl__.render(!0===t)}}ve.template="";const ye=z("").constructor;class we extends ye{constructor(t,e){super(""),this.target=null,this.selector=t,this.content=e}mount(t,e){super.mount(t,e),this.target=document.querySelector(this.selector),this.target?this.content.mount(this.target,null):this.content.mount(t,e)}beforeRemove(){this.content.beforeRemove()}remove(){this.content&&(super.remove(),this.content.remove(),this.content=null)}patch(t){super.patch(t),this.content?this.content.patch(t.content,!0):(this.content=t.content,this.content.mount(this.target,null))}}class $e extends ve{setup(){const t=this.__owl__;me((()=>{const e=t.bdom;if(!e.target){const t=document.querySelector(this.props.target);if(!t)throw new r("invalid portal target");e.content.moveBeforeDOMNode(t.firstChild,t)}})),be((()=>{t.bdom.remove()}))}}$e.template="__portal__",$e.props={target:{type:String},slots:!0};const xe=t=>Array.isArray(t),Ne=t=>"object"!=typeof t,ke=t=>"object"==typeof t&&t&&"value"in t;function Te(t){return"object"==typeof t&&"optional"in t&&t.optional||!1}function Ee(t){return"*"===t||!0===t?"value":t.name.toLowerCase()}function Ae(t){return Ne(t)?Ee(t):xe(t)?t.map(Ae).join(" or "):ke(t)?String(t.value):"element"in t?`list of ${Ae({type:t.element,optional:!1})}s`:"shape"in t?"object":Ae(t.type||"*")}function _e(t,e){var n;Array.isArray(e)&&(n=e,e=Object.fromEntries(n.map((t=>t.endsWith("?")?[t.slice(0,-1),{optional:!0}]:[t,{type:"*",optional:!1}])))),t=Ft(t);let o=[];for(let n in t)if(n in e){let s=Ce(n,t[n],e[n]);s&&o.push(s)}else"*"in e||o.push(`unknown key '${n}'`);for(let n in e){const s=e[n];if("*"!==n&&!Te(s)&&!(n in t)){const t="object"==typeof s&&!Array.isArray(s);let e="*"===s||(t&&"type"in s?"*"===s.type:t)?"":` (should be a ${Ae(s)})`;o.push(`'${n}' is missing${e}`)}}return o}function Ce(t,e,n){if(void 0===e)return Te(n)?null:`'${t}' is undefined (should be a ${Ae(n)})`;if(Ne(n))return function(t,e,n){if("function"==typeof n)if("object"==typeof e){if(!(e instanceof n))return`'${t}' is not a ${Ee(n)}`}else if(typeof e!==n.name.toLowerCase())return`'${t}' is not a ${Ee(n)}`;return null}(t,e,n);if(ke(n))return e===n.value?null:`'${t}' is not equal to '${n.value}'`;if(xe(n)){let o=n.find((n=>!Ce(t,e,n)));return o?null:`'${t}' is not a ${Ae(n)}`}let o=null;if("element"in n)o=function(t,e,n){if(!Array.isArray(e))return`'${t}' is not a list of ${Ae(n)}s`;for(let o=0;o<e.length;o++){const s=Ce(`${t}[${o}]`,e[o],n);if(s)return s}return null}(t,e,n.element);else if("shape"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=_e(e,n.shape);s.length&&(o=`'${t}' doesn't have the correct shape (${s.join(", ")})`)}else if("values"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=Object.entries(e).map((([t,e])=>Ce(t,e,n.values))).filter(Boolean);s.length&&(o=`some of the values in '${t}' are invalid (${s.join(", ")})`)}return"type"in n&&!o&&(o=Ce(t,e,n.type)),"validate"in n&&!o&&(o=n.validate(e)?null:`'${t}' is not valid`),o}const De=Object.create;function Se(t){const e=De(t);for(let n in t)e[n]=t[n];return e}const Oe=Symbol("isBoundary");class Re{constructor(t,e,n,o,s){this.fn=t,this.ctx=Se(e),this.component=n,this.node=o,this.key=s}evaluate(){return this.fn.call(this.component,this.ctx,this.node,this.key)}toString(){return this.evaluate().toString()}}function Le(t,e,n){const o="string"!=typeof t?t:n.constructor.components[t];if(!o)return;const s=o.props;if(!s)return void(n.__owl__.app.warnIfNoStaticProps&&console.warn(`Component '${o.name}' does not have a static props description`));const i=o.defaultProps;if(i){let t=t=>Array.isArray(s)?s.includes(t):t in s&&!("*"in s)&&!Te(s[t]);for(let e in i)if(t(e))throw new r(`A default value cannot be defined for a mandatory prop (name: '${e}', component: ${o.name})`)}const l=_e(e,s);if(l.length)throw new r(`Invalid props for component '${o.name}': `+l.join(", "))}const Be={withDefault:function(t,e){return null==t||!1===t?e:t},zero:Symbol("zero"),isBoundary:Oe,callSlot:function(t,e,n,o,r,i,l){n=n+"__slot_"+o;const a=t.props.slots||{},{__render:c,__ctx:h,__scope:u}=a[o]||{},d=De(h||{});u&&(d[u]=i);const f=c?c(d,e,n):null;if(l){let i,a;return f?i=r?s(o,f):f:a=l(t,e,n),j([i,a])}return f||z("")},capture:Se,withKey:function(t,e){return t.key=e,t},prepareList:function(t){let e,n;if(Array.isArray(t))e=t,n=t;else if(t instanceof Map)e=[...t.keys()],n=[...t.values()];else if(Symbol.iterator in Object(t))e=[...t],n=e;else{if(!t||"object"!=typeof t)throw new r(`Invalid loop expression: "${t}" is not iterable`);n=Object.values(t),e=Object.keys(t)}const o=n.length;return[e,n,o,new Array(o)]},setContextValue:function(t,e,n){const o=t;for(;!t.hasOwnProperty(e)&&!t.hasOwnProperty(Oe);){const e=t.__proto__;if(!e){t=o;break}t=e}t[e]=n},shallowEqual:function(t,e){for(let n=0,o=t.length;n<o;n++)if(t[n]!==e[n])return!1;return!0},toNumber:function(t){const e=parseFloat(t);return isNaN(e)?t:e},validateProps:Le,LazyValue:Re,safeOutput:function(t,e){if(null==t)return e?s("default",e):s("undefined",z(""));let n,o;switch(typeof t){case"object":t instanceof k?(n="string_safe",o=wt(t)):t instanceof Re?(n="lazy_value",o=t.evaluate()):t instanceof String?(n="string_unsafe",o=z(t)):(n="block_safe",o=t);break;case"string":n="string_unsafe",o=z(t);break;default:n="string_unsafe",o=z(String(t))}return s(n,o)},createCatcher:function(t){const e=Object.keys(t).length;class n{constructor(t,e){this.handlerFns=[],this.afterNode=null,this.child=t,this.handlerData=e}mount(e,n){this.parentEl=e,this.child.mount(e,n),this.afterNode=document.createTextNode(""),e.insertBefore(this.afterNode,n),this.wrapHandlerData();for(let n in t){const o=t[n],s=A(n);this.handlerFns[o]=s,s.setup.call(e,this.handlerData[o])}}wrapHandlerData(){for(let t=0;t<e;t++){let e=this.handlerData[t],n=e.length-2,o=e[n];const s=this;e[n]=function(t){const e=t.target;let n=s.child.firstNode();const r=s.afterNode;for(;n&&n!==r;){if(n.contains(e))return o.call(this,t);n=n.nextSibling}}}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,this.child.moveBeforeDOMNode(t,e),e.insertBefore(this.afterNode,t)}moveBeforeVNode(t,e){t&&(e=t.firstNode()||e),this.child.moveBeforeVNode(t?t.child:null,e),this.parentEl.insertBefore(this.afterNode,e)}patch(t,n){if(this!==t){this.handlerData=t.handlerData,this.wrapHandlerData();for(let t=0;t<e;t++)this.handlerFns[t].update.call(this.parentEl,this.handlerData[t]);this.child.patch(t.child,n)}}beforeRemove(){this.child.beforeRemove()}remove(){for(let t=0;t<e;t++)this.handlerFns[t].remove.call(this.parentEl);this.child.remove(),this.afterNode.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}return function(t,e){return new n(t,e)}},markRaw:Vt,OwlError:r,makeRefWrapper:function(t){let e=new Set;return(n,o)=>{if(e.has(n))throw new r(`Cannot set the same ref more than once in the same component, ref "${n}" was set multiple times in ${t.name}`);return e.add(n),o}}};function Pe(t){const e=(new DOMParser).parseFromString(t,"text/xml");if(e.getElementsByTagName("parsererror").length){let n="Invalid XML in template.";const o=e.getElementsByTagName("parsererror")[0].textContent;if(o){n+="\nThe parser has produced the following error message:\n"+o;const e=/\d+/g,s=e.exec(o);if(s){const r=Number(s[0]),i=t.split("\n")[r-1],l=e.exec(o);if(i&&l){const t=Number(l[0])-1;i[t]&&(n+=`\nThe error might be located at xml line ${r} column ${t}\n${i}\n${"-".repeat(t-1)}^`)}}}throw new r(n)}return e}const je={text:z,createBlock:nt,list:bt,multi:j,html:wt,toggler:s,comment:H};class Me{constructor(t={}){if(this.rawTemplates=Object.create(Ie),this.templates={},this.Portal=$e,this.dev=t.dev||!1,this.translateFn=t.translateFn,this.translatableAttributes=t.translatableAttributes,t.templates)if(t.templates instanceof Document||"string"==typeof t.templates)this.addTemplates(t.templates);else for(const e in t.templates)this.addTemplate(e,t.templates[e]);this.getRawTemplate=t.getTemplate,this.customDirectives=t.customDirectives||{},this.runtimeUtils={...Be,__globals__:t.globalValues||{}},this.hasGlobalValues=Boolean(t.globalValues&&Object.keys(t.globalValues).length)}static registerTemplate(t,e){Ie[t]=e}addTemplate(t,e){if(t in this.rawTemplates){if(!this.dev)return;const n=this.rawTemplates[t];if(("string"==typeof n?n:n instanceof Element?n.outerHTML:n.toString())===("string"==typeof e?e:e.outerHTML))return;throw new r(`Template ${t} already defined with different content`)}this.rawTemplates[t]=e}addTemplates(t){if(t){t=t instanceof Document?t:Pe(t);for(const e of t.querySelectorAll("[t-name]")){const t=e.getAttribute("t-name");this.addTemplate(t,e)}}}getTemplate(t){var e;if(!(t in this.templates)){const n=(null===(e=this.getRawTemplate)||void 0===e?void 0:e.call(this,t))||this.rawTemplates[t];if(void 0===n){let e="";try{e=` (for component "${re().component.constructor.name}")`}catch{}throw new r(`Missing template: "${t}"${e}`)}const o="function"==typeof n&&!(n instanceof Element)?n:this._compileTemplate(t,n),s=this.templates;this.templates[t]=function(e,n){return s[t].call(this,e,n)};const i=o(this,je,this.runtimeUtils);this.templates[t]=i}return this.templates[t]}_compileTemplate(t,e){throw new r("Unable to compile a template. Please use owl full build instead")}callTemplate(t,e,n,o,r){return s(e,this.getTemplate(e).call(t,n,o,r+e))}}const Ie={};function We(...t){const e="__template__"+We.nextId++,n=String.raw(...t);return Ie[e]=n,e}We.nextId=1,Me.registerTemplate("__portal__",(function(t,e,n){let{callSlot:o}=n;return function(t,e,n=""){return new we(t.props.target,o(t,e,n,"default",!1,null))}}));const Ve="true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,eval,void,Math,RegExp,Array,Object,Date,__globals__".split(","),Fe=Object.assign(Object.create(null),{and:"&&",or:"||",gt:">",gte:">=",lt:"<",lte:"<="}),Ke=Object.assign(Object.create(null),{"{":"LEFT_BRACE","}":"RIGHT_BRACE","[":"LEFT_BRACKET","]":"RIGHT_BRACKET",":":"COLON",",":"COMMA","(":"LEFT_PAREN",")":"RIGHT_PAREN"}),ze="...,.,===,==,+,!==,!=,!,||,&&,>=,>,<=,<,?,-,*,/,%,typeof ,=>,=,;,in ,new ,|,&,^,~".split(",");const He=[function(t){let e=t[0],n=e;if("'"!==e&&'"'!==e&&"`"!==e)return!1;let o,s=1;for(;t[s]&&t[s]!==n;){if(o=t[s],e+=o,"\\"===o){if(s++,o=t[s],!o)throw new r("Invalid expression");e+=o}s++}if(t[s]!==n)throw new r("Invalid expression");return e+=n,"`"===n?{type:"TEMPLATE_STRING",value:e,replace:t=>e.replace(/\$\{(.*?)\}/g,((e,n)=>"${"+t(n)+"}"))}:{type:"VALUE",value:e}},function(t){let e=t[0];if(e&&e.match(/[0-9]/)){let n=1;for(;t[n]&&t[n].match(/[0-9]|\./);)e+=t[n],n++;return{type:"VALUE",value:e}}return!1},function(t){for(let e of ze)if(t.startsWith(e))return{type:"OPERATOR",value:e};return!1},function(t){let e=t[0];if(e&&e.match(/[a-zA-Z_\$]/)){let n=1;for(;t[n]&&t[n].match(/\w/);)e+=t[n],n++;return e in Fe?{type:"OPERATOR",value:Fe[e],size:e.length}:{type:"SYMBOL",value:e}}return!1},function(t){const e=t[0];return!(!e||!(e in Ke))&&{type:Ke[e],value:e}}];const Ue=t=>t&&("LEFT_BRACE"===t.type||"COMMA"===t.type),qe=t=>t&&("RIGHT_BRACE"===t.type||"COMMA"===t.type);function Ge(t){const e=new Set,n=function(t){const e=[];let n,o=!0,s=t;try{for(;o;)if(s=s.trim(),s){for(let t of He)if(o=t(s),o){e.push(o),s=s.slice(o.size||o.value.length);break}}else o=!1}catch(t){n=t}if(s.length||n)throw new r(`Tokenizer error: could not tokenize \`${t}\``);return e}(t);let o=0,s=[];for(;o<n.length;){let t=n[o],r=n[o-1],i=n[o+1],l=s[s.length-1];switch(t.type){case"LEFT_BRACE":case"LEFT_BRACKET":case"LEFT_PAREN":s.push(t.type);break;case"RIGHT_BRACE":case"RIGHT_BRACKET":case"RIGHT_PAREN":s.pop()}let a="SYMBOL"===t.type&&!Ve.includes(t.value);if("SYMBOL"!==t.type||Ve.includes(t.value)||r&&("LEFT_BRACE"===l&&Ue(r)&&qe(i)&&(n.splice(o+1,0,{type:"COLON",value:":"},{...t}),i=n[o+1]),"OPERATOR"===r.type&&"."===r.value?a=!1:"LEFT_BRACE"!==r.type&&"COMMA"!==r.type||i&&"COLON"===i.type&&(a=!1)),"TEMPLATE_STRING"===t.type&&(t.value=t.replace((t=>Ye(t)))),i&&"OPERATOR"===i.type&&"=>"===i.value)if("RIGHT_PAREN"===t.type){let t=o-1;for(;t>0&&"LEFT_PAREN"!==n[t].type;)"SYMBOL"===n[t].type&&n[t].originalValue&&(n[t].value=n[t].originalValue,e.add(n[t].value)),t--}else e.add(t.value);a&&(t.varName=t.value,e.has(t.value)||(t.originalValue=t.value,t.value=`ctx['${t.value}']`)),o++}for(const t of n)"SYMBOL"===t.type&&t.varName&&e.has(t.value)&&(t.originalValue=t.value,t.value=`_${t.value}`,t.isLocal=!0);return n}const Xe=new Map([["in "," in "]]);function Ye(t){return Ge(t).map((t=>Xe.get(t.value)||t.value)).join("")}const Ze=/\{\{.*?\}\}|\#\{.*?\}/g;function Je(t,e){let n=t.match(Ze);if(n&&n[0].length===t.length)return`(${e(t.slice(2,"{"===n[0][0]?-2:-1))})`;let o=t.replace(Ze,(t=>"${"+e(t.slice(2,"{"===t[0]?-2:-1))+"}"));return"`"+o+"`"}function Qe(t){return Je(t,Ye)}const tn=/\s+/g;let en;"undefined"!=typeof document&&(en=document.implementation.createDocument(null,null,null));const nn=new Set(["stop","capture","prevent","self","synthetic"]);let on={};function sn(t=""){return on[t]=(on[t]||0)+1,t+on[t]}function rn(t,e){switch(t){case"input":return"checked"===e||"indeterminate"===e||"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"option":return"selected"===e||"disabled"===e;case"textarea":return"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"select":return"value"===e||"disabled"===e;case"button":case"optgroup":return"disabled"===e}return!1}function ln(t){return`\`${t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/,"\\${")}\``}class an{constructor(t,e){this.dynamicTagName=null,this.isRoot=!1,this.hasDynamicChildren=!1,this.children=[],this.data=[],this.childNumber=0,this.parentVar="",this.id=an.nextBlockId++,this.varName="b"+this.id,this.blockName="block"+this.id,this.target=t,this.type=e}insertData(t,e="d"){const n=sn(e);return this.target.addLine(`let ${n} = ${t};`),this.data.push(n)-1}insert(t){this.currentDom?this.currentDom.appendChild(t):this.dom=t}generateExpr(t){if("block"===this.type){const t=this.children.length;let e=this.data.length?`[${this.data.join(", ")}]`:t?"[]":"";return t&&(e+=", ["+this.children.map((t=>t.varName)).join(", ")+"]"),this.dynamicTagName?`toggler(${this.dynamicTagName}, ${this.blockName}(${this.dynamicTagName})(${e}))`:`${this.blockName}(${e})`}return"list"===this.type?`list(c_block${this.id})`:t}asXmlString(){const t=en.createElement("t");return t.appendChild(this.dom),t.innerHTML}}function cn(t,e){return Object.assign({block:null,index:0,forceNewBlock:!0,translate:t.translate,translationCtx:t.translationCtx,tKeyExpr:null,nameSpace:t.nameSpace,tModelSelectedExpr:t.tModelSelectedExpr},e)}an.nextBlockId=1;class hn{constructor(t,e){this.indentLevel=0,this.loopLevel=0,this.code=[],this.hasRoot=!1,this.hasCache=!1,this.shouldProtectScope=!1,this.hasRefWrapper=!1,this.name=t,this.on=e||null}addLine(t,e){const n=new Array(this.indentLevel+2).join(" ");void 0===e?this.code.push(n+t):this.code.splice(e,0,n+t)}generateCode(){let t=[];t.push(`function ${this.name}(ctx, node, key = "") {`),this.shouldProtectScope&&(t.push(" ctx = Object.create(ctx);"),t.push(" ctx[isBoundary] = 1")),this.hasRefWrapper&&t.push(" let refWrapper = makeRefWrapper(this.__owl__);"),this.hasCache&&(t.push(" let cache = ctx.cache || {};"),t.push(" let nextCache = ctx.cache = {};"));for(let e of this.code)t.push(e);return this.hasRoot||t.push("return text('');"),t.push("}"),t.join("\n ")}currentKey(t){let e=this.loopLevel?`key${this.loopLevel}`:"key";return t.tKeyExpr&&(e=`${t.tKeyExpr} + ${e}`),e}}const un=["alt","aria-label","aria-placeholder","aria-roledescription","aria-valuetext","label","placeholder","title"],dn=/^(\s*)([\s\S]+?)(\s*)$/;class fn{constructor(t,e){if(this.blocks=[],this.nextBlockId=1,this.isDebug=!1,this.targets=[],this.target=new hn("template"),this.translatableAttributes=un,this.staticDefs=[],this.slotNames=new Set,this.helpers=new Set,this.translateFn=e.translateFn||(t=>t),e.translatableAttributes){const t=new Set(un);for(let n of e.translatableAttributes)n.startsWith("-")?t.delete(n.slice(1)):t.add(n);this.translatableAttributes=[...t]}this.hasSafeContext=e.hasSafeContext||!1,this.dev=e.dev||!1,this.ast=t,this.templateName=e.name,e.hasGlobalValues&&this.helpers.add("__globals__")}generateCode(){const t=this.ast;this.isDebug=12===t.type,an.nextBlockId=1,on={},this.compileAST(t,{block:null,index:0,forceNewBlock:!1,isLast:!0,translate:!0,translationCtx:"",tKeyExpr:null});let e=[" let { text, createBlock, list, multi, html, toggler, comment } = bdom;"];this.helpers.size&&e.push(`let { ${[...this.helpers].join(", ")} } = helpers;`),this.templateName&&e.push(`// Template name: "${this.templateName}"`);for(let{id:t,expr:n}of this.staticDefs)e.push(`const ${t} = ${n};`);if(this.blocks.length){e.push("");for(let t of this.blocks)if(t.dom){let n=ln(t.asXmlString());t.dynamicTagName?(n=n.replace(/^`<\w+/,`\`<\${tag || '${t.dom.nodeName}'}`),n=n.replace(/\w+>`$/,`\${tag || '${t.dom.nodeName}'}>\``),e.push(`let ${t.blockName} = tag => createBlock(${n});`)):e.push(`let ${t.blockName} = createBlock(${n});`)}}if(this.targets.length)for(let t of this.targets)e.push(""),e=e.concat(t.generateCode());e.push(""),e=e.concat("return "+this.target.generateCode());const n=e.join("\n ");if(this.isDebug){const t=`[Owl Debug]\n${n}`;console.log(t)}return n}compileInNewTarget(t,e,n,o){const s=sn(t),r=this.target,i=new hn(s,o);return this.targets.push(i),this.target=i,this.compileAST(e,cn(n)),this.target=r,s}addLine(t,e){this.target.addLine(t,e)}define(t,e){this.addLine(`const ${t} = ${e};`)}insertAnchor(t,e=t.children.length){const n=`block-child-${e}`,o=en.createElement(n);t.insert(o)}createBlock(t,e,n){const o=this.target.hasRoot,s=new an(this.target,e);return o||(this.target.hasRoot=!0,s.isRoot=!0),t&&(t.children.push(s),"list"===t.type&&(s.parentVar=`c_block${t.id}`)),s}insertBlock(t,e,n){let o=e.generateExpr(t);if(e.parentVar){let t=this.target.currentKey(n);return this.helpers.add("withKey"),void this.addLine(`${e.parentVar}[${n.index}] = withKey(${o}, ${t});`)}n.tKeyExpr&&(o=`toggler(${n.tKeyExpr}, ${o})`),e.isRoot?(this.target.on&&(o=this.wrapWithEventCatcher(o,this.target.on)),this.addLine(`return ${o};`)):this.define(e.varName,o)}captureExpression(t,e=!1){if(!e&&!t.includes("=>"))return Ye(t);const n=Ge(t),o=new Map;return n.map((t=>{if(t.varName&&!t.isLocal){if(!o.has(t.varName)){const e=sn("v");o.set(t.varName,e),this.define(e,t.value)}t.value=o.get(t.varName)}return t.value})).join("")}translate(t,e){const n=dn.exec(t);return n[1]+this.translateFn(n[2],e)+n[3]}compileAST(t,e){switch(t.type){case 1:return this.compileComment(t,e);case 0:return this.compileText(t,e);case 2:return this.compileTDomNode(t,e);case 4:return this.compileTEsc(t,e);case 8:return this.compileTOut(t,e);case 5:return this.compileTIf(t,e);case 9:return this.compileTForeach(t,e);case 10:return this.compileTKey(t,e);case 3:return this.compileMulti(t,e);case 7:return this.compileTCall(t,e);case 15:return this.compileTCallBlock(t,e);case 6:return this.compileTSet(t,e);case 11:return this.compileComponent(t,e);case 12:return this.compileDebug(t,e);case 13:return this.compileLog(t,e);case 14:return this.compileTSlot(t,e);case 16:return this.compileTTranslation(t,e);case 17:return this.compileTTranslationContext(t,e);case 18:return this.compileTPortal(t,e)}}compileDebug(t,e){return this.addLine("debugger;"),t.content?this.compileAST(t.content,e):null}compileLog(t,e){return this.addLine(`console.log(${Ye(t.expr)});`),t.content?this.compileAST(t.content,e):null}compileComment(t,e){let{block:n,forceNewBlock:o}=e;if(!n||o)n=this.createBlock(n,"comment",e),this.insertBlock(`comment(${ln(t.value)})`,n,{...e,forceNewBlock:o&&!n});else{const e=en.createComment(t.value);n.insert(e)}return n.varName}compileText(t,e){let{block:n,forceNewBlock:o}=e,s=t.value;if(s&&!1!==e.translate&&(s=this.translate(s,e.translationCtx)),e.inPreTag||(s=s.replace(tn," ")),!n||o)n=this.createBlock(n,"text",e),this.insertBlock(`text(${ln(s)})`,n,{...e,forceNewBlock:o&&!n});else{const e=0===t.type?en.createTextNode:en.createComment;n.insert(e.call(en,s))}return n.varName}generateHandlerCode(t,e){const n=t.split(".").slice(1).map((t=>{if(!nn.has(t))throw new r(`Unknown event modifier: '${t}'`);return`"${t}"`}));let o="";return n.length&&(o=`${n.join(",")}, `),`[${o}${this.captureExpression(e)}, ctx]`}compileTDomNode(t,e){var n;let{block:o,forceNewBlock:s}=e;const r=!o||s||null!==t.dynamicTag||t.ns;let i=this.target.code.length;if(r&&((t.dynamicTag||e.tKeyExpr||t.ns)&&e.block&&this.insertAnchor(e.block),o=this.createBlock(o,"block",e),this.blocks.push(o),t.dynamicTag)){const e=sn("tag");this.define(e,Ye(t.dynamicTag)),o.dynamicTagName=e}const l={};for(let s in t.attrs){let r,i;if(s.startsWith("t-attf")){r=Qe(t.attrs[s]);const e=o.insertData(r,"attr");i=s.slice(7),l["block-attribute-"+e]=i}else if(s.startsWith("t-att"))if(i="t-att"===s?null:s.slice(6),r=Ye(t.attrs[s]),i&&rn(t.tag,i)){"readonly"===i&&(i="readOnly"),r="value"===i?`new String((${r}) === 0 ? 0 : ((${r}) || ""))`:`new Boolean(${r})`;l[`block-property-${o.insertData(r,"prop")}`]=i}else{const t=o.insertData(r,"attr");"t-att"===s?l["block-attributes"]=String(t):l[`block-attribute-${t}`]=i}else if(this.translatableAttributes.includes(s)){const o=(null===(n=t.attrsTranslationCtx)||void 0===n?void 0:n[s])||e.translationCtx;l[s]=this.translateFn(t.attrs[s],o)}else r=`"${t.attrs[s]}"`,i=s,l[s]=t.attrs[s];if("value"===i&&e.tModelSelectedExpr){l[`block-attribute-${o.insertData(`${e.tModelSelectedExpr} === ${r}`,"attr")}`]="selected"}}let a;if(t.model){const{hasDynamicChildren:e,baseExpr:n,expr:s,eventType:r,shouldNumberize:i,shouldTrim:c,targetAttr:h,specialInitTargetAttr:u}=t.model,d=Ye(n),f=sn("bExpr");this.define(f,d);const p=Ye(s),m=sn("expr");this.define(m,p);const g=`${f}[${m}]`;let b;if(u){let e=h in l&&`'${l[h]}'`;if(!e&&t.attrs){const n=t.attrs[`t-att-${h}`];n&&(e=Ye(n))}b=o.insertData(`${g} === ${e}`,"prop"),l[`block-property-${b}`]=u}else if(e){a=`${sn("bValue")}`,this.define(a,g)}else b=o.insertData(`${g}`,"prop"),l[`block-property-${b}`]=h;this.helpers.add("toNumber");let v=`ev.target.${h}`;v=c?`${v}.trim()`:v,v=i?`toNumber(${v})`:v;const y=`[(ev) => { ${g} = ${v}; }]`;b=o.insertData(y,"hdlr"),l[`block-handler-${b}`]=r}for(let e in t.on){const n=this.generateHandlerCode(e,t.on[e]);l[`block-handler-${o.insertData(n,"hdlr")}`]=e}if(t.ref){this.dev&&(this.helpers.add("makeRefWrapper"),this.target.hasRefWrapper=!0);const e=Ze.test(t.ref);let n=`\`${t.ref}\``;e&&(n=Je(t.ref,(t=>this.captureExpression(t,!0))));let s=`(el) => this.__owl__.setRef((${n}), el)`;this.dev&&(s=`refWrapper(${n}, ${s})`);const r=o.insertData(s,"ref");l["block-ref"]=String(r)}const c=t.ns||e.nameSpace,h=c?en.createElementNS(c,t.tag):en.createElement(t.tag);for(const[t,e]of Object.entries(l))"class"===t&&""===e||h.setAttribute(t,e);if(o.insert(h),t.content.length){const n=o.currentDom;o.currentDom=h;const s=t.content;for(let n=0;n<s.length;n++){const r=t.content[n],i=cn(e,{block:o,index:o.childNumber,forceNewBlock:!1,isLast:e.isLast&&n===s.length-1,tKeyExpr:e.tKeyExpr,nameSpace:c,tModelSelectedExpr:a,inPreTag:e.inPreTag||"pre"===t.tag});this.compileAST(r,i)}o.currentDom=n}if(r&&(this.insertBlock(`${o.blockName}(ddd)`,o,e),o.children.length&&o.hasDynamicChildren)){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=i;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,i)}return o.varName}compileTEsc(t,e){let n,{block:o,forceNewBlock:s}=e;if("0"===t.expr?(this.helpers.add("zero"),n="ctx[zero]"):(n=Ye(t.expr),t.defaultValue&&(this.helpers.add("withDefault"),n=`withDefault(${n}, ${ln(t.defaultValue)})`)),!o||s)o=this.createBlock(o,"text",e),this.insertBlock(`text(${n})`,o,{...e,forceNewBlock:s&&!o});else{const t=o.insertData(n,"txt"),e=en.createElement(`block-text-${t}`);o.insert(e)}return o.varName}compileTOut(t,e){let n,{block:o}=e;if(o&&this.insertAnchor(o),o=this.createBlock(o,"html",e),"0"===t.expr)this.helpers.add("zero"),n="ctx[zero]";else if(t.body){let o=null;o=an.nextBlockId;const s=cn(e);this.compileAST({type:3,content:t.body},s),this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)}, b${o})`}else this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)})`;return this.insertBlock(n,o,e),o.varName}compileTIfBranch(t,e,n){this.target.indentLevel++;let o=e.children.length;this.compileAST(t,cn(n,{block:e,index:n.index})),e.children.length>o&&this.insertAnchor(e,o),this.target.indentLevel--}compileTIf(t,e,n){let{block:o,forceNewBlock:s}=e;const r=this.target.code.length,i=!o||"multi"!==o.type&&s;if(o&&(o.hasDynamicChildren=!0),(!o||"multi"!==o.type&&s)&&(o=this.createBlock(o,"multi",e)),this.addLine(`if (${Ye(t.condition)}) {`),this.compileTIfBranch(t.content,o,e),t.tElif)for(let n of t.tElif)this.addLine(`} else if (${Ye(n.condition)}) {`),this.compileTIfBranch(n.content,o,e);if(t.tElse&&(this.addLine("} else {"),this.compileTIfBranch(t.tElse,o,e)),this.addLine("}"),i){if(o.children.length){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=r;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,r)}const t=o.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,o,e)}return o.varName}compileTForeach(t,e){let{block:n}=e;n&&this.insertAnchor(n),n=this.createBlock(n,"list",e),this.target.loopLevel++;const o=`i${this.target.loopLevel}`;this.addLine("ctx = Object.create(ctx);");const s=`v_block${n.id}`,r=`k_block${n.id}`,i=`l_block${n.id}`,l=`c_block${n.id}`;let a;this.helpers.add("prepareList"),this.define(`[${r}, ${s}, ${i}, ${l}]`,`prepareList(${Ye(t.collection)});`),this.dev&&this.define(`keys${n.id}`,"new Set()"),this.addLine(`for (let ${o} = 0; ${o} < ${i}; ${o}++) {`),this.target.indentLevel++,this.addLine(`ctx[\`${t.elem}\`] = ${r}[${o}];`),t.hasNoFirst||this.addLine(`ctx[\`${t.elem}_first\`] = ${o} === 0;`),t.hasNoLast||this.addLine(`ctx[\`${t.elem}_last\`] = ${o} === ${r}.length - 1;`),t.hasNoIndex||this.addLine(`ctx[\`${t.elem}_index\`] = ${o};`),t.hasNoValue||this.addLine(`ctx[\`${t.elem}_value\`] = ${s}[${o}];`),this.define(`key${this.target.loopLevel}`,t.key?Ye(t.key):o),this.dev&&(this.helpers.add("OwlError"),this.addLine(`if (keys${n.id}.has(String(key${this.target.loopLevel}))) { throw new OwlError(\`Got duplicate key in t-foreach: \${key${this.target.loopLevel}}\`)}`),this.addLine(`keys${n.id}.add(String(key${this.target.loopLevel}));`)),t.memo&&(this.target.hasCache=!0,a=sn(),this.define(`memo${a}`,Ye(t.memo)),this.define(`vnode${a}`,`cache[key${this.target.loopLevel}];`),this.addLine(`if (vnode${a}) {`),this.target.indentLevel++,this.addLine(`if (shallowEqual(vnode${a}.memo, memo${a})) {`),this.target.indentLevel++,this.addLine(`${l}[${o}] = vnode${a};`),this.addLine(`nextCache[key${this.target.loopLevel}] = vnode${a};`),this.addLine("continue;"),this.target.indentLevel--,this.addLine("}"),this.target.indentLevel--,this.addLine("}"));const c=cn(e,{block:n,index:o});return this.compileAST(t.body,c),t.memo&&this.addLine(`nextCache[key${this.target.loopLevel}] = Object.assign(${l}[${o}], {memo: memo${a}});`),this.target.indentLevel--,this.target.loopLevel--,this.addLine("}"),e.isLast||this.addLine("ctx = ctx.__proto__;"),this.insertBlock("l",n,e),n.varName}compileTKey(t,e){const n=sn("tKey_");return this.define(n,Ye(t.expr)),e=cn(e,{tKeyExpr:n,block:e.block,index:e.index}),this.compileAST(t.content,e)}compileMulti(t,e){let{block:n,forceNewBlock:o}=e;const s=!n||o;let r=this.target.code.length;if(s){let o=null;if(t.content.filter((t=>!t.hasNoRepresentation)).length<=1){for(let n of t.content){const t=this.compileAST(n,e);o=o||t}return o}n=this.createBlock(n,"multi",e)}let i=0;for(let o=0,s=t.content.length;o<s;o++){const r=t.content[o],l=!r.hasNoRepresentation,a=cn(e,{block:n,index:i,forceNewBlock:l,isLast:e.isLast&&o===s-1});this.compileAST(r,a),l&&i++}if(s){if(n.hasDynamicChildren&&n.children.length){const t=this.target.code,e=n.children.slice();let o=e.shift();for(let n=r;n<t.length&&(!t[n].trimStart().startsWith(`const ${o.varName} `)||(t[n]=t[n].replace(`const ${o.varName}`,o.varName),o=e.shift(),o));n++);this.addLine(`let ${n.children.map((t=>t.varName)).join(", ")};`,r)}const t=n.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,n,e)}return n.varName}compileTCall(t,e){let{block:n,forceNewBlock:o}=e,s=e.ctxVar||"ctx";t.context&&(s=sn("ctx"),this.addLine(`let ${s} = ${Ye(t.context)};`));const r=Ze.test(t.name),i=r?Qe(t.name):"`"+t.name+"`";if(n&&!o&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),t.body){this.addLine(`${s} = Object.create(${s});`),this.addLine(`${s}[isBoundary] = 1;`),this.helpers.add("isBoundary");const n=cn(e,{ctxVar:s}),o=this.compileMulti({type:3,content:t.body},n);o&&(this.helpers.add("zero"),this.addLine(`${s}[zero] = ${o};`))}const l=this.generateComponentKey();if(r){const t=sn("template");this.staticDefs.find((t=>"call"===t.id))||this.staticDefs.push({id:"call",expr:"app.callTemplate.bind(app)"}),this.define(t,i),this.insertBlock(`call(this, ${t}, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}else{const t=sn("callTemplate_");this.staticDefs.push({id:t,expr:`app.getTemplate(${i})`}),this.insertBlock(`${t}.call(this, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}return t.body&&!e.isLast&&this.addLine(`${s} = ${s}.__proto__;`),n.varName}compileTCallBlock(t,e){let{block:n,forceNewBlock:o}=e;return n&&(o||this.insertAnchor(n)),n=this.createBlock(n,"multi",e),this.insertBlock(Ye(t.name),n,{...e,forceNewBlock:!n}),n.varName}compileTSet(t,e){this.target.shouldProtectScope=!0,this.helpers.add("isBoundary").add("withDefault");const n=t.value?Ye(t.value||""):"null";if(t.body){this.helpers.add("LazyValue");const o={type:3,content:t.body};let s=`new LazyValue(${this.compileInNewTarget("value",o,e)}, ctx, this, node, ${this.target.currentKey(e)})`;s=t.value?s?`withDefault(${n}, ${s})`:n:s,this.addLine(`ctx[\`${t.name}\`] = ${s};`)}else{let o;if(t.defaultValue){const s=ln(e.translate?this.translate(t.defaultValue,e.translationCtx):t.defaultValue);o=t.value?`withDefault(${n}, ${s})`:s}else o=n;this.helpers.add("setContextValue"),this.addLine(`setContextValue(${e.ctxVar||"ctx"}, "${t.name}", ${o});`)}return null}generateComponentKey(t="key"){const e=[sn("__")];for(let t=0;t<this.target.loopLevel;t++)e.push(`\${key${t+1}}`);return`${t} + \`${e.join("__")}\``}formatProp(t,e,n,o){if(t.endsWith(".translate")){const s=(null==n?void 0:n[t])||o;e=ln(this.translateFn(e,s))}else e=this.captureExpression(e);if(t.includes(".")){let[n,o]=t.split(".");switch(t=n,o){case"bind":e=`(${e}).bind(this)`;break;case"alike":case"translate":break;default:throw new r(`Invalid prop suffix: ${o}`)}}return`${t=/^[a-z_]+$/i.test(t)?t:`'${t}'`}: ${e||void 0}`}formatPropObject(t,e,n){return Object.entries(t).map((([t,o])=>this.formatProp(t,o,e,n)))}getPropString(t,e){let n=`{${t.join(",")}}`;return e&&(n=`Object.assign({}, ${Ye(e)}${t.length?", "+n:""})`),n}compileComponent(t,e){let{block:n}=e;const o="slots"in(t.props||{}),s=t.props?this.formatPropObject(t.props,t.propsTranslationCtx,e.translationCtx):[];let r="";if(t.slots){let n="ctx";!this.target.loopLevel&&this.hasSafeContext||(n=sn("ctx"),this.helpers.add("capture"),this.define(n,"capture(ctx)"));let o=[];for(let s in t.slots){const r=t.slots[s],i=[];if(r.content){const t=this.compileInNewTarget("slot",r.content,e,r.on);i.push(`__render: ${t}.bind(this), __ctx: ${n}`)}const l=t.slots[s].scope;l&&i.push(`__scope: "${l}"`),t.slots[s].attrs&&i.push(...this.formatPropObject(t.slots[s].attrs,t.slots[s].attrsTranslationCtx,e.translationCtx));const a=`{${i.join(", ")}}`;o.push(`'${s}': ${a}`)}r=`{${o.join(", ")}}`}!r||t.dynamicProps||o||(this.helpers.add("markRaw"),s.push(`slots: markRaw(${r})`));let i,l,a=this.getPropString(s,t.dynamicProps);(r&&(t.dynamicProps||o)||this.dev)&&(i=sn("props"),this.define(i,a),a=i),r&&(t.dynamicProps||o)&&(this.helpers.add("markRaw"),this.addLine(`${i}.slots = markRaw(Object.assign(${r}, ${i}.slots))`)),t.isDynamic?(l=sn("Comp"),this.define(l,Ye(t.name))):l=`\`${t.name}\``,this.dev&&this.addLine(`helpers.validateProps(${l}, ${i}, this);`),n&&(!1===e.forceNewBlock||e.tKeyExpr)&&this.insertAnchor(n);let c=this.generateComponentKey();e.tKeyExpr&&(c=`${e.tKeyExpr} + ${c}`);let h=sn("comp");const u=[];for(let e in t.props||{}){let[t,n]=e.split(".");n||u.push(`"${t}"`)}this.staticDefs.push({id:h,expr:`app.createComponent(${t.isDynamic?null:l}, ${!t.isDynamic}, ${!!t.slots}, ${!!t.dynamicProps}, [${u}])`}),t.isDynamic&&(c=`(${l}).name + ${c}`);let d=`${h}(${a}, ${c}, node, this, ${t.isDynamic?l:null})`;return t.isDynamic&&(d=`toggler(${l}, ${d})`),t.on&&(d=this.wrapWithEventCatcher(d,t.on)),n=this.createBlock(n,"multi",e),this.insertBlock(d,n,e),n.varName}wrapWithEventCatcher(t,e){this.helpers.add("createCatcher");let n=sn("catcher"),o={},s=[];for(let t in e){let n=sn("hdlr"),r=s.push(n)-1;o[t]=r;const i=this.generateHandlerCode(t,e[t]);this.define(n,i)}return this.staticDefs.push({id:n,expr:`createCatcher(${JSON.stringify(o)})`}),`${n}(${t}, [${s.join(",")}])`}compileTSlot(t,e){this.helpers.add("callSlot");let n,o,{block:s}=e,r=!1,i=!1;t.name.match(Ze)?(r=!0,i=!0,o=Qe(t.name)):(o="'"+t.name+"'",i=i||this.slotNames.has(t.name),this.slotNames.add(t.name));const l={...t.attrs},a=l["t-props"];delete l["t-props"];let c=this.target.loopLevel?`key${this.target.loopLevel}`:"key";i&&(c=this.generateComponentKey(c));const h=t.attrs?this.formatPropObject(l,t.attrsTranslationCtx,e.translationCtx):[],u=this.getPropString(h,a);if(t.defaultContent){n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u}, ${this.compileInNewTarget("defaultContent",t.defaultContent,e)}.bind(this))`}else if(r){let t=sn("slot");this.define(t,o),n=`toggler(${t}, callSlot(ctx, node, ${c}, ${t}, ${r}, ${u}))`}else n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u})`;return t.on&&(n=this.wrapWithEventCatcher(n,t.on)),s&&this.insertAnchor(s),s=this.createBlock(s,"multi",e),this.insertBlock(n,s,{...e,forceNewBlock:!1}),s.varName}compileTTranslation(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translate:!1})):null}compileTTranslationContext(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translationCtx:t.translationCtx})):null}compileTPortal(t,e){this.staticDefs.find((t=>"Portal"===t.id))||this.staticDefs.push({id:"Portal",expr:"app.Portal"});let{block:n}=e;const o=this.compileInNewTarget("slot",t.content,e);let s="ctx";!this.target.loopLevel&&this.hasSafeContext||(s=sn("ctx"),this.helpers.add("capture"),this.define(s,"capture(ctx)"));let r=sn("comp");this.staticDefs.push({id:r,expr:"app.createComponent(null, false, true, false, false)"});const i=`${r}({target: ${Ye(t.target)},slots: {'default': {__render: ${o}.bind(this), __ctx: ${s}}}}, ${this.generateComponentKey()}, node, ctx, Portal)`;return n&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),this.insertBlock(i,n,{...e,forceNewBlock:!1}),n.varName}}const pn=new WeakMap;function mn(t,e){var n;return function(t){let e=t.querySelectorAll("[t-elif], [t-else]");for(let t=0,n=e.length;t<n;t++){let n=e[t],o=n.previousElementSibling,s=t=>o.getAttribute(t),i=t=>+!!n.getAttribute(t);if(!o||!s("t-if")&&!s("t-elif"))throw new r("t-elif and t-else directives must be preceded by a t-if or t-elif directive");{if(s("t-foreach"))throw new r("t-if cannot stay at the same level as t-foreach when using t-elif or t-else");if(["t-if","t-elif","t-else"].map(i).reduce((function(t,e){return t+e}))>1)throw new r("Only one conditional branching directive is allowed per node");let t;for(;(t=n.previousSibling)!==o;){if(t.nodeValue.trim().length&&8!==t.nodeType)throw new r("text is not allowed between branching directives");t.remove()}}}}(n=t),function(t){for(const e of["t-esc","t-out"]){const n=[...t.querySelectorAll(`[${e}]`)].filter((t=>t.tagName[0]===t.tagName[0].toUpperCase()||t.hasAttribute("t-component")));for(const t of n){if(t.childNodes.length)throw new r(`Cannot have ${e} on a component that already has content`);const n=t.getAttribute(e);t.removeAttribute(e);const o=t.ownerDocument.createElement("t");null!=n&&o.setAttribute(e,n),t.appendChild(o)}}}(n),gn(t,e)||{type:0,value:""}}function gn(t,e){return t instanceof Element?function(t,e){if(!e.customDirectives)return null;const n=t.getAttributeNames();for(let o of n){if("t-custom"===o||"t-custom-"===o)throw new r("Missing custom directive name with t-custom directive");if(o.startsWith("t-custom-")){const n=o.split(".")[0].slice(9),s=e.customDirectives[n];if(!s)throw new r(`Custom directive "${n}" is not defined`);const i=t.getAttribute(o),l=o.split(".").slice(1);t.removeAttribute(o);try{s(t,i,l)}catch(t){throw new r(`Custom directive "${n}" throw the following error: ${t}`)}return gn(t,e)}}return null}(t,e)||function(t,e){if(t.hasAttribute("t-debug")){t.removeAttribute("t-debug");const n=gn(t,e),o={type:12,content:n};return(null==n?void 0:n.hasNoRepresentation)&&(o.hasNoRepresentation=!0),o}if(t.hasAttribute("t-log")){const n=t.getAttribute("t-log");t.removeAttribute("t-log");const o=gn(t,e),s={type:13,expr:n,content:o};return(null==o?void 0:o.hasNoRepresentation)&&(s.hasNoRepresentation=!0),s}return null}(t,e)||function(t,e){if(!t.hasAttribute("t-foreach"))return null;const n=t.outerHTML,o=t.getAttribute("t-foreach");t.removeAttribute("t-foreach");const s=t.getAttribute("t-as")||"";t.removeAttribute("t-as");const i=t.getAttribute("t-key");if(!i)throw new r(`"Directive t-foreach should always be used with a t-key!" (expression: t-foreach="${o}" t-as="${s}")`);t.removeAttribute("t-key");const l=t.getAttribute("t-memo")||"";t.removeAttribute("t-memo");const a=gn(t,e);if(!a)return null;const c=!n.includes("t-call"),h=c&&!n.includes(`${s}_first`),u=c&&!n.includes(`${s}_last`),d=c&&!n.includes(`${s}_index`),f=c&&!n.includes(`${s}_value`);return{type:9,collection:o,elem:s,body:a,memo:l,key:i,hasNoFirst:h,hasNoLast:u,hasNoIndex:d,hasNoValue:f}}(t,e)||function(t,e){if(!t.hasAttribute("t-if"))return null;const n=t.getAttribute("t-if");t.removeAttribute("t-if");const o=gn(t,e)||{type:0,value:""};let s=t.nextElementSibling;const r=[];for(;s&&s.hasAttribute("t-elif");){const t=s.getAttribute("t-elif");s.removeAttribute("t-elif");const n=gn(s,e),o=s.nextElementSibling;s.remove(),s=o,n&&r.push({condition:t,content:n})}let i=null;s&&s.hasAttribute("t-else")&&(s.removeAttribute("t-else"),i=gn(s,e),s.remove());return{type:5,condition:n,content:o,tElif:r.length?r:null,tElse:i}}(t,e)||function(t,e){if(!t.hasAttribute("t-portal"))return null;const n=t.getAttribute("t-portal");t.removeAttribute("t-portal");const o=gn(t,e);if(!o)return{type:0,value:""};return{type:18,target:n,content:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call"))return null;const n=t.getAttribute("t-call"),o=t.getAttribute("t-call-context");if(t.removeAttribute("t-call"),t.removeAttribute("t-call-context"),"t"!==t.tagName){const s=gn(t,e),r={type:7,name:n,body:null,context:o};if(s&&2===s.type)return s.content=[r],s;if(s&&11===s.type)return{...s,slots:{default:{content:r,scope:null,on:null,attrs:null,attrsTranslationCtx:null}}}}const s=kn(t,e);return{type:7,name:n,body:s.length?s:null,context:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call-block"))return null;const n=t.getAttribute("t-call-block");return{type:15,name:n}}(t)||function(t,e){if("off"!==t.getAttribute("t-translation"))return null;t.removeAttribute("t-translation");const n=gn(t,e);if(3===(null==n?void 0:n.type)){return Tn(n.content.map(xn))}return xn(n)}(t,e)||function(t,e){const n=t.getAttribute("t-translation-context");if(!n)return null;t.removeAttribute("t-translation-context");const o=gn(t,e);if(3===(null==o?void 0:o.type)){return Tn(o.content.map((t=>Nn(t,n))))}return Nn(o,n)}(t,e)||function(t,e){if(!t.hasAttribute("t-key"))return null;const n=t.getAttribute("t-key");t.removeAttribute("t-key");const o=gn(t,e);if(!o)return null;const s={type:10,expr:n,content:o};o.hasNoRepresentation&&(s.hasNoRepresentation=!0);return s}(t,e)||function(t,e){if(!t.hasAttribute("t-esc"))return null;const n=t.getAttribute("t-esc");t.removeAttribute("t-esc");const o={type:4,expr:n,defaultValue:t.textContent||""};let s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-out")&&!t.hasAttribute("t-raw"))return null;t.hasAttribute("t-raw")&&console.warn('t-raw has been deprecated in favor of t-out. If the value to render is not wrapped by the "markup" function, it will be escaped');const n=t.getAttribute("t-out")||t.getAttribute("t-raw");t.removeAttribute("t-out"),t.removeAttribute("t-raw");const o={type:8,expr:n,body:null},s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return o.body=r.content.length?r.content:null,{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-slot"))return null;const n=t.getAttribute("t-slot");t.removeAttribute("t-slot");let o=null,s=null,r=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-on-"))r=r||{},r[e.slice(5)]=n;else if(e.startsWith("t-translation-context-")){s=s||{},s[e.slice(22)]=n}else o=o||{},o[e]=n}return{type:14,name:n,attrs:o,attrsTranslationCtx:s,on:r,defaultContent:En(t,e)}}(t,e)||function(t,e){let n=t.tagName;const o=n[0];let s=t.hasAttribute("t-component");if(s&&"t"!==n)throw new r(`Directive 't-component' can only be used on <t> nodes (used on a <${n}>)`);if(o!==o.toUpperCase()&&!s)return null;s&&(n=t.getAttribute("t-component"),t.removeAttribute("t-component"));const i=t.getAttribute("t-props");t.removeAttribute("t-props");const l=t.getAttribute("t-slot-scope");t.removeAttribute("t-slot-scope");let a=null,c=null,h=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else if(e.startsWith("t-")){if(!e.startsWith("t-on-")){const t=$n.get(e.split("-").slice(0,2).join("-"));throw new r(t||`unsupported directive on Component: ${e}`)}a=a||{},a[e.slice(5)]=n}else c=c||{},c[e]=n}let u=null;if(t.hasChildNodes()){const n=t.cloneNode(!0),o=Array.from(n.querySelectorAll("[t-set-slot]"));for(let t of o){if("t"!==t.tagName)throw new r(`Directive 't-set-slot' can only be used on <t> nodes (used on a <${t.tagName}>)`);const o=t.getAttribute("t-set-slot");let s=t.parentElement,i=!1;for(;s&&s!==n;){if(s.hasAttribute("t-component")||s.tagName[0]===s.tagName[0].toUpperCase()){i=!0;break}s=s.parentElement}if(i||!s)continue;t.removeAttribute("t-set-slot"),t.remove();const l=gn(t,e);let a=null,c=null,h=null,d=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if("t-slot-scope"!==e)if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else e.startsWith("t-on-")?(a=a||{},a[e.slice(5)]=n):(c=c||{},c[e]=n);else d=n}u=u||{},u[o]={content:l,on:a,attrs:c,attrsTranslationCtx:h,scope:d}}const s=En(n,e);u=u||{},s&&!u.default&&(u.default={content:s,on:a,attrs:null,attrsTranslationCtx:null,scope:l})}return{type:11,name:n,isDynamic:s,dynamicProps:i,props:c,propsTranslationCtx:h,slots:u,on:a}}(t,e)||function(t,e){const{tagName:n}=t,o=t.getAttribute("t-tag");if(t.removeAttribute("t-tag"),"t"===n&&!o)return null;if(n.startsWith("block-"))throw new r(`Invalid tag name: '${n}'`);e=Object.assign({},e),"pre"===n&&(e.inPreTag=!0);let s=!e.nameSpace&&wn.has(n)?"http://www.w3.org/2000/svg":null;const i=t.getAttribute("t-ref");t.removeAttribute("t-ref");const l=t.getAttributeNames();let a=null,c=null,h=null,u=null;for(let o of l){const i=t.getAttribute(o);if("t-on"===o||"t-on-"===o)throw new r("Missing event name with t-on directive");if(o.startsWith("t-on-"))h=h||{},h[o.slice(5)]=i;else if(o.startsWith("t-model")){if(!["input","select","textarea"].includes(n))throw new r("The t-model directive only works with <input>, <textarea> and <select>");let s,l;if(vn.test(i)){const t=i.lastIndexOf(".");s=i.slice(0,t),l=`'${i.slice(t+1)}'`}else{if(!yn.test(i))throw new r(`Invalid t-model expression: "${i}" (it should be assignable)`);{const t=i.lastIndexOf("[");s=i.slice(0,t),l=i.slice(t+1,-1)}}const a=t.getAttribute("type"),c="input"===n,h="select"===n,d=c&&"checkbox"===a,f=c&&"radio"===a,p=o.includes(".trim"),m=p||o.includes(".lazy");u={baseExpr:s,expr:l,targetAttr:d?"checked":"value",specialInitTargetAttr:f?"checked":null,eventType:f?"click":h||m?"change":"input",hasDynamicChildren:!1,shouldTrim:p,shouldNumberize:o.includes(".number")},h&&((e=Object.assign({},e)).tModelInfo=u)}else{if(o.startsWith("block-"))throw new r(`Invalid attribute: '${o}'`);if("xmlns"===o)s=i;else if(o.startsWith("t-translation-context-")){c=c||{},c[o.slice(22)]=i}else if("t-name"!==o){if(o.startsWith("t-")&&!o.startsWith("t-att"))throw new r(`Unknown QWeb directive: '${o}'`);const t=e.tModelInfo;t&&["t-att-value","t-attf-value"].includes(o)&&(t.hasDynamicChildren=!0),a=a||{},a[o]=i}}}s&&(e.nameSpace=s);const d=kn(t,e);return{type:2,tag:n,dynamicTag:o,attrs:a,attrsTranslationCtx:c,on:h,ref:i,content:d,model:u,ns:s}}(t,e)||function(t,e){if(!t.hasAttribute("t-set"))return null;const n=t.getAttribute("t-set"),o=t.getAttribute("t-value")||null,s=t.innerHTML===t.textContent&&t.textContent||null;let r=null;t.textContent!==t.innerHTML&&(r=kn(t,e));return{type:6,name:n,value:o,defaultValue:s,body:r,hasNoRepresentation:!0}}(t,e)||function(t,e){if("t"!==t.tagName)return null;return En(t,e)}(t,e):function(t,e){if(t.nodeType===Node.TEXT_NODE){let n=t.textContent||"";return e.inPreTag||!bn.test(n)||n.trim()?{type:0,value:n}:null}if(t.nodeType===Node.COMMENT_NODE)return{type:1,value:t.textContent||""};return null}(t,e)}const bn=/[\r\n]/;const vn=/\.[\w_]+\s*$/,yn=/\[[^\[]+\]\s*$/,wn=new Set(["svg","g","path"]);const $n=new Map([["t-ref","t-ref is no longer supported on components. Consider exposing only the public part of the component's API through a callback prop."],["t-att","t-att makes no sense on component: props are already treated as expressions"],["t-attf","t-attf is not supported on components: use template strings for string interpolation in props"]]);function xn(t){const e={type:16,content:t};return(null==t?void 0:t.hasNoRepresentation)&&(e.hasNoRepresentation=!0),e}function Nn(t,e){const n={type:17,content:t,translationCtx:e};return(null==t?void 0:t.hasNoRepresentation)&&(n.hasNoRepresentation=!0),n}function kn(t,e){const n=[];for(let o of t.childNodes){const t=gn(o,e);t&&(3===t.type?n.push(...t.content):n.push(t))}return n}function Tn(t){const e={type:3,content:t};return t.every((t=>t.hasNoRepresentation))&&(e.hasNoRepresentation=!0),e}function En(t,e){const n=kn(t,e);switch(n.length){case 0:return null;case 1:return n[0];default:return Tn(n)}}function An(t,e={hasGlobalValues:!1}){const n=function(t,e){const n={inPreTag:!1,customDirectives:e};if("string"==typeof t)return mn(Pe(`<t>${t}</t>`).firstChild,n);let o=pn.get(t);return o||(o=mn(t.cloneNode(!0),n),pn.set(t,o)),o}(t,e.customDirectives),o=t instanceof Node?!(t instanceof Element)||null===t.querySelector("[t-set], [t-call]"):!t.includes("t-set")&&!t.includes("t-call"),s=new fn(n,{...e,hasSafeContext:o}).generateCode();try{return new Function("app, bdom, helpers",s)}catch(t){const{name:n}=e,o=new r(`Failed to compile ${n?`template "${n}"`:"anonymous template"}: ${t.message}\n\ngenerated code:\nfunction(app, bdom, helpers) {\n${s}\n}`);throw o.cause=t,o}}let _n;"undefined"!=typeof window&&(_n=window.requestAnimationFrame.bind(window));class Cn{constructor(){this.tasks=new Set,this.frame=0,this.delayedRenders=[],this.cancelledNodes=new Set,this.processing=!1,this.requestAnimationFrame=Cn.requestAnimationFrame}addFiber(t){this.tasks.add(t.root)}scheduleDestroy(t){this.cancelledNodes.add(t),0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}flush(){if(this.delayedRenders.length){let t=this.delayedRenders;this.delayedRenders=[];for(let e of t)e.root&&3!==e.node.status&&e.node.fiber===e&&e.render()}0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}processTasks(){if(!this.processing){this.processing=!0,this.frame=0;for(let t of this.cancelledNodes)t._destroy();this.cancelledNodes.clear();for(let t of this.tasks)this.processFiber(t);for(let t of this.tasks)3===t.node.status&&this.tasks.delete(t);this.processing=!1}}processFiber(t){if(t.root!==t)return void this.tasks.delete(t);const e=xt.has(t);e&&0!==t.counter?this.tasks.delete(t):3!==t.node.status?0===t.counter&&(e||t.complete(),t.appliedToDom&&this.tasks.delete(t)):this.tasks.delete(t)}}Cn.requestAnimationFrame=_n;let Dn=!1;const Sn=new Set;"undefined"!=typeof window&&(window.__OWL_DEVTOOLS__||(window.__OWL_DEVTOOLS__={apps:Sn,Fiber:_t,RootFiber:Ct,toRaw:Ft,reactive:Yt}));class On extends Me{constructor(t,e={}){super(e),this.scheduler=new Cn,this.subRoots=new Set,this.root=null,this.name=e.name||"",this.Root=t,Sn.add(this),e.test&&(this.dev=!0),this.warnIfNoStaticProps=e.warnIfNoStaticProps||!1,!this.dev||e.test||Dn||(console.info("Owl is running in 'dev' mode."),Dn=!0);const n=e.env||{},o=Object.getOwnPropertyDescriptors(n);this.env=Object.freeze(Object.create(Object.getPrototypeOf(n),o)),this.props=e.props||{}}mount(t,e){const n=this.createRoot(this.Root,{props:this.props});return this.root=n.node,this.subRoots.delete(n.node),n.mount(t,e)}createRoot(t,e={}){const n=e.props||{},o=this.env;e.env&&(this.env=e.env);const s=function(){let t=se;return()=>{se=t}}(),r=this.makeNode(t,n);return s(),e.env&&(this.env=o),this.subRoots.add(r),{node:r,mount:(e,o)=>{On.validateTarget(e),this.dev&&Le(t,n,{__owl__:{app:this}});return this.mountNode(r,e,o)},destroy:()=>{this.subRoots.delete(r),r.destroy(),this.scheduler.processTasks()}}}makeNode(t,e){return new ue(t,e,this,null,null)}mountNode(t,e,n){const o=new Promise(((e,n)=>{let o=!1;t.mounted.push((()=>{e(t.component),o=!0}));let s=Nt.get(t);s||(s=[],Nt.set(t,s)),s.unshift((t=>{throw o||n(t),t}))}));return t.mountComponent(e,n),o}destroy(){if(this.root){for(let t of this.subRoots)t.destroy();this.root.destroy(),this.scheduler.processTasks()}Sn.delete(this)}createComponent(t,e,n,o,s){const i=!e;let l;const a=0===s.length;l=n?(t,e)=>!0:o?function(t,e){for(let n in t)if(t[n]!==e[n])return!0;return Object.keys(t).length!==Object.keys(e).length}:a?(t,e)=>!1:function(t,e){for(let n of s)if(t[n]!==e[n])return!0;return!1};const c=ue.prototype.updateAndRender,h=ue.prototype.initiateRender;return(n,o,s,a,u)=>{let d=s.children,f=d[o];i&&f&&f.component.constructor!==u&&(f=void 0);const p=s.fiber;if(f)(l(f.props,n)||p.deep||f.forceNextRender)&&(f.forceNextRender=!1,c.call(f,n,p));else{if(e){const e=a.constructor.components;if(!e)throw new r(`Cannot find the definition of component "${t}", missing static components key in parent`);if(!(u=e[t]))throw new r(`Cannot find the definition of component "${t}"`);if(!(u.prototype instanceof ve))throw new r(`"${t}" is not a Component. It must inherit from the Component class`)}f=new ue(u,n,this,s,o),d[o]=f,h.call(f,new _t(f,p))}return p.childrenMap[o]=f,f}}handleError(...t){return Tt(...t)}}On.validateTarget=function(t){const e=t&&t.ownerDocument;if(e){if(!e.defaultView)throw new r("Cannot mount a component: the target document is not attached to a window (defaultView is missing)");if(t instanceof e.defaultView.HTMLElement||t instanceof ShadowRoot){if(!function(t,e){let n=t;const o=e.defaultView.ShadowRoot;for(;n;){if(n===e)return!0;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof o&&n.host))return!1;n=n.host}}return!1}(t,e))throw new r("Cannot mount a component on a detached dom node");return}}throw new r("Cannot mount component: the target is not a valid DOM element")},On.apps=Sn,On.version="2.8.3";function Rn(t,e){const n=Object.create(t),o=Object.getOwnPropertyDescriptors(e);return Object.freeze(Object.defineProperties(n,o))}function Ln(t){const e=re();e.childEnv=Rn(e.childEnv,t)}n.shouldNormalizeDom=!1,n.mainEventHandler=(t,n,o)=>{const{data:s,modifiers:i}=e(t);t=s;let l=!1;if(i.length){let t=!1;const e=n.target===o;for(const o of i)switch(o){case"self":if(t=!0,e)continue;return l;case"prevent":(t&&e||!t)&&n.preventDefault();continue;case"stop":(t&&e||!t)&&n.stopPropagation(),l=!0;continue}}if(Object.hasOwnProperty.call(t,0)){const e=t[0];if("function"!=typeof e)throw new r(`Invalid handler (expected a function, received: '${e}')`);let o=t[1]?t[1].__owl__:null;o&&1!==o.status||e.call(o?o.component:null,n)}return l};const Bn={config:n,mount:$t,patch:function(t,e,n=!1){t.patch(e,n)},remove:function(t,e=!1){e&&t.beforeRemove(),t.remove()},list:bt,multi:j,text:z,toggler:s,createBlock:nt,html:wt,comment:H},Pn={version:On.version};Me.prototype._compileTemplate=function(t,e){return An(e,{name:t,dev:this.dev,translateFn:this.translateFn,translatableAttributes:this.translatableAttributes,customDirectives:this.customDirectives,hasGlobalValues:this.hasGlobalValues})},t.App=On,t.Component=ve,t.EventBus=N,t.OwlError=r,t.__info__=Pn,t.batched=$,t.blockDom=Bn,t.htmlEscape=T,t.loadFile=async function(t){const e=await fetch(t);if(!e.ok)throw new r("Error while fetching xml templates");return await e.text()},t.markRaw=Vt,t.markup=E,t.mount=async function(t,e,n={}){return new On(t,n).mount(e,n)},t.onError=function(t){const e=re();let n=Nt.get(e);n||(n=[],Nt.set(e,n)),n.push(t.bind(e.component))},t.onMounted=me,t.onPatched=ge,t.onRendered=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onRendered"),e.renderFn=()=>{const e=n();return t(),e}},t.onWillDestroy=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willDestroy.push(n(t.bind(e.component),"onWillDestroy"))},t.onWillPatch=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willPatch.unshift(n(t.bind(e.component),"onWillPatch"))},t.onWillRender=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onWillRender"),e.renderFn=()=>(t(),n())},t.onWillStart=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willStart.push(n(t.bind(e.component),"onWillStart"))},t.onWillUnmount=be,t.onWillUpdateProps=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUpdateProps.push(n(t.bind(e.component),"onWillUpdateProps"))},t.reactive=Yt,t.status=function(t){switch(t.__owl__.status){case 0:return"new";case 2:return"cancelled";case 1:return"mounted";case 3:return"destroyed"}},t.toRaw=Ft,t.useChildSubEnv=Ln,t.useComponent=function(){return se.component},t.useEffect=function(t,e=(()=>[NaN])){let n,o;me((()=>{o=e(),n=t(...o)})),ge((()=>{const s=e();s.some(((t,e)=>t!==o[e]))&&(o=s,n&&n(),n=t(...o))})),be((()=>n&&n()))},t.useEnv=function(){return re().component.env},t.useExternalListener=function(t,e,n,o){const s=re(),r=n.bind(s.component);me((()=>t.addEventListener(e,r,o))),be((()=>t.removeEventListener(e,r,o)))},t.useRef=function(t){const e=re().refs;return{get el(){const n=e[t];return x(n)?n:null}}},t.useState=ae,t.useSubEnv=function(t){const e=re();e.component.env=Rn(e.component.env,t),Ln(t)},t.validate=function(t,e){let n=_e(t,e);if(n.length)throw new r("Invalid object: "+n.join(", "))},t.validateType=Ce,t.whenReady=function(t){return new Promise((function(t){"loading"!==document.readyState?t(!0):document.addEventListener("DOMContentLoaded",t,!1)})).then(t||function(){})},t.xml=We,Object.defineProperty(t,"__esModule",{value:!0}),Pn.date="2026-03-30T13:05:32.099Z",Pn.hash="efae3e4",Pn.url="https://github.com/odoo/owl"}(globalThis.owl=globalThis.owl||{});
|
|
9
|
-
|
|
10
|
-
var BaseUIBundle=(()=>{var bc=Object.create;var Dr=Object.defineProperty;var mc=Object.getOwnPropertyDescriptor;var fc=Object.getOwnPropertyNames;var gc=Object.getPrototypeOf,yc=Object.prototype.hasOwnProperty;var vc=(t,e,s)=>e in t?Dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var ei=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,s)=>(typeof require<"u"?require:e)[s]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var at=(t,e,s)=>()=>{if(s)throw s[0];try{return t&&(e=t(t=0)),e}catch(o){throw s=[o],o}};var si=(t,e)=>{for(var s in e)Dr(t,s,{get:e[s],enumerable:!0})},wn=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of fc(e))!yc.call(t,r)&&r!==s&&Dr(t,r,{get:()=>e[r],enumerable:!(o=mc(e,r))||o.enumerable});return t};var oi=(t,e,s)=>(s=t!=null?bc(gc(t)):{},wn(e||!t||!t.__esModule?Dr(s,"default",{value:t,enumerable:!0}):s,t)),xc=t=>wn(Dr({},"__esModule",{value:!0}),t);var i=(t,e,s)=>vc(t,typeof e!="symbol"?e+"":e,s);function Ac(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function qi(t,e,s={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:s}))}function Ec(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Cc(t,e){return e===document||e===t||e.contains(t)}function Lc(t,e={}){return!e.allowBootstrapControl&&t.matches(Sc)}function An(t){return h.version=t,h}function Sn(){if(typeof MutationObserver>"u")return;let t=new MutationObserver(e=>{for(let s of e)for(let o of s.addedNodes)o instanceof Element&&h.mountAll(o)});return t.observe(document.documentElement,{childList:!0,subtree:!0}),t}function En(){typeof document>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{h.mountAll(),Sn()},{once:!0}):(h.mountAll(),Sn()))}var wc,Ui,Fr,ri,Sc,Pi,h,C=at(()=>{wc="__BASEUI_VERSION__",Ui=new Map,Fr=new WeakMap,ri="[b-ui], [b-icon]",Sc="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";Pi=typeof window<"u"?window.thebase:void 0,h=Pi?.register?Pi:Object.assign(Pi||{},{version:wc,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return Ui.set(t,e),this},component(t){return Ui.get(t)},mount(t,e={}){let s=Ac(t);if(!s||Lc(s,e))return null;let o=Ec(s,e),r=Ui.get(o);if(!r)return null;let a=Fr.get(s);if(a?.name===o)return a;a&&(a.destroy?.(),Fr.delete(s),qi(s,"baseui:destroyed",{name:a.name}));let l=r.mount?.(s,this,e)||{},u={name:o,element:s,destroy:l.destroy};return Fr.set(s,u),qi(s,"baseui:mounted",{name:o,instance:u}),u},mountAll(t=document){let e=t||document,s=[...e.querySelectorAll?.(ri)||[]];return e instanceof Element&&e.matches(ri)&&s.unshift(e),s.map(o=>this.mount(o)).filter(Boolean)},destroy(t=document){let e=t||document,s=[...e.querySelectorAll?.(ri)||[]];e instanceof Element&&e.matches(ri)&&s.unshift(e);for(let o of s){let r=Fr.get(o);r&&Cc(o,e)&&(r.destroy?.(),Fr.delete(o),qi(o,"baseui:destroyed",{name:r.name}))}},theme:{set(t){let e=document.documentElement;if(typeof t=="string"){e.setAttribute("b-theme",t),e.dataset.bsTheme=t;return}for(let[s,o]of Object.entries(t||{})){let r=s==="radius"||s==="--b-radius"?"--base-radius":s.startsWith("--")?s:`--b-${s}`;e.style.setProperty(r,o)}}}});typeof window<"u"&&(window.thebase=h,window.BaseUI=h)});function m(...t){let e=[];for(let s of t)if(s){if(typeof s=="string")e.push(s);else if(Array.isArray(s)){let o=m(...s);o&&e.push(o)}else if(typeof s=="object")for(let[o,r]of Object.entries(s))r&&e.push(o)}return e.join(" ")}function n(t){return{type:t,optional:!0}}function G(t,e,s){return t[e]??(s?t[s]:void 0)}function F(t){return t===!0||t==="open"||t==="on"||t==="active"}function K(...t){let e=[];for(let s of t)if(s){if(typeof s=="string"){let o=s.trim().replace(/;$/,"");o&&e.push(o)}else if(typeof s=="object")for(let[o,r]of Object.entries(s)){if(r==null||r==="")continue;let a=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase());e.push(`${a}:${r}`)}}return e.join(";")}function j(t){return t.state!==void 0?F(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function es(t){return t.state!==void 0||t.open!==void 0}var p,x=at(()=>{p={className:n(String),style:n([String,Object]),slots:n(Object)}});var I,Ln,kn,Nn,On,Tn,Bn,In,Rn,le,$n,ii,_i,Un,R,M,qn,ue,Pn,_n,ot,U,z,Mn,jn,zn,T,Dn,tt,Fn,ss,L,w,Hn,Wn,Kn,Vn,ni,Mi=at(()=>{I=globalThis.owl;if(!I)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");Ln=I.App,kn=I.Component,Nn=I.EventBus,On=I.OwlError,Tn=I.__info__,Bn=I.batched,In=I.blockDom,Rn=I.htmlEscape,le=I.loadFile,$n=I.markRaw,ii=I.markup,_i=I.mount,Un=I.onError,R=I.onMounted,M=I.onPatched,qn=I.onRendered,ue=I.onWillDestroy,Pn=I.onWillPatch,_n=I.onWillRender,ot=I.onWillStart,U=I.onWillUnmount,z=I.onWillUpdateProps,Mn=I.reactive,jn=I.status,zn=I.toRaw,T=I.useChildSubEnv,Dn=I.useComponent,tt=I.useEffect,Fn=I.useEnv,ss=I.useExternalListener,L=I.useRef,w=I.useState,Hn=I.useSubEnv,Wn=I.validate,Kn=I.validateType,Vn=I.whenReady,ni=I.xml});function ji(t){Object.assign(Hr,t)}function Tc(t){let e=t.components;e?e!==Hr&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,Hr):t.components=Object.create(Hr)}function Gn(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,s,o="",r="")=>`<${s}${Bc(s,o)}${r}>`)}function Bc(t,e){let s=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),o=e.replace(/(\s)t-att\s*=/g,"$1t-props=").replace(/(\s)t-att-([A-Za-z_][\w:.-]*)\s*=/g,"$1$2=").replace(/(\s)t-attf-([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(r,a,l,u,d)=>`${a}${l}=${u}${Uc(d)}${u}`);return o=o.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(r,a,l,u,d)=>qc(t,a,l,u,d,o)),s?Ic(o):o}function Ic(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,s,o,r,a)=>o.startsWith("t-")||o==="t-props"||$c(a)?e:`${s}${o}=${r}${Rc(a)}${r}`)}function Rc(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function $c(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function Uc(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,s,o)=>`\${${s||o}}`)}\``}function qc(t,e,s,o,r,a){let l=/^(Checkbox|Switch)$/.test(t),u=Pc(t,s),d=l?"checked":"value",b=new RegExp(`\\s${d}\\s*=`).test(a)?"":`${e}${d}=${o}${r}${o}`,f=new RegExp(`\\s${u}\\s*=`).test(a)?"":`${e}${u}=${o}${_c(r,s,l)}${o}`;return`${b}${f}`}function Pc(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(t)?"onInput":"onChange"}function _c(t,e,s){if(s)return`(value) => { ${t} = value; }`;let o="value";return e.includes(".trim")&&(o=`(typeof ${o} === 'string' ? ${o}.trim() : ${o})`),e.includes(".number")&&(o=`Number.isNaN(Number(${o})) ? ${o} : Number(${o})`),`(value) => { ${t} = ${o}; }`}function zi(t,...e){return Array.isArray(t?.raw)?ni({raw:t.raw.map(Gn)},...e):ni(t,...e)}function os(t,e,s={}){let o=Gn(s.templates);return t.components={...Hr,...t.components||{}},_i(t,e,o===s.templates?s:{...s,templates:o})}async function Mc(t){let e=await(await fetch(t,{cache:"reload"})).text(),o=new DOMParser().parseFromString(e,"application/xml").querySelector("templates > t[t-name]");return o?o.innerHTML:e}var Nc,Oc,Hr,c,A=at(()=>{Mi();Mi();Nc=_i,Oc=ni,Hr={};c=class extends kn{constructor(...e){super(...e),Tc(this.constructor)}}});function Dc(t){return typeof Image>"u"?Promise.resolve(!0):(Di.has(t)||Di.set(t,new Promise(e=>{let s=new Image;s.onload=()=>e(!0),s.onerror=()=>e(!1),s.src=t})),Di.get(t))}function ai(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Wr(t,e={}){let s=ai(t);if(!zc.test(s))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||h.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${s}.svg`}function D(t,e,s={}){let o=s.url||Wr(e,s),r=s.label??t.getAttribute("aria-label")??"";t.classList.add("b-icon"),t.style.setProperty("--b-icon-url",`url("${o.replace(/"/g,"%22")}")`),(s.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--b-icon-size",s.size||t.getAttribute("b-att-size")),r?(t.setAttribute("role","img"),t.setAttribute("aria-label",r)):t.setAttribute("aria-hidden","true");let a=s.fallback===!1?null:s.fallback||ci;return a&&!s.url&&ai(e)!==ai(a)&&Dc(o).then(l=>{if(l||!t.isConnected)return;let u=Wr(a,s);t.style.setProperty("--b-icon-url",`url("${u.replace(/"/g,"%22")}")`)}),t}var Zn,jc,ci,zc,Di,lt=at(()=>{C();Zn="1.31.0",jc=`https://cdn.jsdelivr.net/npm/lucide-static@${Zn}/icons`,ci="file",zc=/^[a-z0-9][a-z0-9-]*$/,Di=new Map;h.icons={...h.icons||{},lucide:{version:Zn,cdnBaseUrl:jc,normalizeName:ai,url:Wr,render:D}}});var V,Z,Br=at(()=>{V={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},Z={xs:"btn-xs",sm:"btn-sm",lg:"btn-lg",icon:"btn-icon","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-lg":"btn-icon-lg"}});function li({variant:t="default",size:e,className:s}={}){return m("btn","b-button","b-clipboard-button",V[t]||V.default,Z[e],s)}async function Ir(t){let e=String(t??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(e);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let s=document.createElement("textarea");s.value=e,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.append(s),s.select(),s.setSelectionRange(0,e.length);let o;try{o=document.execCommand("copy")}catch{o=!1}if(s.remove(),!o)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Fi,ui=at(()=>{x();Br();Fi=["btn","b-button","b-clipboard-button",...Object.values(V),...Object.values(Z)]});var Ea={};si(Ea,{destroyBaseUiPreviews:()=>_r,enhanceMarkdownDiagrams:()=>Jr,expandSelfClosingTags:()=>nu,extractTagCaseMap:()=>Wl,mountMarkdownEditor:()=>Yr,normalizeOwlPreviewMarkup:()=>cu,parseMarkdown:()=>Zr,primeBaseUiTemplates:()=>lu,renderBaseUiBlocks:()=>Aa,renderMermaidBlocks:()=>wa});function Ml(){return Yi??(Yi=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),Yi}function jl(t){let e=t.closest("[data-bs-theme]")?.getAttribute("data-bs-theme")||document.documentElement.getAttribute("data-bs-theme");return(e?e==="dark":window.matchMedia?.("(prefers-color-scheme: dark)").matches)?"dark":"default"}function zl(){return Xi??(Xi=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),Xi}function Dl(){return Qi??(Qi=import("./runtime/milkdown/milkdown-editor.js")),Qi}async function Zr(t,e={}){return(await Ml()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function en(t,e,s,o=""){t.classList.add("b-markdown-diagram-error"),t.replaceChildren();let r=document.createElement("p");if(r.className="b-markdown-diagram-error-message",r.textContent=`Unable to render ${e} diagram: ${s?.message||s}`,t.append(r),o){let a=document.createElement("pre"),l=document.createElement("code");l.textContent=o,a.append(l),t.append(a)}}async function wa(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let s;try{s=await zl()}catch(o){e.forEach(r=>{let a=r.closest("pre");a.replaceChildren(),a.className="b-markdown-diagram b-markdown-mermaid",en(a,"mermaid",o,r.textContent)});return}s.initialize({startOnLoad:!1,securityLevel:"strict",theme:jl(t)});for(let o of e){let r=o.textContent,a=o.closest("pre");a.replaceChildren(),a.className="b-markdown-diagram b-markdown-mermaid";try{let{svg:l}=await s.render(`b-mermaid-${++_l}`,r);a.innerHTML=l}catch(l){en(a,"mermaid",l,r)}}}function Fl(t){let e=globalThis.thebase;if(!e?.mountAll)return;let s=document.createElement("div");s.setAttribute("b-ui","toast"),s.setAttribute("b-att-state","open"),s.setAttribute("b-att-delay","2000"),s.className="b-markdown-b-copy-toast",s.textContent=t,document.body.append(s),e.mountAll(s),s.addEventListener("baseui:close",()=>s.remove(),{once:!0})}function Hl(t){let e=document.createElement("div");e.className="b-markdown-b-code";let s=document.createElement("button");s.type="button",s.className="b-markdown-b-copy";let o=document.createElement("span");D(o,"copy",{label:"Copy code"}),s.append(o),s.addEventListener("click",async()=>{try{await Ir(t),s.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),Fl("Copied to clipboard")}catch(l){s.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:l}}))}}),e.append(s);let r=document.createElement("pre"),a=document.createElement("code");a.className="b-markdown-b-code-lines";for(let l of t.replace(/\n$/,"").split(`
|
|
11
|
-
`)){let u=document.createElement("span");u.className="b-markdown-b-code-line",u.textContent=l,a.append(u)}return r.append(a),e.append(r),e}function ga(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Wl(t){let e=new Map;for(let s of t.matchAll(/<\/?([A-Z][A-Za-z0-9]*)\b/g))e.set(s[1].toLowerCase(),s[1]);return e}function Kl(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=globalThis.thebase,o=t.get(e.localName)||e.localName,r=ga(o),a=!!s?.component?.(r),l=_(e.getAttribute("className")||e.getAttribute("class"));if(!a){let u=`b-${r}`;return e.className=l?`${u} ${l}`:u,e}e.setAttribute("b-ui",r),l&&(e.className=l);for(let u of[...e.attributes]){if(u.name==="class"||u.name==="className"||u.name==="b-ui"||/^on[A-Z]/.test(u.name))continue;let d=_(u.value);e.removeAttribute(u.name),!(d===""||d==="false")&&e.setAttribute(`b-att-${ga(u.name)}`,d==="true"?"true":d)}return e}}function _(t){if(!t)return"";let e=t.trim();return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function wi(t,e){for(;t.firstChild;)e.append(t.firstChild)}function nt(t,e){return wi(t,e),t.replaceWith(e),e}function Vl(t){let e=document.createElement("div");e.setAttribute("b-field-group","");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function Gl(t){let e=document.createElement("div");e.setAttribute("b-ui","field");let s=_(t.getAttribute("orientation")||""),o=_(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-orientation",s),o&&(e.className=o),nt(t,e)}function Zl(t){let e=document.createElement("label");e.setAttribute("b-field-label","");let s=_(t.getAttribute("for")||""),o=_(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("for",s),o&&(e.className=o),nt(t,e)}function ya(t,e,s){let o=document.createElement(e);o.setAttribute(s,"");let r=_(t.getAttribute("className")||t.getAttribute("class"));return r&&(o.className=r),nt(t,o)}function Jl(t){let e=t.getAttribute("type")||"",s=t.hasAttribute("variant")||t.hasAttribute("size")||t.hasAttribute("className")||t.hasAttribute("onClick")||t.hasAttribute("label")||e.trim().startsWith("'")||e.trim().startsWith('"');if(t.hasAttribute("b-ui")||!s)return t;let o=document.createElement("button");o.setAttribute("b-ui","button");let r=_(e||"button"),a=_(t.getAttribute("variant")||""),l=_(t.getAttribute("size")||""),u=_(t.getAttribute("className")||t.getAttribute("class")),d=_(t.getAttribute("label")||"");return o.type=r||"button",a&&o.setAttribute("b-att-variant",a),l&&o.setAttribute("b-att-size",l),u&&(o.className=u),d&&!t.childNodes.length&&(o.textContent=d),nt(t,o)}function Yl(t){if(t.hasAttribute("b-ui")||t.hasAttribute("b-icon"))return t;let e=_(t.getAttribute("name")||t.getAttribute("icon")||"");if(!e)return t;let s=document.createElement("span");s.setAttribute("b-ui","icon"),s.setAttribute("b-att-icon",e);let o=_(t.getAttribute("size")||""),r=_(t.getAttribute("label")||""),a=_(t.getAttribute("className")||t.getAttribute("class"));return o&&s.setAttribute("b-att-size",o),r&&s.setAttribute("b-att-label",r),a&&(s.className=a),nt(t,s)}function Xl(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","alert");let s=_(t.getAttribute("variant")||""),o=_(t.getAttribute("className")||t.getAttribute("class"));return s&&e.setAttribute("b-att-variant",s),o&&(e.className=o),nt(t,e)}function tn(t){return e=>{if(e.hasAttribute("b-ui"))return e;let s=document.createElement("div"),o=_(e.getAttribute("className")||e.getAttribute("class"));return s.className=o?`${t} ${o}`:t,nt(e,s)}}function Ql(t){if(t.hasAttribute("b-ui"))return t;let e=document.createElement("div");e.setAttribute("b-ui","accordion"),_(t.getAttribute("multiple"))==="true"&&e.setAttribute("b-att-multiple","true");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function tu(t){if(t.hasAttribute("b-accordion-item"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-item",""),_(t.getAttribute("state"))==="open"&&e.setAttribute("b-att-state","open");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function eu(t){if(t.hasAttribute("b-accordion-trigger"))return t;let e=document.createElement("button");e.type="button",e.setAttribute("b-accordion-trigger","");let s=_(t.getAttribute("className")||t.getAttribute("class"));s&&(e.className=s),wi(t,e);let o=document.createElement("span");return o.setAttribute("b-icon","chevron-down"),o.className="b-accordion-trigger-icon",e.append(o),t.replaceWith(e),e}function su(t){if(t.hasAttribute("b-accordion-panel"))return t;let e=document.createElement("div");e.setAttribute("b-accordion-panel","");let s=_(t.getAttribute("className")||t.getAttribute("class"));return s&&(e.className=s),nt(t,e)}function ou(t){return va+=1,`${t}-${va}`}function it(t,e,s){return o=>{if(o.hasAttribute("b-ui"))return o;let r=document.createElement(t);t==="button"&&(r.type="button"),s&&r.setAttribute(s,"");let a=_(o.getAttribute("className")||o.getAttribute("class"));return r.className=a?`${e} ${a}`:e,nt(o,r)}}function ru(){let t=document.createElement("button");t.type="button",t.className="btn b-button btn-light btn-icon-sm b-dialog-close b-dialog-close-control",t.setAttribute("b-dialog-close",""),t.setAttribute("aria-label","Close");let e=document.createElement("span");e.setAttribute("b-ui","icon"),e.setAttribute("b-att-icon","x");let s=document.createElement("span");return s.className="visually-hidden",s.textContent="Close",t.append(e,s),t}function xa({tagPrefix:t,componentName:e,triggerTag:s,triggerClassName:o,panelClassName:r,closeButton:a}){return l=>{if(l.hasAttribute("b-ui"))return l;let u=l.querySelector(`:scope > ${t}trigger`),d=l.querySelector(`:scope > ${t}content`);if(!d)return l;let b=ou(`b-preview-${e}`),f=document.createElement(s);s==="button"&&(f.type="button"),f.className=o,f.setAttribute("b-att-trigger",`#${b}`),u&&wi(u,f);let g=document.createElement("div");g.setAttribute("b-ui",e),g.id=b,g.setAttribute("b-att-trigger",`[b-att-trigger='#${b}']`);let v=document.createElement("div");v.className=r;let k=_(d.getAttribute("size")||"");return k&&v.setAttribute("data-size",k),wi(d,v),a&&v.append(a()),g.append(v),l.before(f,g),l.remove(),g}}function nu(t){return t.replace(/<([a-zA-Z][a-zA-Z0-9-]*)((?:"[^"]*"|'[^']*'|[^"'>])*?)\/>/g,(e,s,o)=>iu.has(s.toLowerCase())?e:`<${s}${o}></${s}>`)}function au(t){t.querySelectorAll("t[t-esc]").forEach(e=>{let o=e.getAttribute("t-esc")?.includes(".length")?"0":"";e.replaceWith(document.createTextNode(`${o}${e.textContent||""}`))})}function cu(t,e){au(t);let s={fieldgroup:Vl,field:Gl,fieldlabel:Zl,fielddescription:r=>ya(r,"p","b-field-description"),fielderror:r=>ya(r,"p","b-field-error"),button:Jl,icon:Yl,alert:Xl,alerttitle:tn("b-alert-title"),alertdescription:tn("b-alert-description"),alertaction:tn("b-alert-action"),accordion:Ql,accordionitem:tu,accordiontrigger:eu,accordioncontent:su,dialog:xa({tagPrefix:"dialog",componentName:"dialog",triggerTag:"span",triggerClassName:"b-dialog-trigger",panelClassName:"b-dialog-panel",closeButton:ru}),dialogheader:it("div","b-dialog-header"),dialogfooter:it("div","b-dialog-footer"),dialogtitle:it("h2","b-dialog-title"),dialogdescription:it("p","b-dialog-description"),dialogclose:it("button","btn b-button btn-outline-secondary b-dialog-close","b-dialog-close"),alertdialog:xa({tagPrefix:"alertdialog",componentName:"alert-dialog",triggerTag:"button",triggerClassName:"btn b-button btn-outline-secondary b-alert-dialog-trigger",panelClassName:"b-dialog-panel b-alert-dialog-panel"}),alertdialogheader:it("div","b-dialog-header b-alert-dialog-header"),alertdialogfooter:it("div","b-dialog-footer b-alert-dialog-footer"),alertdialogmedia:it("div","b-alert-dialog-media"),alertdialogtitle:it("h2","b-dialog-title b-alert-dialog-title"),alertdialogdescription:it("p","b-dialog-description b-alert-dialog-description"),alertdialogcancel:it("button","btn b-button btn-outline-secondary b-alert-dialog-cancel","b-alert-dialog-cancel"),alertdialogaction:it("button","btn b-button btn-primary b-alert-dialog-action","b-alert-dialog-action")},o=Kl(e);for(let r of[...t.querySelectorAll("*")]){let a=r.localName.toLowerCase();s[a]?s[a](r):e.has(a)&&o(r)}}function lu(t){xi=Promise.resolve(t)}function uu(){return xi??(xi=le("/dist/baseui.templates.xml")),xi}function _r(t){let e=sn.get(t);if(e){sn.delete(t);for(let s of e)try{s.destroy()}catch{}}}function du(t){return new Set([...t.matchAll(pu)].map(e=>e[1]))}function mu(t){let e=new Set;for(let s of t.matchAll(hu))e.add(s[1]);for(let s of t.matchAll(bu))e.add(s[2]);return e}function fu(t){let e=zi({raw:[t]}),s=du(t);class o extends c{setup(){this.state=w(Object.fromEntries([...s].map(a=>[a,""])))}}i(o,"template",e);for(let r of mu(t))o.prototype[r]=function(){};return o}function Sa(t){t.querySelector("[data-slot='dropdown-menu'], .b-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("b-markdown-b-preview-overlay")}async function gu(t,e){let[s,o]=await Promise.all([uu(),fu(e)]),r=await os(o,t,{templates:s});return Sa(t),r}function yu(t,e){let s=globalThis.thebase;if(!s?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");t.innerHTML=e,Sa(t),s.mountAll(t)}async function Aa(t){_r(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let s=new Set;for(let o of e){let r=o.textContent,a=o.closest("pre");a.replaceChildren(),a.className="b-markdown-live b-markdown-baseui";let l=document.createElement("div");l.className="b-markdown-b-preview",a.append(l,Hl(r));try{/<[A-Z]/.test(r)?s.add(await gu(l,r)):yu(l,r)}catch(u){en(a,"BaseUI component",u,r)}}s.size&&sn.set(t,s)}function vu(t){for(let e of t.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))e.setAttribute("aria-label",e.parentElement.textContent.trim())}async function Jr(t,{mermaid:e=!0,baseUi:s=!0}={}){vu(t),e&&await wa(t),s&&await Aa(t)}async function Yr(t){return(await Dl()).createMilkdownMarkdownEditor(t)}var Yi,Xi,Qi,_l,va,iu,xi,sn,pu,hu,bu,Si=at(()=>{A();lt();ui();_l=0;va=0;iu=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);sn=new WeakMap;pu=/\bstate\.([A-Za-z_$][\w$]*)/g;hu=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,bu=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g});function Au(t,e,s){let o=String(t||"").trim();if(!o)return"";let r=o.replace(/\{([^}]+)\}/g,(a,l)=>{let u=s&&typeof s=="object"?s[l]:null;return u&&u.default!==void 0?String(u.default):`{${l}}`});try{return new URL(r,`${e}/`).href.replace(/\/$/,"")}catch{return r.replace(/\/$/,"")}}function H(t,e){if(t&&typeof t=="object"&&typeof t.$ref=="string"){let s=t.$ref.replace(/^#\//,"").split("/"),o=e;for(let r of s)o=o?.[decodeURIComponent(r.replace(/~1/g,"/").replace(/~0/g,"~"))];return o?{...o}:{}}return t}function hn(t,e){if(!Array.isArray(t?.allOf))return t;let s={...t,properties:{...t.properties},required:[...t.required||[]]};delete s.allOf;for(let o of t.allOf){let r=hn(H(o,e),e)||{};Object.assign(s.properties,r.properties),s.required.push(...r.required||[]),s.type||(s.type=r.type)}return s}function Eu(t,e){if(!t)return null;let s=H(t,e);return!s||typeof s!="object"?null:s}function dn(t){return t&&typeof t.$ref=="string"?t.$ref.split("/").pop():null}function Pa(t,e){if(!t||typeof t!="object")return null;for(let[s,o]of Object.entries(t)){let r=Eu(o,e);if(r){if(r.dataValue!==void 0)return{key:s,label:r.summary||s,value:r.dataValue,isAuto:!1};if(r.serializedValue!==void 0)return{key:s,label:r.summary||s,value:r.serializedValue,isAuto:!1};if(r.value!==void 0)return{key:s,label:r.summary||s,value:r.value,isAuto:!1};if(r.externalValue)return{key:s,label:r.summary||s,value:r.externalValue,isAuto:!1}}}return null}function bn(t){if(t){if(t.example!==void 0)return t.example;if(t.default!==void 0)return t.default;if(Array.isArray(t.enum)&&t.enum.length)return t.enum[0]}}function ln(t,e){if(!t)return null;let s=Pa(t.examples,e);if(s)return s;if(t.example!==void 0)return{label:"media example",value:t.example,isAuto:!1};let o=H(t.schema,e),r=bn(o);return r!==void 0?{label:"schema example",value:r,isAuto:!1}:null}function _a(t,e){let s=Pa(t.examples,e);if(s)return s;if(t.example!==void 0)return{label:"example",value:t.example,isAuto:!1};let o=H(t.schema,e),r=bn(o);return r!==void 0?{label:"schema example",value:r,isAuto:!1}:null}function Mr(t,e,s=new Set){if(!t)return null;let o=dn(t);if(o){if(s.has(o))return{};s=new Set(s).add(o)}let r=hn(H(t,e),e);if(!r)return null;let a=bn(r);if(a!==void 0)return a;if(r.type==="array"||r.items)return[Mr(r.items||{},e,s)];if(r.properties||r.type==="object"){let l={};for(let[u,d]of Object.entries(r.properties||{}))l[u]=Mr(d,e,s);return l}switch(r.type){case"integer":return r.minimum??0;case"number":return r.minimum??0;case"boolean":return!0;case"string":return r.format==="date-time"?new Date().toISOString():r.format==="date"?new Date().toISOString().slice(0,10):r.format==="byte"?"base64==":r.title||"string";default:return null}}function Qr(t,e,{depth:s=0,prefix:o="",seen:r=new Set,required:a=!1,selfRow:l=!0}={}){if(!t||s>4)return[];let u=dn(t);if(u){if(r.has(u))return[];r=new Set(r).add(u)}let d=hn(H(t,e),e),b=[],f=d.contentMediaType||d.contentEncoding?[d.contentMediaType,d.contentEncoding&&`encoding:${d.contentEncoding}`].filter(Boolean).join(", "):"",g=d.discriminator?.propertyName?`discriminator: ${d.discriminator.propertyName}`:"";if(Array.isArray(d.prefixItems))return l&&b.push({path:o||"items",type:"tuple",required:a,description:d.description||""}),d.prefixItems.forEach((v,k)=>{b.push(...Qr(v,e,{depth:s+1,prefix:`${o}[${k}]`,seen:r,required:!1}))}),d.items&&b.push(...Qr(d.items,e,{depth:s+1,prefix:`${o}[n]`,seen:r,required:!1})),b;if(d.type==="array"||d.items)return l&&b.push({path:o||"items",type:"array",required:a,description:d.description||""}),b.push(...Qr(d.items||{},e,{depth:s+1,prefix:`${o}[]`,seen:r,required:!1})),b;if(d.properties||d.type==="object"||d.patternProperties){let v=new Set(d.required||[]);for(let[k,y]of Object.entries(d.properties||{})){let E=H(y,e),O=o?`${o}.${k}`:k;b.push({path:O,type:E.type||(E.$ref?dn(y):"any")||"any",format:E.format||"",enum:E.enum,required:v.has(k),description:E.description||""}),(E.type==="object"||E.properties||E.type==="array"||E.items)&&b.push(...Qr(y,e,{depth:s+1,prefix:O,seen:r,required:v.has(k),selfRow:!1}))}for(let[k,y]of Object.entries(d.patternProperties||{})){let E=H(y,e);b.push({path:o?`${o}.<${k}>`:`<${k}>`,type:E.type||"any",format:E.format||"",required:!1,description:E.description||""})}return b}return b.push({path:o||"value",type:d.type||"any",format:d.format||"",enum:d.enum,required:a,description:[d.description,f,g].filter(Boolean).join(" \u2014 ")}),b}function Cu(t){let e=_a(t,this);return{name:t.name,in:t.in,required:!!t.required,type:t.type||t.schema?.type||"string",format:t.format||t.schema?.format||"",description:t.description||"",default:t.default??t.schema?.default,enum:t.enum||t.schema?.enum,example:e?e.value:void 0,exampleLabel:e?e.label:""}}function ku(t){if(t.type==="http")return{...t,type:String(t.scheme).toLowerCase()==="basic"?"basic":"bearer"};if(t.type==="openIdConnect")return{...t,type:"bearer",oauth2MetadataUrl:t.openIdConnectUrl};if(t.type!=="oauth2"||!t.flows)return t;let[e,s]=Object.entries(t.flows)[0]||[];return{...t,...s,flow:Lu[e]||e,scopes:s?.scopes||{}}}function Ma(t){let e=t.securityDefinitions||t.components?.securitySchemes||{};return Object.fromEntries(Object.entries(e).map(([s,o])=>[s,ku(H(o,t))]))}function Nu(t,e){let s=Ma(e),o=t.security||e.security||[],r=[];for(let a of o)for(let l of Object.keys(a)){let u=s[l];u&&r.push({key:l,...u})}return r}function un(t,e,s,o){let r={path:[],query:[],header:[],formData:[],body:null};for(let b of o.parameters||[]){let f=H(b,t);if(f.in==="body"){let g={schema:f.schema},v=ln(g,t);r.body={required:!!f.required,schema:f.schema,description:f.description||"",contentType:"application/json",example:v?v.value:Mr(f.schema,t),exampleLabel:v?v.label:"auto",exampleIsAuto:!v}}else r[f.in]&&r[f.in].push(Cu.call(t,f))}if(o.requestBody){let b=H(o.requestBody,t)||{},[f,g]=Object.entries(b.content||{})[0]||[];if(f&&g){let v=ln(g,t);r.body={required:!!b.required,schema:g.schema||null,description:b.description||"",contentType:f,encoding:g.encoding||null,itemSchema:g.itemSchema||null,example:v?v.value:Mr(g.schema,t),exampleLabel:v?v.label:"auto",exampleIsAuto:!v}}}let a=Object.entries(o.responses||{}).map(([b,f])=>{let g=H(f,t)||{},[v,k]=Object.entries(g.content||{})[0]||[],y=k?ln(k,t):null;return{status:b,summary:g.summary||"",description:g.description||"",contentType:v||"application/json",schema:k?.schema||g.schema||null,encoding:k?.encoding||null,headers:Ou(g.headers,t),links:Tu(g.links,t),example:y?y.value:k?.schema?Mr(k.schema,t):null,exampleLabel:y?y.label:"auto",exampleIsAuto:!y&&!!k?.schema}}).sort((b,f)=>{let g=qa(b.status),v=qa(f.status);return g-v}),l=Bu(o.callbacks,t),u=s.toUpperCase();return{id:(o.operationId||`${s}-${e}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:u,path:e,tag:o.tags&&o.tags[0]||"default",summary:o.summary||o.operationId||`${u} ${e}`,description:o.description||"",deprecated:!!o.deprecated,produces:o.produces||t.produces||["application/json"],consumes:o.consumes||t.consumes||(r.body?["application/json"]:[]),parameters:r,responses:a,callbacks:l,externalDocs:o.externalDocs||null,security:Nu(o,t)}}function Ou(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([s,o])=>{let r=H(o,e)||{},a=_a({...r,in:"header"},e);return{name:s,required:!!r.required,deprecated:!!r.deprecated,type:r.schema?.type||"string",description:r.description||"",example:a?a.value:void 0}})}function Tu(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([s,o])=>{let r=H(o,e)||{};return{name:s,operationId:r.operationId||"",operationRef:r.operationRef||"",description:r.description||"",parameters:r.parameters||{}}})}function Bu(t,e){if(!t||typeof t!="object")return[];let s=[];for(let[o,r]of Object.entries(t)){let a=H(r,e)||{};for(let[l,u]of Object.entries(a)){let d=H(u,e)||{};for(let b of pn)d[b]&&s.push({name:o,expression:l,method:b.toUpperCase(),summary:d[b].summary||"",description:d[b].description||""})}}return s}function qa(t){if(t==="default")return 999;let e=parseInt(t,10);return Number.isNaN(e)?998:e}async function ja(t,e=""){let s=await fetch(t);if(!s.ok)throw new Error(`Failed to fetch spec: HTTP ${s.status}`);return mn(await s.json(),e)}function mn(t,e=""){if(!t||typeof t!="object"||!t.paths&&!t.webhooks)throw new Error("Not an OpenAPI document (missing paths).");let s=t.schemes&&t.schemes.includes("https")?"https":t.schemes?.[0]||"https",o=t.host||location.host,r=t.basePath||"",a=`${s}://${o}${r}`.replace(/\/$/,""),l=e?[{name:"",url:e.replace(/\/$/,""),description:""}]:Array.isArray(t.servers)&&t.servers.length?t.servers.map(y=>({name:y?.name||"",url:Au(y?.url,a,y?.variables),description:String(y?.description||"").trim()})).filter(y=>y.url):[{name:"",url:a,description:""}],u=l[0]?.url||a,d=(t.tags||[]).map(y=>y.name),b=new Map((t.tags||[]).map(y=>[y.name,y])),f=[];for(let[y,E]of Object.entries(t.paths||{})){let O=H(E,t)||{};for(let P of pn)O[P]&&f.push(un(t,y,P,O[P]));for(let[P,B]of Object.entries(O.additionalOperations||{}))f.push(un(t,y,P.toLowerCase(),B))}let g=[];for(let[y,E]of Object.entries(t.webhooks||{})){let O=H(E,t)||{};for(let P of pn)O[P]&&g.push(un(t,y,P,O[P]))}let k=[...new Set([...d,...f.map(y=>y.tag)])].map(y=>{let E=b.get(y);return{id:y.replace(/[^a-zA-Z0-9]+/g,"-").toLowerCase(),name:y,summary:E?.summary||"",description:E?.description||"",parent:E?.parent||"",kind:E?.kind||"",items:f.filter(O=>O.tag===y)}}).filter(y=>y.items.length);return{spec:t,info:t.info||{},baseUrl:u,derivedBaseUrl:a,servers:l,securityDefinitions:Ma(t),groups:k,webhooks:g,resolveRef:y=>H(y,t),generateExample:y=>Mr(y,t),schemaRows:y=>Qr(y,t),findOperation:y=>f.find(E=>E.id===y)||g.find(E=>E.id===y),firstOperation:()=>f[0]}}var pn,Lu,za=at(()=>{pn=["get","post","put","patch","delete","options","head","trace","query"];Lu={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"}});function Iu(t){let e=new URL(t.url);return(t.query||[]).forEach(([s,o])=>{s&&e.searchParams.set(s,String(o||""))}),e.toString()}function Ru(t,e){let s=[];return(t.headers||[]).forEach(([r,a])=>{r&&s.push([r,String(a??"")])}),e&&t.bodyText&&!$u(s,"Content-Type")&&s.push(["Content-Type",t.mimeType||"application/json"]),s}function $u(t,e){let s=e.toLowerCase();return t.some(function(o){return String(o[0]||"").toLowerCase()===s})}function Uu(t,e){return String(t||"").split(`
|
|
12
|
-
`).map(function(s){return e+s}).join(`
|
|
13
|
-
`)}function Q(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function q(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function qu(t){return String(t).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function Pu(t){return String(t).replace(/`/g,'` + "`" + `')}function _u(t){return String(t).replace(/\\/g,"\\\\").replace(/"""/g,'\\"\\"\\"')}function Ei(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function Ci(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}function Li(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function ki(t){return String(t).replace(/`/g,"``").replace(/"/g,'`"')}function Mu(t){return String(t).replace(/\]=\]/g,']==] .. "]=" .. [=[')}function ju(t,e){let s=e&&e.quote==="double"?'"':"'";return t.map(function(r){let a=s==='"'?q(r[0]):Q(r[0]),l=s==='"'?q(r[1]):Q(r[1]);return s+a+s+": "+s+l+s}).join(`,
|
|
14
|
-
`)}function zu(t,e,s){let o=["curl --request "+t.method];return s.forEach(function(r){o.push("--header '"+Q(r[0]+": "+r[1])+"'")}),t.bodyText&&o.push("--data '"+Q(t.bodyText)+"'"),o.push("'"+Q(e)+"'"),o.join(` \\
|
|
15
|
-
`)}function Da(t,e,s){let o=["const url = '"+Q(e)+"';","const options = {"," method: '"+Q(t.method)+"',"];return s.length&&(o.push(" headers: {"),o.push(Uu(ju(s)," ")),o.push(" },")),t.bodyText&&o.push(" body: `"+qu(t.bodyText)+"`,"),o.push("};","","const response = await fetch(url, options);","const data = await response.text();","console.log(response.status, data);"),o.join(`
|
|
16
|
-
`)}function Du(t,e,s){return Da(t,e,s)}function Fu(t,e,s){let o=["import requests","","url = '"+Q(e)+"'"];return s.length?(o.push("headers = {"),s.forEach(function(r){o.push(" '"+Q(r[0])+"': '"+Q(r[1])+"',")}),o.push("}")):o.push("headers = {}"),t.bodyText?(o.push("",'payload = """'+_u(t.bodyText)+'"""'),o.push("response = requests.request('"+Q(t.method)+"', url, headers=headers, data=payload)")):o.push("","response = requests.request('"+Q(t.method)+"', url, headers=headers)"),o.push("print(response.status_code)","print(response.text)"),o.join(`
|
|
17
|
-
`)}function Hu(t,e,s){let o=["package main","","import (",' "fmt"',' "io"',' "net/http"'];return t.bodyText&&o.push(' "strings"'),o.push(")","","func main() {"),t.bodyText?(o.push(" body := strings.NewReader(`"+Pu(t.bodyText)+"`)"),o.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", body)')):o.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", nil)'),o.push(" if err != nil {"," panic(err)"," }"),s.forEach(function(r){o.push(' req.Header.Set("'+q(r[0])+'", "'+q(r[1])+'")')}),o.push(""," res, err := http.DefaultClient.Do(req)"," if err != nil {"," panic(err)"," }"," defer res.Body.Close()",""," data, err := io.ReadAll(res.Body)"," if err != nil {"," panic(err)"," }",""," fmt.Println(res.StatusCode)"," fmt.Println(string(data))","}"),o.join(`
|
|
18
|
-
`)}function Wu(t,e,s){let o=["OkHttpClient client = new OkHttpClient();","","Request.Builder builder = new Request.Builder()",' .url("'+q(e)+'")'];return s.forEach(function(r){o.push(' .addHeader("'+q(r[0])+'", "'+q(r[1])+'")')}),t.bodyText?o.push(";","",'MediaType mediaType = MediaType.parse("'+q(t.mimeType||"application/json")+'");','RequestBody body = RequestBody.create("""'+q(t.bodyText)+'""", mediaType);','Request request = builder.method("'+t.method+'", body).build();'):o.push(";","",'Request request = builder.method("'+t.method+'", null).build();'),o.push("","try (Response response = client.newCall(request).execute()) {"," System.out.println(response.code());",' System.out.println(response.body() != null ? response.body().string() : "");',"}"),o.join(`
|
|
19
|
-
`)}function Ku(t,e,s){let r=["using var client = new HttpClient();","using var request = new HttpRequestMessage(HttpMethod."+(t.method.charAt(0)+t.method.slice(1).toLowerCase())+', "'+q(e)+'");'];return s.forEach(function(a){r.push('request.Headers.TryAddWithoutValidation("'+q(a[0])+'", "'+q(a[1])+'");')}),t.bodyText&&r.push('request.Content = new StringContent("""'+q(t.bodyText)+'""", Encoding.UTF8, "'+q(t.mimeType||"application/json")+'");'),r.push("","using var response = await client.SendAsync(request);","var body = await response.Content.ReadAsStringAsync();","Console.WriteLine((int)response.StatusCode);","Console.WriteLine(body);"),r.join(`
|
|
20
|
-
`)}function Vu(t,e,s){let o=["$ch = curl_init();","curl_setopt_array($ch, ["," CURLOPT_URL => '"+Ei(e)+"',"," CURLOPT_CUSTOMREQUEST => '"+Ei(t.method)+"',"," CURLOPT_RETURNTRANSFER => true,"];return s.length&&(o.push(" CURLOPT_HTTPHEADER => ["),s.forEach(function(r){o.push(" '"+Ei(r[0]+": "+r[1])+"',")}),o.push(" ],")),t.bodyText&&o.push(" CURLOPT_POSTFIELDS => '"+Ei(t.bodyText)+"',"),o.push("]);","","$response = curl_exec($ch);","echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE) . PHP_EOL;","echo $response;","curl_close($ch);"),o.join(`
|
|
21
|
-
`)}function Gu(t,e,s){let o=t.method.charAt(0)+t.method.slice(1).toLowerCase(),r=['require "uri"','require "net/http"',"","uri = URI('"+Ci(e)+"')","http = Net::HTTP.new(uri.host, uri.port)",'http.use_ssl = uri.scheme == "https"',"","request = Net::HTTP::"+o+".new(uri)"];return s.forEach(function(a){r.push("request['"+Ci(a[0])+"'] = '"+Ci(a[1])+"'")}),t.bodyText&&r.push("request.body = '"+Ci(t.bodyText)+"'"),r.push("","response = http.request(request)","puts response.code","puts response.body"),r.join(`
|
|
22
|
-
`)}function Zu(t,e,s){let o=["#include <curl/curl.h>","","int main(void) {"," CURL *curl = curl_easy_init();"," if (!curl) return 1;",""," struct curl_slist *headers = NULL;"];return s.forEach(function(r){o.push(' headers = curl_slist_append(headers, "'+Li(r[0]+": "+r[1])+'");')}),o.push(' curl_easy_setopt(curl, CURLOPT_URL, "'+Li(e)+'");'),o.push(' curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "'+Li(t.method)+'");'),s.length&&o.push(" curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);"),t.bodyText&&o.push(' curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "'+Li(t.bodyText)+'");'),o.push(""," curl_easy_perform(curl);"," curl_slist_free_all(headers);"," curl_easy_cleanup(curl);"," return 0;","}"),o.join(`
|
|
23
|
-
`)}function Ju(t,e,s){let o=['var request = URLRequest(url: URL(string: "'+q(e)+'")!)','request.httpMethod = "'+q(t.method)+'"'];return s.forEach(function(r){o.push('request.setValue("'+q(r[1])+'", forHTTPHeaderField: "'+q(r[0])+'")')}),t.bodyText&&o.push('request.httpBody = """',t.bodyText,'""".data(using: .utf8)'),o.push("","URLSession.shared.dataTask(with: request) { data, response, error in"," if let error = error {"," print(error)"," return"," }"," let status = (response as? HTTPURLResponse)?.statusCode ?? 0"," print(status)",' print(String(data: data ?? Data(), encoding: .utf8) ?? "")',"}.resume()"),o.join(`
|
|
24
|
-
`)}function Yu(t,e,s){let o=['NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"'+q(e)+'"]];','request.HTTPMethod = @"'+q(t.method)+'";'];return s.forEach(function(r){o.push('[request setValue:@"'+q(r[1])+'" forHTTPHeaderField:@"'+q(r[0])+'"];')}),t.bodyText&&o.push('request.HTTPBody = [@"'+q(t.bodyText)+'" dataUsingEncoding:NSUTF8StringEncoding];'),o.push("","NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request"," completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"," if (error) {",' NSLog(@"%@", error);'," return;"," }"," NSInteger status = [(NSHTTPURLResponse *)response statusCode];"," NSString *body = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];",' NSLog(@"%ld", (long)status);',' NSLog(@"%@", body);',"}];","[task resume];"),o.join(`
|
|
25
|
-
`)}function Xu(t,e,s){let o=["val client = OkHttpClient()"];return t.bodyText&&o.push('val body = """',t.bodyText,'""".trimIndent().toRequestBody("'+q(t.mimeType||"application/json")+'".toMediaType())'),o.push("val request = Request.Builder()",' .url("'+q(e)+'")'),s.forEach(function(r){o.push(' .addHeader("'+q(r[0])+'", "'+q(r[1])+'")')}),o.push(t.bodyText?' .method("'+t.method+'", body)':' .method("'+t.method+'", null)'," .build()","","client.newCall(request).execute().use { response ->"," println(response.code)"," println(response.body?.string().orEmpty())","}"),o.join(`
|
|
26
|
-
`)}function Qu(t,e,s){let o=["let client = reqwest::Client::new();","let response = client"," ."+t.method.toLowerCase()+'("'+q(e)+'")'];return s.forEach(function(r){o.push(' .header("'+q(r[0])+'", "'+q(r[1])+'")')}),t.bodyText&&o.push(' .body(r#"'+t.bodyText.replace(/"#/g,'"#""#')+'"#)'),o.push(" .send()"," .await?;","",'println!("{}", response.status());','println!("{}", response.text().await?);'),o.join(`
|
|
27
|
-
`)}function tp(t,e,s){let o=["$headers = @{"];return s.forEach(function(r){o.push(' "'+ki(r[0])+'" = "'+ki(r[1])+'"')}),o.push("}",""),t.bodyText&&o.push('$body = @"',t.bodyText,'"@',""),o.push("$response = Invoke-RestMethod -Method "+t.method+' -Uri "'+ki(e)+'" -Headers $headers'+(t.bodyText?' -Body $body -ContentType "'+ki(t.mimeType||"application/json")+'"':""),"$response | ConvertTo-Json -Depth 10"),o.join(`
|
|
28
|
-
`)}function ep(t,e,s){let o=["import 'package:http/http.dart' as http;","","final uri = Uri.parse('"+Q(e)+"');","final headers = <String, String>{"];return s.forEach(function(r){o.push(" '"+Q(r[0])+"': '"+Q(r[1])+"',")}),o.push("};",""),t.bodyText?o.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers, body: '''"+t.bodyText.replace(/'''/g,"'' '")+"''');"):o.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers);"),o.push("print('Status: ${response.statusCode}');","print(response.body);"),o.join(`
|
|
29
|
-
`)}function sp(t,e,s){let o=['local http = require("socket.http")','local ltn12 = require("ltn12")',"","local response_body = {}","local headers = {"];return s.forEach(function(r){o.push(' ["'+q(r[0])+'"] = "'+q(r[1])+'",')}),o.push("}",""),t.bodyText&&(o.push("local body = [==["+Mu(t.bodyText)+"]==]",""),o.push('headers["Content-Length"] = tostring(#body)')),o.push("local _, code = http.request{",' url = "'+q(e)+'",',' method = "'+q(t.method)+'",'," headers = headers,"),t.bodyText&&o.push(" source = ltn12.source.string(body),"),o.push(" sink = ltn12.sink.table(response_body),","}","",'print("Status: " .. tostring(code))',"print(table.concat(response_body))"),o.join(`
|
|
30
|
-
`)}async function Fa(t,e){let s=fn.find(function(a){return a.id===t});if(!s)throw new Error("Unknown language: "+t);let o=Ru(e,!0),r=Iu(e);return op[s.id](e,r,o)}var fn,op,Ha=at(()=>{fn=[{id:"curl",label:"CURL",icon:"img/bash-plain.svg"},{id:"csharp",label:"CSHARP",icon:"img/csharp-original.svg"},{id:"go",label:"GO",icon:"img/go-original-wordmark.svg"},{id:"node",label:"NODEJS",icon:"img/nodejs-original.svg"},{id:"ruby",label:"RUBY",icon:"img/ruby-plain.svg"},{id:"php",label:"PHP",icon:"img/php-original.svg"},{id:"javascript",label:"JAVASCRIPT",icon:"img/javascript-original.svg"},{id:"python",label:"PYTHON",icon:"img/python-original.svg"},{id:"java",label:"JAVA",icon:"img/java-original.svg"},{id:"c",label:"C",icon:"img/c-original.svg"},{id:"swift",label:"SWIFT",icon:"img/swift-original.svg"},{id:"objc",label:"OBJECTIVE-C",icon:"img/objectivec-plain.svg"},{id:"kotlin",label:"KOTLIN",icon:"img/kotlin-original.svg"},{id:"rust",label:"RUST",icon:"img/rust-original.svg"},{id:"powershell",label:"POWERSHELL",icon:"img/windows8-original.svg"},{id:"dart",label:"DART",icon:"img/dart-original.svg"},{id:"lua",label:"LUA",icon:"img/lua.svg"}];op={curl:zu,javascript:Da,node:Du,python:Fu,go:Hu,java:Wu,csharp:Ku,php:Vu,ruby:Gu,c:Zu,swift:Ju,objc:Yu,kotlin:Xu,rust:Qu,powershell:tp,dart:ep,lua:sp}});var Wa={};si(Wa,{LANGUAGES:()=>fn,buildOpenApiDoc:()=>mn,generateSnippet:()=>Fa,loadOpenApiDoc:()=>ja});var Ka=at(()=>{za();Ha()});var ch={};si(ch,{Accordion:()=>po,AccordionContent:()=>bo,AccordionItem:()=>ho,AccordionTrigger:()=>Ce,Alert:()=>pt,AlertAction:()=>ns,AlertDescription:()=>Lt,AlertDialog:()=>Is,AlertDialogAction:()=>ge,AlertDialogCancel:()=>fe,AlertDialogContent:()=>Rs,AlertDialogDescription:()=>_s,AlertDialogFooter:()=>Us,AlertDialogHeader:()=>$s,AlertDialogMedia:()=>qs,AlertDialogTitle:()=>Ps,AlertDialogTrigger:()=>me,AlertTitle:()=>is,ApiDoc:()=>Et,ApiDocGroup:()=>Ct,App:()=>Ln,AspectRatio:()=>ar,Attachment:()=>Vo,AttachmentAction:()=>Fe,AttachmentActions:()=>Xo,AttachmentContent:()=>Zo,AttachmentDescription:()=>Yo,AttachmentDropzone:()=>tr,AttachmentGroup:()=>Qo,AttachmentMedia:()=>Go,AttachmentTitle:()=>Jo,AttachmentTrigger:()=>He,Avatar:()=>er,Badge:()=>st,BaseUI:()=>h,BaseUIComponents:()=>Ii,BaseUITheme:()=>Ji,BlockViewer:()=>Je,Breadcrumb:()=>Gt,BreadcrumbEllipsis:()=>ke,BreadcrumbItem:()=>Jt,BreadcrumbLink:()=>Yt,BreadcrumbList:()=>Zt,BreadcrumbPage:()=>Xt,BreadcrumbSeparator:()=>yt,Bubble:()=>cr,Button:()=>S,ButtonGroup:()=>pr,ButtonGroupSeparator:()=>dr,ButtonGroupText:()=>hr,Calendar:()=>je,Card:()=>ls,CardBody:()=>ps,CardDescription:()=>bs,CardFooter:()=>ds,CardHeader:()=>us,CardTitle:()=>hs,Carousel:()=>Fo,CarouselNext:()=>De,CarouselPrevious:()=>ze,CarouselSlide:()=>Ho,Chart:()=>Do,Checkbox:()=>Dt,ClipboardButton:()=>ut,CodeEditor:()=>pe,Collapsible:()=>mo,CollapsibleContent:()=>fo,CollapsibleTrigger:()=>Le,Combobox:()=>jo,Command:()=>zo,Component:()=>c,ContextMenu:()=>ao,ContextMenuContent:()=>lo,ContextMenuItem:()=>uo,ContextMenuTrigger:()=>co,DataTable:()=>Me,DatePicker:()=>Mo,Dialog:()=>$t,DialogClose:()=>de,DialogContent:()=>bt,DialogDescription:()=>_t,DialogFooter:()=>qt,DialogHeader:()=>Ut,DialogTitle:()=>Pt,DialogTrigger:()=>ms,Direction:()=>lr,Drawer:()=>Ms,DrawerClose:()=>ve,DrawerContent:()=>js,DrawerDescription:()=>Hs,DrawerFooter:()=>Ds,DrawerHeader:()=>zs,DrawerTitle:()=>Fs,DrawerTrigger:()=>ye,DropdownMenu:()=>Ft,DropdownMenuCheckboxItem:()=>Ae,DropdownMenuContent:()=>Ht,DropdownMenuGroup:()=>so,DropdownMenuItem:()=>Wt,DropdownMenuLabel:()=>oo,DropdownMenuRadioGroup:()=>ro,DropdownMenuRadioItem:()=>Ee,DropdownMenuSeparator:()=>io,DropdownMenuShortcut:()=>no,DropdownMenuSub:()=>Kt,DropdownMenuSubContent:()=>Vt,DropdownMenuSubTrigger:()=>ft,DropdownMenuTrigger:()=>mt,Empty:()=>fs,EmptyContent:()=>ws,EmptyDescription:()=>xs,EmptyHeader:()=>gs,EmptyMedia:()=>ys,EmptyTitle:()=>vs,EventBus:()=>Nn,Field:()=>re,FieldContent:()=>fr,FieldDescription:()=>ne,FieldError:()=>ae,FieldGroup:()=>oe,FieldLabel:()=>ie,FieldLegend:()=>mr,FieldSeparator:()=>yr,FieldSet:()=>br,FieldTitle:()=>gr,Form:()=>Qe,HoverCard:()=>Qs,HoverCardContent:()=>eo,HoverCardTrigger:()=>to,Icon:()=>$,Input:()=>Ot,InputOtp:()=>Ns,Item:()=>ur,Kbd:()=>kt,Label:()=>vr,Markdown:()=>At,MarkdownTree:()=>Ze,MarkdownTreeNode:()=>zr,Marker:()=>Es,Menubar:()=>wo,Message:()=>sr,MessageScroller:()=>or,NativeSelect:()=>zt,NavigationMenu:()=>vo,NavigationMenuItem:()=>xo,OwlError:()=>On,Pagination:()=>go,PaginationItem:()=>yo,Popover:()=>Ys,PopoverContent:()=>Xs,PopoverTrigger:()=>Se,Progress:()=>nr,Pwa:()=>Sr,PwaBody:()=>kr,PwaClose:()=>Xe,PwaContent:()=>Ar,PwaDescription:()=>Lr,PwaFooter:()=>Or,PwaHeader:()=>Er,PwaSteps:()=>Nr,PwaTitle:()=>Cr,PwaTrigger:()=>Ye,Questionnaire:()=>rr,QuestionnaireNext:()=>Ke,QuestionnairePrevious:()=>We,QuestionnaireStep:()=>ir,RadioGroup:()=>Cs,RadioGroupItem:()=>Ls,Resizable:()=>Wo,ScrollArea:()=>Ko,Select:()=>Os,SelectContent:()=>Ts,SelectItem:()=>Bs,SelectTrigger:()=>be,Separator:()=>Ss,Sheet:()=>Ws,SheetClose:()=>we,SheetContent:()=>Ks,SheetDescription:()=>Js,SheetFooter:()=>Gs,SheetHeader:()=>Vs,SheetTitle:()=>Zs,SheetTrigger:()=>xe,Shell:()=>Ue,ShellContent:()=>Pe,ShellHeader:()=>Uo,ShellMain:()=>$o,ShellNav:()=>Ro,ShellSidebar:()=>qe,ShellSidebarHeader:()=>Io,ShellUserMenu:()=>_e,Sidebar:()=>xt,SidebarClose:()=>Te,SidebarContent:()=>Qt,SidebarFooter:()=>Ao,SidebarGroup:()=>te,SidebarGroupAction:()=>Be,SidebarGroupCollapsible:()=>Ie,SidebarGroupContent:()=>ko,SidebarGroupLabel:()=>ee,SidebarHeader:()=>So,SidebarInput:()=>Co,SidebarInset:()=>Eo,SidebarMenu:()=>wt,SidebarMenuAction:()=>Re,SidebarMenuBadge:()=>Oo,SidebarMenuButton:()=>vt,SidebarMenuItem:()=>se,SidebarMenuSkeleton:()=>To,SidebarMenuSub:()=>No,SidebarMenuSubButton:()=>$e,SidebarMenuSubItem:()=>Bo,SidebarProvider:()=>qr,SidebarRail:()=>Oe,SidebarSeparator:()=>Lo,SidebarTrigger:()=>Ne,Skeleton:()=>Mt,Slider:()=>ks,Spinner:()=>Nt,Switch:()=>he,TabContent:()=>Rt,TabTrigger:()=>ht,Table:()=>qo,Tabs:()=>Tt,TabsContainer:()=>Bt,TabsList:()=>It,TextEditor:()=>Tr,Textarea:()=>jt,ThemeButton:()=>St,Toast:()=>gt,Toggle:()=>Ve,ToggleGroup:()=>xr,ToggleGroupItem:()=>Ge,Tooltip:()=>ct,Typography:()=>As,__info__:()=>Tn,batched:()=>Bn,blockDom:()=>In,cn:()=>m,createNamedIcon:()=>rs,createThemeController:()=>ce,default:()=>hc,findMarkdownTreeNode:()=>Ni,htmlEscape:()=>Rn,iconComponentName:()=>Zi,loadFile:()=>le,loadTemplate:()=>Mc,markRaw:()=>$n,markup:()=>ii,mergeStyle:()=>K,mount:()=>os,normalizeTheme:()=>yi,onError:()=>Un,onMounted:()=>R,onPatched:()=>M,onRendered:()=>qn,onWillDestroy:()=>ue,onWillPatch:()=>Pn,onWillRender:()=>_n,onWillStart:()=>ot,onWillUnmount:()=>U,onWillUpdateProps:()=>z,rawMount:()=>Nc,rawXml:()=>Oc,reactive:()=>Mn,registerGlobalComponents:()=>ji,status:()=>jn,toRaw:()=>zn,useChildSubEnv:()=>T,useComponent:()=>Dn,useEffect:()=>tt,useEnv:()=>Fn,useExternalListener:()=>ss,useRef:()=>L,useState:()=>w,useSubEnv:()=>Hn,validate:()=>Wn,validateType:()=>Kn,whenReady:()=>Vn,xml:()=>zi});C();x();var Cn="1.2.1";A();var Ii={};si(Ii,{Accordion:()=>po,AccordionContent:()=>bo,AccordionItem:()=>ho,AccordionTrigger:()=>Ce,Alert:()=>pt,AlertAction:()=>ns,AlertDescription:()=>Lt,AlertDialog:()=>Is,AlertDialogAction:()=>ge,AlertDialogCancel:()=>fe,AlertDialogContent:()=>Rs,AlertDialogDescription:()=>_s,AlertDialogFooter:()=>Us,AlertDialogHeader:()=>$s,AlertDialogMedia:()=>qs,AlertDialogTitle:()=>Ps,AlertDialogTrigger:()=>me,AlertTitle:()=>is,ApiDoc:()=>Et,ApiDocGroup:()=>Ct,AspectRatio:()=>ar,Attachment:()=>Vo,AttachmentAction:()=>Fe,AttachmentActions:()=>Xo,AttachmentContent:()=>Zo,AttachmentDescription:()=>Yo,AttachmentDropzone:()=>tr,AttachmentGroup:()=>Qo,AttachmentMedia:()=>Go,AttachmentTitle:()=>Jo,AttachmentTrigger:()=>He,Avatar:()=>er,Badge:()=>st,BlockViewer:()=>Je,Breadcrumb:()=>Gt,BreadcrumbEllipsis:()=>ke,BreadcrumbItem:()=>Jt,BreadcrumbLink:()=>Yt,BreadcrumbList:()=>Zt,BreadcrumbPage:()=>Xt,BreadcrumbSeparator:()=>yt,Bubble:()=>cr,Button:()=>S,ButtonGroup:()=>pr,ButtonGroupSeparator:()=>dr,ButtonGroupText:()=>hr,Calendar:()=>je,Card:()=>ls,CardBody:()=>ps,CardDescription:()=>bs,CardFooter:()=>ds,CardHeader:()=>us,CardTitle:()=>hs,Carousel:()=>Fo,CarouselNext:()=>De,CarouselPrevious:()=>ze,CarouselSlide:()=>Ho,Chart:()=>Do,Checkbox:()=>Dt,ClipboardButton:()=>ut,CodeEditor:()=>pe,Collapsible:()=>mo,CollapsibleContent:()=>fo,CollapsibleTrigger:()=>Le,Combobox:()=>jo,Command:()=>zo,ContextMenu:()=>ao,ContextMenuContent:()=>lo,ContextMenuItem:()=>uo,ContextMenuTrigger:()=>co,DataTable:()=>Me,DatePicker:()=>Mo,Dialog:()=>$t,DialogClose:()=>de,DialogContent:()=>bt,DialogDescription:()=>_t,DialogFooter:()=>qt,DialogHeader:()=>Ut,DialogTitle:()=>Pt,DialogTrigger:()=>ms,Direction:()=>lr,Drawer:()=>Ms,DrawerClose:()=>ve,DrawerContent:()=>js,DrawerDescription:()=>Hs,DrawerFooter:()=>Ds,DrawerHeader:()=>zs,DrawerTitle:()=>Fs,DrawerTrigger:()=>ye,DropdownMenu:()=>Ft,DropdownMenuCheckboxItem:()=>Ae,DropdownMenuContent:()=>Ht,DropdownMenuGroup:()=>so,DropdownMenuItem:()=>Wt,DropdownMenuLabel:()=>oo,DropdownMenuRadioGroup:()=>ro,DropdownMenuRadioItem:()=>Ee,DropdownMenuSeparator:()=>io,DropdownMenuShortcut:()=>no,DropdownMenuSub:()=>Kt,DropdownMenuSubContent:()=>Vt,DropdownMenuSubTrigger:()=>ft,DropdownMenuTrigger:()=>mt,Empty:()=>fs,EmptyContent:()=>ws,EmptyDescription:()=>xs,EmptyHeader:()=>gs,EmptyMedia:()=>ys,EmptyTitle:()=>vs,Field:()=>re,FieldContent:()=>fr,FieldDescription:()=>ne,FieldError:()=>ae,FieldGroup:()=>oe,FieldLabel:()=>ie,FieldLegend:()=>mr,FieldSeparator:()=>yr,FieldSet:()=>br,FieldTitle:()=>gr,Form:()=>Qe,HoverCard:()=>Qs,HoverCardContent:()=>eo,HoverCardTrigger:()=>to,Icon:()=>$,Input:()=>Ot,InputOtp:()=>Ns,Item:()=>ur,Kbd:()=>kt,Label:()=>vr,Markdown:()=>At,MarkdownTree:()=>Ze,MarkdownTreeNode:()=>zr,Marker:()=>Es,Menubar:()=>wo,Message:()=>sr,MessageScroller:()=>or,NativeSelect:()=>zt,NavigationMenu:()=>vo,NavigationMenuItem:()=>xo,Pagination:()=>go,PaginationItem:()=>yo,Popover:()=>Ys,PopoverContent:()=>Xs,PopoverTrigger:()=>Se,Progress:()=>nr,Pwa:()=>Sr,PwaBody:()=>kr,PwaClose:()=>Xe,PwaContent:()=>Ar,PwaDescription:()=>Lr,PwaFooter:()=>Or,PwaHeader:()=>Er,PwaSteps:()=>Nr,PwaTitle:()=>Cr,PwaTrigger:()=>Ye,Questionnaire:()=>rr,QuestionnaireNext:()=>Ke,QuestionnairePrevious:()=>We,QuestionnaireStep:()=>ir,RadioGroup:()=>Cs,RadioGroupItem:()=>Ls,Resizable:()=>Wo,ScrollArea:()=>Ko,Select:()=>Os,SelectContent:()=>Ts,SelectItem:()=>Bs,SelectTrigger:()=>be,Separator:()=>Ss,Sheet:()=>Ws,SheetClose:()=>we,SheetContent:()=>Ks,SheetDescription:()=>Js,SheetFooter:()=>Gs,SheetHeader:()=>Vs,SheetTitle:()=>Zs,SheetTrigger:()=>xe,Shell:()=>Ue,ShellContent:()=>Pe,ShellHeader:()=>Uo,ShellMain:()=>$o,ShellNav:()=>Ro,ShellSidebar:()=>qe,ShellSidebarHeader:()=>Io,ShellUserMenu:()=>_e,Sidebar:()=>xt,SidebarClose:()=>Te,SidebarContent:()=>Qt,SidebarFooter:()=>Ao,SidebarGroup:()=>te,SidebarGroupAction:()=>Be,SidebarGroupCollapsible:()=>Ie,SidebarGroupContent:()=>ko,SidebarGroupLabel:()=>ee,SidebarHeader:()=>So,SidebarInput:()=>Co,SidebarInset:()=>Eo,SidebarMenu:()=>wt,SidebarMenuAction:()=>Re,SidebarMenuBadge:()=>Oo,SidebarMenuButton:()=>vt,SidebarMenuItem:()=>se,SidebarMenuSkeleton:()=>To,SidebarMenuSub:()=>No,SidebarMenuSubButton:()=>$e,SidebarMenuSubItem:()=>Bo,SidebarProvider:()=>qr,SidebarRail:()=>Oe,SidebarSeparator:()=>Lo,SidebarTrigger:()=>Ne,Skeleton:()=>Mt,Slider:()=>ks,Spinner:()=>Nt,Switch:()=>he,TabContent:()=>Rt,TabTrigger:()=>ht,Table:()=>qo,Tabs:()=>Tt,TabsContainer:()=>Bt,TabsList:()=>It,TextEditor:()=>Tr,Textarea:()=>jt,ThemeButton:()=>St,Toast:()=>gt,Toggle:()=>Ve,ToggleGroup:()=>xr,ToggleGroupItem:()=>Ge,Tooltip:()=>ct,Typography:()=>As,createNamedIcon:()=>rs,findMarkdownTreeNode:()=>Ni,iconComponentName:()=>Zi});A();x();A();lt();x();var $=class extends c{setup(){this.state=w({failed:!1}),tt(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===ci)return;let s=new Image;return s.onerror=()=>{this.state.failed=!0},s.src=this.buildUrl(e),()=>{s.onload=null,s.onerror=null}},()=>[this.name])}buildUrl(e){return Wr(e,{baseUrl:G(this.props,"base-url","baseUrl")})}get name(){return G(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?ci:this.name)}get style(){let e=[`--b-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&e.push(`--b-icon-size:${this.props.size}`),K(e.join(";"),this.props.style)}get classNames(){return m("b-icon",this.props.className)}};i($,"template","baseui.Icon"),i($,"props",{icon:n(String),name:n(String),label:n(String),title:n(String),size:n(String),"base-url":n(String),baseUrl:n(String),className:n(String),style:n([String,Object])});function rs(t){return class extends ${get name(){return G(this.props,"icon","name")||t}}}Br();var S=class extends c{setup(){this.rootRef=L("root"),this.props.getRef&&(R(()=>this.props.getRef(this.rootRef.el)),U(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?m(this.props.className):m("btn","b-button",V[this.props.variant]||V.default,Z[this.props.size],this.isIconOnly&&"b-button-icon",this.props.className)}get iconPosition(){return G(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return G(this.props,"aria-label","ariaLabel")}get ariaPressed(){return G(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=G(this.props,"aria-invalid","ariaInvalid");return e===!0?"true":e}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(e){if(this.props.href&&this.props.disabled){e.preventDefault();return}this.props.onClick?.(e)}};i(S,"template","baseui.Button"),i(S,"components",{Icon:$}),i(S,"props",{variant:n(String),size:n(String),type:n(String),href:n(String),disabled:n(Boolean),label:n(String),icon:n(String),"icon-position":n(String),iconPosition:n(String),unstyled:n(Boolean),attrs:n(Object),getRef:n(Function),...p,id:n(String),title:n(String),"aria-label":n(String),ariaLabel:n(String),"aria-pressed":n(String),ariaPressed:n(String),"aria-invalid":n([String,Boolean]),ariaInvalid:n([String,Boolean]),onClick:n(Function)});A();x();ui();var ut=class extends c{setup(){this.state=w({copied:!1}),this.resetTimer=null,U(()=>window.clearTimeout(this.resetTimer))}get classNames(){return li(this.props)}get resetDelay(){return G(this.props,"reset-delay","resetDelay")??2e3}get iconName(){return this.state.copied?this.props.copiedIcon||"check":this.props.icon||"copy"}get label(){return this.state.copied&&this.props.copiedLabel?this.props.copiedLabel:this.props.label}get ariaLabel(){return G(this.props,"aria-label","ariaLabel")||this.label}get attrs(){return{"data-copied":this.state.copied?"true":void 0}}async onClick(e){if(this.props.disabled)return;let s=this.props.getValue?this.props.getValue():this.props.value??"";try{await Ir(s),this.state.copied=!0,window.clearTimeout(this.resetTimer),this.resetTimer=window.setTimeout(()=>{this.state.copied=!1},this.resetDelay),this.props.onCopy?.({value:s,event:e})}catch(o){this.props.onCopyError?.({error:o,event:e})}}};i(ut,"template","baseui.ClipboardButton"),i(ut,"components",{Button:S}),i(ut,"props",{variant:n(String),size:n(String),value:n(String),getValue:n(Function),label:n(String),copiedLabel:n(String),icon:n(String),copiedIcon:n(String),"reset-delay":n(Number),resetDelay:n(Number),disabled:n(Boolean),...p,"aria-label":n(String),ariaLabel:n(String),onCopy:n(Function),onCopyError:n(Function)});A();x();A();function N(){let t=globalThis.bootstrap;if(!t)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}x();var Jn={default:"b-alert-default",destructive:"b-alert-destructive",info:"b-alert-default",success:"alert-success",warning:"alert-warning",danger:"b-alert-destructive"},pt=class extends c{setup(){this.rootRef=L("root"),this.bootstrapAlert=null,this.props.dismissible&&(R(()=>{this.bootstrapAlert=new(N()).Alert(this.rootRef.el)}),U(()=>{this.bootstrapAlert?.dispose()}))}get classNames(){return m("alert","b-alert",Jn[this.props.variant]||Jn.default,this.props.dismissible&&"alert-dismissible",this.props.dismissible&&"fade",this.props.dismissible&&"show",this.props.className)}};i(pt,"template","baseui.Alert"),i(pt,"components",{Button:S}),i(pt,"props",{variant:n(String),dismissible:n(Boolean),...p});var is=class extends c{};i(is,"template","baseui.AlertTitle"),i(is,"props",p);var Lt=class extends c{};i(Lt,"template","baseui.AlertDescription"),i(Lt,"props",p);var ns=class extends c{};i(ns,"template","baseui.AlertAction"),i(ns,"props",p);A();x();var as={primary:"b-badge-primary",secondary:"b-badge-secondary",success:"b-badge-success",warning:"b-badge-warning",danger:"b-badge-danger",info:"b-badge-info",muted:"b-badge-muted"};var st=class extends c{get classNames(){return m("badge",as[this.props.variant]||as.secondary,this.props.pill&&"rounded-pill",this.props.className)}};i(st,"template","baseui.Badge"),i(st,"props",{variant:n(String),pill:n(Boolean),label:n(String),...p});A();x();var kt=class extends c{get classNames(){return m("b-kbd",this.props.className)}};i(kt,"template","baseui.Kbd"),i(kt,"props",{...p});A();x();var Nt=class extends c{get classNames(){return m("b-spinner",this.props.type==="grow"?"spinner-grow":"spinner-border",this.props.className)}get label(){return this.props.label||"Loading"}};i(Nt,"template","baseui.Spinner"),i(Nt,"props",{type:n(String),label:n(String),className:n(String),style:n([String,Object])});var dt={line:["//"],block:["/*","*/"],quotes:`"'`},pi={line:["#"],quotes:`"'`},Yn="auto break case char const continue default do double else enum extern float for goto if inline int long register restrict return short signed sizeof static struct switch typedef union unsigned void volatile while include define ifdef ifndef endif pragma",Fc="abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws transient true false try var void volatile while record",Xn="async await break case catch class const continue debugger default delete do else export extends false finally for from function if import in instanceof let new null of return static super switch this throw true try typeof undefined var void while with yield",Kr={plaintext:{label:"Plain text",indent:" "},javascript:{label:"JavaScript",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:Xn,builtins:"console document window JSON Math Object Array Promise Map Set Date Number String Boolean Symbol require module exports process"},typescript:{annotations:!0,label:"TypeScript",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:`${Xn} abstract as declare enum implements interface keyof namespace private protected public readonly type`,builtins:"console JSON Math Object Array Promise Map Set Date Number string number boolean any unknown never void Record Partial Readonly"},go:{label:"Go",...dt,quotes:"\"'`",multiline:"`",indent:" ",keywords:"break case chan const continue default defer else fallthrough for func go goto if import interface map package range return select struct switch type var nil true false",builtins:"append cap close complex copy delete imag len make new panic print println real recover string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 bool byte rune error any context fmt"},c:{label:"C",...dt,indent:" ",keywords:Yn,builtins:"NULL size_t printf scanf malloc free memcpy memset strlen strcmp FILE stdin stdout stderr uint8_t uint16_t uint32_t uint64_t int8_t int16_t int32_t int64_t bool"},cpp:{label:"C++",...dt,indent:" ",keywords:`${Yn} alignas alignof and bool catch class constexpr const_cast decltype delete dynamic_cast explicit export false friend mutable namespace new noexcept nullptr operator or private protected public reinterpret_cast static_assert static_cast template this throw true try typeid typename using virtual override final`,builtins:"std string vector map set unordered_map unique_ptr shared_ptr cout cin endl size_t NULL"},java:{annotations:!0,label:"Java",...dt,indent:" ",keywords:Fc,builtins:"String System Object Integer Long Double Boolean List Map Set ArrayList HashMap Exception Override Math"},csharp:{label:"C#",...dt,indent:" ",keywords:"abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using var virtual void volatile while async await record",builtins:"Console String List Dictionary Task Math Exception"},kotlin:{annotations:!0,label:"Kotlin",...dt,quotes:`"'`,indent:" ",keywords:"abstract as break by catch class companion const constructor continue data do else enum false final finally for fun if import in infix init inline interface internal is lateinit null object open operator override package private protected public return sealed super suspend this throw true try typealias val var when while",builtins:"String Int Long Double Boolean List Map Set Any Unit println"},swift:{label:"Swift",...dt,indent:" ",keywords:"as associatedtype break case catch class continue default defer deinit do else enum extension fallthrough false fileprivate for func guard if import in init inout internal is let nil open operator private protocol public repeat rethrows return self static struct subscript super switch throw throws true try typealias var where while async await",builtins:"String Int Double Bool Array Dictionary Set Any print"},rust:{label:"Rust",...dt,quotes:'"',indent:" ",keywords:"as async await break const continue crate dyn else enum extern false fn for if impl in let loop match mod move mut pub ref return self Self static struct super trait true type unsafe use where while",builtins:"String Vec Option Result Some None Ok Err Box Rc Arc println format vec i8 i16 i32 i64 u8 u16 u32 u64 usize isize f32 f64 bool str"},php:{label:"PHP",variables:!0,line:["//","#"],block:["/*","*/"],quotes:`"'`,indent:" ",keywords:"abstract and array as break callable case catch class clone const continue declare default do echo else elseif empty extends final finally fn for foreach function global if implements include instanceof interface isset namespace new null or print private protected public require return static switch this throw trait true false try unset use var while yield",builtins:"count strlen array_map array_filter in_array json_encode json_decode var_dump"},python:{annotations:!0,label:"Python",...pi,indent:" ",keywords:"and as assert async await break class continue def del elif else except False finally for from global if import in is lambda None nonlocal not or pass raise return True try while with yield match case",builtins:"print len range str int float bool list dict set tuple open isinstance super self cls enumerate zip map filter sorted sum min max abs"},ruby:{label:"Ruby",...pi,indent:" ",keywords:"BEGIN END alias and begin break case class def defined do else elsif end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield",builtins:"puts print require require_relative attr_accessor attr_reader attr_writer lambda proc raise"},bash:{label:"Shell",variables:!0,...pi,indent:" ",keywords:"case do done elif else esac fi for function if in select then until while",builtins:"echo cd ls cat grep sed awk export source exit read printf test set unset local return trap"},sql:{label:"SQL",line:["--"],block:["/*","*/"],quotes:`"'`,indent:" ",ci:!0,keywords:"add all alter and as asc begin between by case check column commit constraint create cross database default delete desc distinct drop else end exists foreign from full group having if in index inner insert into is join key left like limit not null offset on or order outer primary references returning right rollback select set table then transaction union unique update values view when where with",builtins:"count sum avg min max coalesce now cast varchar text integer int bigint boolean timestamp date numeric serial"},json:{label:"JSON",plainWords:!0,keys:!0,quotes:'"',indent:" ",keywords:"true false null"},yaml:{label:"YAML",plainWords:!0,keys:!0,...pi,indent:" ",keywords:"true false null yes no on off"},css:{label:"CSS",plainWords:!0,keys:"prop",dashed:!0,hex:!0,block:["/*","*/"],quotes:`"'`,indent:" ",keywords:"important inherit initial unset auto none",builtins:"var calc rgb rgba hsl hsla url"},html:{label:"HTML",plainWords:!0,tags:!0,block:["<!--","-->"],quotes:`"'`,indent:" "},lua:{label:"Lua",line:["--"],block:["--[[","]]"],quotes:`"'`,indent:" ",keywords:"and break do else elseif end false for function goto if in local nil not or repeat return then true until while",builtins:"assert error ipairs next pairs pcall print select tonumber tostring type unpack xpcall string table math os"}};Kr.xml={...Kr.html,label:"XML"};var Hc={js:"javascript",jsx:"javascript",node:"javascript",ts:"typescript",tsx:"typescript",golang:"go",h:"c","c++":"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp","c#":"csharp",kt:"kotlin",rs:"rust",py:"python",rb:"ruby",sh:"bash",shell:"bash",zsh:"bash",postgres:"sql",postgresql:"sql",mysql:"sql",mjs:"javascript",cjs:"javascript",htm:"html",yml:"yaml",svg:"xml",text:"plaintext",txt:"plaintext"},Wc={comment:"b-code-comment",string:"b-code-string",number:"b-code-number",keyword:"b-code-keyword",builtin:"b-code-builtin",function:"b-code-function",type:"b-code-type",tag:"b-code-tag",attr:"b-code-attr",meta:"b-code-meta",variable:"b-code-variable",plain:""},Wi=/[A-Za-z_$]/,oa=/[A-Za-z0-9_$]/,ra=/[A-Za-z0-9_:-]/,Kc=/[0-9A-Za-z_.]/,Qn=/[0-9]/,Vc=/[A-Za-z0-9_-]/,ta=/^#[0-9a-fA-F]{3,8}\b/,Gc=/^&#?\w+;/,Zc=/[A-Za-z/!?]/,Hi=new Map;function ea(t,e){return new Set((t?e?t.toLowerCase():t:"").split(" ").filter(Boolean))}function Gr(t){let e=String(t??"").trim().toLowerCase(),s=Hc[e]??e,o=s in Kr?s:"plaintext";if(!Hi.has(o)){let r=Kr[o];Hi.set(o,{id:o,...r,keywordSet:ea(r.keywords,r.ci),builtinSet:ea(r.builtins,r.ci)})}return Hi.get(o)}function ia(t){let e=String(t??"").split(/[?#]/)[0].split("/").pop();return e.includes(".")?e.split(".").pop().toLowerCase():""}var cb=Object.keys(Kr);function Vr(t,e,s){let o=e;for(;o<t.length&&s.test(t[o]);)o+=1;return o}function Jc(t,e,s){if(s.block&&t.startsWith(s.block[0],e)){let r=t.indexOf(s.block[1],e+s.block[0].length);return r===-1?t.length:r+s.block[1].length}if(!s.line?.some(r=>t.startsWith(r,e)))return-1;let o=t.indexOf(`
|
|
31
|
-
`,e);return o===-1?t.length:o}function na(t,e,s){let o=t[e],r=s.multiline?.includes(o),a=e+1;for(;a<t.length&&t[a]!==o&&(r||t[a]!==`
|
|
32
|
-
`);)a+=t[a]==="\\"?2:1;return Math.min(t.length,t[a]===o?a+1:a)}function Yc(t,e){let s=e-1;for(;s>=0&&/\s/.test(t[s]);)s-=1;return t[s]}function sa(t,e,s,o){return!o.keys||!/^\s*:(?!:|\/\/)/.test(t.slice(s,s+8))?!1:o.keys!=="prop"||"{;".includes(Yc(t,e))}function Xc(t,e,s,o){let r=o.ci?t.slice(e,s).toLowerCase():t.slice(e,s);if(o.keywordSet.has(r))return"keyword";let a=t[e-1]==="."||t[e-1]===":";return o.builtinSet.has(r)&&!a?"builtin":o.plainWords?"plain":/^\s*\(/.test(t.slice(s,s+8))?"function":/^[A-Z][A-Za-z0-9_$]*[a-z]/.test(r)?"type":"plain"}function Qc(t,e,s,o){let r=t[e],a=/^(\/|\?)?>/.exec(t.slice(e,e+2));return a?(o.inTag=!1,["tag",e+a[0].length]):s.quotes.includes(r)?["string",na(t,e,s)]:Wi.test(r)?["attr",Vr(t,e+1,ra)]:["plain",e+1]}function tl(t,e,s){if(t[e]==="<"&&Zc.test(t[e+1]??""))return s.inTag=!0,["tag",Vr(t,e+2,ra)];let o=t[e]==="&"?Gc.exec(t.slice(e,e+12)):null;return o?["number",e+o[0].length]:["plain",e+1]}function el(t,e,s){let o=t[e];return!(o==="$"&&s.variables||o==="@"&&s.annotations)||!Wi.test(t[e+1]??"")?null:[o==="$"?"variable":"meta",Vr(t,e+2,oa)]}function sl(t,e,s,o,r){let a=t[e];if(r.inTag)return Qc(t,e,s,r);let l=Jc(t,e,s);if(l!==-1)return["comment",l];if(s.tags)return tl(t,e,r);if(s.quotes?.includes(a)){let v=na(t,e,s);return[sa(t,e,v,s)?"attr":"string",v]}if(s.hex&&a==="#"&&ta.test(t.slice(e,e+10)))return["number",e+ta.exec(t.slice(e,e+10))[0].length];if(Qn.test(a)||a==="."&&Qn.test(t[e+1]??""))return["number",Vr(t,e+1,Kc)];let u=el(t,e,s);if(u)return u;let d=s.dashed&&a==="-"&&/[A-Za-z-]/.test(t[e+1]??"");if(!Wi.test(a)&&!d)return["plain",e+1];let b=Vr(t,e+1,s.dashed?Vc:oa);if(sa(t,e,b,s))return["attr",b];let f=Xc(t,e,b,s);return[f==="plain"&&o.has(t.slice(e,b))&&t[e-1]!=="."?"builtin":f,b]}function di(t,e,s=[]){let o=Gr(e),r=new Set(s),a={inTag:!1},l=[],u=0;for(;u<t.length;){let[d,b]=sl(t,u,o,r,a),f=t.slice(u,b),g=l[l.length-1];d==="plain"&&g?.kind==="plain"?g.text+=f:l.push({kind:d,text:f,className:Wc[d]}),u=b}return l}function aa(t,e){return t.startsWith(" ")?1:/^ */.exec(t.slice(0,e.length))[0].length}var ol=new Set(["javascript","typescript","go","c","cpp","java","csharp","kotlin","swift","rust","php","css","lua","html","xml"]),rl=new Set("area base br col embed hr img input link meta source track wbr".split(" ")),il=/^[}\])]+/,nl=/\b(function|if|for|while|repeat)\b/g,al=/\b(end|until)\b/g,cl=/^(else|elseif)\b/,ll=/^(end|until)\b/;function cs(t,e){return(t.match(e)??[]).length}function ul(t,e){let s=new Uint8Array(t.length),o="",r=0;for(let{kind:a,text:l}of di(t,e)){let u=a==="comment"||a==="string";o+=u?l.replace(/[^\n]/g," "):l,u&&s.fill(1,r,r+l.length),r+=l.length}return{masked:o,inside:s}}function pl(t,e){let s=u=>!(e&&rl.has(u.toLowerCase())),o=[...t.matchAll(/<([A-Za-z][\w:.-]*)/g)].filter(u=>s(u[1])).length,r=[...t.matchAll(/<([A-Za-z][\w:.-]*)[^<>]*\/>/g)].filter(u=>s(u[1])).length,a=t.includes("<")?0:cs(t,/\/>/g);return{leading:cs(/^(?:<\/[^>]*>\s*)+/.exec(t)?.[0]??"",/<\//g),net:o-r-a-cs(t,/<\//g)}}function dl(t,e){let s=t.trim();if(e.tags)return pl(s,e.id==="html");let o=e.id==="lua",r=il.exec(s)?.[0].length??0,a=cs(s,/[{([]/g)-cs(s,/[})\]]/g);if(!o)return{leading:r,net:a};let l=cs(s,nl)+(/^do\b/.test(s)?1:0)-cs(s,al);return{leading:r||(cl.test(s)||ll.test(s)?1:0),net:a+l}}function hl(t,e){return(t.id==="c"||t.id==="cpp")&&e.startsWith("#")}function bl(t,e){let{masked:s,inside:o}=ul(t,e.id),r=[],a=0,l=0;for(let u of t.split(`
|
|
33
|
-
`)){let d=s.slice(l,l+u.length),b=l>0&&o[l-1]===1;l+=u.length+1;let f=u.trim(),{leading:g,net:v}=dl(d,e);b?r.push(u.trimEnd()):f?hl(e,f)?r.push(f):r.push(e.indent.repeat(Math.max(0,a-g))+f):r.push(""),a=Math.max(0,a+v)}return r}function ml(t){return t.split(`
|
|
34
|
-
`).map(e=>e.trimEnd())}function fl(t){return`${t.filter((s,o)=>s!==""||o>0&&t[o-1]!=="").join(`
|
|
35
|
-
`).replace(/^\n+|\n+$/g,"")}
|
|
36
|
-
`}function ca(t,e){let s=Gr(e),o=String(t??"").replace(/\r\n?/g,`
|
|
37
|
-
`);return o.trim()?s.id==="json"?`${JSON.stringify(JSON.parse(o),null,2)}
|
|
38
|
-
`:fl(ol.has(s.id)?bl(o,s):ml(o)):""}var pe=class extends c{setup(){this.state=w({text:null,name:"",loading:!1,error:"",editing:!this.props.readonly}),this.fileInput=L("fileInput"),this.input=L("input"),this.controller=null,R(()=>this.syncInput()),M(()=>this.syncInput()),ot(()=>this.loadUrl(this.props.src)),z(e=>{if(e.readonly!==this.props.readonly&&(this.state.editing=!e.readonly),e.src!==this.props.src)return this.loadUrl(e.src)}),U(()=>this.controller?.abort()),this.tabReleased=!1}get classNames(){return m("b-code-editor",this.props.className)}get code(){return this.state.text??this.props.value??""}get codeLang(){return this.props.codeLang??ia(this.state.name||this.props.src)}get language(){return Gr(this.codeLang)}get globals(){return this.props.globals??[]}get isReadonly(){return!this.state.editing}get showToggle(){return this.props.toggle!==!1}get showFormat(){return this.props.format!==!1&&!this.isReadonly}get ariaLabel(){return this.props.title||`${this.language.label} code`}get tokens(){return di(`${this.code}
|
|
39
|
-
`,this.codeLang,this.globals)}get lineCount(){return this.code.split(`
|
|
40
|
-
`).length}get lineLabel(){return`${this.lineCount} ${this.lineCount===1?"line":"lines"}`}get lineNumbers(){return Array.from({length:this.lineCount},(e,s)=>s+1).join(`
|
|
41
|
-
`)}commit(e){(this.state.text!==null||!this.props.onChange)&&(this.state.text=e),this.props.onChange?.(e)}async loadUrl(e){if(this.controller?.abort(),!!e){this.controller=new globalThis.AbortController,this.state.loading=!0,this.state.error="";try{let s=await fetch(e,{signal:this.controller.signal});if(!s.ok)throw new Error(`Could not load ${e} (HTTP ${s.status})`);this.setFile(await s.text(),e)}catch(s){s.name!=="AbortError"&&this.fail(s)}this.state.loading=!1}}syncInput(){let e=this.input.el;if(!e||e.value===this.code)return;let{selectionStart:s,selectionEnd:o}=e;e.value=this.code,e.setSelectionRange(Math.min(s,this.code.length),Math.min(o,this.code.length))}toggleEditing(){this.state.editing=!this.state.editing}format(){try{this.commit(ca(this.code,this.codeLang)),this.state.error=""}catch(e){this.fail(e)}}openPicker(){this.fileInput.el.click()}async onFileChange(e){let s=e.target.files[0];if(e.target.value="",!!s)try{this.setFile(await s.text(),s.name)}catch(o){this.fail(o)}}setFile(e,s){Object.assign(this.state,{text:e,name:s,error:""}),this.props.onLoad?.({code:e,name:s})}fail(e){this.state.error=e.message,this.props.onError?.(e)}onInput(e){this.commit(e.target.value),this.revealCaret(e.target)}revealCaret(e){let s=e.closest(".b-code-editor-box");if(!s||!e.isConnected)return;let o=getComputedStyle(e),r=parseFloat(o.paddingTop)||0,a=parseFloat(o.lineHeight)||21,l=e.value.slice(0,e.selectionEnd),u=l.split(`
|
|
42
|
-
`).length-1,d=r+u*a;d-r<s.scrollTop?s.scrollTop=Math.max(0,d-r):d+a+r>s.scrollTop+s.clientHeight&&(s.scrollTop=d+a+r-s.clientHeight);let b=l.slice(l.lastIndexOf(`
|
|
43
|
-
`)+1).replaceAll(" "," ".repeat(4)).length,f=this.measure??(this.measure=document.createElement("canvas").getContext("2d"));if(!f)return;f.font=`${o.fontSize} ${o.fontFamily}`;let g=e.offsetLeft+parseFloat(o.paddingLeft)+b*f.measureText("0").width,v=s.querySelector(".b-code-editor-gutter")?.offsetWidth??0;g<s.scrollLeft+v?s.scrollLeft=Math.max(0,g-v-r):g+r>s.scrollLeft+s.clientWidth&&(s.scrollLeft=g+r-s.clientWidth)}onKeydown(e){let s=e.target;if(requestAnimationFrame(()=>this.revealCaret(s)),e.key==="F"&&e.shiftKey&&e.altKey&&this.showFormat){e.preventDefault(),this.format();return}if(e.key==="Escape"){this.tabReleased=!0;return}let o=this.tabReleased;if(this.tabReleased=!1,e.key==="Tab"&&!o)e.preventDefault(),e.shiftKey?this.outdentLine(s):s.setRangeText(this.language.indent,s.selectionStart,s.selectionEnd,"end");else if(e.key==="Enter"&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault();let r=s.value.lastIndexOf(`
|
|
44
|
-
`,s.selectionStart-1)+1,a=/^[ \t]*/.exec(s.value.slice(r,s.selectionStart))[0];s.setRangeText(`
|
|
45
|
-
${a}`,s.selectionStart,s.selectionEnd,"end")}else return;this.commit(s.value)}outdentLine(e){let s=e.value.lastIndexOf(`
|
|
46
|
-
`,e.selectionStart-1)+1,o=aa(e.value.slice(s),this.language.indent);if(!o)return;let{selectionStart:r,selectionEnd:a}=e;e.setRangeText("",s,s+o,"preserve"),e.setSelectionRange(Math.max(s,r-o),Math.max(s,a-o))}};i(pe,"template","baseui.CodeEditor"),i(pe,"components",{Alert:pt,AlertDescription:Lt,Badge:st,Button:S,ClipboardButton:ut,Kbd:kt,Spinner:Nt}),i(pe,"props",{value:n(String),codeLang:n(String),src:n(String),upload:n(Boolean),format:n(Boolean),toggle:n(Boolean),onChange:n(Function),onLoad:n(Function),onError:n(Function),readonly:n(Boolean),title:n(String),globals:n(Array),hint:n(String),id:n(String),...p});A();x();var ls=class extends c{get tag(){return this.props.tag||"div"}};i(ls,"template","baseui.Card"),i(ls,"props",{...p,tag:n(String)});var us=class extends c{};i(us,"template","baseui.CardHeader"),i(us,"props",p);var ps=class extends c{};i(ps,"template","baseui.CardBody"),i(ps,"props",p);var ds=class extends c{};i(ds,"template","baseui.CardFooter"),i(ds,"props",p);var hs=class extends c{};i(hs,"template","baseui.CardTitle"),i(hs,"props",p);var bs=class extends c{};i(bs,"template","baseui.CardDescription"),i(bs,"props",p);x();A();x();A();x();var ct=class extends c{setup(){this.state=w({open:F(this.props.state)}),this.triggerRef=L("trigger"),this.bufferRef=L("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},R(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(N()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),F(this.props.state)&&this.bootstrapTooltip.show()}),M(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),U(()=>{let e=this.triggerElement();e?.removeEventListener("shown.bs.tooltip",this.onShown),e?.removeEventListener("hidden.bs.tooltip",this.onHidden),this.bootstrapTooltip?.dispose()})}triggerElement(){return this.triggerRef.el?.firstElementChild||this.triggerRef.el}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}show(){this.bootstrapTooltip?.show()}hide(){this.bootstrapTooltip?.hide()}};i(ct,"template","baseui.Tooltip"),i(ct,"props",{content:n(String),state:n(String),...p});var gl=rs("circle-question-mark"),yl=0,rt={label:n(String),labelBackground:n(String),supportingText:n(String),useTip:n(Number),errorText:n(String),leadingIcon:n(String),trailingIcon:n(String),maxLength:n(Number),invalid:n(Boolean),placeholder:n(String),disabled:n(Boolean),slots:n(Object)},J=class extends c{setup(){this.supportId=`b-input-support-${yl++}`,this.box=L("box"),this.slotRefs={start:L("start"),end:L("end"),footer:L("footer")},R(()=>this.measureSlots()),M(()=>this.measureSlots())}get field(){return this.env.fieldProps?.()??{}}get label(){return this.props.label??this.field.label}get labelStyle(){let e=this.props.labelBackground??this.field.labelBackground;return e?`--b-label-bg:${e}`:void 0}get isOutlined(){return!!this.label||this.hasStart||this.hasEnd||this.hasFooter}get hasStart(){return!!this.props.slots?.start}get hasEnd(){return!!this.props.slots?.end}get hasFooter(){return!!this.props.slots?.footer}measureSlots(){let e=this.box.el;if(!e)return;let{start:s,end:o,footer:r}=this.slotRefs;e.style.setProperty("--b-slot-start",`${s.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-end",`${o.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-footer",`${r.el?.offsetHeight??0}px`)}get isInvalid(){return!!(this.props.invalid||this.field.invalid||this.errorText)}get errorText(){return this.props.errorText??this.field.error}get helperText(){return this.props.supportingText||this.field.description}get useTip(){return Number(this.props.useTip??this.field.useTip??0)===1}get supportingText(){return this.errorText||(this.useTip?void 0:this.helperText)}get tipText(){return this.useTip&&!this.errorText?this.helperText:void 0}get leadingIcon(){return this.props.leadingIcon}get trailingIcon(){return this.isInvalid?"circle-alert":this.props.trailingIcon}get fieldPlaceholder(){return this.props.placeholder??(this.isOutlined?" ":void 0)}get counter(){return`${(this.props.value??"").length}/${this.props.maxLength}`}get controlClass(){return this.isOutlined&&"b-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return m("b-input-outlined",this.isInvalid&&"is-invalid",this.props.disabled&&"is-disabled",this.props.placeholder&&"has-placeholder",this.leadingIcon&&"has-leading",this.trailingIcon&&"has-trailing",this.hasStart&&"has-start",this.hasEnd&&"has-end",this.hasFooter&&"has-footer")}};i(J,"components",{Icon:$,IconCircleQuestionMark:gl,Tooltip:ct});function hi({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var Ot=class extends J{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return m("b-input",hi({tag:"input",type:this.props.type}),this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};i(Ot,"template","baseui.Input"),i(Ot,"props",{...rt,value:n(String),type:n(String),readonly:n(Boolean),className:n(String),style:n([String,Object]),id:n(String),list:n(String),autocomplete:n(String),"aria-label":n(String),ariaLabel:n(String),min:n([String,Number]),max:n([String,Number]),step:n([String,Number]),onInput:n(Function),onChange:n(Function)});A();x();var Ki={default:"b-tabs-list-default",line:"b-tabs-list-line"};function bi(t,e,s,o="horizontal"){let r=o==="vertical",u=t===(r?"ArrowDown":"ArrowRight")?1:t===(r?"ArrowUp":"ArrowLeft")?-1:0;return!u||s===0?-1:(e+u+s)%s}var vl=0;function la(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var Tt=class extends c{setup(){this.tabsState=w({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++vl}`,T({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId,orientation:this.orientation}),z(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("b-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};i(Tt,"template","baseui.Tabs"),i(Tt,"props",{value:n(String),defaultValue:n(String),orientation:n(String),onChange:n(Function),...p});var Bt=class extends c{};i(Bt,"template","baseui.TabsContainer"),i(Bt,"props",{...p});var It=class extends c{setup(){this.listRef=L("list")}get classNames(){return m("nav","b-tabs-list",Ki[this.props.variant]||Ki.default,this.props.className)}onKeyDown(e){let s=[...this.listRef.el.querySelectorAll("[role='tab']")],o=s.indexOf(e.target),r=bi(e.key,o,s.length,this.env.orientation);r!==-1&&(e.preventDefault(),s[r].focus(),s[r].click())}};i(It,"template","baseui.TabsList"),i(It,"props",{variant:n(String),...p});var ht=class extends c{setup(){this.rootEl=null,this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value)}onRootRef(e){e?(this.rootEl=e,this.tabInstance=N().Tab.getOrCreateInstance(e),e.addEventListener("shown.bs.tab",this.onShown)):this.rootEl&&(this.rootEl.removeEventListener("shown.bs.tab",this.onShown),this.tabInstance?.dispose(),this.tabInstance=null,this.rootEl=null)}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`b-tabs-panel-${this.env.tabsId}-${la(this.props.value)}`}get classNames(){return m("nav-link","b-tabs-trigger",this.isActive&&"active",this.props.className)}get tabAttrs(){return{role:"tab","data-bs-target":`#${this.panelId}`,"aria-selected":this.isActive?"true":"false",tabindex:this.isActive?0:-1}}onClick(){this.props.disabled||this.tabInstance?.show()}};i(ht,"template","baseui.TabTrigger"),i(ht,"components",{Button:S}),i(ht,"props",{value:{type:String},disabled:n(Boolean),...p});var Rt=class extends c{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`b-tabs-panel-${this.env.tabsId}-${la(this.props.value)}`}};i(Rt,"template","baseui.TabContent"),i(Rt,"props",{value:{type:String},...p});A();x();A();x();function Y(t,e){z(s=>{es(s)&&(t.open=j(s),t.open?e?.instance?.show():e?.instance?.hide())})}function X(t,e,s){es(t)||(e.open=s),t.onOpenChange?.(s)}function mi(t,e){let s=null;R(()=>{s=new(N()).Collapse(t.el,{toggle:!1})}),M(()=>{if(!s)return;let o=t.el.classList.contains("show");e()&&!o?s.show():!e()&&o&&s.hide()}),U(()=>s?.dispose())}var $t=class extends c{setup(){this.dialogState=w({open:j(this.props)}),this.control={instance:null},T({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),Y(this.dialogState,this.control)}setOpen(e){X(this.props,this.dialogState,e)}};i($t,"template","baseui.Dialog"),i($t,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),style:n([String,Object]),slots:n(Object)});var ms=class extends c{onClick(){this.env.dialogControl.instance?.show()}};i(ms,"template","baseui.DialogTrigger"),i(ms,"props",p);var bt=class extends c{setup(){this.rootRef=L("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDialogOpen(!0),this.onHidden=()=>{this.env.setDialogOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},R(()=>{this.env.dialogControl.instance=N().Modal.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,focus:!0}),this.rootRef.el.addEventListener("show.bs.modal",this.onShow),this.rootRef.el.addEventListener("shown.bs.modal",this.onShown),this.rootRef.el.addEventListener("hidden.bs.modal",this.onHidden),this.env.dialog.open&&this.env.dialogControl.instance.show()}),U(()=>{this.rootRef.el.removeEventListener("show.bs.modal",this.onShow),this.rootRef.el.removeEventListener("shown.bs.modal",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.modal",this.onHidden),this.env.dialogControl.instance?.dispose(),this.env.dialogControl.instance=null})}get showCloseButton(){return this.props.showCloseButton!==!1&&this.props["show-close-button"]!==!1}};i(bt,"template","baseui.DialogContent"),i(bt,"components",{Button:S}),i(bt,"props",{...p,showCloseButton:n(Boolean),"show-close-button":n(Boolean)});var Ut=class extends c{};i(Ut,"template","baseui.DialogHeader"),i(Ut,"props",p);var qt=class extends c{};i(qt,"template","baseui.DialogFooter"),i(qt,"props",p);var Pt=class extends c{};i(Pt,"template","baseui.DialogTitle"),i(Pt,"props",p);var _t=class extends c{};i(_t,"template","baseui.DialogDescription"),i(_t,"props",p);var de=class extends c{};i(de,"template","baseui.DialogClose"),i(de,"components",{Button:S}),i(de,"props",p);A();x();var ua={default:"b-empty-default",outline:"b-empty-outline",background:"b-empty-background"},xl={default:"b-empty-media-default",icon:"b-empty-media-icon"},fs=class extends c{get classNames(){return m("b-empty",ua[this.props.variant]||ua.default,this.props.className)}};i(fs,"template","baseui.Empty"),i(fs,"props",{variant:n(String),...p});var gs=class extends c{};i(gs,"template","baseui.EmptyHeader"),i(gs,"props",p);var ys=class extends c{get variant(){return this.props.variant==="icon"?"icon":"default"}get classNames(){return m("b-empty-media",xl[this.variant],this.props.className)}};i(ys,"template","baseui.EmptyMedia"),i(ys,"props",{variant:n(String),...p});var vs=class extends c{};i(vs,"template","baseui.EmptyTitle"),i(vs,"props",p);var xs=class extends c{};i(xs,"template","baseui.EmptyDescription"),i(xs,"props",p);var ws=class extends c{};i(ws,"template","baseui.EmptyContent"),i(ws,"props",p);A();x();var Ss=class extends c{get vertical(){return this.props.orientation==="vertical"}get classNames(){return m("b-separator",this.vertical?"b-separator-vertical":"b-separator-horizontal",this.props.className)}};i(Ss,"template","baseui.Separator"),i(Ss,"props",{orientation:n(String),className:n(String),style:n([String,Object])});A();x();var Mt=class extends c{get classNames(){return m("b-skeleton",this.props.shape==="circle"?"b-skeleton-circle":"b-skeleton-block",this.props.className)}};i(Mt,"template","baseui.Skeleton"),i(Mt,"props",{shape:n(String),className:n(String),style:n([String,Object])});A();x();var wl={lead:"lead",muted:"text-body-secondary",code:"b-code",kbd:"b-kbd",h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"b-list"},Sl={h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"ul"},As=class extends c{get tag(){return this.props.tag||Sl[this.props.variant]||"p"}get classNames(){return m("b-typography",wl[this.props.variant],this.props.className)}};i(As,"template","baseui.Typography"),i(As,"props",{variant:n(String),tag:n(String),...p});A();x();var Es=class extends c{get classNames(){return m("b-marker",this.props.className)}get variant(){return this.props.variant}};i(Es,"template","baseui.Marker"),i(Es,"props",{variant:n(String),...p});x();var jt=class extends J{get outlinedClassNames(){return m(super.outlinedClassNames,"is-anchored")}get classNames(){return m("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"b-textarea-no-resize",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};i(jt,"template","baseui.Textarea"),i(jt,"props",{...rt,value:n(String),rows:n(Number),readonly:n(Boolean),resize:n(String),className:n(String),style:n([String,Object]),id:n(String),onInput:n(Function),onChange:n(Function)});x();var zt=class extends J{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return m("b-native-select","form-select",this.controlClass,this.isInvalid&&"is-invalid",(this.props.size==="sm"||this.props.size==="lg")&&`form-select-${this.props.size}`,this.props.className)}onChange(e){this.props.onChange?.(e.target.value,e)}};i(zt,"template","baseui.NativeSelect"),i(zt,"props",{...rt,value:n(String),size:n(String),...p,"aria-label":n(String),ariaLabel:n(String),id:n(String),onChange:n(Function)});A();x();var Dt=class extends c{onChange(e){this.props.onChange?.(e.target.checked,e)}};i(Dt,"template","baseui.Checkbox"),i(Dt,"props",{checked:n(Boolean),disabled:n(Boolean),...p,id:n(String),onChange:n(Function)});A();x();var Cs=class extends c{setup(){T({radioGroupValue:()=>this.props.value,radioGroupDisabled:()=>this.props.disabled,radioGroupName:()=>this.props.name||"b-radio-group",selectRadio:e=>this.props.onChange?.(e)})}get classNames(){return m("b-radio-group",this.props.className)}};i(Cs,"template","baseui.RadioGroup"),i(Cs,"props",{value:n(String),name:n(String),disabled:n(Boolean),...p,onChange:n(Function)});var Ls=class extends c{get checked(){return this.env.radioGroupValue()===this.props.value}get disabled(){return this.props.disabled||this.env.radioGroupDisabled()}onChange(){this.disabled||this.env.selectRadio(this.props.value)}};i(Ls,"template","baseui.RadioGroupItem"),i(Ls,"props",{value:{type:String},disabled:n(Boolean),...p});A();x();var Al=rs("circle-question-mark"),he=class extends c{get tipText(){return Number(this.props.useTip??0)===1?this.props.supportingText:void 0}get supportingText(){return this.tipText?void 0:this.props.supportingText}onChange(e){this.props.onChange?.(e.target.checked,e)}};i(he,"template","baseui.Switch"),i(he,"components",{IconCircleQuestionMark:Al,Tooltip:ct}),i(he,"props",{checked:n(Boolean),disabled:n(Boolean),supportingText:n(String),useTip:n(Number),...p,onChange:n(Function)});A();x();var ks=class extends c{get classNames(){return m("b-slider",this.props.className)}onInput(e){e.target.style.setProperty("--b-slider-value",`${e.target.value}%`),this.props.onChange?.(e.target.value,e)}};i(ks,"template","baseui.Slider"),i(ks,"props",{value:n([Number,String]),min:n([Number,String]),max:n([Number,String]),step:n([Number,String]),disabled:n(Boolean),className:n(String),style:n([String,Object]),onChange:n(Function)});A();x();var Ns=class extends c{setup(){this.length=this.props.length||6;let e=(this.props.value||"").split("");this.state=w({digits:Array.from({length:this.length},(s,o)=>e[o]||"")}),this.rootRef=L("root")}get classNames(){return m("b-input-otp",this.props.className)}get boxes(){return this.state.digits.map((e,s)=>({index:s,value:e}))}emit(){this.props.onChange?.(this.state.digits.join(""))}onInput(e,s){let o=s.target.value.slice(-1);this.state.digits[e]=o,o&&this.rootRef.el&&[...this.rootRef.el.querySelectorAll("input")][e+1]?.focus(),this.emit()}onPaste(e){let s=e.clipboardData.getData("text").trim();if(s){e.preventDefault();for(let o=0;o<this.length;o++)this.state.digits[o]=s[o]||"";this.emit()}}};i(Ns,"template","baseui.InputOtp"),i(Ns,"props",{length:n(Number),value:n(String),disabled:n(Boolean),className:n(String),style:n([String,Object]),onChange:n(Function)});A();A();function Rr(t,{defaultOpen:e=!1,onOpenChange:s}={}){let o=w({open:e}),r=d=>{o.open!==d&&(o.open=d,s?.(d))},a=()=>r(!o.open),l=d=>{t.el&&!t.el.contains(d.target)&&r(!1)},u=d=>{d.key==="Escape"&&r(!1)};return tt(d=>{if(d)return document.addEventListener("click",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("click",l),document.removeEventListener("keydown",u)}},()=>[o.open]),U(()=>{document.removeEventListener("click",l),document.removeEventListener("keydown",u)}),{state:o,setOpen:r,toggle:a}}x();var Os=class extends J{setup(){super.setup(),this.rootRef=L("root");let{state:e,setOpen:s,toggle:o}=Rr(this.rootRef,{defaultOpen:F(this.props.state)});this.disclosure=e,T({select:this.disclosure,selectValue:()=>this.props.value,selectToggle:o,selectClose:()=>s(!1),selectChoose:r=>{this.props.onChange?.(r),s(!1)}})}get outlinedClassNames(){return m(super.outlinedClassNames,"is-anchored",this.props.value&&"is-floated")}get rootStyle(){return K(this.labelStyle,this.props.style)}get classNames(){return m("b-select",this.isOutlined&&this.outlinedClassNames,this.props.className)}};i(Os,"template","baseui.Select"),i(Os,"props",{...rt,value:n(String),state:n(String),onChange:n(Function),...p});var be=class extends c{get attrs(){return{"aria-haspopup":"listbox","aria-expanded":this.env.select.open?"true":"false"}}onClick(){this.env.selectToggle()}};i(be,"template","baseui.SelectTrigger"),i(be,"components",{Button:S}),i(be,"props",p);var Ts=class extends c{get open(){return this.env.select.open}};i(Ts,"template","baseui.SelectContent"),i(Ts,"props",p);var Bs=class extends c{get selected(){return this.env.selectValue()===this.props.value}onClick(){this.env.selectChoose(this.props.value)}};i(Bs,"template","baseui.SelectItem"),i(Bs,"props",{value:{type:String},...p});A();function $r(t){return[...t.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(e=>!e.disabled&&!e.hidden)}function Vi(t,e){if(t.key!=="Tab")return;let s=$r(e);if(!s.length){t.preventDefault();return}let o=s[0],r=s[s.length-1];t.shiftKey&&document.activeElement===o?(t.preventDefault(),r.focus()):!t.shiftKey&&document.activeElement===r&&(t.preventDefault(),o.focus())}function fi(t,{closeSelector:e,trapFocus:s=!1}={}){let o=t.getAttribute("b-att-trigger"),r=o?document.querySelector(o):null,a=[...t.querySelectorAll(e)],l=null,u=()=>$r(t),d=()=>{l=document.activeElement,t.hidden=!1,t.setAttribute("b-att-state","open"),t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true"),u()[0]?.focus(),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},b=()=>{t.hidden=!0,t.setAttribute("b-att-state","closed"),l?.focus?.(),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},f=v=>{if(v.key==="Escape"){b();return}!s||t.hidden||Vi(v,t)},g=v=>{v.target===t&&b()};return r?.addEventListener("click",d),a.forEach(v=>v.addEventListener("click",b)),t.addEventListener("keydown",f),t.addEventListener("click",g),(!t.getAttribute("b-att-state")||t.getAttribute("b-att-state")==="closed")&&(t.hidden=!0),{open:d,close:b,destroy:()=>{r?.removeEventListener("click",d),a.forEach(v=>v.removeEventListener("click",b)),t.removeEventListener("keydown",f),t.removeEventListener("click",g)}}}function Ur(t,e,s,o){let r=t.getAttribute("b-att-trigger"),a=r?document.querySelector(r):null,l=null,u=()=>{l=document.activeElement},d=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},b=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0})),l?.focus?.(),l=null},f=()=>e.show(),g=()=>e.hide();return t.addEventListener(`show.bs.${s}`,u),t.addEventListener(`shown.bs.${s}`,d),t.addEventListener(`hidden.bs.${s}`,b),a?.addEventListener("click",f),t.setAttribute("b-att-state","closed"),t[o]={open:f,close:g},{destroy:()=>{a?.removeEventListener("click",f),t.removeEventListener(`show.bs.${s}`,u),t.removeEventListener(`shown.bs.${s}`,d),t.removeEventListener(`hidden.bs.${s}`,b),e.dispose(),delete t[o]}}}x();var Is=class extends c{setup(){this.alertDialogState=w({open:j(this.props)}),T({alertDialog:this.alertDialogState,setAlertDialogOpen:e=>this.setOpen(e)}),Y(this.alertDialogState)}setOpen(e){X(this.props,this.alertDialogState,e)}};i(Is,"template","baseui.AlertDialog"),i(Is,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var me=class extends c{get attrs(){return{"data-slot":"alert-dialog-trigger"}}onClick(){this.env.setAlertDialogOpen(!0)}};i(me,"template","baseui.AlertDialogTrigger"),i(me,"components",{Button:S}),i(me,"props",p);var Rs=class extends c{get size(){return this.props.size==="sm"?"sm":"default"}setup(){this.rootRef=L("root"),tt(e=>{if(!e)return;let s=document.activeElement;return $r(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.alertDialog.open])}get open(){return this.env.alertDialog.open}onKeyDown(e){if(e.key==="Escape"){this.env.setAlertDialogOpen(!1);return}Vi(e,this.rootRef.el)}};i(Rs,"template","baseui.AlertDialogContent"),i(Rs,"props",{...p,size:n(String)});var $s=class extends c{};i($s,"template","baseui.AlertDialogHeader"),i($s,"props",p);var Us=class extends c{};i(Us,"template","baseui.AlertDialogFooter"),i(Us,"props",p);var qs=class extends c{};i(qs,"template","baseui.AlertDialogMedia"),i(qs,"props",p);var Ps=class extends c{};i(Ps,"template","baseui.AlertDialogTitle"),i(Ps,"props",p);var _s=class extends c{};i(_s,"template","baseui.AlertDialogDescription"),i(_s,"props",p);var fe=class extends c{get attrs(){return{"data-slot":"alert-dialog-cancel"}}onClick(){this.env.setAlertDialogOpen(!1)}};i(fe,"template","baseui.AlertDialogCancel"),i(fe,"components",{Button:S}),i(fe,"props",p);var ge=class extends c{get attrs(){return{"data-slot":"alert-dialog-action"}}onClick(){this.props.onClick?.(),this.env.setAlertDialogOpen(!1)}};i(ge,"template","baseui.AlertDialogAction"),i(ge,"components",{Button:S}),i(ge,"props",{...p,onClick:n(Function)});A();x();var Ms=class extends c{setup(){this.drawerState=w({open:j(this.props)}),this.control={instance:null},T({drawer:this.drawerState,drawerControl:this.control,setDrawerOpen:e=>this.setOpen(e)}),Y(this.drawerState,this.control)}setOpen(e){X(this.props,this.drawerState,e)}};i(Ms,"template","baseui.Drawer"),i(Ms,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var ye=class extends c{onClick(){this.env.drawerControl.instance?.show()}};i(ye,"template","baseui.DrawerTrigger"),i(ye,"components",{Button:S}),i(ye,"props",p);var js=class extends c{setup(){this.rootRef=L("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDrawerOpen(!0),this.onHidden=()=>{this.env.setDrawerOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},R(()=>{this.env.drawerControl.instance=N().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawer.open&&this.env.drawerControl.instance.show()}),U(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.drawerControl.instance?.dispose(),this.env.drawerControl.instance=null})}get open(){return this.env.drawer.open}};i(js,"template","baseui.DrawerContent"),i(js,"props",p);var zs=class extends c{};i(zs,"template","baseui.DrawerHeader"),i(zs,"props",p);var Ds=class extends c{};i(Ds,"template","baseui.DrawerFooter"),i(Ds,"props",p);var Fs=class extends c{};i(Fs,"template","baseui.DrawerTitle"),i(Fs,"props",p);var Hs=class extends c{};i(Hs,"template","baseui.DrawerDescription"),i(Hs,"props",p);var ve=class extends c{get attrs(){return{"data-bs-dismiss":"offcanvas"}}};i(ve,"template","baseui.DrawerClose"),i(ve,"components",{Button:S}),i(ve,"props",p);A();x();var Ws=class extends c{setup(){this.sheetState=w({open:j(this.props),side:this.props.side}),this.control={instance:null},T({sheet:this.sheetState,sheetControl:this.control,setSheetOpen:e=>this.setOpen(e)}),Y(this.sheetState,this.control),z(e=>{this.sheetState.side=e.side})}setOpen(e){X(this.props,this.sheetState,e)}};i(Ws,"template","baseui.Sheet"),i(Ws,"props",{open:n(Boolean),state:n(String),side:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var xe=class extends c{onClick(){this.env.sheetControl.instance?.show()}};i(xe,"template","baseui.SheetTrigger"),i(xe,"components",{Button:S}),i(xe,"props",p);var Ks=class extends c{setup(){this.rootRef=L("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setSheetOpen(!0),this.onHidden=()=>{this.env.setSheetOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},R(()=>{this.env.sheetControl.instance=N().Offcanvas.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,scroll:!1}),this.rootRef.el.addEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.addEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.addEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheet.open&&this.env.sheetControl.instance.show()}),U(()=>{this.rootRef.el.removeEventListener("show.bs.offcanvas",this.onShow),this.rootRef.el.removeEventListener("shown.bs.offcanvas",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.offcanvas",this.onHidden),this.env.sheetControl.instance?.dispose(),this.env.sheetControl.instance=null})}get open(){return this.env.sheet.open}get side(){return this.props.side??this.env.sheet.side}get placementClass(){return this.side==="left"?"offcanvas-start":"offcanvas-end"}};i(Ks,"template","baseui.SheetContent"),i(Ks,"props",{...p,side:n(String)});var Vs=class extends c{};i(Vs,"template","baseui.SheetHeader"),i(Vs,"props",p);var Gs=class extends c{};i(Gs,"template","baseui.SheetFooter"),i(Gs,"props",p);var Zs=class extends c{};i(Zs,"template","baseui.SheetTitle"),i(Zs,"props",p);var Js=class extends c{};i(Js,"template","baseui.SheetDescription"),i(Js,"props",p);var we=class extends c{};i(we,"template","baseui.SheetClose"),i(we,"components",{Button:S}),i(we,"props",p);A();x();var Ys=class extends c{setup(){let e=w({open:F(this.props.state)});this.control={instance:null,bufferEl:null,lastContentHtml:null};let s=o=>{e.open!==o&&(e.open=o,this.props.onOpenChange?.(o))};T({popover:e,popoverControl:this.control,popoverSetOpen:s,popoverToggle:()=>this.control.instance?.toggle(),popoverClose:()=>this.control.instance?.hide()})}};i(Ys,"template","baseui.Popover"),i(Ys,"props",{state:n(String),onOpenChange:n(Function),...p});var Se=class extends c{setup(){this.rootRef={el:null},this.getRef=e=>{this.rootRef.el=e},this.onShown=()=>this.env.popoverSetOpen(!0),this.onHidden=()=>this.env.popoverSetOpen(!1),R(()=>{let e=this.env.popoverControl,s=e.bufferEl?.innerHTML??"";e.lastContentHtml=s,e.instance=new(N()).Popover(this.rootRef.el,{content:s,html:!0,trigger:"manual"}),this.rootRef.el.addEventListener("shown.bs.popover",this.onShown),this.rootRef.el.addEventListener("hidden.bs.popover",this.onHidden)}),U(()=>{this.rootRef.el.removeEventListener("shown.bs.popover",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.popover",this.onHidden),this.env.popoverControl.instance?.dispose(),this.env.popoverControl.instance=null})}get attrs(){return{"aria-haspopup":"dialog","aria-expanded":this.env.popover.open?"true":"false"}}onClick(){this.env.popoverControl.instance?.toggle()}};i(Se,"template","baseui.PopoverTrigger"),i(Se,"components",{Button:S}),i(Se,"props",p);var Xs=class extends c{get style(){return K("display:none",this.props.style)}setup(){this.bufferRef=L("buffer"),R(()=>{this.env.popoverControl.bufferEl=this.bufferRef.el}),M(()=>{let e=this.env.popoverControl;e.bufferEl=this.bufferRef.el;let s=this.currentContentHtml();e.instance&&s!==e.lastContentHtml&&(e.lastContentHtml=s,e.instance.setContent({".popover-body":s}))})}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}};i(Xs,"template","baseui.PopoverContent"),i(Xs,"props",{...p,content:n(String)});A();x();var Qs=class extends c{setup(){this.state=w({open:!1}),T({hoverCard:this.state})}open(){this.state.open=!0}close(){this.state.open=!1}onKeyDown(e){e.key==="Escape"&&this.close()}};i(Qs,"template","baseui.HoverCard"),i(Qs,"props",{...p});var to=class extends c{};i(to,"template","baseui.HoverCardTrigger"),i(to,"props",p);var eo=class extends c{get open(){return this.env.hoverCard.open}};i(eo,"template","baseui.HoverCardContent"),i(eo,"props",p);A();x();var Gi={...p,disabled:n(Boolean),inset:n(Boolean),onClick:n(Function),onSelect:n(Function),variant:n(String)},Ft=class extends c{setup(){this.rootRef=L("root");let e=w({open:F(this.props.state)});this.control={instance:null};let s=a=>{e.open!==a&&(e.open=a,this.props.onOpenChange?.(a))};T({dropdownMenu:e,dropdownControl:this.control,dropdownSetOpen:s,dropdownToggle:()=>this.control.instance?.toggle(),dropdownClose:()=>this.control.instance?.hide()});let o=a=>{this.rootRef.el&&!this.rootRef.el.contains(a.target)&&this.control.instance?.hide()},r=a=>{a.key==="Escape"&&this.control.instance?.hide()};tt(a=>{if(a)return document.addEventListener("click",o),document.addEventListener("keydown",r),()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",r)}},()=>[e.open]),U(()=>{document.removeEventListener("click",o),document.removeEventListener("keydown",r)})}};i(Ft,"template","baseui.DropdownMenu"),i(Ft,"props",{state:n(String),onOpenChange:n(Function),...p});var mt=class extends c{setup(){this.rootRef={el:null},this.onShown=()=>this.env.dropdownSetOpen(!0),this.onHidden=()=>this.env.dropdownSetOpen(!1),this.getRef=e=>{e?(this.rootRef.el=e,this.env.dropdownControl.instance=N().Dropdown.getOrCreateInstance(e),e.addEventListener("shown.bs.dropdown",this.onShown),e.addEventListener("hidden.bs.dropdown",this.onHidden)):this.rootRef.el&&(this.rootRef.el.removeEventListener("shown.bs.dropdown",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.dropdown",this.onHidden),this.env.dropdownControl.instance?.dispose(),this.env.dropdownControl.instance=null,this.rootRef.el=null)}}get classNames(){return m("btn","b-button","btn-outline-secondary","b-dropdown-menu-trigger",this.props.className)}get attrs(){return{"data-slot":"dropdown-menu-trigger","aria-haspopup":"menu","aria-expanded":this.env.dropdownMenu.open?"true":"false"}}onClick(){this.env.dropdownToggle()}};i(mt,"template","baseui.DropdownMenuTrigger"),i(mt,"components",{Button:S}),i(mt,"props",p);var Ht=class extends c{get open(){return this.env.dropdownMenu.open}get classNames(){return m("b-dropdown-menu-content","dropdown-menu",this.open?"show":"",this.props.className)}};i(Ht,"template","baseui.DropdownMenuContent"),i(Ht,"props",{...p,align:n(String),alignOffset:n(Number),side:n(String),sideOffset:n(Number)});var so=class extends c{};i(so,"template","baseui.DropdownMenuGroup"),i(so,"props",p);var oo=class extends c{};i(oo,"template","baseui.DropdownMenuLabel"),i(oo,"props",{...p,inset:n(Boolean)});var Wt=class extends c{get variant(){return this.props.variant||"default"}onClick(e){this.props.disabled||(this.props.onClick?.(e),this.props.onSelect?.(e),this.env.dropdownClose())}};i(Wt,"template","baseui.DropdownMenuItem"),i(Wt,"props",Gi);var Ae=class extends c{onClick(e){this.props.disabled||(this.props.onCheckedChange?.(!this.props.checked,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};i(Ae,"template","baseui.DropdownMenuCheckboxItem"),i(Ae,"components",{Icon:$}),i(Ae,"props",{...Gi,checked:n(Boolean),onCheckedChange:n(Function)});var ro=class extends c{setup(){T({dropdownRadio:{value:this.props.value,onValueChange:this.props.onValueChange}})}};i(ro,"template","baseui.DropdownMenuRadioGroup"),i(ro,"props",{...p,value:n(String),onValueChange:n(Function)});var Ee=class extends c{get checked(){return this.env.dropdownRadio?.value===this.props.value}onClick(e){this.props.disabled||(this.env.dropdownRadio?.onValueChange?.(this.props.value,e),this.props.onClick?.(e),this.props.onSelect?.(e))}};i(Ee,"template","baseui.DropdownMenuRadioItem"),i(Ee,"components",{Icon:$}),i(Ee,"props",{...Gi,value:n(String)});var io=class extends c{};i(io,"template","baseui.DropdownMenuSeparator"),i(io,"props",p);var no=class extends c{};i(no,"template","baseui.DropdownMenuShortcut"),i(no,"props",p);var Kt=class extends c{setup(){this.rootRef=L("root");let{state:e,setOpen:s,toggle:o}=Rr(this.rootRef);T({dropdownSub:e,dropdownSubToggle:o,dropdownSubOpen:()=>s(!0),dropdownSubClose:()=>s(!1)})}};i(Kt,"template","baseui.DropdownMenuSub"),i(Kt,"props",p);var ft=class extends c{onMouseEnter(){this.props.disabled||this.env.dropdownSubOpen()}onClick(){this.props.disabled||this.env.dropdownSubToggle()}};i(ft,"template","baseui.DropdownMenuSubTrigger"),i(ft,"components",{Icon:$}),i(ft,"props",{...p,disabled:n(Boolean),inset:n(Boolean)});var Vt=class extends c{get open(){return this.env.dropdownSub.open}};i(Vt,"template","baseui.DropdownMenuSubContent"),i(Vt,"props",p);A();x();var ao=class extends c{setup(){this.state=w({open:!1,x:0,y:0});let e=()=>{this.state.open=!1};this.close=e,T({contextMenu:this.state,contextMenuOpenAt:(s,o)=>{this.state.open=!0,this.state.x=s,this.state.y=o},contextMenuClose:e}),document.addEventListener("click",e),U(()=>document.removeEventListener("click",e))}};i(ao,"template","baseui.ContextMenu"),i(ao,"props",{className:n(String),slots:n(Object)});var co=class extends c{onContextMenu(e){e.preventDefault(),this.env.contextMenuOpenAt(e.clientX,e.clientY)}};i(co,"template","baseui.ContextMenuTrigger"),i(co,"props",p);var lo=class extends c{setup(){this.rootRef=L("root")}get open(){return this.env.contextMenu.open}get style(){return K(`left:${this.env.contextMenu.x}px;top:${this.env.contextMenu.y}px`,this.props.style)}};i(lo,"template","baseui.ContextMenuContent"),i(lo,"props",p);var uo=class extends c{onClick(){this.props.onClick?.(),this.env.contextMenuClose()}};i(uo,"template","baseui.ContextMenuItem"),i(uo,"props",{...p,onClick:n(Function)});A();x();var El={"top-left":["top-0","start-0"],"top-right":["top-0","end-0"],"bottom-left":["bottom-0","start-0"],"bottom-right":["bottom-0","end-0"]};function gi(t){let e=El[t];return e?["toast-container","position-fixed","p-3","pe-auto",...e]:null}var gt=class extends c{setup(){this.state=w({open:j(this.props)}),this.rootRef=L("root"),this.bootstrapToast=null,this.handleShown=()=>{this.state.open=!0},this.handleHidden=()=>{this.state.open=!1,this.props.onOpenChange?.(!1)},R(()=>{this.mountBootstrapToast(this.props.delay),this.state.open&&this.bootstrapToast.show()}),z(e=>{let s=es(e)?j(e):this.state.open;e.delay!==this.props.delay?(this.bootstrapToast?.dispose(),this.mountBootstrapToast(e.delay),s&&this.bootstrapToast.show()):s!==this.state.open&&(s?this.bootstrapToast?.show():this.bootstrapToast?.hide())}),U(()=>{this.bootstrapToast?.dispose()})}mountBootstrapToast(e){let s=this.rootRef.el,o=e??3e3;this.bootstrapToast=new(N()).Toast(s,{autohide:o>0,delay:o||3e3}),s.addEventListener("shown.bs.toast",this.handleShown),s.addEventListener("hidden.bs.toast",this.handleHidden)}get classNames(){return m("toast","fade","b-toast",gi(this.props.position),this.props.className)}get role(){return this.props.variant==="danger"?"alert":"status"}get hasActionSlot(){return!!this.props.slots?.action}close(){this.bootstrapToast?.hide()}};i(gt,"template","baseui.Toast"),i(gt,"components",{Button:S}),i(gt,"props",{open:n(Boolean),state:n(String),variant:n(String),delay:n(Number),position:n(String),...p,onOpenChange:n(Function)});A();x();var po=class extends c{setup(){this.state=w({open:new Set}),T({accordion:this.state,accordionToggle:e=>this.toggle(e)})}toggle(e){let s=!this.state.open.has(e);this.props.multiple||this.state.open.clear(),s?this.state.open.add(e):this.state.open.delete(e),this.props.onChange?.(s)}};i(po,"template","baseui.Accordion"),i(po,"props",{multiple:n(Boolean),onChange:n(Function),...p});var ho=class extends c{setup(){T({accordionItemState:this.props.state,accordionItemValue:this.props.value})}};i(ho,"template","baseui.AccordionItem"),i(ho,"props",{value:{type:String},state:n(String),...p});var Ce=class extends c{get open(){return this.env.accordionItemState!==void 0?F(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}get triggerAttrs(){return{"data-slot":"accordion-trigger","aria-expanded":this.open?"true":"false"}}onClick(){this.env.accordionToggle(this.env.accordionItemValue)}};i(Ce,"template","baseui.AccordionTrigger"),i(Ce,"components",{Icon:$,Button:S}),i(Ce,"props",p);var bo=class extends c{setup(){this.rootRef=L("root"),this.initialOpen=this.open,mi(this.rootRef,()=>this.open)}get open(){return this.env.accordionItemState!==void 0?F(this.env.accordionItemState):this.env.accordion.open.has(this.env.accordionItemValue)}};i(bo,"template","baseui.AccordionContent"),i(bo,"props",p);A();x();var mo=class extends c{setup(){this.state=w({open:j(this.props)}),T({collapsible:this.state,collapsibleToggle:()=>this.toggle()}),Y(this.state)}toggle(){let e=!this.state.open;X(this.props,this.state,e)}};i(mo,"template","baseui.Collapsible"),i(mo,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),...p});var Le=class extends c{get attrs(){return{"aria-expanded":this.env.collapsible.open?"true":"false"}}onClick(){this.env.collapsibleToggle()}};i(Le,"template","baseui.CollapsibleTrigger"),i(Le,"components",{Button:S}),i(Le,"props",p);var fo=class extends c{setup(){this.rootRef=L("root"),this.initialOpen=this.open,mi(this.rootRef,()=>this.open)}get open(){return this.env.collapsible.open}};i(fo,"template","baseui.CollapsibleContent"),i(fo,"props",p);A();x();var Gt=class extends c{};i(Gt,"template","baseui.Breadcrumb"),i(Gt,"props",{...p});var Zt=class extends c{};i(Zt,"template","baseui.BreadcrumbList"),i(Zt,"props",{...p});var Jt=class extends c{get classNames(){return m("b-breadcrumb-item",this.props.current&&"b-breadcrumb-page",this.props.className)}};i(Jt,"template","baseui.BreadcrumbItem"),i(Jt,"props",{current:n(Boolean),...p});var Yt=class extends c{get classNames(){return m("b-breadcrumb-link",this.props.className)}onClick(e){this.props.onClick?.(e)}};i(Yt,"template","baseui.BreadcrumbLink"),i(Yt,"props",{href:n(String),target:n(String),rel:n(String),...p,onClick:n(Function)});var Xt=class extends c{get classNames(){return m("b-breadcrumb-page",this.props.className)}};i(Xt,"template","baseui.BreadcrumbPage"),i(Xt,"props",{...p});var yt=class extends c{get classNames(){return m("b-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};i(yt,"template","baseui.BreadcrumbSeparator"),i(yt,"components",{Icon:$}),i(yt,"props",{...p});var ke=class extends c{get classNames(){return m("b-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};i(ke,"template","baseui.BreadcrumbEllipsis"),i(ke,"components",{Icon:$}),i(ke,"props",{...p});A();x();var go=class extends c{get classNames(){return m("b-pagination",this.props.className)}};i(go,"template","baseui.Pagination"),i(go,"props",{...p});var yo=class extends c{get classNames(){return m("page-item",this.props.current&&"active",this.props.disabled&&"disabled")}onClick(){this.props.disabled||this.props.onClick?.()}};i(yo,"template","baseui.PaginationItem"),i(yo,"props",{current:n(Boolean),disabled:n(Boolean),style:n([String,Object]),onClick:n(Function),slots:n(Object)});A();x();var vo=class extends c{setup(){this.rootRef=L("root")}onKeyDown(e){let s=[...this.rootRef.el.querySelectorAll("a, button")].filter(a=>!a.disabled),o=s.indexOf(e.target),r=e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0;!r||o<0||(e.preventDefault(),s[(o+r+s.length)%s.length]?.focus())}};i(vo,"template","baseui.NavigationMenu"),i(vo,"props",{...p});var xo=class extends c{};i(xo,"template","baseui.NavigationMenuItem"),i(xo,"props",{href:n(String),...p});A();x();var wo=class extends c{get classNames(){return m("b-menubar",this.props.className)}};i(wo,"template","baseui.Menubar"),i(wo,"props",{...p});A();x();var pa={...p,href:n(String)};function da(t){globalThis.matchMedia?.("(max-width: 991.98px)").matches&&t.setSidebarOpen?.(!1)}var xt=class extends c{setup(){this.state=w({open:j(this.props)}),T({sidebar:this.state,setSidebarOpen:e=>this.setOpen(e)}),Y(this.state)}setOpen(e){X(this.props,this.state,e)}get sidebarState(){return this.state.open?"expanded":"collapsed"}get side(){return this.props.side||"left"}get variant(){return this.props.variant||"sidebar"}get collapsible(){return this.props.collapsible||"offcanvas"}get classNames(){return m("b-sidebar-root",this.props.className)}onKeyDown(e){e.key==="Escape"&&this.setOpen(!1)}};i(xt,"template","baseui.Sidebar"),i(xt,"props",{open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),side:n(String),variant:n(String),collapsible:n(String),...p});var qr=class extends xt{};i(qr,"template","baseui.Sidebar");var Ne=class extends c{onClick(){if(this.env.setShellCollapsed&&!globalThis.matchMedia?.("(max-width: 991.98px)").matches){this.env.setShellCollapsed(!this.env.shell.collapsed);return}this.env.setSidebarOpen(!this.env.sidebar.open)}};i(Ne,"template","baseui.SidebarTrigger"),i(Ne,"components",{Icon:$,Button:S}),i(Ne,"props",{...p,icon:n(String),label:n(String)});var Qt=class extends c{get open(){return this.env.sidebar.open}};i(Qt,"template","baseui.SidebarContent"),i(Qt,"props",p);var So=class extends c{};i(So,"template","baseui.SidebarHeader"),i(So,"props",p);var Ao=class extends c{};i(Ao,"template","baseui.SidebarFooter"),i(Ao,"props",p);var Eo=class extends c{};i(Eo,"template","baseui.SidebarInset"),i(Eo,"props",p);var Oe=class extends c{onClick(){this.env.setSidebarOpen(!this.env.sidebar.open)}};i(Oe,"template","baseui.SidebarRail"),i(Oe,"components",{Button:S}),i(Oe,"props",p);var Co=class extends c{};i(Co,"template","baseui.SidebarInput"),i(Co,"props",{className:n(String),style:n([String,Object]),placeholder:n(String),value:n(String),type:n(String)});var Lo=class extends c{};i(Lo,"template","baseui.SidebarSeparator"),i(Lo,"props",p);var Te=class extends c{onClick(){this.env.setSidebarOpen(!1)}};i(Te,"template","baseui.SidebarClose"),i(Te,"components",{Icon:$,Button:S}),i(Te,"props",{...p,icon:n(String),label:n(String)});var te=class extends c{};i(te,"template","baseui.SidebarGroup"),i(te,"props",{muted:n(Boolean),...p});var ee=class extends c{};i(ee,"template","baseui.SidebarGroupLabel"),i(ee,"props",pa);var Be=class extends c{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(Be,"template","baseui.SidebarGroupAction"),i(Be,"components",{Button:S}),i(Be,"props",{icon:n(String),"aria-label":n(String),ariaLabel:n(String),onClick:n(Function),...p});var ko=class extends c{};i(ko,"template","baseui.SidebarGroupContent"),i(ko,"props",p);var Ie=class extends c{setup(){let e=this.props["default-open"]!==void 0||this.props.defaultOpen!==void 0;this.state=w({open:es(this.props)||e?j(this.props):!0}),Y(this.state)}get open(){return this.state.open}toggle(){let e=!this.state.open;X(this.props,this.state,e)}};i(Ie,"template","baseui.SidebarGroupCollapsible"),i(Ie,"components",{Icon:$,Button:S}),i(Ie,"props",{label:{type:String},open:n(Boolean),state:n(String),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),...p});var wt=class extends c{};i(wt,"template","baseui.SidebarMenu"),i(wt,"props",p);var se=class extends c{};i(se,"template","baseui.SidebarMenuItem"),i(se,"props",p);var vt=class extends c{get classNames(){return m("b-sidebar-menu-button",this.isActive&&"is-active",this.props.variant&&`is-${this.props.variant}`,this.props.size&&`is-${this.props.size}`,this.props.className)}get isActive(){return this.props.active||this.props.isActive}onClick(e){this.props.onClick?.(e),da(this.env)}};i(vt,"template","baseui.SidebarMenuButton"),i(vt,"components",{Icon:$,Button:S}),i(vt,"props",{href:n(String),icon:n(String),active:n(Boolean),isActive:n(Boolean),variant:n(String),size:n(String),tooltip:n(String),disabled:n(Boolean),onClick:n(Function),...p});var Re=class extends c{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(Re,"template","baseui.SidebarMenuAction"),i(Re,"components",{Button:S}),i(Re,"props",{icon:n(String),"aria-label":n(String),ariaLabel:n(String),showOnHover:n(Boolean),onClick:n(Function),...p});var No=class extends c{};i(No,"template","baseui.SidebarMenuSub"),i(No,"props",p);var Oo=class extends c{};i(Oo,"template","baseui.SidebarMenuBadge"),i(Oo,"props",p);var To=class extends c{setup(){this.state=w({width:this.props.width||`${Math.floor(Math.random()*40)+50}%`})}get style(){return K(`--b-sidebar-skeleton-width:${this.state.width}`,this.props.style)}};i(To,"template","baseui.SidebarMenuSkeleton"),i(To,"props",{showIcon:n(Boolean),width:n(String),className:n(String),style:n([String,Object])});var Bo=class extends c{};i(Bo,"template","baseui.SidebarMenuSubItem"),i(Bo,"props",p);var $e=class extends c{get classNames(){return m("b-sidebar-menu-sub-button",(this.props.active||this.props.isActive)&&"is-active",this.props.size&&`is-${this.props.size}`,this.props.className)}onClick(e){this.props.onClick?.(e),da(this.env)}};i($e,"template","baseui.SidebarMenuSubButton"),i($e,"components",{Button:S}),i($e,"props",{...pa,active:n(Boolean),isActive:n(Boolean),size:n(String),onClick:n(Function)});A();x();var Ue=class extends c{setup(){this.state=w({collapsed:this.props.collapsed??this.props.defaultCollapsed??!1,authState:this.props.authState??null}),T({shell:this.state,setShellCollapsed:e=>this.setCollapsed(e)}),z(e=>{e.collapsed!==void 0&&(this.state.collapsed=e.collapsed),this.state.authState=e.authState??null})}setCollapsed(e){this.props.collapsed===void 0&&(this.state.collapsed=e),this.props.onCollapsedChange?.(e)}dismissToast(){this.props.onToastOpenChange?.(!1)}runToastAction(){this.props.toast?.onAction?.()}};i(Ue,"template","baseui.Shell"),i(Ue,"components",{Sidebar:xt,Toast:gt,Button:S}),i(Ue,"props",{open:n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),collapsed:n(Boolean),defaultCollapsed:n(Boolean),onCollapsedChange:n(Function),authState:n(Object),toast:n(Object),onToastOpenChange:n(Function),notificationPage:n(Function),pwa:n(Function),...p});var qe=class extends c{};i(qe,"template","baseui.ShellSidebar"),i(qe,"components",{SidebarContent:Qt}),i(qe,"props",p);var Io=class extends c{};i(Io,"template","baseui.ShellSidebarHeader"),i(Io,"props",p);var Ro=class extends c{};i(Ro,"template","baseui.ShellNav"),i(Ro,"props",p);var $o=class extends c{};i($o,"template","baseui.ShellMain"),i($o,"props",p);var Uo=class extends c{};i(Uo,"template","baseui.ShellHeader"),i(Uo,"props",p);var Pe=class extends c{};i(Pe,"template","baseui.ShellContent"),i(Pe,"components",{Skeleton:Mt}),i(Pe,"props",{loading:n(Boolean),...p});var _e=class extends c{get authState(){return this.env.shell.authState}logout(){this.authState?.onLogout?.()}};i(_e,"template","baseui.ShellUserMenu"),i(_e,"components",{Button:S}),i(_e,"props",p);A();x();var qo=class extends c{get classNames(){return m("table","b-table",this.props.striped!==!1&&"table-striped",this.props.hover!==!1&&"table-hover",this.props.className)}};i(qo,"template","baseui.Table"),i(qo,"props",{striped:n(Boolean),hover:n(Boolean),responsive:n(Boolean),...p});A();x();var Cl=[{key:"status",label:"Status",format:"capitalize"},{key:"email",label:"Email",sortable:!0,filterable:!0},{key:"amount",label:"Amount",align:"right",format:"currency"}],Ll=[{id:"728ed52f",status:"success",email:"ken99@example.com",amount:316},{id:"489e1d42",status:"success",email:"abe45@example.com",amount:242},{id:"6b0888f6",status:"processing",email:"monserrat44@example.com",amount:837},{id:"a1dc8c4e",status:"success",email:"silas22@example.com",amount:874},{id:"15b96de0",status:"failed",email:"carmella@example.com",amount:721}],kl=[{label:"Copy payment ID"},{label:"View customer"},{label:"View payment details"}],Po=4,_o=8,Nl=32,Me=class extends c{setup(){this.state=w({query:"",sortKey:null,sortDir:1,page:0,pageSize:this.initialPageSize,selectedKeys:[],hiddenColumns:this.columns.filter(e=>e.hidden||e.visible===!1).map(e=>e.key),columnsOpen:!1,actionRowKey:null,actionMenuStyle:null}),this.actionsMenuRef=L("actionsMenu"),this.actionsMenuTriggerEl=null,ss(window,"click",this.onWindowClick,!0),ss(window,"keydown",this.onWindowKeydown),ss(window,"resize",this.closeRowActions),ss(window,"scroll",this.closeRowActions,!0),M(()=>this.refreshActionsMenuPosition())}get columns(){return this.props.columns?.length?this.props.columns:Cl}get rows(){return this.props.rows?.length?this.props.rows:Ll}get usesDefaultRows(){return!this.props.rows?.length}get initialPageSize(){return this.props["page-size"]??this.props.pageSize??10}get pageSizeOptions(){return this.props["page-size-options"]??this.props.pageSizeOptions??[10,20,50,80]}get rowActions(){return this.props["row-actions"]??this.props.rowActions??(this.usesDefaultRows?kl:[])}get variant(){return this.props.variant||"default"}get classNames(){return m("b-data-table",`b-data-table-${this.variant}`,this.props.className)}get viewportStyle(){let e=this.props["max-height"]??this.props.maxHeight;return e?`max-height: ${typeof e=="number"?`${e}px`:e};`:""}get hasSearch(){return this.props.searchable!==!1}get hasSorting(){return this.props.sortable!==!1}get hasPagination(){return this.props.pagination!==!1}get hasColumnToggle(){return this.props["column-toggle"]??this.props.columnToggle??!0}get hasToolbarActions(){return!!this.props.slots?.toolbarActions}get hasSelection(){return this.props.selectable??this.usesDefaultRows}get visibleColumns(){return this.columns.filter(e=>!this.state.hiddenColumns.includes(e.key))}get visibleRows(){let e=this.state.query.toLowerCase(),s=this.columns.filter(a=>a.filterable===!0),o=(s.length?s:this.columns).map(a=>a.key),r=this.rows.filter(a=>!e||o.some(l=>String(a[l]).toLowerCase().includes(e)));return this.state.sortKey&&(r=[...r].sort((a,l)=>String(a[this.state.sortKey]).localeCompare(String(l[this.state.sortKey]))*this.state.sortDir)),r}get pageCount(){return Math.max(1,Math.ceil(this.visibleRows.length/this.state.pageSize))}get pageRows(){if(!this.hasPagination)return this.visibleRows;let s=Math.min(this.state.page,this.pageCount-1)*this.state.pageSize;return this.visibleRows.slice(s,s+this.state.pageSize)}get selectedCount(){return this.state.selectedKeys.length}get selectionLabel(){return`${this.selectedCount} of ${this.visibleRows.length} row(s) selected.`}get emptyLabel(){return this.props["empty-label"]??this.props.emptyLabel??"No results."}get filterPlaceholder(){return this.props["filter-placeholder"]??this.props.filterPlaceholder??"Filter emails..."}get canPreviousPage(){return this.hasPagination&&this.state.page>0}get canNextPage(){return this.hasPagination&&this.state.page<this.pageCount-1}get pageLabel(){return`Page ${Math.min(this.state.page,this.pageCount-1)+1} of ${this.pageCount}`}rowKey(e,s){return e.id??e.key??s}isSelected(e,s){return this.state.selectedKeys.includes(this.rowKey(e,s))}isColumnSortable(e){return this.hasSorting&&e.sortable===!0}onSearchInput(e){this.state.query=e.target.value,this.state.page=0}sortBy(e){let s=this.columns.find(o=>o.key===e);!s||!this.isColumnSortable(s)||(this.state.sortKey===e?this.state.sortDir=-this.state.sortDir:(this.state.sortKey=e,this.state.sortDir=1))}sortIcon(e){return this.state.sortKey!==e?"arrow-up-down":this.state.sortDir===1?"arrow-up":"arrow-down"}toggleColumn(e){this.state.hiddenColumns.includes(e)?this.state.hiddenColumns=this.state.hiddenColumns.filter(s=>s!==e):this.state.hiddenColumns=[...this.state.hiddenColumns,e]}toggleColumnsMenu(){this.state.columnsOpen=!this.state.columnsOpen}toggleRowActions(e,s,o){let r=this.rowKey(e,s);if(this.state.actionRowKey===r){this.closeRowActions();return}this.actionsMenuTriggerEl=o.currentTarget,this.state.actionRowKey=r,this.state.actionMenuStyle=this.estimateActionMenuStyle(o.currentTarget)}closeRowActions(){this.state.actionRowKey!==null&&(this.state.actionRowKey=null,this.state.actionMenuStyle=null,this.actionsMenuTriggerEl=null)}get openRowAction(){if(this.state.actionRowKey===null)return null;let e=this.pageRows.findIndex((s,o)=>this.rowKey(s,o)===this.state.actionRowKey);return e===-1?null:{row:this.pageRows[e],index:e}}estimateActionMenuStyle(e){let s=e.getBoundingClientRect(),o=this.rowActions.length*Nl+Po*2,r=window.innerHeight-s.bottom,l=r<o+Po&&s.top>r?Math.max(_o,s.top-Po-o):s.bottom+Po,u=Math.min(Math.max(_o,s.right-160),window.innerWidth-160-_o);return`position: fixed; top: ${Math.round(l)}px; left: ${Math.round(u)}px;`}refreshActionsMenuPosition(){if(this.state.actionRowKey===null||!this.actionsMenuTriggerEl)return;let e=this.actionsMenuRef.el;if(!e)return;let s=this.actionsMenuTriggerEl.getBoundingClientRect(),o=e.getBoundingClientRect(),r=window.innerHeight-s.bottom,a=s.top,u=r<o.height+Po&&a>r?Math.max(_o,s.top-Po-o.height):Math.min(s.bottom+Po,window.innerHeight-o.height-_o),d=Math.min(Math.max(_o,s.right-o.width),window.innerWidth-o.width-_o),b=`position: fixed; top: ${Math.round(u)}px; left: ${Math.round(d)}px;`;this.state.actionMenuStyle!==b&&(this.state.actionMenuStyle=b)}onWindowClick(e){this.state.actionRowKey===null||this.actionsMenuRef.el?.contains(e.target)||this.actionsMenuTriggerEl?.contains(e.target)||this.closeRowActions()}onWindowKeydown(e){e.key==="Escape"&&this.closeRowActions()}setPage(e){this.state.page=Math.max(0,Math.min(e,this.pageCount-1))}setPageSize(e){this.state.pageSize=Number(e),this.state.page=0}optionValue(e){return`${e}`}toggleRow(e,s,o){let r=this.rowKey(e,s);this.state.selectedKeys=o?[...new Set([...this.state.selectedKeys,r])]:this.state.selectedKeys.filter(a=>a!==r),this.props.onSelectionChange?.(this.state.selectedKeys)}toggleAllVisible(e){let s=this.pageRows.map((o,r)=>this.rowKey(o,r));this.state.selectedKeys=e?[...new Set([...this.state.selectedKeys,...s])]:this.state.selectedKeys.filter(o=>!s.includes(o)),this.props.onSelectionChange?.(this.state.selectedKeys)}onAction(e,s,o){e.onSelect?.(s,o),this.props.onRowAction?.(e,s,o),this.closeRowActions()}columnLabel(e){return e.label??e.key}cellValue(e,s){let o=e[s.key];if(s.format==="currency"){let r=Number(o);return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number.isFinite(r)?r:0)}if(s.format==="capitalize"){let r=String(o??"");return r.charAt(0).toUpperCase()+r.slice(1)}return o??""}cellComponentProps(e,s){return s.componentProps?s.componentProps(e,s):{row:e,column:s,value:e[s.key]}}};i(Me,"template","baseui.DataTable"),i(Me,"components",{Button:S,Icon:$}),i(Me,"props",{columns:n(Array),rows:n(Array),variant:n(String),searchable:n(Boolean),sortable:n(Boolean),pagination:n(Boolean),selectable:n(Boolean),"column-toggle":n(Boolean),columnToggle:n(Boolean),"row-actions":n(Array),rowActions:n(Array),"page-size":n(Number),pageSize:n(Number),"page-size-options":n(Array),pageSizeOptions:n(Array),"filter-placeholder":n(String),filterPlaceholder:n(String),"empty-label":n(String),emptyLabel:n(String),onRowAction:n(Function),onSelectionChange:n(Function),...p,"max-height":n([String,Number]),maxHeight:n([String,Number])});A();x();var Ol=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"}),Tl=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],je=class extends c{get baseDate(){return this.props.selected?new Date(`${this.props.selected}T00:00:00`):new Date}get month0(){return(this.props.month??this.baseDate.getMonth()+1)-1}get year(){return this.props.year??this.baseDate.getFullYear()}get headerLabel(){return Ol.format(new Date(this.year,this.month0,1))}get weekdays(){return Tl}get days(){let e=new Date(this.year,this.month0+1,0).getDate(),s=new Date(this.year,this.month0,1).getDay(),o=[];for(let r=0;r<s;r++)o.push(null);for(let r=1;r<=e;r++){let a=`${this.year}-${String(this.month0+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`;o.push({day:r,value:a,selected:a===this.props.selected})}return o}onSelect(e){this.props.onChange?.(e)}};i(je,"template","baseui.Calendar"),i(je,"components",{Button:S}),i(je,"props",{selected:n(String),month:n(Number),year:n(Number),className:n(String),style:n([String,Object]),onChange:n(Function)});x();var Mo=class extends J{get classNames(){return m("b-date-picker","form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onChange?.(e.target.value,e)}};i(Mo,"template","baseui.DatePicker"),i(Mo,"props",{...rt,value:n(String),className:n(String),style:n([String,Object]),onChange:n(Function)});A();x();var jo=class extends J{setup(){super.setup(),this.rootRef=L("root");let{state:e}=Rr(this.rootRef);this.disclosure=e,this.state=w({query:this.selectedLabel})}get classNames(){return m("form-control",this.controlClass,this.isInvalid&&"is-invalid")}get selectedLabel(){return this.props.options.find(e=>e.value===this.props.value)?.label||""}get filteredOptions(){let e=this.state.query.toLowerCase();return this.props.options.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value,this.disclosure.open=!0}onFocus(){this.disclosure.open=!0}choose(e){this.state.query=e.label,this.disclosure.open=!1,this.props.onChange?.(e.value)}};i(jo,"template","baseui.Combobox"),i(jo,"props",{options:{type:Array},...rt,value:n(String),className:n(String),style:n([String,Object]),id:n(String),onChange:n(Function)});A();x();var zo=class extends c{setup(){this.state=w({query:""})}get filteredItems(){let e=this.state.query.toLowerCase();return this.props.items.filter(s=>s.label.toLowerCase().includes(e))}onInput(e){this.state.query=e.target.value}select(e){this.props.onSelect?.(e.value)}};i(zo,"template","baseui.Command"),i(zo,"props",{items:{type:Array},placeholder:n(String),className:n(String),style:n([String,Object]),onSelect:n(Function)});A();x();var Do=class extends c{get classNames(){return m("b-chart",this.props.type&&`b-chart-${this.props.type}`,this.props.variant&&`b-chart-${this.props.variant}`,this.props.className)}};i(Do,"template","baseui.Chart"),i(Do,"props",{config:n([String,Object]),label:n(String),type:n(String),value:n([String,Number]),variant:n(String),...p});A();x();var Fo=class extends c{setup(){this.state=w({index:this.props.defaultIndex??0}),this.rootRef=L("root"),this.bootstrapCarousel=null,this.onSlid=e=>{this.state.index=e.to,this.props.onChange?.(this.state.index)},T({carousel:this.state,carouselInstance:()=>this.bootstrapCarousel}),R(()=>{this.bootstrapCarousel=new(N()).Carousel(this.rootRef.el,{interval:!1,wrap:!0,touch:!0}),this.rootRef.el.addEventListener("slid.bs.carousel",this.onSlid)}),U(()=>{this.rootRef.el.removeEventListener("slid.bs.carousel",this.onSlid),this.bootstrapCarousel?.dispose()})}};i(Fo,"template","baseui.Carousel"),i(Fo,"props",{slideCount:{type:Number},defaultIndex:n(Number),onChange:n(Function),...p});var Ho=class extends c{setup(){this.rootRef=L("root"),this.initialActive=this.active,M(()=>{if(!this.rootRef.el)return;let e=this.rootRef.el.classList.contains("active");this.active&&!e?this.rootRef.el.classList.add("active"):!this.active&&e&&this.rootRef.el.classList.remove("active")})}get active(){return this.props.state!==void 0?F(this.props.state):this.env.carousel.index===this.props.index}};i(Ho,"template","baseui.CarouselSlide"),i(Ho,"props",{index:{type:Number},state:n(String),...p});var ze=class extends c{onClick(){this.env.carouselInstance()?.prev()}};i(ze,"template","baseui.CarouselPrevious"),i(ze,"components",{Button:S}),i(ze,"props",p);var De=class extends c{onClick(){this.env.carouselInstance()?.next()}};i(De,"template","baseui.CarouselNext"),i(De,"components",{Button:S}),i(De,"props",p);A();x();var Wo=class extends c{setup(){this.panelRef=L("panel"),this.state=w({width:null})}get panelStyle(){return this.state.width?`width:${this.state.width}px`:""}onPointerDown(e){let s=e.clientX,o=this.panelRef.el.getBoundingClientRect().width,r=this.props.min||160,a=this.props.max||720,l=d=>{this.state.width=Math.min(a,Math.max(r,o+d.clientX-s))},u=()=>{document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",u),this.props.onChange?.(this.state.width)};document.addEventListener("pointermove",l),document.addEventListener("pointerup",u)}};i(Wo,"template","baseui.Resizable"),i(Wo,"props",{min:n(Number),max:n(Number),onChange:n(Function),...p});A();x();var Ko=class extends c{get classNames(){return m("b-scroll-area",this.props.className)}};i(Ko,"template","baseui.ScrollArea"),i(Ko,"props",p);A();x();var ha={idle:"b-attachment-idle",uploading:"b-attachment-uploading",processing:"b-attachment-processing",error:"b-attachment-error",done:"b-attachment-done"},ba={default:"b-attachment-default",sm:"b-attachment-sm",xs:"b-attachment-xs"},Vo=class extends c{get state(){return ha[this.props.state]?this.props.state:"done"}get size(){return ba[this.props.size]?this.props.size:"default"}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("b-attachment",ha[this.state],ba[this.size],`b-attachment-${this.orientation}`,!this.hasContent&&"b-attachment-picker",this.props.className)}get hasContent(){return!!this.props.slots?.default}onChange(e){this.props.onChange?.([...e.target.files])}};i(Vo,"template","baseui.Attachment"),i(Vo,"props",{state:n(String),size:n(String),orientation:n(String),multiple:n(Boolean),...p,onChange:n(Function)});var Go=class extends c{get variant(){return this.props.variant==="image"?"image":"icon"}get classNames(){return m("b-attachment-media",`b-attachment-media-${this.variant}`,this.props.className)}};i(Go,"template","baseui.AttachmentMedia"),i(Go,"props",{variant:n(String),...p});var Zo=class extends c{};i(Zo,"template","baseui.AttachmentContent"),i(Zo,"props",p);var Jo=class extends c{};i(Jo,"template","baseui.AttachmentTitle"),i(Jo,"props",p);var Yo=class extends c{};i(Yo,"template","baseui.AttachmentDescription"),i(Yo,"props",p);var Xo=class extends c{};i(Xo,"template","baseui.AttachmentActions"),i(Xo,"props",p);var Fe=class extends c{get variant(){return this.props.variant||"ghost"}get size(){return this.props.size||"icon-xs"}get className(){return m("b-button-icon","b-attachment-action",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(Fe,"template","baseui.AttachmentAction"),i(Fe,"components",{Button:S}),i(Fe,"props",{type:n(String),variant:n(String),size:n(String),disabled:n(Boolean),label:n(String),...p,"aria-label":n(String),ariaLabel:n(String),onClick:n(Function)});var He=class extends c{get classNames(){return m("b-attachment-trigger",this.props.className)}get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}onClick(e){this.props.onClick?.(e)}};i(He,"template","baseui.AttachmentTrigger"),i(He,"components",{Button:S}),i(He,"props",{href:n(String),target:n(String),rel:n(String),type:n(String),className:n(String),style:n([String,Object]),"aria-label":n(String),ariaLabel:n(String),onClick:n(Function)});var Qo=class extends c{get classNames(){return m("b-attachment-group",this.props.className)}};i(Qo,"template","baseui.AttachmentGroup"),i(Qo,"props",{...p});var tr=class extends c{setup(){this.state=w({dragging:!1}),this.fileInput=L("fileInput")}get hasContent(){return!!this.props.slots?.default}get classNames(){return m("b-attachment-dropzone",this.state.dragging&&"b-attachment-dropzone-dragging",this.props.disabled&&"b-attachment-dropzone-disabled",this.props.className)}openPicker(){this.props.disabled||this.fileInput.el?.click()}onInputChange(e){let s=Array.from(e.target.files??[]);e.target.value="",s.length&&this.props.onFilesSelected?.(s)}onDragOver(e){e.preventDefault(),!this.props.disabled&&(this.state.dragging=!0)}onDragLeave(){this.state.dragging=!1}onDrop(e){if(e.preventDefault(),this.state.dragging=!1,this.props.disabled)return;let s=Array.from(e.dataTransfer?.files??[]);s.length&&this.props.onFilesSelected?.(s)}};i(tr,"template","baseui.AttachmentDropzone"),i(tr,"props",{multiple:n(Boolean),disabled:n(Boolean),...p,onFilesSelected:n(Function)});A();x();var er=class extends c{setup(){this.state=w({errored:!1})}get showImage(){return!!this.props.src&&!this.state.errored}onError(){this.state.errored=!0}};i(er,"template","baseui.Avatar"),i(er,"props",{src:n(String),alt:n(String),title:n(String),...p});A();x();var sr=class extends c{get classNames(){return m("b-message",this.props.className)}get side(){return this.props.side||"incoming"}};i(sr,"template","baseui.Message"),i(sr,"props",{side:n(String),...p});A();x();var or=class extends c{setup(){this.rootRef=L("root"),tt(()=>{this.props.autoscroll!==!1&&this.rootRef.el&&(this.rootRef.el.scrollTop=this.rootRef.el.scrollHeight)})}};i(or,"template","baseui.MessageScroller"),i(or,"props",{autoscroll:n(Boolean),...p});A();x();var rr=class extends c{setup(){this.state=w({index:0}),T({questionnaire:this.state,questionnaireShow:e=>this.show(e)})}show(e){this.state.index=Math.min(this.props.stepCount-1,Math.max(0,e)),this.props.onChange?.(this.state.index)}};i(rr,"template","baseui.Questionnaire"),i(rr,"props",{stepCount:{type:Number},onChange:n(Function),...p});var ir=class extends c{get active(){return this.props.state!==void 0?F(this.props.state):this.env.questionnaire.index===this.props.index}};i(ir,"template","baseui.QuestionnaireStep"),i(ir,"props",{index:{type:Number},state:n(String),...p});var We=class extends c{get disabled(){return this.env.questionnaire.index===0}onClick(){this.env.questionnaireShow(this.env.questionnaire.index-1)}};i(We,"template","baseui.QuestionnairePrevious"),i(We,"components",{Button:S}),i(We,"props",p);var Ke=class extends c{onClick(){this.env.questionnaireShow(this.env.questionnaire.index+1)}};i(Ke,"template","baseui.QuestionnaireNext"),i(Ke,"components",{Button:S}),i(Ke,"props",{...p,stepCount:n(Number)});A();x();var nr=class extends c{get max(){return this.props.max||100}get value(){return Math.min(this.max,Math.max(0,this.props.value||0))}get style(){return K(`--b-progress-value:${this.value/this.max*100}%`,this.props.style)}get classNames(){return m("progress b-progress",this.props.className)}};i(nr,"template","baseui.Progress"),i(nr,"props",{value:n(Number),max:n(Number),className:n(String),style:n([String,Object])});A();x();var ar=class extends c{get classNames(){return m("b-aspect-ratio",this.props.className)}get style(){let e=this.props.ratio||`${this.props.width||16} / ${this.props.height||9}`;return K(`--b-aspect-ratio:${e}`,this.props.style)}};i(ar,"template","baseui.AspectRatio"),i(ar,"props",{ratio:n(String),width:n(Number),height:n(Number),...p});A();x();var cr=class extends c{get classNames(){return m("b-bubble",this.props.className)}get side(){return this.props.side}};i(cr,"template","baseui.Bubble"),i(cr,"props",{side:n(String),...p});A();x();var lr=class extends c{get dir(){return this.props.dir==="rtl"?"rtl":"ltr"}};i(lr,"template","baseui.Direction"),i(lr,"props",{dir:n(String),...p});A();x();var ur=class extends c{get classNames(){return m("b-item",this.props.className)}get variant(){return this.props.variant}};i(ur,"template","baseui.Item"),i(ur,"props",{variant:n(String),...p});A();x();var pr=class extends c{get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("b-button-group",this.orientation==="vertical"?"btn-group-vertical":"btn-group",(this.props.size==="sm"||this.props.size==="lg")&&`btn-group-${this.props.size}`,this.props.className)}get ariaLabel(){return this.props["aria-label"]}get ariaLabelledby(){return this.props["aria-labelledby"]}};i(pr,"template","baseui.ButtonGroup"),i(pr,"props",{orientation:n(String),size:n(String),"aria-label":n(String),"aria-labelledby":n(String),...p});var dr=class extends c{get orientation(){return this.props.orientation==="horizontal"?"horizontal":"vertical"}get classNames(){return m("b-button-group-separator",`b-button-group-separator-${this.orientation}`,this.props.className)}};i(dr,"template","baseui.ButtonGroupSeparator"),i(dr,"props",{orientation:n(String),className:n(String),style:n([String,Object])});var hr=class extends c{get classNames(){return m("b-button-group-text",this.props.className)}};i(hr,"template","baseui.ButtonGroupText"),i(hr,"props",{...p});A();x();var br=class extends c{get classNames(){return m("b-field-set",this.props.className)}};i(br,"template","baseui.FieldSet"),i(br,"props",{...p});var mr=class extends c{get variant(){return this.props.variant||"legend"}get classNames(){return m("b-field-legend",this.props.className)}};i(mr,"template","baseui.FieldLegend"),i(mr,"props",{variant:n(String),...p});var oe=class extends c{get classNames(){return m("b-field-group",this.props.className)}};i(oe,"template","baseui.FieldGroup"),i(oe,"props",{...p});var re=class extends c{setup(){T({fieldProps:()=>this.props})}get orientation(){return this.props.orientation||"vertical"}get classNames(){return m("b-field",`b-field-orientation-${this.orientation}`,this.props.className)}};i(re,"template","baseui.Field"),i(re,"props",{orientation:n(String),invalid:n(Boolean),label:n(String),labelBackground:n(String),description:n(String),useTip:n(Number),error:n(String),...p});var fr=class extends c{get classNames(){return m("b-field-content",this.props.className)}};i(fr,"template","baseui.FieldContent"),i(fr,"props",{...p});var ie=class extends c{get classNames(){return m("b-field-label",this.props.className)}};i(ie,"template","baseui.FieldLabel"),i(ie,"props",{for:n(String),...p});var gr=class extends c{get classNames(){return m("b-field-title",this.props.className)}};i(gr,"template","baseui.FieldTitle"),i(gr,"props",{...p});var ne=class extends c{get classNames(){return m("b-field-description",this.props.className)}};i(ne,"template","baseui.FieldDescription"),i(ne,"props",{...p});var yr=class extends c{get hasContent(){return!!this.props.slots?.default}get classNames(){return m("b-field-separator",this.props.className)}};i(yr,"template","baseui.FieldSeparator"),i(yr,"props",{...p});var ae=class extends c{get classNames(){return m("b-field-error",this.props.className)}};i(ae,"template","baseui.FieldError"),i(ae,"props",{message:n(String),...p});function Zi(t){return`Icon${String(t).split("-").filter(Boolean).map(s=>s[0].toUpperCase()+s.slice(1)).join("")}`}A();x();var vr=class extends c{get classNames(){return m("form-label","b-label","b-label",this.props.className)}get state(){return this.props.state||(this.props.required?"required":void 0)}};i(vr,"template","baseui.Label"),i(vr,"props",{for:n(String),required:n(Boolean),state:n(String),...p});A();var Bl="b-theme",Il="theme",Rl="[b-theme-toggle]",$l="[b-theme-label]";function yi(t){return t==="dark"?"dark":"light"}function Ul(t){return typeof globalThis.location>"u"?null:new URLSearchParams(globalThis.location.search).get(t)}function ql(t,e=document.documentElement){let s=yi(t);return globalThis.thebase?.theme?.set?globalThis.thebase.theme.set(s):e&&(e.setAttribute("b-theme",s),e.setAttribute("data-bs-theme",s)),s}function ma(t,e,s){try{t.contentWindow?.BaseUI?.theme.set(e),t.contentDocument?.documentElement.setAttribute("b-theme",e),t.contentDocument?.documentElement.setAttribute("data-bs-theme",e)}catch{let o=new URL(t.getAttribute("src"),globalThis.location.href);o.searchParams.set(s,e),t.setAttribute("src",o.pathname+o.search+o.hash)}}function Pl(t){typeof document>"u"||typeof CustomEvent>"u"||document.dispatchEvent(new CustomEvent("baseui:theme-change",{detail:{theme:t}}))}function ce(t={}){let e=t.storageKey||Bl,s=t.queryKey||Il,o=t.toggleSelector??Rl,r=t.labelSelector??$l,a=t.root||(typeof document>"u"?null:document.documentElement);function l(){return Ul(s)}function u(){return yi(l()||globalThis.localStorage?.getItem(e)||a?.getAttribute("b-theme")||"light")}function d(k){typeof document>"u"||!o||document.querySelectorAll(o).forEach(y=>{y.setAttribute("aria-pressed",k==="dark"?"true":"false");let E=r?y.querySelector(r):null;E&&(E.textContent=k==="dark"?"Light theme":"Dark theme")})}function b(k){typeof document>"u"||document.querySelectorAll("iframe").forEach(y=>ma(y,k,s))}function f(k,y={}){let E=ql(k,a);return!y.skipStorage&&!l()&&globalThis.localStorage?.setItem(e,E),d(E),b(E),Pl(E),E}function g(){return f(a?.getAttribute("b-theme")==="dark"?"light":"dark")}function v(){if(typeof document>"u")return u();let k=u();return f(k,{skipStorage:!!l()}),o&&document.addEventListener("click",y=>{y.target.closest?.(o)&&g()}),document.querySelectorAll("iframe").forEach(y=>{y.addEventListener("load",()=>ma(y,a?.getAttribute("b-theme")||k,s))}),k}return{current:u,set:f,toggle:g,syncFrames:b,init:v}}var Ji=ce();typeof window<"u"&&(window.BaseUITheme=Ji);x();x();Br();var fa=["btn","b-theme-button",...Object.values(V),...Object.values(Z)];function Pr(t){let e=t==="dark";return{icon:e?"sun":"moon",label:e?"Switch to light theme":"Switch to dark theme",pressed:e?"true":"false"}}function vi({variant:t="outline",size:e,className:s}={}){return m("btn","b-theme-button",V[t]||V.outline,Z[e],s)}var St=class extends c{setup(){this.theme=ce({storageKey:G(this.props,"storage-key","storageKey")}),this.state=w({theme:this.theme.current()}),this.onThemeChange=e=>{this.state.theme=e.detail?.theme||this.theme.current()},R(()=>{this.state.theme=this.theme.set(this.theme.current(),{skipStorage:!0}),document.addEventListener("baseui:theme-change",this.onThemeChange)}),U(()=>document.removeEventListener("baseui:theme-change",this.onThemeChange))}get iconName(){return Pr(this.state.theme).icon}get baseUrl(){return G(this.props,"base-url")}get label(){return Pr(this.state.theme).label}get pressed(){return Pr(this.state.theme).pressed}get classNames(){return vi(this.props)}get attrs(){return{"b-theme-button":""}}onClick(){let e=this.theme.toggle();this.state.theme=e,this.props.onChange?.(e)}};i(St,"template","baseui.ThemeButton"),i(St,"components",{Icon:$,Button:S}),i(St,"props",{variant:n(String),size:n(String),"base-url":n(String),"storage-key":n(String),storageKey:n(String),className:n(String),style:n([String,Object]),onChange:n(Function)});A();x();var Ve=class extends c{get classNames(){return m("b-toggle","btn",this.props.variant==="outline"?"btn-outline-secondary":"btn-light",this.props.className)}get pressed(){return this.props.state!==void 0?F(this.props.state):!!this.props.pressed}onClick(){this.props.onChange?.(!this.pressed)}};i(Ve,"template","baseui.Toggle"),i(Ve,"components",{Button:S}),i(Ve,"props",{pressed:n(Boolean),state:n(String),variant:n(String),...p,onChange:n(Function)});A();x();var xr=class extends c{setup(){this.state=w({selected:new Set}),T({toggleGroup:this.state,toggleGroupSelect:e=>this.select(e)})}select(e){this.props.multiple?this.state.selected.has(e)?this.state.selected.delete(e):this.state.selected.add(e):this.state.selected=this.state.selected.has(e)?new Set:new Set([e]);let s=this.props.multiple?[...this.state.selected]:[...this.state.selected][0];this.props.onChange?.(s)}};i(xr,"template","baseui.ToggleGroup"),i(xr,"props",{multiple:n(Boolean),onChange:n(Function),...p});var Ge=class extends c{get pressed(){return this.env.toggleGroup.selected.has(this.props.value)}onClick(){this.env.toggleGroupSelect(this.props.value)}};i(Ge,"template","baseui.ToggleGroupItem"),i(Ge,"components",{Button:S}),i(Ge,"props",{value:{type:String},...p});A();x();A();x();Si();function Ai(t){let e=String(t??""),s=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!s)return{data:{},content:e};let o={};for(let r of s[1].split(/\r?\n/)){let a=r.trim();if(!a||a.startsWith("#"))continue;let l=a.indexOf(":");if(l===-1)continue;let u=a.slice(0,l).trim();u&&(o[u]=xu(a.slice(l+1).trim()))}return{data:o,content:e.slice(s[0].length)}}function Ca(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function xu(t){if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(",").map(s=>Ca(s.trim())):[]}return Ca(t)}var At=class extends c{setup(){this.rootRef=L("root"),this.editorRef=L("editor"),this.editorHandle=null,this.state=w({html:"",source:"",status:"loading",error:"",frontmatter:{}}),ot(()=>this.load(this.props)),z(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),R(()=>this.afterRender()),M(()=>this.afterRender()),ue(()=>{this.destroyEditor(),this.rootRef.el&&_r(this.rootRef.el)})}get classNames(){return m("b-markdown",this.props.className)}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.editable!==this.props.editable||e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let o=await fetch(e.src);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.text()}catch(o){this.state.status="error",this.state.error=o.message||String(o);return}try{this.state.source=s;let{data:o,content:r}=Ai(s);this.state.frontmatter=o,this.state.html=ii(await Zr(r)),this.state.status="ready"}catch(o){this.state.status="error",this.state.error=o.message||String(o)}}get hasFrontmatterMeta(){let e=this.state.frontmatter;return!!(e.tags?.length||e.authors?.length)}enhance(){let e=this.rootRef.el;!e||this.state.status!=="ready"||Jr(e,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Yr({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"b-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(s,o,r)=>{this.state.source=s,this.props.onChange?.(s,o,r)}})}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};i(At,"template","baseui.Markdown"),i(At,"components",{Badge:st}),i(At,"props",{content:n(String),src:n(String),mermaid:n(Boolean),baseUi:n(Boolean),editable:n(Boolean),collaborative:n(Boolean),room:n(String),password:n(String),signaling:n(Array),user:n(Object),onChange:n(Function),className:n(String),style:n([String,Object])});var La={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},wu=["POST","PUT","PATCH"];function wr(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function Xr(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function rn(){return!!(wr("apikey")||wr("oauthkey"))}function on(t){return t.example!==void 0?String(t.example):t.default!==void 0?String(t.default):t.enum?.length?String(t.enum[0]):t.type==="integer"||t.type==="number"?t.format==="int64"?"10":"1":t.type==="boolean"?"true":t.required&&t.in==="path"?"string":""}function nn(t,e){let s=wr("apikey"),o=wr("oauthkey");for(let r of t.security)r.type==="apiKey"&&r.in==="header"?e.header[r.name]=s:r.type==="apiKey"&&r.in==="query"?e.query[r.name]=s:r.type==="basic"?e.header.Authorization=s?`Basic ${s}`:"":(r.type==="oauth2"||r.type==="bearer")&&(e.header.Authorization=o?`Bearer ${o}`:"")}function ka(t,e){let s={baseUrl:e,path:{},query:{},header:{},bodyText:"",mimeType:t.consumes?.[0]||"application/json"};return t.parameters.path.forEach(o=>{s.path[o.name]=on(o)}),t.parameters.query.forEach(o=>{s.query[o.name]=o.required?on(o):""}),t.parameters.header.forEach(o=>{s.header[o.name]=o.required?on(o):""}),t.produces?.length&&(s.header.Accept=t.produces.includes("application/json")?"application/json":t.produces[0]),t.parameters.body&&(s.mimeType=t.parameters.body.contentType||s.mimeType,s.bodyText=an(t.parameters.body.example)),nn(t,s),s}function an(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function cn(t,e){let s=t.path;for(let[r,a]of Object.entries(e.path))s=s.replace(`{${r}}`,encodeURIComponent(a??""));let o=!!t.parameters.body&&wu.includes(t.method);return{method:t.method,url:`${e.baseUrl}${s}`,query:Object.entries(e.query).filter(([,r])=>r!==""),headers:Object.entries(e.header).filter(([,r])=>r!==""),bodyText:o?e.bodyText:"",mimeType:e.mimeType}}function Na(t){let e=t.query.length?`${t.url}?${new URLSearchParams(t.query)}`:t.url,s=Object.fromEntries(t.headers);return t.bodyText&&(s["Content-Type"]=s["Content-Type"]||t.mimeType),{url:e,headers:s,headerLines:Object.entries(s).map(([o,r])=>`${o}: ${r}`).join(`
|
|
47
|
-
`)}}async function Oa(t,e){let s=performance.now(),o=await fetch(e.url,{method:t.method,headers:e.headers,body:t.bodyText||void 0}),r=Math.round(performance.now()-s),a=await o.text();return{status:o.status,statusText:o.statusText,ms:r,headerLines:[...o.headers.entries()].map(([l,u])=>`${l}: ${u}`).join(`
|
|
48
|
-
`),bodyText:Su(a)}}function Su(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function Ta(t){let e=parseInt(t,10);return t==="default"||Number.isNaN(e)?"default":e<300?"2xx":e<400?"3xx":e<500?"4xx":"5xx"}function Ba(t,e,s){if(!t)return"";try{let o=new URL(e),r=new URL(s.derivedBaseUrl||s.baseUrl||e),a=new URL(t,`${o.href.replace(/\/$/,"")}/`);return a.host===r.host&&(a.protocol=o.protocol,a.username=o.username,a.password=o.password,a.host=o.host),a.href}catch{return String(t)}}function Ia(){return Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}function Ra({def:t,clientId:e,scopes:s,state:o,redirectUri:r,baseUrl:a,doc:l}){let u=new URL(Ba(t.authorizationUrl,a,l));return u.searchParams.set("response_type",t.flow==="implicit"?"token":"code"),e&&u.searchParams.set("client_id",e),u.searchParams.set("redirect_uri",r),s.length&&u.searchParams.set("scope",s.join(" ")),u.searchParams.set("state",o),u.toString()}async function $a(t,e,s,o){if(!t)throw new Error("No tokenUrl defined for this scheme.");let r=new URLSearchParams;for(let[u,d]of Object.entries(e))d&&r.set(u,d);let a=await fetch(Ba(t,s,o),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:r.toString()}),l=await a.json().catch(()=>({}));if(!a.ok||!l.access_token)throw new Error(l.error_description||l.error||`HTTP ${a.status}`);return l.access_token}function Ua(t,e,s){let o={client_id:e.clientId,client_secret:e.clientSecret,scope:s.join(" ")};return t==="password"?{grant_type:"password",username:e.username,password:e.password,...o}:{grant_type:"client_credentials",...o}}var Va;function rp(){return Va??(Va=Promise.resolve().then(()=>(Ka(),Wa)))}var ip=["curl","csharp","go","node","ruby","php"],np="(max-width: 1100px)";function Ga(t){return t==="DELETE"?"DEL":t}function ap(){let t=[...document.scripts].find(e=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(e.src));return t?`${t.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var Ct=class extends c{get children(){return this.props.groups.filter(e=>e.parent===this.props.group.name)}methodLabel(e){return Ga(e)}};i(Ct,"template","baseui.ApiDocGroup"),i(Ct,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});Ct.components={ApiDocGroup:Ct,Icon:$};var Et=class extends c{setup(){this.rootRef=L("root"),this.mainRef=L("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(np),this.state=w({status:"loading",error:"",current:"introduction",lang:this.props.language||"curl",sidebarOpen:!this.overlayQuery.matches,systemTheme:"light",themeOverride:"",drafts:{},snippet:"",result:null,respTab:0,respView:{},authOpen:!1,authed:rn(),stored:{apikey:"",oauthkey:""},inputs:{apikey:"",oauthkey:""},oauth:{},oauthStatus:{}}),this.onHashChange=()=>this.setCurrent(this.routeId()),this.onViewportChange=()=>{this.state.sidebarOpen=!this.overlayQuery.matches},this.onDocumentClick=e=>this.closeSidebarOnOutsideClick(e),this.onOAuthMessage=e=>this.handleOAuthMessage(e),this.onThemeChange=()=>this.readSystemTheme(),ot(()=>this.load(this.props)),z(e=>this.shouldReload(e)?this.load(e):void 0),R(()=>this.addListeners()),ue(()=>this.removeListeners())}get classNames(){return m("b-apidoc",this.props.className)}get rootStyle(){return K(this.props.height?`--b-apidoc-height:${this.props.height}`:"",this.props.style)}get theme(){return(this.props.theme==="light"||this.props.theme==="dark"?this.props.theme:"")||this.state.themeOverride||this.state.systemTheme}get title(){return this.props.title||this.doc?.info.title||"API Documentation"}get tryItEnabled(){return this.props.tryIt!==!1}get hasSecurity(){return this.props.authorize!==!1&&Object.keys(this.doc?.securityDefinitions||{}).length>0}get languages(){let e=this.logic?.LANGUAGES||[],s=this.props.languages;return s?.length?e.filter(o=>s.includes(o.id)):e}get currentLanguage(){return this.languages.find(e=>e.id===this.state.lang)||this.languages[0]}get op(){return this.state.current==="introduction"?null:this.doc.findOperation(this.state.current)}get draft(){return this.state.drafts[this.state.current]}get showTryIt(){return this.tryItEnabled&&!!this.op}get sidebarGroups(){let e=this.doc.groups.filter(s=>!s.parent);return this.doc.webhooks.length&&e.push({id:"webhooks",name:"Webhooks",items:this.doc.webhooks,kind:""}),e}get breadcrumb(){let e=this.op;if(!e)return[{label:"Home",id:"introduction",home:!0},{label:"Introduction"}];let s=this.doc.groups.find(o=>o.name===e.tag);return[{label:"Home",id:"introduction",home:!0},{label:this.title,id:"introduction"},{label:e.tag,id:s?s.items[0].id:"introduction"},{label:e.summary}]}get authSchemes(){return Object.entries(this.doc.securityDefinitions).map(([e,s])=>({key:e,def:s,scopes:Object.entries(s.scopes||{})}))}get serverOptions(){return this.doc.servers.length?this.doc.servers:[{url:this.doc.baseUrl,name:"",description:""}]}get tryItParams(){let{path:e,query:s,header:o}=this.op.parameters;return[...e.map(r=>({...r,group:"path"})),...s.map(r=>({...r,group:"query"})),...o.map(r=>({...r,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(e){return Ga(e)}statusClass(e){return Ta(e)}formatExample(e){return an(e)}serverLabel(e){let s=[e.name,e.description].filter(Boolean).join(" \u2014 ");return s?`${s} (${e.url})`:e.url}languageTone(e){return ip.includes(e)?e:"default"}encodingEntries(e){return Object.entries(e)}oauthFlowLabel(e){return La[e]||e||"unknown"}schemaRows(e){return this.rowsCache.has(e)||this.rowsCache.set(e,this.doc.schemaRows(e)),this.rowsCache.get(e)}depth(e){return(e.match(/\./g)||[]).length}lineNumbers(e){return String(e||"").split(`
|
|
49
|
-
`).map((s,o)=>o+1)}iconUrl(e){let s=this.props.assetBase??this.assetBase??(this.assetBase=ap());return s?`${s.replace(/\/$/,"")}/${e.icon}`:""}href(e){return this.props.hash?`#/${e}`:"#"}shouldReload(e){return e.src!==this.props.src||e.spec!==this.props.spec||e.serverUrl!==this.props.serverUrl}async load(e){this.state.status="loading";try{this.logic=await rp(),this.doc=e.spec?this.logic.buildOpenApiDoc(e.spec,e.serverUrl):await this.logic.loadOpenApiDoc(e.src,e.serverUrl)}catch(s){this.state.status="error",this.state.error=s.message||String(s),e.onError?.(s);return}this.state.drafts={},this.state.current=this.routeId(e),this.ensureDraft(),this.state.status="ready",this.updateSnippet(),e.onLoad?.(this.doc)}routeId(e=this.props){let s=e.hash?location.hash.replace(/^#\//,""):e.operation;return s&&this.doc.findOperation(s)?s:"introduction"}go(e,s){this.props.hash||(e.preventDefault(),this.setCurrent(s)),this.overlayQuery.matches&&(this.state.sidebarOpen=!1)}setCurrent(e){let s=this.state;s.current=e,s.result=null,s.respTab=0,s.respView={},this.ensureDraft(),this.updateSnippet(),this.mainRef.el&&(this.mainRef.el.scrollTop=0),this.props.onNavigate?.(e)}ensureDraft(){let e=this.op;e&&!this.state.drafts[e.id]&&(this.state.drafts[e.id]=ka(e,this.doc.baseUrl))}toggleSidebar(){this.state.sidebarOpen=!this.state.sidebarOpen}closeSidebarOnOutsideClick(e){!this.overlayQuery.matches||!this.state.sidebarOpen||e.target.closest?.(".sidebar-shell, .sidebar-toggle")||(this.state.sidebarOpen=!1)}selectResponse(e){this.state.respTab=Number(e)}setResponseView(e,s){this.state.respView[e]=s}setLanguage(e){this.state.lang=e,this.updateSnippet()}onBaseUrl(e){this.draft.baseUrl=e,this.updateSnippet()}onParam(e,s,o){this.draft[s][o]=e,this.updateSnippet()}onBody(e){this.draft.bodyText=e,this.updateSnippet()}async updateSnippet(){let e=this.op;if(!e||!this.tryItEnabled)return;let s=this.currentLanguage;try{this.state.snippet=await this.logic.generateSnippet(s.id,cn(e,this.draft))}catch(o){this.state.snippet=`// Could not generate ${s.label} snippet: ${o.message}`}}async send(){let e=this.op,s=cn(e,this.draft),o=Na(s),r={method:s.method,url:o.url,headerLines:o.headerLines,bodyText:s.bodyText};this.state.result={phase:"sending",sent:r};let a;try{a={phase:"done",sent:r,res:await Oa(s,o)}}catch(l){a={phase:"error",sent:r,message:l.message}}this.state.current===e.id&&(this.state.result=a)}clearResult(){this.state.result=null}collapseRequest(){this.rootRef.el.querySelectorAll(".tryit-card details").forEach((e,s)=>{s<3&&(e.open=!1)})}toggleTheme(){this.state.themeOverride=this.theme==="dark"?"light":"dark"}readSystemTheme(){let e=document.documentElement.getAttribute("data-bs-theme"),s=e?e==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches;this.state.systemTheme=s?"dark":"light"}openAuth(){var s;let e=this.state;e.stored.apikey=wr("apikey"),e.stored.oauthkey=wr("oauthkey"),e.inputs.apikey=e.stored.apikey,e.inputs.oauthkey=e.stored.oauthkey;for(let{key:o,def:r}of this.authSchemes)(s=e.oauth)[o]??(s[o]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(r.scopes||{})});e.authOpen=!0}closeAuth(){this.state.authOpen=!1}setAuthOpen(e){this.state.authOpen=e}setAuthInput(e,s){this.state.inputs[e]=s}setField(e,s,o){e[s]=o}saveAuth(){Xr("apikey",this.state.inputs.apikey.trim()),Xr("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(e){Xr(e,""),this.state.stored[e]="",this.state.inputs[e]="",this.applyAuthToAll()}applyAuthToAll(){for(let[e,s]of Object.entries(this.state.drafts))nn(this.doc.findOperation(e),s);this.state.authed=rn(),this.updateSnippet()}toggleScope(e,s){let o=this.state.oauth[e].scopes,r=o.indexOf(s);r<0?o.push(s):o.splice(r,1)}setOAuthStatus(e,s,o=!1){this.state.oauthStatus[e]={message:s,isError:o}}applyOAuthToken(e,s,o){Xr("oauthkey",s),this.state.stored.oauthkey=s,this.state.inputs.oauthkey=s,Object.assign(this.state.oauth[e],{clientId:o.clientId,clientSecret:o.clientSecret}),this.applyAuthToAll(),this.setOAuthStatus(e,"Token acquired.")}async fetchToken(e,s,o){try{let r=await $a(this.doc.securityDefinitions[e].tokenUrl,s,this.selectedBaseUrl,this.doc);this.applyOAuthToken(e,r,o)}catch(r){this.setOAuthStatus(e,`Token request failed: ${r.message}. This is usually a CORS restriction on the auth server.`,!0)}}startOAuth2Flow(e){let s=this.doc.securityDefinitions[e],o=this.state.oauth[e],r=[...o.scopes];if(s.flow==="implicit"||s.flow==="accessCode")return this.openOAuthPopup(e,s,o,r);if(s.flow==="password"||s.flow==="application")return this.setOAuthStatus(e,"Requesting token\u2026"),this.fetchToken(e,Ua(s.flow,o,r),o);this.setOAuthStatus(e,`Unsupported OAuth2 flow: ${s.flow}`,!0)}openOAuthPopup(e,s,o,r){if(!s.authorizationUrl)return this.setOAuthStatus(e,"No authorizationUrl defined for this scheme.",!0);let a=Ia(),l=Ra({def:s,clientId:o.clientId,scopes:r,state:a,redirectUri:this.redirectUri,baseUrl:this.selectedBaseUrl,doc:this.doc}),u=window.open(l,`oauth2-authorize-${e}`,"width=560,height=680");if(!u)return this.setOAuthStatus(e,"Popup blocked \u2014 allow popups for this site and try again.",!0);this.pendingOAuth.set(a,{key:e,flow:s.flow,fields:{...o}}),this.setOAuthStatus(e,"Waiting for authorization in the popup\u2026"),this.watchPopup(u,a,e)}watchPopup(e,s,o){let r=setInterval(()=>{e.closed&&(clearInterval(r),this.watchers.delete(r),this.pendingOAuth.delete(s)&&this.setOAuthStatus(o,"Authorization window was closed before completing.",!0))},500);this.watchers.add(r)}get redirectUri(){return this.props.oauthRedirectUri||new URL("oauth2-redirect.html",document.baseURI).href}handleOAuthMessage(e){let s=e.data;if(e.origin!==window.location.origin||s?.source!=="oauth2-redirect")return;let o=this.pendingOAuth.get(s.state);if(!o)return;this.pendingOAuth.delete(s.state);let{key:r,flow:a,fields:l}=o;if(s.error)return this.setOAuthStatus(r,`Authorization failed: ${s.error}${s.errorDescription?" - "+s.errorDescription:""}`,!0);if(a==="implicit")return s.accessToken?this.applyOAuthToken(r,s.accessToken,l):this.setOAuthStatus(r,"Authorization server did not return an access token.",!0);if(!s.code)return this.setOAuthStatus(r,"Authorization server did not return a code.",!0);this.setOAuthStatus(r,"Exchanging code for token\u2026"),this.fetchToken(r,{grant_type:"authorization_code",code:s.code,redirect_uri:this.redirectUri,client_id:l.clientId,client_secret:l.clientSecret},l)}addListeners(){this.readSystemTheme(),this.themeObserver=new MutationObserver(this.onThemeChange),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-bs-theme"]}),window.addEventListener("hashchange",this.onHashChange),window.addEventListener("message",this.onOAuthMessage),document.addEventListener("click",this.onDocumentClick),this.overlayQuery.addEventListener("change",this.onViewportChange)}removeListeners(){this.themeObserver?.disconnect(),window.removeEventListener("hashchange",this.onHashChange),window.removeEventListener("message",this.onOAuthMessage),document.removeEventListener("click",this.onDocumentClick),this.overlayQuery.removeEventListener("change",this.onViewportChange),this.watchers.forEach(clearInterval)}};i(Et,"template","baseui.ApiDoc"),i(Et,"components",{ApiDocGroup:Ct,Markdown:At,Badge:st,Breadcrumb:Gt,BreadcrumbItem:Jt,BreadcrumbLink:Yt,BreadcrumbList:Zt,BreadcrumbPage:Xt,BreadcrumbSeparator:yt,Button:S,Checkbox:Dt,Dialog:$t,DialogContent:bt,DialogDescription:_t,DialogFooter:qt,DialogHeader:Ut,DialogTitle:Pt,Icon:$,Input:Ot,NativeSelect:zt,TabContent:Rt,Tabs:Tt,TabsContainer:Bt,TabsList:It,TabTrigger:ht,Textarea:jt}),i(Et,"props",{src:n(String),spec:n(Object),title:n(String),serverUrl:n(String),theme:n(String),themeToggle:n(Boolean),hash:n(Boolean),operation:n(String),tryIt:n(Boolean),authorize:n(Boolean),languages:n(Array),language:n(String),assetBase:n(String),oauthRedirectUri:n(String),height:n(String),onLoad:n(Function),onError:n(Function),onNavigate:n(Function),className:n(String),style:n([String,Object])});A();x();function Ni(t,e){if(!t)return null;if(t.type==="file"&&(t.path===e||t.meta?.slug===e))return t;for(let s of t.children||[]){let o=Ni(s,e);if(o)return o}return null}function cp(t){return t.replace(/\.[^./]+$/,"").replace(/[_-]+/g," ").trim().split(/\s+/).map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}var jr=class jr extends c{get label(){let e=this.props.node.meta;return e?.sidebar_label||e?.title||cp(this.props.node.name)}get hasSubfolders(){return(this.props.node.children||[]).some(e=>e.type==="dir")}select(e){this.props.onSelect(e)}};i(jr,"template","baseui.MarkdownTreeNode"),i(jr,"components",{MarkdownTreeNode:jr,Icon:$,SidebarGroupLabel:ee,SidebarMenu:wt,SidebarMenuItem:se,SidebarMenuButton:vt,DropdownMenu:Ft,DropdownMenuTrigger:mt,DropdownMenuContent:Ht,DropdownMenuItem:Wt,DropdownMenuSub:Kt,DropdownMenuSubTrigger:ft,DropdownMenuSubContent:Vt}),i(jr,"props",{node:{type:Object},activePath:n(String),onSelect:{type:Function},nested:n(Boolean)});var zr=jr,Ze=class extends c{setup(){this.state=w({tree:null,status:"loading",error:""}),ot(()=>this.load())}async load(){this.state.status="loading",this.state.error="";try{let e=await fetch(this.props.src);if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);this.state.tree=await e.json(),this.state.status="ready"}catch(e){this.state.status="error",this.state.error=e.message||String(e)}}};i(Ze,"template","baseui.MarkdownTree"),i(Ze,"components",{MarkdownTreeNode:zr,SidebarGroup:te,SidebarMenu:wt}),i(Ze,"props",{src:{type:String},activePath:n(String),onSelect:{type:Function},className:n(String),style:n([String,Object])});A();function Za(t=document.querySelector("[b-block-code-template]")){let o=((t?.tagName==="SCRIPT"?t.textContent:t?.innerHTML)?.replace(/^\n/,"").replace(/\s+$/,"")||"").split(`
|
|
50
|
-
`),r=o.filter(l=>l.trim()).map(l=>l.match(/^\s*/)?.[0].length||0),a=r.length?Math.min(...r):0;return o.map(l=>l.slice(a)).join(`
|
|
51
|
-
`)}function Ja(t,e=0){let s=" ".repeat(e),o=[];for(let r of t.childNodes){if(r.nodeType===Node.TEXT_NODE){let u=r.textContent.trim();u&&o.push(`${s}${u}`);continue}if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=[...r.attributes].map(u=>` ${u.name}="${u.value}"`).join("");if(![...r.childNodes].some(u=>u.nodeType===Node.ELEMENT_NODE||u.nodeType===Node.TEXT_NODE&&u.textContent.trim())){o.push(`${s}<${r.localName}${a}>${r.textContent.trim()}</${r.localName}>`);continue}o.push(`${s}<${r.localName}${a}>`),o.push(...Ja(r,e+1)),o.push(`${s}</${r.localName}>`)}return o}async function Ya(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:o}=await Promise.resolve().then(()=>(Si(),Ea)),r=document.createElement("div");return r.innerHTML=e(t),o(r,s(t)),Ja(r).join(`
|
|
52
|
-
`)}function Xa(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),o=e.querySelector("[b-block-sidebar]");!s||!o||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let r=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",r?"open":"collapsed"),s.setAttribute("aria-expanded",r?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",o=>{o.preventDefault();let r=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",r?"open":"collapsed"),s.setAttribute("aria-expanded",r?"true":"false")}))})}x();var Oi=ce({storageKey:"b-example-theme",toggleSelector:"",labelSelector:""}),lp=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],up={desktop:"",tablet:"768px",mobile:"390px"},pp="/dist/icons/lucide";function dp(){return document.querySelector("[b-block-code-template]")}function hp(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function bp(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",pp)}var Je=class extends c{setup(){this.navItems=this.props.navItems||lp,this.previewFrame=L("previewFrame"),this.embedRoot=L("embedRoot"),this.code=Za(),this.state=w({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),R(()=>this.mountPreview()),M(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await Ya(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=up[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=dp();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),Xa(e)}}async mountOwlPreview(e,s){e.replaceChildren();class o extends c{setup(){this.state=w({collapsed:!1})}}i(o,"template","examples.SidebarBlock");let r=[await le("/dist/baseui.templates.xml"),s.textContent].map(hp).join(`
|
|
53
|
-
`);await os(o,e,{templates:`<templates>${r}</templates>`}),Oi.set(Oi.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){bp(e),globalThis.thebase?.mountAll(e),Oi.set(Oi.current(),{skipStorage:!0})}};i(Je,"template","baseui.BlockViewer"),i(Je,"components",{Button:S,Icon:$,ThemeButton:St}),i(Je,"props",{navItems:n(Array)});A();x();var Sr=class extends c{setup(){this.pwaState=w({open:j(this.props)}),T({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),Y(this.pwaState)}setOpen(e){X(this.props,this.pwaState,e)}};i(Sr,"template","baseui.Pwa"),i(Sr,"props",{open:n(Boolean),"default-open":n(Boolean),defaultOpen:n(Boolean),onOpenChange:n(Function),slots:n(Object)});var Ye=class extends c{onClick(){this.env.setPwaOpen(!0)}};i(Ye,"template","baseui.PwaTrigger"),i(Ye,"components",{Button:S}),i(Ye,"props",p);var Ar=class extends c{setup(){this.rootRef=L("root"),tt(e=>{if(!e)return;let s=document.activeElement;return $r(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};i(Ar,"template","baseui.PwaContent"),i(Ar,"props",p);var Er=class extends c{};i(Er,"template","baseui.PwaHeader"),i(Er,"props",p);var Cr=class extends c{};i(Cr,"template","baseui.PwaTitle"),i(Cr,"props",p);var Lr=class extends c{};i(Lr,"template","baseui.PwaDescription"),i(Lr,"props",p);var kr=class extends c{};i(kr,"template","baseui.PwaBody"),i(kr,"props",p);var Nr=class extends c{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};i(Nr,"template","baseui.PwaSteps"),i(Nr,"props",{...p,steps:n(Array)});var Or=class extends c{};i(Or,"template","baseui.PwaFooter"),i(Or,"props",p);var Xe=class extends c{onClick(){this.env.setPwaOpen(!1)}};i(Xe,"template","baseui.PwaClose"),i(Xe,"components",{Button:S}),i(Xe,"props",p);A();x();var Qa="",tc="";function ec(t,e){return typeof t=="string"?t:e}function mp(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var Qe=class extends c{setup(){this.state=w({title:ec(this.props.title,Qa),description:ec(this.props.description,tc),submitted:!1})}get classNames(){return m("b-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return mp(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=Qa,this.state.description=tc,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};i(Qe,"template","baseui.Form"),i(Qe,"components",{Button:S,Field:re,FieldDescription:ne,FieldError:ae,FieldGroup:oe,FieldLabel:ie}),i(Qe,"props",{title:n(String),description:n(String),titlePlaceholder:n(String),descriptionPlaceholder:n(String),maxDescriptionLength:n(Number),className:n(String),style:n([String,Object]),onSubmit:n(Function)});A();x();var gn;function fp(){return gn??(gn=import("./runtime/milkdown/milkdown-text-editor.js")),gn}async function Ti(t){return(await fp()).createMilkdownTextEditor(t)}function Bi({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var Tr=class extends c{setup(){this.editorRef=L("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=w({content:"",status:"loading",error:""}),ot(()=>this.load(this.props)),z(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),R(()=>this.mountEditor()),M(()=>this.mountEditor()),ue(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){return m("b-text-editor",this.props.className)}get isCollaborative(){return Bi({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let o=await fetch(e.src);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.text()}catch(o){this.state.status="error",this.state.error=o.message||String(o);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let o=await Ti({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"b-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(r,a,l)=>{this.state.content=r,this.props.onChange?.(r,a,l)}});if(s!==this.mountToken){o.destroy?.();return}this.editorHandle=o}catch(o){s===this.mountToken&&(this.state.status="error",this.state.error=o.message||String(o))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};i(Tr,"template","baseui.TextEditor"),i(Tr,"props",{content:n(String),src:n(String),placeholder:n(String),collaborative:n(Boolean),provider:n(String),room:n(String),url:n(String),password:n(String),signaling:n(Array),user:n(Object),onChange:n(Function),className:n(String),style:n([String,Object])});C();function gp(t){let{open:e,close:s,destroy:o}=fi(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{o(),delete t.BaseUIAlertDialog}}}h.register("alert-dialog",{type:"owl",mount:gp});C();var yn={default:"b-alert-default",destructive:"b-alert-destructive",info:"b-alert-default",success:"alert-success",warning:"alert-warning",danger:"b-alert-destructive"};function yp(t){t.classList.add("alert","b-alert",yn[t.getAttribute("b-att-variant")||"default"]||yn.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let o=document.createElement("button");o.type="button",o.className="btn-close",o.setAttribute("data-bs-dismiss","alert"),o.setAttribute("aria-label","Close"),t.appendChild(o)}e=new(N()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","b-alert","alert-dismissible","fade","show",...Object.values(yn))}}}h.register("alert",{type:"static",mount:yp});A();C();function sc(t,e){return t.getAttribute(e)!=="false"}function vp(t){let e=t.getAttribute("b-att-templates");if(e)return e;let s=[...document.scripts].find(o=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(o.src));return s?s.src.replace(/[?#].*$/,"").replace(/[^/]*$/,"baseui.templates.xml"):"/dist/baseui.templates.xml"}function xp(t){let e=(o,r)=>t.dispatchEvent(new CustomEvent(`baseui:${o}`,{bubbles:!0,detail:r})),s=t.getAttribute("b-att-languages");return{src:t.getAttribute("b-att-src")||void 0,title:t.getAttribute("b-att-title")||void 0,serverUrl:t.getAttribute("b-att-server-url")||void 0,theme:t.getAttribute("b-att-theme")||void 0,themeToggle:t.getAttribute("b-att-theme-toggle")==="true",hash:t.getAttribute("b-att-hash")==="true",operation:t.getAttribute("b-att-operation")||void 0,tryIt:sc(t,"b-att-try-it"),authorize:sc(t,"b-att-authorize"),languages:s?s.split(",").map(o=>o.trim()).filter(Boolean):void 0,language:t.getAttribute("b-att-language")||void 0,assetBase:t.getAttribute("b-att-asset-base")??void 0,oauthRedirectUri:t.getAttribute("b-att-oauth-redirect-uri")||void 0,height:t.getAttribute("b-att-height")||void 0,onLoad:o=>e("load",{info:o.info,operations:o.groups.flatMap(r=>r.items).length}),onError:o=>e("error",{error:o}),onNavigate:o=>e("navigate",{id:o})}}function wp(t){let e=xp(t),s=le(vp(t)).then(o=>os(Et,t,{templates:o,props:e}));return{destroy:async()=>{(await s).destroy()}}}h.register("apidoc",{type:"owl",mount:wp});C();function Sp(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",o=new Map,r=new Map,a=new Map,l=(u,d)=>{let b=u.querySelector("[b-accordion-trigger]");u.setAttribute("b-att-state",d?"open":"closed"),b?.setAttribute("aria-expanded",String(d)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:d}}))};return t.setAttribute("role","presentation"),t.classList.add("accordion"),e.forEach((u,d)=>{let b=u.querySelector("[b-accordion-trigger]"),f=u.querySelector("[b-accordion-panel]");if(!f)return;u.classList.add("accordion-item"),b?.classList.add("accordion-button"),f.classList.add("accordion-collapse");let g=f.id||`b-accordion-panel-${d}`;f.id=g;let v=u.getAttribute("b-att-state")==="open";f.classList.add("collapse"),v&&f.classList.add("show");let k=new(N()).Collapse(f,{toggle:!1});a.set(u,k);let y=()=>l(u,!0),E=()=>l(u,!1);f.addEventListener("shown.bs.collapse",y),f.addEventListener("hidden.bs.collapse",E),r.set(u,{onShown:y,onHidden:E}),b?.setAttribute("aria-expanded",String(v)),b?.setAttribute("aria-controls",g);let O=()=>{let P=f.classList.contains("show");!s&&!P&&e.forEach(B=>{if(B===u)return;let W=a.get(B),et=B.querySelector("[b-accordion-panel]");W&&et?.classList.contains("show")&&W.hide()}),P?k.hide():k.show()};o.set(u,O),b?.addEventListener("click",O)}),{destroy:()=>{e.forEach(u=>{let d=u.querySelector("[b-accordion-trigger]"),b=u.querySelector("[b-accordion-panel]");d?.removeEventListener("click",o.get(u));let f=r.get(u);b&&f&&(b.removeEventListener("shown.bs.collapse",f.onShown),b.removeEventListener("hidden.bs.collapse",f.onHidden)),a.get(u)?.dispose()}),o.clear(),r.clear(),a.clear()}}}h.register("accordion",{type:"owl",mount:Sp});C();function Ap(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("b-aspect-ratio"),t.style.setProperty("--b-aspect-ratio",e),{destroy:()=>t.classList.remove("b-aspect-ratio")}}h.register("aspect-ratio",{type:"static",mount:Ap});C();Br();var Ep=["idle","uploading","processing","error","done"],Cp=["default","sm","xs"],Lp=["content","title","description","actions"];function oc(t,e){t.classList.add(`b-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function kp(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),o=Ep.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",r=Cp.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("b-attachment"),t.classList.add(`b-attachment-${o}`,`b-attachment-${r}`,`b-attachment-${a}`),t.setAttribute("data-state",o),t.setAttribute("data-size",r),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("b-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(u=>{let d=u.getAttribute("b-att-variant")==="image"?"image":"icon";oc(u,"media"),u.classList.add(`b-attachment-media-${d}`),u.setAttribute("data-variant",d)}),Lp.forEach(u=>t.querySelectorAll(`[b-attachment-${u}]`).forEach(d=>oc(d,u))),t.querySelectorAll("[b-attachment-action]").forEach(u=>{let d=V[u.getAttribute("b-att-variant")]||V.ghost,b=Z[u.getAttribute("b-att-size")]||Z["icon-xs"];u.classList.add("btn","b-button",d,b,"b-button-icon","b-attachment-action"),u.setAttribute("data-slot","attachment-action"),!u.getAttribute("type")&&u.tagName==="BUTTON"&&u.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(u=>{u.classList.add("b-attachment-trigger"),u.setAttribute("data-slot","attachment-trigger"),!u.getAttribute("type")&&u.tagName==="BUTTON"&&u.setAttribute("type","button")}),e?.classList.add("form-control");let l=()=>{s&&(s.innerHTML=[...e.files].map(u=>`<li>${u.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",l),{destroy:()=>e?.removeEventListener("change",l)}}function Np(t){return t.classList.add("b-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("b-attachment-group")}}function Op(t){let e=t.querySelector("input[type='file']");t.classList.add("b-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),o=d=>{d.preventDefault(),t.classList.add("b-attachment-dropzone-dragging")},r=()=>t.classList.remove("b-attachment-dropzone-dragging"),a=d=>{d.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:d}}))},l=d=>{d.preventDefault(),t.classList.remove("b-attachment-dropzone-dragging"),a([...d.dataTransfer?.files??[]])},u=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",o),t.addEventListener("dragleave",r),t.addEventListener("drop",l),e?.addEventListener("change",u),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",o),t.removeEventListener("dragleave",r),t.removeEventListener("drop",l),e?.removeEventListener("change",u)}}}h.register("attachment",{type:"owl",mount:kp});h.register("attachment-group",{type:"static",mount:Np});h.register("attachment-dropzone",{type:"static",mount:Op});C();function Tp(t){t.classList.add("b-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let o=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",o),{destroy:()=>e.removeEventListener("error",o)}}return{}}h.register("avatar",{type:"static",mount:Tp});C();function Bp(t){let e=as[t.getAttribute("b-att-variant")||"secondary"]||as.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(as))}}h.register("badge",{type:"static",mount:Bp});C();lt();function rc(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .b-breadcrumb-separator"))}function nc(t,e,s){return D(t,e,{size:s}),t}function Ip(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="b-breadcrumb-separator",e.className="b-breadcrumb-separator-icon",t.append(nc(e,"chevron-right","var(--b3_5)")),t}function Rp(t){t.classList.add("b-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function $p(t){if(t.classList.add("b-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".b-icon")){let e=document.createElement("span");e.className="b-breadcrumb-ellipsis-icon",t.prepend(nc(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function ic(t){t.classList.add("b-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Up(t){let e=t.querySelector("ol, ul")||t;t.classList.add("b-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","b-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let o of e.querySelectorAll("[b-breadcrumb-separator], .b-breadcrumb-separator"))Rp(o);for(let o of e.querySelectorAll("[b-breadcrumb-ellipsis], .b-breadcrumb-ellipsis"))$p(o);for(let o of e.querySelectorAll("[b-breadcrumb-page], .b-breadcrumb-page"))ic(o);e.querySelector("[b-breadcrumb-separator], .b-breadcrumb-separator")||rc(e).slice(0,-1).forEach(r=>r.after(Ip()));let s=rc(e);return s.forEach((o,r)=>{o.classList.add("b-breadcrumb-item"),o.setAttribute("data-slot",o.getAttribute("data-slot")||"breadcrumb-item");for(let a of o.querySelectorAll("a"))a.classList.add("b-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(r===s.length-1){let a=o.querySelector("[b-breadcrumb-page], .b-breadcrumb-page");a?ic(a):(o.classList.add("b-breadcrumb-page"),o.setAttribute("aria-current",o.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("b-breadcrumb"),e.classList.remove("breadcrumb","b-breadcrumb-list");for(let o of e.querySelectorAll("[b-breadcrumb-separator]"))o.remove()}}}h.register("breadcrumb",{type:"owl",mount:Up});C();function qp(t){return t.classList.add("b-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("b-bubble")}}h.register("bubble",{type:"static",mount:qp});C();lt();Br();function Pp(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function _p(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",o=!!t.textContent.trim(),r=e&&o?Pp(t):[],a=null;return t.classList.add("btn","b-button",V[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),Z[t.getAttribute("b-att-size")]&&t.classList.add(Z[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,D(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,o||(t.dataset.iconOnly="true",t.classList.add("b-button-icon"))),{destroy:()=>{a?.remove();for(let l of r)l.replaceWith(document.createTextNode(l.textContent));t.classList.remove("btn","b-button","b-button-icon",...Object.values(V),...Object.values(Z)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}h.register("button",{type:"static",mount:_p});C();function Mp(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),o=[...t.querySelectorAll("[b-button-group-separator]")],r=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("b-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),o.forEach(a=>{let l=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("b-button-group-separator",`b-button-group-separator-${l}`),a.setAttribute("data-orientation",l),a.setAttribute("role","separator")}),r.forEach(a=>{a.classList.add("b-button-group-text")}),{destroy:()=>{t.classList.remove("b-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}h.register("button-group",{type:"static",mount:Mp});C();var jp=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function zp(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,o=Number(t.getAttribute("b-att-year")??e.getFullYear()),r=new Date(o,s,1),a=new Date(o,s+1,0).getDate(),l=r.getDay();t.classList.add("b-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
|
|
54
|
-
<div class="b-calendar__header">${jp.format(r)}</div>
|
|
55
|
-
<div class="b-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(b=>`<span>${b}</span>`).join("")}</div>
|
|
56
|
-
<div b-calendar-grid class="b-calendar__grid"></div>
|
|
57
|
-
`);let u=t.querySelector("[b-calendar-grid]");u.innerHTML="";for(let b=0;b<l;b+=1)u.append(document.createElement("span"));for(let b=1;b<=a;b+=1){let f=document.createElement("button"),g=`${o}-${String(s+1).padStart(2,"0")}-${String(b).padStart(2,"0")}`;f.type="button",f.textContent=String(b),f.setAttribute("b-att-value",g),f.setAttribute("aria-pressed",String(g===t.getAttribute("b-att-selected"))),u.append(f)}let d=b=>{let f=b.target.closest("button[b-att-value]");f&&(t.setAttribute("b-att-selected",f.getAttribute("b-att-value")),u.querySelectorAll("button").forEach(g=>g.setAttribute("aria-pressed",String(g===f))),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:f.getAttribute("b-att-value")}})))};return u.addEventListener("click",d),{destroy:()=>u.removeEventListener("click",d)}}h.register("calendar",{type:"owl",mount:zp});C();function Dp(t){return t.classList.add("card","b-card"),t.querySelector("[b-card-header]")?.classList.add("card-header"),t.querySelector("[b-card-body]")?.classList.add("card-body"),t.querySelector("[b-card-footer]")?.classList.add("card-footer"),{destroy:()=>t.classList.remove("card","b-card")}}h.register("card",{type:"static",mount:Dp});C();function Fp(t){let e=[...t.querySelectorAll("[b-carousel-slide]")],s=t.querySelector("[b-carousel-prev]"),o=t.querySelector("[b-carousel-next]");if(t.classList.add("carousel","slide"),e.length&&!e[0].parentElement.classList.contains("carousel-inner")){let b=document.createElement("div");b.classList.add("carousel-inner"),e[0].before(b),e.forEach(f=>b.appendChild(f))}let r=Math.max(0,e.findIndex(b=>b.getAttribute("b-att-state")==="active"));e.forEach((b,f)=>{b.classList.add("carousel-item"),f===r&&b.classList.add("active"),b.setAttribute("b-att-state",f===r?"active":"inactive")});let a=e.length?new(N()).Carousel(t,{interval:!1,wrap:!0,touch:!0}):null,l=b=>{e.forEach((f,g)=>{f.setAttribute("b-att-state",g===b.to?"active":"inactive")}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:b.to}}))};t.addEventListener("slid.bs.carousel",l);let u=()=>a?.prev(),d=()=>a?.next();return s?.addEventListener("click",u),o?.addEventListener("click",d),{destroy:()=>{s?.removeEventListener("click",u),o?.removeEventListener("click",d),t.removeEventListener("slid.bs.carousel",l),a?.dispose()}}}h.register("carousel",{type:"owl",mount:Fp});C();function ac(t,e,s=0){let o=Number(t.getAttribute(e));return Number.isFinite(o)?o:s}function Hp(t){let e=t.getAttribute("b-att-config")||t.querySelector("script[type='application/json']")?.textContent;if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Wp(t,e){let s=globalThis.getComputedStyle(t),o=[1,2,3,4,5].map(l=>s.getPropertyValue(`--b-chart-${l}`).trim()),r=s.getPropertyValue("--b-muted-foreground").trim(),a=s.getPropertyValue("--b-chart-grid").trim()||s.getPropertyValue("--b-border").trim();return e.options={maintainAspectRatio:!1,plugins:{legend:{labels:{boxWidth:8,boxHeight:8,color:r,font:{size:12}}},tooltip:{titleFont:{size:12},bodyFont:{size:12},cornerRadius:10,padding:10},...e.options?.plugins||{}},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:r,font:{size:12}}},y:{border:{display:!1},grid:{color:a},ticks:{color:r,font:{size:12}}},...e.options?.scales||{}},...e.options},e.data?.datasets?.forEach((l,u)=>{l.backgroundColor||(l.backgroundColor=o[u%o.length]),l.borderColor||(l.borderColor=o[u%o.length]),l.borderRadius??(l.borderRadius=4)}),e}function Kp(t,e,s){if(t.querySelector("[b-chart-tooltip]"))return;let o=document.createElement("span");o.setAttribute("b-chart-tooltip",""),o.textContent=`${e}: ${s}`,t.append(o)}function Vp(t){t.classList.add("b-chart"),t.setAttribute("role",t.getAttribute("role")||"figure");let e=t.querySelector("canvas"),s=null;if(e&&globalThis.Chart){let a=Hp(t);a&&(s=new globalThis.Chart(e,Wp(t,a)))}let o=[...t.querySelectorAll("[b-att-value]")],r=Math.max(1,...o.map(a=>ac(a,"b-att-value")));return o.forEach((a,l)=>{let u=ac(a,"b-att-value"),d=a.getAttribute("b-att-label")||a.textContent.trim()||`Series ${l+1}`,b=Math.max(0,Math.min(100,u/r*100));a.style.setProperty("--b-chart-value",`${b}%`),a.style.setProperty("--b-chart-index",String(l%5+1)),a.style.setProperty("--b-chart-color",`var(--b-chart-${l%5+1})`),a.setAttribute("role",a.getAttribute("role")||"listitem"),a.setAttribute("aria-label",a.getAttribute("aria-label")||`${d} ${u}`),Kp(a,d,u)}),[...t.querySelectorAll("[b-chart-series], [b-chart-legend] > *")].forEach((a,l)=>{a.style.setProperty("--b-chart-color",a.style.getPropertyValue("--b-chart-color")||`var(--b-chart-${l%5+1})`)}),{destroy:()=>{s?.destroy?.(),t.classList.remove("b-chart")}}}h.register("chart",{type:"static",mount:Vp});C();function Ri(t,e){let s=t.matches("input")?t:t.querySelector(`input[type='${e}']`),o=t.matches("input")?t.closest("label, .form-check"):t;return s?.classList.add("form-check-input"),o?.classList.add("form-check","b-check"),{destroy:()=>{s?.classList.remove("form-check-input"),o?.classList.remove("form-check","b-check")}}}h.register("checkbox",{type:"static",mount:t=>Ri(t,"checkbox")});C();lt();ui();function Gp(t){let e=t.getAttribute("b-att-value");if(e!==null)return e;let s=t.getAttribute("b-att-target");if(s){let o=document.querySelector(s);if(o)return o.textContent??""}return t.textContent??""}function Zp(t){t.classList.remove(...Fi),t.className=`${t.className} ${li({variant:t.getAttribute("b-att-variant")||"default",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button";let e=t.querySelector("[b-clipboard-button-icon]");e||(e=document.createElement("span"),e.setAttribute("b-clipboard-button-icon",""),t.prepend(e));let s=t.getAttribute("b-att-icon")||"copy",o=t.getAttribute("b-att-copied-icon")||"check";D(e,s,{label:""});let r=null,a=async()=>{if(t.disabled)return;let l=Gp(t);try{await Ir(l),D(e,o,{label:""}),t.setAttribute("data-copied","true"),t.dispatchEvent(new CustomEvent("baseui:clipboard-copy",{bubbles:!0,detail:{value:l}})),window.clearTimeout(r),r=window.setTimeout(()=>{D(e,s,{label:""}),t.removeAttribute("data-copied")},Number(t.getAttribute("b-att-reset-delay"))||2e3)}catch(u){t.dispatchEvent(new CustomEvent("baseui:clipboard-copy-error",{bubbles:!0,detail:{error:u}}))}};return t.addEventListener("click",a),{destroy:()=>{t.removeEventListener("click",a),window.clearTimeout(r),e.remove(),t.classList.remove(...Fi),t.removeAttribute("data-copied")}}}h.register("clipboard-button",{type:"static",mount:Zp});C();function Jp(t){let e=t.querySelector("[b-collapsible-trigger]"),s=t.querySelector("[b-collapsible-panel]"),o=b=>{t.setAttribute("b-att-state",b?"open":"closed"),e?.setAttribute("aria-expanded",String(b)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:b}}))};if(!s){let b=()=>o(t.getAttribute("b-att-state")!=="open");return e?.setAttribute("aria-expanded",String(t.getAttribute("b-att-state")==="open")),e?.addEventListener("click",b),{destroy:()=>e?.removeEventListener("click",b)}}let r=t.getAttribute("b-att-state")==="open";s.classList.add("collapse"),r&&s.classList.add("show");let a=new(N()).Collapse(s,{toggle:!1}),l=()=>o(!0),u=()=>o(!1);s.addEventListener("shown.bs.collapse",l),s.addEventListener("hidden.bs.collapse",u),e?.setAttribute("aria-expanded",String(r));let d=()=>{s.classList.contains("show")?a.hide():a.show()};return e?.addEventListener("click",d),{destroy:()=>{e?.removeEventListener("click",d),s.removeEventListener("shown.bs.collapse",l),s.removeEventListener("hidden.bs.collapse",u),a.dispose()}}}h.register("collapsible",{type:"owl",mount:Jp});C();function Yp(t){let e=t.querySelector("input"),s=t.querySelector("[b-combobox-list]"),o=()=>[...s?.querySelectorAll("[b-att-value]")||[]];t.classList.add("b-combobox"),e?.setAttribute("role","combobox"),e?.setAttribute("aria-expanded","false"),s?.setAttribute("role","listbox"),s&&(s.hidden=!0);let r=u=>{s&&(s.hidden=!u),e?.setAttribute("aria-expanded",String(u))},a=()=>{let u=e.value.toLowerCase();o().forEach(d=>{d.hidden=!d.textContent.toLowerCase().includes(u)}),r(!0)},l=u=>{let d=u.target.closest("[b-att-value]");d&&(e.value=d.textContent.trim(),t.setAttribute("b-att-value",d.getAttribute("b-att-value")),r(!1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:d.getAttribute("b-att-value")}})))};return e?.addEventListener("input",a),e?.addEventListener("focus",()=>r(!0)),s?.addEventListener("click",l),{destroy:()=>{e?.removeEventListener("input",a),s?.removeEventListener("click",l)}}}h.register("combobox",{type:"owl",mount:Yp});C();function Xp(t){let e=t.querySelector("input"),s=()=>[...t.querySelectorAll("[b-command-item]")];t.classList.add("b-command"),t.setAttribute("role",t.getAttribute("role")||"dialog"),e?.classList.add("form-control");let o=()=>{let a=(e?.value||"").toLowerCase();s().forEach(l=>{l.hidden=!l.textContent.toLowerCase().includes(a)})},r=a=>{let l=a.target.closest("[b-command-item]");l&&t.dispatchEvent(new CustomEvent("baseui:select",{bubbles:!0,detail:{value:l.getAttribute("b-att-value")||l.textContent.trim()}}))};return e?.addEventListener("input",o),t.addEventListener("click",r),{destroy:()=>{e?.removeEventListener("input",o),t.removeEventListener("click",r)}}}h.register("command",{type:"owl",mount:Xp});C();function Qp(t){let e=t.querySelector("[b-context-menu-content]");if(!e)return{};e.hidden=!0,e.setAttribute("role","menu");let s=a=>{a.preventDefault(),e.hidden=!1,e.style.left=`${a.clientX}px`,e.style.top=`${a.clientY}px`,t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},o=()=>{e.hidden=!0,t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))},r=a=>{a.key==="Escape"&&o()};return t.addEventListener("contextmenu",s),document.addEventListener("click",o),t.addEventListener("keydown",r),{destroy:()=>{t.removeEventListener("contextmenu",s),document.removeEventListener("click",o),t.removeEventListener("keydown",r)}}}h.register("context-menu",{type:"owl",mount:Qp});C();lt();var cc=[["728ed52f","Success","ken99@example.com","$316.00"],["489e1d42","Success","abe45@example.com","$242.00"],["6b0888f6","Processing","monserrat44@example.com","$837.00"],["a1dc8c4e","Success","silas22@example.com","$874.00"],["15b96de0","Failed","carmella@example.com","$721.00"]];function td(t){t.querySelector("table")||(t.innerHTML=`
|
|
58
|
-
<div class="b-data-table__toolbar">
|
|
59
|
-
<input b-table-search type="search" class="form-control b-data-table__search" placeholder="Filter emails...">
|
|
60
|
-
<div class="b-data-table__columns"><button type="button" class="btn b-button btn-outline-secondary" data-slot="button" data-icon="inline-end" aria-label="Toggle columns"><span>Columns</span><span b-icon="chevron-down" data-icon="inline-end"></span></button></div>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="b-data-table__viewport">
|
|
63
|
-
<table class="table b-data-table__table">
|
|
64
|
-
<thead><tr><th class="b-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select all rows"></th><th>Status</th><th b-att-sortable="true">Email <span class="b-data-table__sort-icon" data-icon="arrow-up-down" aria-hidden="true"></span></th><th class="text-end">Amount</th><th class="b-data-table__actions-cell"><span class="visually-hidden">Actions</span></th></tr></thead>
|
|
65
|
-
<tbody>${cc.map(e=>`<tr data-row-key="${e[0]}"><td class="b-data-table__selection-cell"><input type="checkbox" class="form-check-input" aria-label="Select row"></td><td>${e[1]}</td><td>${e[2]}</td><td class="text-end"><span class="b-data-table__money">${e[3]}</span></td><td class="b-data-table__actions-cell"><button type="button" class="btn b-button btn-ghost b-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></td></tr>`).join("")}</tbody>
|
|
66
|
-
</table>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="b-data-table__cards">
|
|
69
|
-
${cc.map(e=>`<div class="b-data-table__card" data-row-key="${e[0]}">
|
|
70
|
-
<div class="b-data-table__card-header"><input type="checkbox" class="form-check-input" aria-label="Select row"><div class="b-data-table__actions"><button type="button" class="btn b-button btn-ghost b-button-icon" aria-label="Open menu" data-slot="button" data-icon="inline-start" data-icon-only="true"><span b-icon="ellipsis"></span></button></div></div>
|
|
71
|
-
<div class="b-data-table__card-field"><span class="b-data-table__card-label">Status</span><span class="b-data-table__card-value">${e[1]}</span></div>
|
|
72
|
-
<div class="b-data-table__card-field"><span class="b-data-table__card-label">Email</span><span class="b-data-table__card-value">${e[2]}</span></div>
|
|
73
|
-
<div class="b-data-table__card-field"><span class="b-data-table__card-label">Amount</span><span class="b-data-table__card-value b-data-table__money">${e[3]}</span></div>
|
|
74
|
-
</div>`).join("")}
|
|
75
|
-
</div>
|
|
76
|
-
<div class="b-data-table__pagination"><div class="b-data-table__selection-summary">0 of 5 row(s) selected.</div><div class="b-data-table__pager"><button type="button" class="btn b-button btn-outline-secondary btn-sm" disabled>Previous</button><button type="button" class="btn b-button btn-outline-secondary btn-sm" disabled>Next</button></div></div>
|
|
77
|
-
`)}function ed(t){td(t),t.querySelectorAll("[b-icon]").forEach(E=>D(E,E.getAttribute("b-icon"),{label:""}));let e=t.querySelector("table")||t,s=t.querySelector("[b-table-search]"),o=t.querySelector(".b-data-table__selection-summary"),r=t.getAttribute("b-att-variant");t.classList.add("b-data-table"),r&&t.classList.add(`b-data-table-${r}`),e.classList.add("table");let a=t.querySelector(".b-data-table__cards"),l=()=>[...e.querySelectorAll("tbody tr")],u=E=>a?.querySelector(`[data-row-key="${E.dataset.rowKey}"]`),d=()=>[...e.querySelectorAll("tbody input[type='checkbox']")],b=()=>{o&&(o.textContent=`${d().filter(E=>E.checked).length} of ${l().filter(E=>!E.hidden).length} row(s) selected.`)},f=()=>{let E=(s?.value||"").toLowerCase();l().forEach(O=>{let B=!(O.cells[2]||O.cells[1]||O.cells[0]).textContent.toLowerCase().includes(E);O.hidden=B;let W=u(O);W&&(W.hidden=B)}),b()},g=(E,O)=>{let P=e.tBodies[0];l().sort((B,W)=>B.cells[E].textContent.localeCompare(W.cells[E].textContent)*O).forEach(B=>{P.append(B);let W=u(B);W&&a.append(W)})},v=E=>{let O=E.target.closest("th");if(!O)return;let P=O.getAttribute("b-att-sort")==="asc"?-1:1;e.querySelectorAll("th").forEach(B=>B.removeAttribute("b-att-sort")),O.setAttribute("b-att-sort",P===1?"asc":"desc"),g([...O.parentElement.children].indexOf(O),P)},k=(E,O)=>{let B=u(E)?.querySelector("input[type='checkbox']");B&&B.checked!==O&&(B.checked=O)},y=E=>{let O=E.target;if(O?.matches("input[type='checkbox']")){let P=O.closest("tr"),B=O.closest(".b-data-table__card");if(P)k(P,O.checked);else if(B){let et=l().find(ti=>ti.dataset.rowKey===B.dataset.rowKey)?.querySelector("input[type='checkbox']");et&&et.checked!==O.checked&&(et.checked=O.checked)}}b()};return s?.addEventListener("input",f),e.tHead?.addEventListener("click",v),e.addEventListener("change",y),a?.addEventListener("change",y),b(),{destroy:()=>{s?.removeEventListener("input",f),e.tHead?.removeEventListener("click",v),e.removeEventListener("change",y),a?.removeEventListener("change",y)}}}h.register("data-table",{type:"owl",mount:ed});C();function sd(t){let e=t.matches("input")?t:t.querySelector("input[type='date'], input");t.classList.add("b-date-picker"),e?.classList.add("form-control"),e?.setAttribute("type",e.getAttribute("type")||"date");let s=()=>{t.setAttribute("b-att-value",e.value),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:e.value}}))};return e?.addEventListener("input",s),{destroy:()=>e?.removeEventListener("input",s)}}h.register("date-picker",{type:"owl",mount:sd});C();function od(t){let e=t.querySelector("[b-dialog-panel]");if(t.classList.add("modal","fade","b-dialog-backdrop"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),e){let r=document.createElement("div");r.className="modal-dialog modal-dialog-centered",e.replaceWith(r),r.append(e),e.classList.add("modal-content")}[...t.querySelectorAll("[b-dialog-close]")].forEach(r=>r.setAttribute("data-bs-dismiss","modal"));let o=N().Modal.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,focus:!0});return Ur(t,o,"modal","BaseUIDialog")}h.register("dialog",{type:"owl",mount:od});C();function rd(t){let e=t.getAttribute("b-att-dir")||t.getAttribute("dir")||"ltr";return t.setAttribute("dir",e==="rtl"?"rtl":"ltr"),{}}h.register("direction",{type:"static",mount:rd});C();function id(t){t.classList.add("offcanvas","offcanvas-bottom","b-drawer-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-drawer-close]")].forEach(o=>o.setAttribute("data-bs-dismiss","offcanvas"));let s=N().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1});return Ur(t,s,"offcanvas","BaseUIDrawer")}h.register("drawer",{type:"owl",mount:id});C();lt();var uc="a, button, [role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']";function lc(t,e){t?.classList.add(e)}function nd(t,e){if(!e||t.querySelector("[b-dropdown-indicator], [data-slot$='indicator']"))return;let s=document.createElement("span");s.setAttribute("b-dropdown-indicator",""),s.append(D(document.createElement("span"),"check")),t.prepend(s)}function ad(t){t.setAttribute("data-slot",t.getAttribute("data-slot")||"dropdown-menu-content"),t.querySelectorAll("[b-dropdown-group]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-group"),e.setAttribute("role",e.getAttribute("role")||"group")}),t.querySelectorAll("[b-dropdown-label]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-label"),e.classList.add("dropdown-header")}),t.querySelectorAll("[b-dropdown-separator]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-separator"),e.classList.add("dropdown-divider"),e.setAttribute("role",e.getAttribute("role")||"separator")}),t.querySelectorAll("[b-dropdown-shortcut]").forEach(e=>{e.setAttribute("data-slot","dropdown-menu-shortcut")}),t.querySelectorAll("[b-dropdown-checkbox-item], [b-dropdown-radio-item]").forEach(e=>{let s=e.hasAttribute("b-dropdown-radio-item");e.setAttribute("role",s?"menuitemradio":"menuitemcheckbox"),e.setAttribute("data-slot",s?"dropdown-menu-radio-item":"dropdown-menu-checkbox-item"),e.classList.add("dropdown-item"),e.setAttribute("aria-checked",e.hasAttribute("checked")||e.getAttribute("aria-checked")==="true"?"true":"false"),nd(e,e.getAttribute("aria-checked")==="true")}),t.querySelectorAll(uc).forEach(e=>{e.setAttribute("role",e.getAttribute("role")||"menuitem"),e.setAttribute("tabindex",e.getAttribute("tabindex")||"0"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"dropdown-menu-item"),e.classList.add("dropdown-item")})}function cd(t){let e=[];return t.querySelectorAll("[b-dropdown-sub]").forEach(s=>{let o=s.querySelector("[b-dropdown-sub-trigger]"),r=s.querySelector("[b-dropdown-sub-content]");if(!o||!r)return;if(lc(o,"b-dropdown-menu-sub-trigger"),lc(r,"b-dropdown-menu-sub-content"),o.setAttribute("data-slot","dropdown-menu-sub-trigger"),o.setAttribute("role","menuitem"),o.setAttribute("aria-haspopup","menu"),r.setAttribute("data-slot","dropdown-menu-sub-content"),r.setAttribute("role","menu"),r.hidden=!0,!o.querySelector(".b-dropdown-menu-sub-trigger-icon")){let b=D(document.createElement("span"),"chevron-right");b.classList.add("b-dropdown-menu-sub-trigger-icon"),o.append(b)}let a=b=>{r.hidden=!b,o.setAttribute("data-state",b?"open":"closed"),o.setAttribute("aria-expanded",String(b))},l=()=>a(!0),u=()=>a(!1),d=b=>{b.preventDefault(),a(r.hidden)};s.addEventListener("mouseenter",l),s.addEventListener("mouseleave",u),o.addEventListener("focus",l),o.addEventListener("click",d),e.push(()=>{s.removeEventListener("mouseenter",l),s.removeEventListener("mouseleave",u),o.removeEventListener("focus",l),o.removeEventListener("click",d)})}),()=>e.forEach(s=>s())}function ld(t){let e=t.querySelector("[b-dropdown-trigger]"),s=t.querySelector("[b-dropdown-menu]");if(!e||!s)return{destroy:()=>{}};t.classList.add("dropdown"),s.classList.add("dropdown-menu"),e.setAttribute("aria-haspopup","menu"),s.setAttribute("role","menu");let o=N().Dropdown.getOrCreateInstance(e),r=v=>{t.setAttribute("b-att-state",v?"open":"closed"),e.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>r(!0),l=()=>r(!1);e.addEventListener("shown.bs.dropdown",a),e.addEventListener("hidden.bs.dropdown",l);let u=()=>o.toggle();e.addEventListener("click",u);let d=v=>{v.key==="Escape"?(o.hide(),e.focus()):v.key==="ArrowDown"&&!s.classList.contains("show")&&(v.preventDefault(),o.show(),[...s.querySelectorAll("a, button, [tabindex]:not([tabindex='-1'])")][0]?.focus())};t.addEventListener("keydown",d);let b=v=>{t.contains(v.target)||o.hide()};document.addEventListener("click",b),ad(s);let f=cd(s),g=v=>{let k=v.target.closest(uc);!k||k.closest("[b-dropdown-sub]")||o.hide()};return s.addEventListener("click",g),{destroy:()=>{f(),s.removeEventListener("click",g),document.removeEventListener("click",b),t.removeEventListener("keydown",d),e.removeEventListener("click",u),e.removeEventListener("shown.bs.dropdown",a),e.removeEventListener("hidden.bs.dropdown",l),o.dispose()}}}h.register("dropdown-menu",{type:"owl",mount:ld});C();var vn={default:"b-empty-default",outline:"b-empty-outline",background:"b-empty-background"};function ud(t){let e=t.getAttribute("b-att-variant")||"default",s=[...t.querySelectorAll("[b-empty-media]")];return t.setAttribute("role",t.getAttribute("role")||"status"),t.classList.add("b-empty",vn[e]||vn.default),t.querySelectorAll("[b-empty-header]").forEach(o=>o.classList.add("b-empty-header")),t.querySelectorAll("[b-empty-title]").forEach(o=>o.classList.add("b-empty-title")),t.querySelectorAll("[b-empty-description]").forEach(o=>o.classList.add("b-empty-description")),t.querySelectorAll("[b-empty-content]").forEach(o=>o.classList.add("b-empty-content")),s.forEach(o=>{let r=o.getAttribute("b-att-variant")==="icon"?"icon":"default";o.classList.add("b-empty-media",`b-empty-media-${r}`),o.setAttribute("data-variant",r)}),{destroy:()=>{t.classList.remove("b-empty",...Object.values(vn))}}}h.register("empty",{type:"owl",mount:ud});C();function $i(t,e){t?.classList.add(...e.filter(Boolean))}function ts(t,e,s,o){t.querySelectorAll(e).forEach(r=>{r.setAttribute("data-slot",s),$i(r,[o])})}function pd(t){return t.querySelector("input, textarea, select, [role='checkbox'], [role='radio'], [role='switch']")}function dd(t,e){return e.id?e.id:`${t?.id||"b-field"}-error`}function hd(t){let e=t.getAttribute("b-att-slot")||t.getAttribute("data-slot")||"field",s=[];if(e==="field-set")t.setAttribute("data-slot","field-set"),$i(t,["b-field-set"]),s.push("b-field-set");else if(e==="field-group")t.setAttribute("data-slot","field-group"),$i(t,["b-field-group"]),s.push("b-field-group");else{let a=t.getAttribute("b-att-orientation")||t.getAttribute("data-orientation")||"vertical";t.setAttribute("role",t.getAttribute("role")||"group"),t.setAttribute("data-slot","field"),t.setAttribute("data-orientation",a),$i(t,["b-field",`b-field-orientation-${a}`]),s.push("b-field",`b-field-orientation-${a}`)}ts(t,"legend[b-field-legend], [b-field-legend]","field-legend","b-field-legend"),ts(t,"[b-field-group]","field-group","b-field-group"),ts(t,"[b-field-content]","field-content","b-field-content"),ts(t,"label[b-field-label], [b-field-label], [b-label]","field-label","b-field-label"),ts(t,"[b-field-title]","field-label","b-field-title"),ts(t,"[b-field-description]","field-description","b-field-description"),ts(t,"[b-field-separator]","field-separator","b-field-separator"),ts(t,"[b-field-error], [b-error]","field-error","b-field-error"),t.querySelectorAll("[b-field-separator]").forEach(a=>{if(!a.querySelector(".b-field-separator-line")){let l=document.createElement("span");l.className="b-field-separator-line",l.setAttribute("aria-hidden","true"),a.prepend(l)}a.textContent.trim()&&a.setAttribute("data-content","true")});let o=pd(t),r=t.querySelector("[b-field-error], [b-error], [data-slot='field-error']");if(o&&r){r.setAttribute("role",r.getAttribute("role")||"alert");let a=dd(o,r);r.id=a,o.setAttribute("aria-describedby",a),o.setAttribute("aria-invalid","true"),t.setAttribute("data-invalid","true")}return{destroy:()=>t.classList.remove(...s)}}h.register("field",{type:"static",mount:hd});C();function bd(t){t.classList.add("b-form"),t.setAttribute("data-slot","form"),t.setAttribute("novalidate","");let e=t.querySelector("[name='title']"),s=t.querySelector("[name='description']"),o=t.querySelector("[b-form-counter], .b-form-counter-text"),r=Number(s?.getAttribute("maxlength")||100),a=()=>{o&&s&&(o.textContent=`${s.value.length}/${r} characters`)},l=()=>{e&&(e.value=""),s&&(s.value=""),a()},u=t.querySelector("[b-form-reset]");return u?.addEventListener("click",l),s?.addEventListener("input",a),a(),{destroy(){u?.removeEventListener("click",l),s?.removeEventListener("input",a)}}}h.register("form",{type:"static",mount:bd});C();function md(t){let e=t.querySelector("[b-hover-card-trigger]"),s=t.querySelector("[b-hover-card-content]");if(!e||!s)return{};let o=()=>{s.hidden=!1,e.setAttribute("aria-expanded","true")},r=()=>{s.hidden=!0,e.setAttribute("aria-expanded","false")},a=l=>{l.key==="Escape"&&r()};return e.setAttribute("aria-haspopup","dialog"),s.setAttribute("role","dialog"),r(),t.addEventListener("mouseenter",o),t.addEventListener("mouseleave",r),t.addEventListener("focusin",o),t.addEventListener("focusout",r),t.addEventListener("keydown",a),{destroy:()=>{t.removeEventListener("mouseenter",o),t.removeEventListener("mouseleave",r),t.removeEventListener("focusin",o),t.removeEventListener("focusout",r),t.removeEventListener("keydown",a)}}}h.register("hover-card",{type:"owl",mount:md});C();lt();function fd(t){let e=t.getAttribute("b-icon")||t.getAttribute("b-att-icon")||t.getAttribute("aria-label");return e?(D(t,e,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url"),label:t.getAttribute("b-att-label")??t.getAttribute("aria-label")??"",size:t.getAttribute("b-icon-size")||t.getAttribute("b-att-size")}),{destroy:()=>{t.classList.remove("b-icon"),t.style.removeProperty("--b-icon-url"),t.style.removeProperty("--b-icon-size"),!t.getAttribute("b-att-label")&&!t.getAttribute("aria-label")&&t.removeAttribute("aria-hidden")}}):{}}h.register("icon",{type:"static",mount:fd});C();function gd(t){let e=hi({tag:t.tagName.toLowerCase(),type:t.getAttribute("type")});return t.classList.add(e),{destroy:()=>t.classList.remove(e)}}h.register("input",{type:"static",mount:gd});C();function yd(t){let e=[...t.querySelectorAll("input")];t.classList.add("b-input-otp"),e.forEach(a=>{a.classList.add("form-control"),a.inputMode=a.inputMode||"numeric",a.maxLength=a.maxLength>0?a.maxLength:1});let s=()=>{let a=e.map(l=>l.value).join("");t.setAttribute("b-att-value",a),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:a}}))},o=a=>{let l=e.indexOf(a.target);a.target.value&&e[l+1]&&e[l+1].focus(),s()},r=a=>{let l=a.clipboardData.getData("text").trim();l&&(a.preventDefault(),e.forEach((u,d)=>{u.value=l[d]||""}),s())};return e.forEach(a=>a.addEventListener("input",o)),t.addEventListener("paste",r),{destroy:()=>{e.forEach(a=>a.removeEventListener("input",o)),t.removeEventListener("paste",r)}}}h.register("input-otp",{type:"owl",mount:yd});C();function vd(t){return t.classList.add("b-item"),{destroy:()=>t.classList.remove("b-item")}}h.register("item",{type:"static",mount:vd});C();function xd(t){return t.classList.add("b-kbd"),{destroy:()=>t.classList.remove("b-kbd")}}h.register("kbd",{type:"static",mount:xd});C();function wd(t){return t.classList.add("form-label","b-label","b-label"),t.getAttribute("b-att-required")==="true"&&t.setAttribute("b-att-state","required"),{destroy:()=>t.classList.remove("form-label","b-label","b-label")}}h.register("label",{type:"static",mount:wd});C();function Sd(t){return t.classList.add("b-marker"),{destroy:()=>t.classList.remove("b-marker")}}h.register("marker",{type:"static",mount:Sd});C();Si();function Ad(t){let e=t.querySelector("script[type='text/markdown'], template");return e?e.tagName==="TEMPLATE"?e.content.textContent:e.textContent:t.getAttribute("b-att-content")||t.textContent||""}function Ed(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function Cd(t){t.classList.add("b-markdown");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-mermaid")!=="false",o=t.getAttribute("b-att-base-ui")!=="false",r=t.getAttribute("b-att-editable")==="true",a=t.getAttribute("b-att-collaborative")==="true",l=t.getAttribute("b-att-room")||"b-markdown",u=t.getAttribute("b-att-password")||void 0,d=Ed(t.getAttribute("b-att-signaling")),b=!1,f=null;function g(k){b||(t.setAttribute("data-status","error"),t.textContent=`Unable to render Markdown: ${k?.message||k}`,t.dispatchEvent(new CustomEvent("baseui:markdown-error",{bubbles:!0,detail:{error:k}})))}async function v(){let k=Ad(t);t.setAttribute("data-status","loading");let y=k;if(e)try{let B=await fetch(e);if(!B.ok)throw new Error(`${B.status} ${B.statusText}`);y=await B.text()}catch(B){g(B);return}if(r){t.replaceChildren(),t.classList.add("b-markdown-editable"),t.setAttribute("data-status","ready");let B=document.createElement("div");B.className="b-markdown-editor",B.setAttribute("data-slot","markdown-editor"),B.setAttribute("role","group"),B.setAttribute("aria-label",a?"Collaborative Markdown editor":"Markdown editor"),t.append(B);try{if(f=await Yr({root:B,value:y,collaborative:a,room:l,password:u,signaling:d,onChange:(W,et)=>{t.dispatchEvent(new CustomEvent("baseui:markdown-change",{bubbles:!0,detail:{markdown:W,previousMarkdown:et}}))}}),b){f?.destroy?.(),f=null;return}}catch(W){g(W);return}t.dispatchEvent(new CustomEvent("baseui:markdown-editor-ready",{bubbles:!0,detail:{collaborative:a,room:l}}));return}let{data:E,content:O}=Ai(y),P;try{P=await Zr(O)}catch(B){g(B);return}b||(t.innerHTML=P,t.setAttribute("data-status","ready"),await Jr(t,{mermaid:s,baseUi:o}),b||t.dispatchEvent(new CustomEvent("baseui:markdown-render",{bubbles:!0,detail:{html:P,frontmatter:E}})))}return v(),{destroy:()=>{b=!0,f?.destroy?.(),f=null,_r(t),t.classList.remove("b-markdown"),t.classList.remove("b-markdown-editable"),t.removeAttribute("data-status")}}}h.register("markdown",{type:"static",mount:Cd});C();function Ld(t){return t.classList.add("b-message"),t.setAttribute("b-att-side",t.getAttribute("b-att-side")||"incoming"),t.setAttribute("role",t.getAttribute("role")||"listitem"),{}}h.register("message",{type:"static",mount:Ld});C();function kd(t){t.classList.add("b-message-scroller");let e=()=>{t.getAttribute("b-att-autoscroll")!=="false"&&(t.scrollTop=t.scrollHeight)},s=new window.MutationObserver(e);return s.observe(t,{childList:!0,subtree:!0}),window.requestAnimationFrame(e),{destroy:()=>s.disconnect()}}h.register("message-scroller",{type:"owl",mount:kd});C();function Nd(t){t.setAttribute("role","menubar"),t.classList.add("b-menubar");for(let e of t.querySelectorAll("a, button"))e.setAttribute("role","menuitem");return{destroy:()=>t.classList.remove("b-menubar")}}h.register("menubar",{type:"static",mount:Nd});C();function Od(t){return t.classList.add("form-select"),(t.getAttribute("b-att-size")==="sm"||t.getAttribute("b-att-size")==="lg")&&t.classList.add(`form-select-${t.getAttribute("b-att-size")}`),{destroy:()=>t.classList.remove("form-select","form-select-sm","form-select-lg")}}h.register("native-select",{type:"static",mount:Od});C();function Td(t){t.classList.add("nav");let e=[...t.querySelectorAll("a, button")].filter(o=>!o.disabled);e.forEach(o=>o.classList.add("nav-link"));let s=o=>{let r=e.indexOf(o.target),a=o.key==="ArrowRight"?1:o.key==="ArrowLeft"?-1:0;!a||r<0||(o.preventDefault(),e[(r+a+e.length)%e.length]?.focus())};return t.setAttribute("role",t.getAttribute("role")||"menubar"),e.forEach(o=>o.setAttribute("role","menuitem")),t.addEventListener("keydown",s),{destroy:()=>t.removeEventListener("keydown",s)}}h.register("navigation-menu",{type:"owl",mount:Td});C();function Bd(t){let e=t.querySelector("ol, ul")||t,s=[...e.children];return t.classList.add("b-pagination"),e.classList.add("pagination"),s.forEach(o=>{let r=o.querySelector("a, button");o.classList.add("page-item"),r?.classList.add("page-link"),r?.getAttribute("aria-current")==="page"&&o.classList.add("active"),(r?.hasAttribute("disabled")||r?.getAttribute("aria-disabled")==="true")&&o.classList.add("disabled")}),t.setAttribute("aria-label",t.getAttribute("aria-label")||"Pagination"),{destroy:()=>{t.classList.remove("b-pagination"),e.classList.remove("pagination")}}}h.register("pagination",{type:"owl",mount:Bd});C();function Id(t){let e=t.querySelector("[b-popover-trigger]")||t,s=t.querySelector("[b-popover-content]"),o=s?s.innerHTML:"";s?.remove(),e.setAttribute("aria-haspopup","dialog");let r=new(N()).Popover(e,{content:o,html:!0,trigger:"click"}),a=()=>{t.setAttribute("b-att-state","open"),e.setAttribute("aria-expanded","true"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},l=()=>{t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};return e.addEventListener("shown.bs.popover",a),e.addEventListener("hidden.bs.popover",l),t.setAttribute("b-att-state","closed"),e.setAttribute("aria-expanded","false"),{destroy:()=>{e.removeEventListener("shown.bs.popover",a),e.removeEventListener("hidden.bs.popover",l),r.dispose()}}}h.register("popover",{type:"owl",mount:Id});C();function Rd(t){let e=Number(t.getAttribute("b-att-max")||t.getAttribute("aria-valuemax")||100),s=Math.min(e,Math.max(0,Number(t.getAttribute("b-att-value")||t.getAttribute("aria-valuenow")||0)));if(t.classList.add("progress","b-progress"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuemin","0"),t.setAttribute("aria-valuemax",String(e)),t.setAttribute("aria-valuenow",String(s)),t.style.setProperty("--b-progress-value",`${s/e*100}%`),!t.querySelector("[b-progress-indicator]")){let o=document.createElement("span");o.className="progress-bar",o.setAttribute("b-progress-indicator",""),t.append(o)}return{destroy:()=>t.classList.remove("progress","b-progress")}}h.register("progress",{type:"static",mount:Rd});C();function $d(t){let{open:e,close:s,destroy:o}=fi(t,{closeSelector:"[b-pwa-close]"});return t.BaseUIPwa={open:e,close:s},{destroy:()=>{o(),delete t.BaseUIPwa}}}h.register("pwa",{type:"owl",mount:$d});C();function Ud(t){let e=[...t.querySelectorAll("[b-question]")],s=t.querySelector("[b-question-prev]"),o=t.querySelector("[b-question-next]"),r=0,a=d=>{r=Math.min(e.length-1,Math.max(0,d)),e.forEach((b,f)=>{b.hidden=f!==r,b.setAttribute("b-att-state",f===r?"active":"inactive")}),s&&(s.disabled=r===0),o&&(o.disabled=r===e.length-1),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{index:r}}))},l=()=>a(r-1),u=()=>a(r+1);return s?.addEventListener("click",l),o?.addEventListener("click",u),e.length&&a(0),{destroy:()=>{s?.removeEventListener("click",l),o?.removeEventListener("click",u)}}}h.register("questionnaire",{type:"owl",mount:Ud});C();h.register("radio-group",{type:"static",mount:t=>Ri(t,"radio")});C();function qd(t){let e=t.querySelector("[b-resizable-panel]")||t,s=t.querySelector("[b-resizable-handle]");if(!s)return{};let o=Number(t.getAttribute("b-att-min")||160),r=Number(t.getAttribute("b-att-max")||720),a=l=>{let u=l.clientX,d=e.getBoundingClientRect().width,b=g=>{e.style.width=`${Math.min(r,Math.max(o,d+g.clientX-u))}px`},f=()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",f),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{width:e.style.width}}))};document.addEventListener("pointermove",b),document.addEventListener("pointerup",f)};return s.addEventListener("pointerdown",a),{destroy:()=>s.removeEventListener("pointerdown",a)}}h.register("resizable",{type:"owl",mount:qd});C();function Pd(t){return t.classList.add("b-scroll-area"),t.tabIndex=t.tabIndex>=0?t.tabIndex:0,t.setAttribute("role",t.getAttribute("role")||"region"),{}}h.register("scroll-area",{type:"static",mount:Pd});C();function _d(t){let e=t.getAttribute("b-att-orientation")==="vertical";return t.classList.add("b-separator",e?"b-separator-vertical":"b-separator-horizontal"),t.setAttribute("role",t.getAttribute("role")||"separator"),t.setAttribute("aria-orientation",e?"vertical":"horizontal"),{destroy:()=>t.classList.remove("b-separator","b-separator-vertical","b-separator-horizontal")}}h.register("separator",{type:"static",mount:_d});C();function pc(t,{triggerSelector:e,panelSelector:s,ariaHaspopup:o,panelRole:r,onKeyDown:a}={}){let l=t.querySelector(e),u=t.querySelector(s),d=v=>{!u||!l||(u.hidden=!v,t.setAttribute("b-att-state",v?"open":"closed"),l.setAttribute("aria-expanded",String(v)),t.dispatchEvent(new CustomEvent(v?"baseui:open":"baseui:close",{bubbles:!0})))},b=()=>d(u?.hidden!==!1),f=v=>{v.key==="Escape"&&(d(!1),l?.focus()),a?.(v,{setOpen:d,panel:u,trigger:l})},g=v=>{t.contains(v.target)||d(!1)};return l?.setAttribute("aria-haspopup",o),u?.setAttribute("role",r),u&&(u.hidden=!0),l?.addEventListener("click",b),t.addEventListener("keydown",f),document.addEventListener("click",g),{trigger:l,panel:u,setOpen:d,destroy:()=>{l?.removeEventListener("click",b),t.removeEventListener("keydown",f),document.removeEventListener("click",g)}}}function Md(t){let{setOpen:e,destroy:s}=pc(t,{triggerSelector:"[b-select-trigger]",panelSelector:"[b-select-content]",ariaHaspopup:"listbox",panelRole:"listbox"}),o=t.querySelector("[b-select-trigger]"),r=t.querySelector("[b-select-value]"),a=l=>{let u=l.target.closest("[b-select-item]");if(!(!u||!t.contains(u))){for(let d of t.querySelectorAll("[b-select-item]"))d.setAttribute("aria-selected",String(d===u));r&&(r.textContent=u.textContent.trim()),t.setAttribute("b-att-value",u.getAttribute("b-att-value")||u.textContent.trim()),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.getAttribute("b-att-value")}})),e(!1),o?.focus()}};for(let l of t.querySelectorAll("[b-select-item]"))l.setAttribute("role","option");return t.addEventListener("click",a),{destroy:()=>{t.removeEventListener("click",a),s()}}}h.register("select",{type:"owl",mount:Md});C();function jd(t){let e=[...t.querySelectorAll("[b-shell-collapse-trigger]")],s=r=>{t.setAttribute("b-att-collapsed",r?"true":"false"),t.dispatchEvent(new CustomEvent(r?"baseui:collapse":"baseui:expand",{bubbles:!0}))},o=()=>s(t.getAttribute("b-att-collapsed")!=="true");return e.forEach(r=>r.addEventListener("click",o)),s(t.getAttribute("b-att-collapsed")==="true"),t.BaseUIShell={collapse:()=>s(!0),expand:()=>s(!1),toggle:o},{destroy:()=>{e.forEach(r=>r.removeEventListener("click",o)),delete t.BaseUIShell}}}h.register("shell",{type:"owl",mount:jd});C();function zd(t){let e=t.getAttribute("b-att-side")==="left"?"offcanvas-start":"offcanvas-end";t.classList.add("offcanvas",e,"b-sheet-overlay"),t.setAttribute("tabindex","-1"),[...t.querySelectorAll("[b-sheet-close]")].forEach(r=>r.setAttribute("data-bs-dismiss","offcanvas"));let o=N().Offcanvas.getOrCreateInstance(t,{backdrop:!0,keyboard:!0,scroll:!1});return Ur(t,o,"offcanvas","BaseUISheet")}h.register("sheet",{type:"owl",mount:zd});C();var Dd={"[b-sidebar-header]":["b-sidebar-header","sidebar-header","header"],"[b-sidebar-content]":["b-sidebar-content","sidebar-content","content"],"[b-sidebar-footer]":["b-sidebar-footer","sidebar-footer","footer"],"[b-sidebar-group]":["b-sidebar-group","sidebar-group","group"],"[b-sidebar-group-label]":["b-sidebar-group-label","sidebar-group-label","group-label"],"[b-sidebar-group-action]":["b-sidebar-group-action","sidebar-group-action","group-action"],"[b-sidebar-group-content]":["b-sidebar-group-content","sidebar-group-content","group-content"],"[b-sidebar-menu]":["b-sidebar-menu","sidebar-menu","menu"],"[b-sidebar-menu-item]":["b-sidebar-menu-item","sidebar-menu-item","menu-item"],"[b-sidebar-menu-button]":["b-sidebar-menu-button","sidebar-menu-button","menu-button"],"[b-sidebar-menu-action]":["b-sidebar-menu-action","sidebar-menu-action","menu-action"],"[b-sidebar-menu-badge]":["b-sidebar-menu-badge","sidebar-menu-badge","menu-badge"],"[b-sidebar-menu-sub]":["b-sidebar-menu-sub","sidebar-menu-sub","menu-sub"],"[b-sidebar-menu-sub-item]":["b-sidebar-menu-sub-item","sidebar-menu-sub-item","menu-sub-item"],"[b-sidebar-menu-sub-button]":["b-sidebar-menu-sub-button","sidebar-menu-sub-button","menu-sub-button"],"[b-sidebar-separator]":["b-sidebar-separator","sidebar-separator","separator"]};function Fd(t){let e=[];for(let[s,[o,r,a]]of Object.entries(Dd))for(let l of t.querySelectorAll(s))l.classList.add(o),l.dataset.slot=r,l.dataset.sidebar=a,(l.hasAttribute("b-att-active")||l.getAttribute("aria-current")==="page")&&(l.classList.add("is-active"),l.dataset.active="true"),e.push([l,o]);return e}function Hd(t){let e=t.getAttribute("b-att-trigger")?document.querySelector(t.getAttribute("b-att-trigger")):null,s=[...t.querySelectorAll("[b-sidebar-close]")],o=Fd(t),r=d=>{t.setAttribute("b-att-state",d?"open":"closed"),t.classList.toggle("is-open",d),t.dataset.state=d?"expanded":"collapsed",t.dispatchEvent(new CustomEvent(d?"baseui:open":"baseui:close",{bubbles:!0}))},a=()=>r(!0),l=()=>r(!1),u=d=>{d.key==="Escape"&&l()};return e?.addEventListener("click",a),s.forEach(d=>d.addEventListener("click",l)),t.addEventListener("keydown",u),t.dataset.sidebar="sidebar",t.dataset.slot="sidebar",r(t.getAttribute("b-att-state")==="open"),t.BaseUISidebar={open:a,close:l},{destroy:()=>{e?.removeEventListener("click",a),s.forEach(d=>d.removeEventListener("click",l)),t.removeEventListener("keydown",u);for(let[d,b]of o)d.classList.remove(b,"is-active"),d.removeAttribute("data-slot"),d.removeAttribute("data-sidebar"),d.removeAttribute("data-active");t.removeAttribute("data-sidebar"),t.removeAttribute("data-slot"),t.removeAttribute("data-state"),delete t.BaseUISidebar}}}h.register("sidebar",{type:"owl",mount:Hd});C();function Wd(t){t.classList.add("b-slider");let e=()=>{t.style.setProperty("--b-slider-value",`${t.value}%`),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:t.value}}))};return e(),t.addEventListener("input",e),{destroy:()=>{t.removeEventListener("input",e),t.classList.remove("b-slider")}}}h.register("slider",{type:"static",mount:Wd});C();function Kd(t){let e=t.getAttribute("b-att-shape")==="circle"?"b-skeleton-circle":"b-skeleton-block";return t.classList.add("b-skeleton",e),t.setAttribute("aria-hidden",t.getAttribute("aria-hidden")||"true"),{destroy:()=>t.classList.remove("b-skeleton","b-skeleton-circle","b-skeleton-block")}}h.register("skeleton",{type:"static",mount:Kd});C();function Vd(t){let e=t.getAttribute("b-att-type")==="grow",s=t.getAttribute("b-att-label")||"Loading";if(t.classList.add(e?"spinner-grow":"spinner-border"),t.setAttribute("role",t.getAttribute("role")||"status"),!t.querySelector(".visually-hidden")){let o=document.createElement("span");o.className="visually-hidden",o.textContent=s,t.append(o)}return{destroy:()=>t.classList.remove("spinner-border","spinner-grow")}}h.register("spinner",{type:"static",mount:Vd});C();function Gd(t){let e=t.matches("input")?t:t.querySelector("input[type='checkbox']"),s=t.matches("input")?t.closest("label, .form-check"):t;return e?.classList.add("form-check-input"),e?.setAttribute("role",e.getAttribute("role")||"switch"),s?.classList.add("form-check","form-switch","b-switch"),{destroy:()=>{e?.classList.remove("form-check-input"),s?.classList.remove("form-check","form-switch","b-switch")}}}h.register("switch",{type:"static",mount:Gd});C();function Zd(t){if(t.classList.add("table","b-table"),t.getAttribute("b-att-striped")!=="false"&&t.classList.add("table-striped"),t.getAttribute("b-att-hover")!=="false"&&t.classList.add("table-hover"),t.getAttribute("b-att-responsive")==="true"&&!t.parentElement?.classList.contains("table-responsive")){let e=document.createElement("div");return e.className="table-responsive",t.before(e),e.append(t),{destroy:()=>{e.before(t),e.remove(),t.classList.remove("table","b-table","table-striped","table-hover")}}}return{destroy:()=>t.classList.remove("table","b-table","table-striped","table-hover")}}h.register("table",{type:"static",mount:Zd});C();function Jd(t){t.classList.add("b-tabs-host");let e=[...t.querySelectorAll("[b-tab]")],s=[...t.querySelectorAll("[b-panel]")],o=new Map(s.map(g=>[g.getAttribute("b-panel"),g])),r=new Map,a=new Map,l=new Map,u=new Map,d=e[0]?.parentElement;d&&!d.hasAttribute("role")&&d.setAttribute("role","tablist"),d?.classList.add("nav");let b=t.getAttribute("b-att-value")||e[0]?.getAttribute("b-tab")||"",f=g=>{t.setAttribute("b-att-value",g),e.forEach(v=>{v.tabIndex=v.getAttribute("b-tab")===g?0:-1}),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:g}}))};return e.forEach((g,v)=>{let k=g.getAttribute("b-tab"),y=o.get(k),E=k===b;if(g.setAttribute("role","tab"),g.classList.add("nav-link"),g.tabIndex=E?0:-1,E&&g.classList.add("active"),y){let et=y.id||`b-tabs-panel-${k}`;y.id=et,y.setAttribute("role","tabpanel"),y.classList.add("tab-pane","fade"),E&&y.classList.add("show","active"),g.setAttribute("data-bs-target",`#${et}`)}let O=N().Tab.getOrCreateInstance(g);r.set(g,O);let P=()=>O.show();g.addEventListener("click",P),a.set(g,P);let B=()=>f(k);g.addEventListener("shown.bs.tab",B),u.set(g,B);let W=et=>{let ti=bi(et.key,v,e.length);if(ti===-1)return;et.preventDefault();let xn=e[ti];xn.focus(),r.get(xn)?.show()};g.addEventListener("keydown",W),l.set(g,W)}),b&&t.setAttribute("b-att-value",b),{destroy:()=>{e.forEach(g=>{g.removeEventListener("click",a.get(g)),g.removeEventListener("keydown",l.get(g)),g.removeEventListener("shown.bs.tab",u.get(g)),r.get(g)?.dispose()}),a.clear(),l.clear(),u.clear(),r.clear()}}}h.register("tabs",{type:"owl",mount:Jd});C();function Yd(t){return t.classList.add("form-control"),t.getAttribute("b-att-resize")==="none"&&t.classList.add("b-textarea-no-resize"),{destroy:()=>t.classList.remove("form-control","b-textarea-no-resize")}}h.register("textarea",{type:"static",mount:Yd});C();function Xd(t){let e=t.querySelector("template, script[type='text/html']");return e?e.tagName==="TEMPLATE"?e.innerHTML:e.textContent:t.getAttribute("b-att-content")||t.innerHTML||""}function Qd(t){return String(t||"").split(",").map(e=>e.trim()).filter(Boolean)}function th(t){t.classList.add("b-text-editor");let e=t.getAttribute("b-att-src"),s=t.getAttribute("b-att-provider")||void 0,o=t.getAttribute("b-att-room")||"b-text-editor",r=t.getAttribute("b-att-url")||void 0,a=Bi({collaborative:t.getAttribute("b-att-collaborative")==="true",providerType:s,url:r}),l=t.getAttribute("b-att-password")||void 0,u=Qd(t.getAttribute("b-att-signaling")),d=t.getAttribute("b-att-placeholder")||void 0,b=!1,f=null;function g(k){b||(t.setAttribute("data-status","error"),t.textContent=`Unable to mount text editor: ${k?.message||k}`,t.dispatchEvent(new CustomEvent("baseui:text-editor-error",{bubbles:!0,detail:{error:k}})))}async function v(){t.setAttribute("data-status","loading");let k=Xd(t);if(e)try{let E=await fetch(e);if(!E.ok)throw new Error(`${E.status} ${E.statusText}`);k=await E.text()}catch(E){g(E);return}t.replaceChildren();let y=document.createElement("div");y.className="b-text-editor-shell",y.setAttribute("data-slot","text-editor-shell"),y.setAttribute("role","group"),y.setAttribute("aria-label",a?"Collaborative rich text editor":"Rich text editor"),t.append(y);try{if(f=await Ti({root:y,value:k,placeholder:d,collaborative:a,providerType:s,room:o,url:r,password:l,signaling:u,onChange:(E,O)=>{t.dispatchEvent(new CustomEvent("baseui:text-editor-change",{bubbles:!0,detail:{html:E,previousHtml:O}}))}}),b){f?.destroy?.(),f=null;return}}catch(E){g(E);return}t.setAttribute("data-status","ready"),t.dispatchEvent(new CustomEvent("baseui:text-editor-ready",{bubbles:!0,detail:{collaborative:a,room:o}}))}return v(),{destroy:()=>{b=!0,f?.destroy?.(),f=null,t.classList.remove("b-text-editor"),t.removeAttribute("data-status")}}}h.register("text-editor",{type:"static",mount:th});lt();C();function eh(t,e){let s=Pr(e);t.classList.remove(...fa),t.className=`${t.className} ${vi({variant:t.getAttribute("b-att-variant")||"outline",size:t.getAttribute("b-att-size")})}`.trim(),t.type=t.getAttribute("type")||"button",t.setAttribute("aria-label",s.label),t.setAttribute("title",s.label),t.setAttribute("aria-pressed",s.pressed);let o=t.querySelector("[b-theme-button-icon]");o||(o=document.createElement("span"),o.setAttribute("b-theme-button-icon",""),t.prepend(o)),o.setAttribute("b-icon",s.icon),D(o,s.icon,{baseUrl:t.getAttribute("b-icon-base-url")||t.getAttribute("b-att-base-url")});let r=t.querySelector("[b-theme-button-label]");r||(r=document.createElement("span"),r.className="visually-hidden",r.setAttribute("b-theme-button-label",""),t.append(r)),r.textContent=s.label}function sh(t){let e=ce({storageKey:t.getAttribute("b-att-storage-key")||void 0,toggleSelector:"[b-theme-toggle]",labelSelector:"[b-theme-label]"}),s=(a=e.current())=>eh(t,a),o=()=>s(e.toggle()),r=a=>s(a.detail?.theme);return s(e.set(e.current(),{skipStorage:!0})),t.addEventListener("click",o),document.addEventListener("baseui:theme-change",r),{destroy:()=>{t.removeEventListener("click",o),document.removeEventListener("baseui:theme-change",r)}}}h.register("theme-button",{type:"static",mount:sh});C();x();function oh(t){let e=[...t.querySelectorAll("[b-toast-close]")],s=t.getAttribute("b-att-delay"),o=s===null?3e3:Number(s),r=gi(t.getAttribute("b-att-position"));t.className=m(t.className,"toast","fade",r),t.setAttribute("role",t.getAttribute("b-att-variant")==="danger"?"alert":"status"),e.forEach(f=>f.setAttribute("data-bs-dismiss","toast"));let a=new(N()).Toast(t,{autohide:o>0,delay:o||3e3}),l=()=>{t.setAttribute("b-att-state","open"),t.dispatchEvent(new CustomEvent("baseui:open",{bubbles:!0}))},u=()=>{t.setAttribute("b-att-state","closed"),t.dispatchEvent(new CustomEvent("baseui:close",{bubbles:!0}))};t.addEventListener("shown.bs.toast",l),t.addEventListener("hidden.bs.toast",u);let d=()=>a.show(),b=()=>a.hide();return t.getAttribute("b-att-state")==="open"&&d(),t.BaseUIToast={show:d,hide:b},{destroy:()=>{t.removeEventListener("shown.bs.toast",l),t.removeEventListener("hidden.bs.toast",u),a.dispose(),delete t.BaseUIToast}}}h.register("toast",{type:"owl",mount:oh});C();function rh(t){let e=t.querySelector("[b-tooltip-trigger]")||t,s=t.querySelector("[b-tooltip-content]");!s&&t.getAttribute("b-att-content")&&(s=document.createElement("span"),s.setAttribute("b-tooltip-content",""),s.textContent=t.getAttribute("b-att-content"),t.appendChild(s));let o=s?s.innerHTML:"";s?.remove();let r=new(N()).Tooltip(e,{title:o,html:!0,trigger:"hover focus"}),a=()=>t.setAttribute("b-att-state","open"),l=()=>t.setAttribute("b-att-state","closed");return e.addEventListener("shown.bs.tooltip",a),e.addEventListener("hidden.bs.tooltip",l),t.setAttribute("b-att-state","closed"),{destroy:()=>{e.removeEventListener("shown.bs.tooltip",a),e.removeEventListener("hidden.bs.tooltip",l),r.dispose()}}}h.register("tooltip",{type:"owl",mount:rh});C();function ih(t){t.classList.add("btn",t.getAttribute("b-att-variant")==="outline"?"btn-outline-secondary":"btn-light"),t.setAttribute("aria-pressed",t.getAttribute("aria-pressed")||"false");let e=()=>{let s=t.getAttribute("aria-pressed")!=="true";t.setAttribute("aria-pressed",String(s)),t.setAttribute("b-att-state",s?"on":"off"),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{pressed:s}}))};return t.addEventListener("click",e),{destroy:()=>t.removeEventListener("click",e)}}h.register("toggle",{type:"owl",mount:ih});C();function nh(t){let e=[...t.querySelectorAll("[b-att-value], button")],s=t.getAttribute("b-att-multiple")==="true";t.classList.add("btn-group"),t.setAttribute("role",s?"group":"radiogroup"),e.forEach(r=>{r.classList.add("btn","btn-outline-secondary"),r.setAttribute("aria-pressed",r.getAttribute("aria-pressed")||"false")});let o=r=>{let a=r.target.closest("button, [b-att-value]");if(!a||!t.contains(a))return;s||e.forEach(u=>u.setAttribute("aria-pressed","false")),a.setAttribute("aria-pressed",String(a.getAttribute("aria-pressed")!=="true"));let l=e.filter(u=>u.getAttribute("aria-pressed")==="true").map(u=>u.getAttribute("b-att-value")||u.textContent.trim());t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{value:s?l:l[0]}}))};return t.addEventListener("click",o),{destroy:()=>t.removeEventListener("click",o)}}h.register("toggle-group",{type:"owl",mount:nh});C();var dc={lead:"lead",muted:"text-body-secondary",code:"b-code",kbd:"b-kbd",h1:"h1",h2:"h2",h3:"h3",h4:"h4",blockquote:"blockquote",small:"small",list:"b-list"};function ah(t){let e=dc[t.getAttribute("b-att-variant")||"body"];return t.classList.add("b-typography"),e&&t.classList.add(e),{destroy:()=>t.classList.remove("b-typography",...Object.values(dc))}}h.register("typography",{type:"static",mount:ah});A();ji(Ii);An(Cn);En();var hc=h;return xc(ch);})();
|