bitwrench 2.0.12 → 2.0.14
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/README.md +4 -4
- package/dist/bitwrench-code-edit.cjs.js +1 -1
- package/dist/bitwrench-code-edit.es5.js +1 -1
- package/dist/bitwrench-code-edit.es5.min.js +1 -1
- package/dist/bitwrench-code-edit.esm.js +1 -1
- package/dist/bitwrench-code-edit.esm.min.js +1 -1
- package/dist/bitwrench-code-edit.umd.js +1 -1
- package/dist/bitwrench-code-edit.umd.min.js +1 -1
- package/dist/bitwrench-lean.cjs.js +659 -346
- package/dist/bitwrench-lean.cjs.min.js +5 -5
- package/dist/bitwrench-lean.es5.js +960 -347
- package/dist/bitwrench-lean.es5.min.js +3 -3
- package/dist/bitwrench-lean.esm.js +659 -346
- package/dist/bitwrench-lean.esm.min.js +5 -5
- package/dist/bitwrench-lean.umd.js +659 -346
- package/dist/bitwrench-lean.umd.min.js +5 -5
- package/dist/bitwrench.cjs.js +1737 -452
- package/dist/bitwrench.cjs.min.js +6 -6
- package/dist/bitwrench.css +1625 -168
- package/dist/bitwrench.es5.js +4016 -2341
- package/dist/bitwrench.es5.min.js +4 -4
- package/dist/bitwrench.esm.js +1737 -452
- package/dist/bitwrench.esm.min.js +6 -6
- package/dist/bitwrench.umd.js +1737 -452
- package/dist/bitwrench.umd.min.js +6 -6
- package/dist/builds.json +61 -61
- package/dist/sri.json +26 -26
- package/package.json +1 -1
- package/readme.html +5 -5
- package/src/bitwrench-color-utils.js +137 -17
- package/src/bitwrench-components-v2.js +997 -35
- package/src/bitwrench-styles.js +1098 -370
- package/src/bitwrench.js +128 -75
- package/src/version.js +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
2
|
-
const e={version:"2.0.
|
|
1
|
+
/*! bitwrench v2.0.14 | BSD-2-Clause | https://deftio.github.com/bitwrench/pages */
|
|
2
|
+
const e={version:"2.0.14",name:"bitwrench",description:"A library for javascript UI functions.",license:"BSD-2-Clause",homepage:"https://deftio.github.com/bitwrench/pages",repository:"git+https://github.com/deftio/bitwrench.git",author:"manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)",buildDate:"2026-03-08T08:04:06.572Z"};
|
|
3
3
|
/**
|
|
4
4
|
* Bitwrench Color Utilities
|
|
5
5
|
*
|
|
@@ -9,7 +9,7 @@ const e={version:"2.0.12",name:"bitwrench",description:"A library for javascript
|
|
|
9
9
|
*
|
|
10
10
|
* @module bitwrench-color-utils
|
|
11
11
|
* @license BSD-2-Clause
|
|
12
|
-
*/function t(e,t){void 0===t&&(t=255);var
|
|
12
|
+
*/function t(e,t,r){return Math.max(t,Math.min(r,e))}function r(e,t){void 0===t&&(t=255);var r=[0,0,0,t,"rgb"];if(Array.isArray(e)){for(var o=[0,0,0,255,"rgb"],n=0;n<e.length&&n<o.length;n++)o[n]=e[n];return o}if("#"===(e=String(e).replace(/\s/g,""))[0]){var i=e.slice(1);if(3===i.length||4===i.length)for(var s=0;s<i.length;s++)r[s]=parseInt(i[s]+i[s],16);else if(6===i.length||8===i.length)for(var l=0;l<i.length;l+=2)r[l/2]=parseInt(i.substring(l,l+2),16)}else{var c=e.match(/^(rgb|hsl)a?\(([^)]+)\)$/i);if(c){var d=c[1].toLowerCase(),b=c[2].split(",").map(function(e){return parseFloat(e)});if("rgb"===d)r[0]=b[0]||0,r[1]=b[1]||0,r[2]=b[2]||0,r[3]=void 0!==b[3]?255*b[3]:t,r[4]="rgb";else if("hsl"===d){return a(b[0]||0,b[1]||0,b[2]||0,void 0!==b[3]?255*b[3]:t)}}}return r}function a(e,t,r,a,o){void 0===a&&(a=255),void 0===o&&(o=!0),Array.isArray(e)&&(t=e[1],r=e[2],a=void 0!==e[3]?e[3]:255,e=e[0]);var n,i,s,l=e/360,c=t/100,d=r/100;if(0===c)n=i=s=255*d;else{var b=function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},m=d<.5?d*(1+c):d+c-d*c,p=2*d-m;n=255*b(p,m,l+1/3),i=255*b(p,m,l),s=255*b(p,m,l-1/3)}return o&&(n=Math.round(n),i=Math.round(i),s=Math.round(s),a=Math.round(a)),[n,i,s,a,"rgb"]}function o(e){var t=r(e),a=function(e,t,r,a){void 0===a&&(a=255),Array.isArray(e)&&(t=e[1],r=e[2],a=void 0!==e[3]?e[3]:255,e=e[0]),e/=255,t/=255,r/=255;var o,n,i=Math.max(e,t,r),s=Math.min(e,t,r),l=(i+s)/2;if(i===s)o=n=0;else{var c=i-s;switch(n=l>.5?c/(2-i-s):c/(i+s),i){case e:o=((t-r)/c+(t<r?6:0))/6;break;case t:o=((r-e)/c+2)/6;break;case r:o=((e-t)/c+4)/6}}return[o*=360,n*=100,l*=100,a,"hsl"]}(t[0],t[1],t[2],255);return[a[0],a[1],a[2]]}function n(e){var t=a(e[0],e[1],e[2],255,!0);return"#"+("0"+t[0].toString(16)).slice(-2)+("0"+t[1].toString(16)).slice(-2)+("0"+t[2].toString(16)).slice(-2)}function i(e,r){var a=o(e);return a[2]=t(a[2]+r,0,100),n(a)}function s(e,t,a){var o=r(e),n=r(t),i=Math.round(o[0]+(n[0]-o[0])*a),s=Math.round(o[1]+(n[1]-o[1])*a),l=Math.round(o[2]+(n[2]-o[2])*a);return"#"+("0"+i.toString(16)).slice(-2)+("0"+s.toString(16)).slice(-2)+("0"+l.toString(16)).slice(-2)}function l(e){var t=r(e),a=[t[0]/255,t[1]/255,t[2]/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*a[0]+.7152*a[1]+.0722*a[2]}function c(e){return l(e)>.179?"#000":"#fff"}function d(e,t,r){if(void 0===r&&(r=.2),0===r)return e;var a=o(e),i=o(t)[0]-a[0];return i>180&&(i-=360),i<-180&&(i+=360),n([(a[0]+i*r+360)%360,a[1],a[2]])}function b(e){var t=r(e);return{base:e,hover:i(e,-10),active:i(e,-15),light:s(e,"#ffffff",.85),darkText:i(e,-40),border:s(e,"#ffffff",.6),focus:"rgba("+t[0]+","+t[1]+","+t[2]+",0.25)",textOn:c(e)}}function m(e){var r,a,i=o(e),s=i[0],l=i[1],c=i[2];return c>50?(r=t(100-c-10,8,40),a=t(.85*l,0,100)):(r=t(100-c+10,60,92),a=t(1.1*l,0,100)),n([s,a,r])}function p(e){var t=l(e.primary);return e.secondary&&(t=(t+l(e.secondary))/2),e.tertiary&&(t=(2*t+l(e.tertiary))/3),t>.179}function u(e){var t={};t.primary=m(e.primary),t.secondary=m(e.secondary),t.tertiary=e.tertiary?m(e.tertiary):t.primary;var r=o(e.primary),a=r[0];p(e)?(t.light=n([a,Math.min(r[1],15),15]),t.dark=n([a,5,88])):(t.light=n([a,Math.min(r[1],10),96]),t.dark=n([a,10,18]));for(var i=void 0!==e.harmonize?e.harmonize:.2,s={success:"#198754",danger:"#dc3545",warning:"#f0ad4e",info:"#17a2b8"},l=["success","danger","warning","info"],c=0;c<l.length;c++){var b=l[c],u=d(e[b]||s[b],e.primary,i);t[b]=m(u)}return t.harmonize=0,t}function w(e){var t=void 0!==e.harmonize?e.harmonize:.2,r=e.primary,a=o(r)[0],i=d(e.success||"#198754",r,t),s=d(e.danger||"#dc3545",r,t),l=d(e.warning||"#f0ad4e",r,t),c=d(e.info||"#17a2b8",r,t),m=e.light||n([a,8,97]),p=e.dark||n([a,10,13]);return{primary:b(e.primary),secondary:b(e.secondary),tertiary:b(e.tertiary),success:b(i),danger:b(s),warning:b(l),info:b(c),light:b(m),dark:b(p)}}
|
|
13
13
|
/**
|
|
14
14
|
* Bitwrench v2 Default Styles
|
|
15
15
|
*
|
|
@@ -32,7 +32,7 @@ const e={version:"2.0.12",name:"bitwrench",description:"A library for javascript
|
|
|
32
32
|
* @module bitwrench-styles
|
|
33
33
|
* @license BSD-2-Clause
|
|
34
34
|
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
35
|
-
*/var b={compact:{btn:"0.3rem 0.8rem",card:"0.875rem 1rem",alert:"0.625rem 1rem",cell:"0.5rem 0.75rem",input:"0.375rem 0.7rem"},normal:{btn:"0.5rem 1.125rem",card:"1.25rem 1.5rem",alert:"0.875rem 1.25rem",cell:"0.75rem 1rem",input:"0.5rem 0.875rem"},spacious:{btn:"0.75rem 1.5rem",card:"1.75rem 2rem",alert:"1.125rem 1.5rem",cell:"1rem 1.25rem",input:"0.75rem 1.125rem"}},m={none:{btn:"0",card:"0",badge:"0",alert:"0",input:"0"},sm:{btn:"4px",card:"4px",badge:".25rem",alert:"4px",input:"4px"},md:{btn:"6px",card:"8px",badge:".375rem",alert:"8px",input:"6px"},lg:{btn:"10px",card:"12px",badge:".5rem",alert:"12px",input:"10px"},pill:{btn:"50rem",card:"1rem",badge:"50rem",alert:"1rem",input:"50rem"}},u={primary:"#006666",secondary:"#6c757d",tertiary:"#006666",success:"#198754",danger:"#dc3545",warning:"#ffc107",info:"#0dcaf0",light:"#f8f9fa",dark:"#212529"};function p(e,t){return e?t.includes(",")?t.split(",").map(function(t){return"."+e+" "+t.trim()}).join(", "):"."+e+" "+t:t}function w(e,t,r){return Object.assign({},function(e,t){var r={};return r[p(e,"body")]={color:t.dark.base,"background-color":"#f5f5f5"},r}(e,t),function(e,t){var r={};return r[p(e,"a")]={color:t.primary.base,"text-decoration":"none",transition:"color 0.15s"},r[p(e,"a:hover")]={color:t.primary.hover,"text-decoration":"underline"},r}(e,t),function(e,t,r){var o={},a=r.spacing,n=r.radius;return o[p(e,".bw-btn")]={padding:a.btn,"border-radius":n.btn},o[p(e,".bw-btn:focus-visible")]={outline:"0","box-shadow":"0 0 0 3px "+t.primary.focus},["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(r){var a=t[r];o[p(e,".bw-btn-"+r)]={color:a.textOn,"background-color":a.base,"border-color":a.base},o[p(e,".bw-btn-"+r+":hover")]={color:a.textOn,"background-color":a.hover,"border-color":a.active},o[p(e,".bw-btn-outline-"+r)]={color:a.base,"border-color":a.base,"background-color":"transparent"},o[p(e,".bw-btn-outline-"+r+":hover")]={color:a.textOn,"background-color":a.base,"border-color":a.base}}),o[p(e,".bw-btn-lg")]={padding:"0.625rem 1.5rem","font-size":"1rem","border-radius":"50rem"===n.btn?"50rem":parseInt(n.btn)+2+"px"},o[p(e,".bw-btn-sm")]={padding:"0.25rem 0.75rem","font-size":"0.8125rem","border-radius":"50rem"===n.btn?"50rem":Math.max(parseInt(n.btn)-1,0)+"px"},o}(e,t,r),function(e,t,r){var o={},a=r.spacing,i=r.radius;return o[p(e,".bw-alert")]={padding:a.alert,"border-radius":i.alert},["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(r){var a=t[r];o[p(e,".bw-alert-"+r)]={color:a.darkText,"background-color":a.light,"border-color":a.border},o[p(e,".bw-alert-"+r+" .alert-link")]={color:n(a.darkText,-10)}}),o}(e,t,r),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(o){var a=t[o];r[p(e,".bw-badge-"+o)]={color:a.textOn,"background-color":a.base}}),r}(e,t),function(e,t,r){var o={},a=r.spacing,n=r.radius;return o[p(e,".bw-card")]={"background-color":"#fff",border:"1px solid "+t.light.border,"border-radius":n.card,"box-shadow":"0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04)"},o[p(e,".bw-card:hover")]={"box-shadow":"0 4px 12px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.06)"},o[p(e,".bw-card-body")]={padding:a.card},o[p(e,".bw-card-header")]={padding:a.card.split(" ").map(function(e){return(.7*parseFloat(e)).toFixed(3).replace(/\.?0+$/,"")+"rem"}).join(" "),"background-color":t.light.light,"border-bottom":"1px solid "+t.light.border},o[p(e,".bw-card-footer")]={"background-color":t.light.light,"border-top":"1px solid "+t.light.border,color:t.secondary.base},o[p(e,".bw-card-title")]={color:t.dark.base},o[p(e,".bw-card-subtitle")]={color:t.secondary.base},["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(r){o[p(e,".bw-card-"+r)]={"border-left":"4px solid "+t[r].base}}),o}(e,t,r),function(e,t,r){var o={},a=r.spacing,n=r.radius;return o[p(e,".bw-form-control")]={padding:a.input,"border-radius":n.input,color:t.dark.base,"background-color":"#fff","border-color":t.light.border},o[p(e,".bw-form-control:focus")]={"border-color":t.primary.border,"box-shadow":"0 0 0 0.25rem "+t.primary.focus},o[p(e,".bw-form-control::placeholder")]={color:t.secondary.base},o[p(e,".bw-form-label")]={color:t.dark.base},o[p(e,".bw-form-text")]={color:t.secondary.base},o[p(e,".bw-form-check-input:checked")]={"background-color":t.primary.base,"border-color":t.primary.base},o[p(e,".bw-form-check-input:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},o}(e,t,r),function(e,t){var r={};return r[p(e,".bw-navbar")]={"background-color":t.light.light,"border-bottom-color":t.light.border},r[p(e,".bw-navbar-brand")]={color:t.dark.base},r[p(e,".bw-navbar-nav .bw-nav-link")]={color:t.secondary.base},r[p(e,".bw-navbar-nav .bw-nav-link:hover")]={color:t.dark.base},r[p(e,".bw-navbar-nav .bw-nav-link.active")]={color:t.primary.base,"background-color":t.primary.focus},r[p(e,".bw-navbar-dark")]={"background-color":t.dark.base,"border-bottom-color":t.dark.hover},r[p(e,".bw-navbar-dark .bw-navbar-brand")]={color:t.light.base},r[p(e,".bw-navbar-dark .bw-nav-link")]={color:"rgba(255,255,255,.65)"},r[p(e,".bw-navbar-dark .bw-nav-link:hover")]={color:"#fff"},r[p(e,".bw-navbar-dark .bw-nav-link.active")]={color:"#fff","font-weight":"600"},r[p(e,".bw-nav-pills .bw-nav-link.active")]={color:t.primary.textOn,"background-color":t.primary.base},r}(e,t),function(e,t,r){var o={},a=r.spacing;return o[p(e,".bw-table")]={color:t.dark.base,"border-color":t.light.border},o[p(e,".bw-table > :not(caption) > * > *")]={padding:a.cell,"border-bottom-color":t.light.border},o[p(e,".bw-table > thead > tr > *")]={color:t.secondary.base,"border-bottom-color":t.light.border,"background-color":t.light.light},o[p(e,".bw-table-striped > tbody > tr:nth-of-type(odd) > *")]={"background-color":"rgba(0, 0, 0, 0.05)"},o[p(e,".bw-table-hover > tbody > tr:hover > *")]={"background-color":t.primary.focus},o[p(e,".bw-table-bordered")]={"border-color":t.light.border},o[p(e,".bw-table caption")]={color:t.secondary.base},o}(e,t,r),function(e,t){var r={};return r[p(e,".bw-nav-tabs")]={"border-bottom-color":t.light.border},r[p(e,".bw-nav-link")]={color:t.secondary.base},r[p(e,".bw-nav-tabs .bw-nav-link:hover")]={color:t.dark.base,"border-bottom-color":t.light.border},r[p(e,".bw-nav-tabs .bw-nav-link.active")]={color:t.primary.base,"border-bottom":"2px solid "+t.primary.base},r}(e,t),function(e,t,r){var o={},a=r.spacing;return o[p(e,".bw-list-group-item")]={padding:a.cell,color:t.dark.base,"background-color":"#fff","border-color":t.light.border},o[p(e,"a.bw-list-group-item:hover")]={"background-color":t.light.light,color:t.dark.hover},o[p(e,".bw-list-group-item.active")]={color:t.primary.textOn,"background-color":t.primary.base,"border-color":t.primary.base},o[p(e,".bw-list-group-item.disabled")]={color:t.secondary.base,"background-color":"#fff"},o}(e,t,r),function(e,t){var r={};return r[p(e,".bw-page-link")]={color:t.primary.base,"background-color":"#fff","border-color":t.light.border},r[p(e,".bw-page-link:hover")]={color:t.primary.hover,"background-color":t.light.light,"border-color":t.light.border},r[p(e,".bw-page-link:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},r[p(e,".bw-page-item.bw-active .bw-page-link")]={color:t.primary.textOn,"background-color":t.primary.base,"border-color":t.primary.base},r[p(e,".bw-page-item.bw-disabled .bw-page-link")]={color:t.secondary.base,"background-color":"#fff","border-color":t.light.border},r}(e,t),function(e,t){var r={};return r[p(e,".bw-progress")]={"background-color":t.light.light,"box-shadow":"inset 0 1px 2px rgba(0,0,0,.1)"},r[p(e,".bw-progress-bar")]={color:"#fff","background-color":t.primary.base,"box-shadow":"inset 0 -1px 0 rgba(0,0,0,.15)"},["primary","secondary","success","danger","warning","info"].forEach(function(o){r[p(e,".bw-progress-bar-"+o)]={"background-color":t[o].base}}),r}(e,t),function(e,t){var r={};return r[p(e,".bw-hero-primary")]={background:"linear-gradient(135deg, "+t.primary.base+" 0%, "+t.primary.hover+" 100%)",color:t.primary.textOn},r[p(e,".bw-hero-secondary")]={background:"linear-gradient(135deg, "+t.secondary.base+" 0%, "+t.secondary.hover+" 100%)",color:t.secondary.textOn},r[p(e,".bw-hero-dark")]={background:"linear-gradient(135deg, "+t.dark.base+" 0%, "+t.dark.hover+" 100%)",color:t.dark.textOn},r}(e,t),function(e,t){var r={};return r[p(e,".bw-breadcrumb-item + .bw-breadcrumb-item::before")]={color:t.secondary.base},r[p(e,".bw-breadcrumb-item.active")]={color:t.secondary.base},r}(e,t),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(o){r[p(e,".bw-spinner-border.bw-text-"+o)]={color:t[o].base},r[p(e,".bw-spinner-grow.bw-text-"+o)]={color:t[o].base}}),r}(e,t),function(e,t){var r={};return r[p(e,".bw-close")]={color:t.dark.base,opacity:"0.5"},r[p(e,".bw-close:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},r}(e,t),function(e,t){var r={};return r[p(e,".bw-section-subtitle")]={color:t.secondary.base},r[p(e,".bw-feature-description")]={color:t.secondary.base},r[p(e,".bw-cta-description")]={color:t.secondary.base},r}(e,t),function(e,t){var r={};return r[p(e,".bw-accordion-item")]={"background-color":"#fff","border-color":t.light.border},r[p(e,".bw-accordion-button")]={color:t.dark.base},r[p(e,".bw-accordion-button:not(.bw-collapsed)")]={color:t.primary.darkText,"background-color":t.primary.light},r[p(e,".bw-accordion-button:hover")]={"background-color":t.light.light},r[p(e,".bw-accordion-button:not(.bw-collapsed):hover")]={"background-color":t.primary.hover},r[p(e,".bw-accordion-button:focus-visible")]={"box-shadow":"0 0 0 0.2rem "+t.primary.focus},r[p(e,".bw-accordion-body")]={"border-top":"1px solid "+t.light.border},r}(e,t),function(e,t){var r={};return r[p(e,".bw-carousel")]={"background-color":t.light.light},r[p(e,".bw-carousel-indicator.active")]={"background-color":t.primary.base},r}(e,t),function(e,t){var r={};return r[p(e,".bw-modal-content")]={"background-color":"#fff","border-color":t.light.border,"box-shadow":"0 0.5rem 1rem rgba(0,0,0,0.15)"},r[p(e,".bw-modal-header")]={"border-bottom-color":t.light.border},r[p(e,".bw-modal-footer")]={"border-top-color":t.light.border},r[p(e,".bw-modal-title")]={color:t.dark.base},r}(e,t),function(e,t){var r={};return r[p(e,".bw-toast")]={"background-color":"#fff","border-color":"rgba(0,0,0,0.1)","box-shadow":"0 0.5rem 1rem rgba(0,0,0,0.15)"},r[p(e,".bw-toast-header")]={"border-bottom-color":"rgba(0,0,0,0.05)"},["primary","secondary","success","danger","warning","info"].forEach(function(o){r[p(e,".bw-toast-"+o)]={"border-left":"4px solid "+t[o].base}}),r}(e,t),function(e,t){var r={};return r[p(e,".bw-dropdown-menu")]={"background-color":"#fff","border-color":t.light.border,"box-shadow":"0 0.5rem 1rem rgba(0,0,0,0.15)"},r[p(e,".bw-dropdown-item")]={color:t.dark.base},r[p(e,".bw-dropdown-item:hover")]={color:t.dark.hover,"background-color":t.light.light},r[p(e,".bw-dropdown-item.disabled")]={color:t.secondary.base},r[p(e,".bw-dropdown-divider")]={"border-top-color":t.light.border},r}(e,t),function(e,t){var r={};return r[p(e,".bw-form-switch .bw-switch-input")]={"background-color":t.secondary.base,"border-color":t.secondary.base},r[p(e,".bw-form-switch .bw-switch-input:checked")]={"background-color":t.primary.base,"border-color":t.primary.base},r[p(e,".bw-form-switch .bw-switch-input:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},r}(e,t),function(e,t){var r={};return r[p(e,".bw-skeleton")]={background:"linear-gradient(90deg, "+t.light.border+" 25%, "+t.light.light+" 37%, "+t.light.border+" 63%)"},r}(e,t),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(o){r[p(e,".bw-avatar-"+o)]={"background-color":t[o].base,color:t[o].textOn}}),r}(e,t),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(o){var a=t[o];r[p(e,".bw-text-"+o)]={color:a.base},r[p(e,".bw-bg-"+o)]={"background-color":a.base}}),r}(e,t))}const f={".bw-container":{width:"100%","padding-right":"0.75rem","padding-left":"0.75rem","margin-right":"auto","margin-left":"auto"},"@media (min-width: 576px)":{".bw-container":{"max-width":"540px"}},"@media (min-width: 768px)":{".bw-container":{"max-width":"720px"}},"@media (min-width: 992px)":{".bw-container":{"max-width":"960px"}},"@media (min-width: 1200px)":{".bw-container":{"max-width":"1140px"}},".bw-container-fluid":{width:"100%","padding-right":"15px","padding-left":"15px","margin-right":"auto","margin-left":"auto"},".bw-row":{display:"flex","flex-wrap":"wrap","margin-right":"calc(var(--bw-gutter-x, 0.75rem) * -0.5)","margin-left":"calc(var(--bw-gutter-x, 0.75rem) * -0.5)"},'.col, [class*="col-"]':{position:"relative",width:"100%","padding-right":"calc(var(--bw-gutter-x, 0.75rem) * 0.5)","padding-left":"calc(var(--bw-gutter-x, 0.75rem) * 0.5)"},".bw-col":{flex:"1 0 0%"},".bw-col":{"flex-basis":"0","flex-grow":"1","max-width":"100%"},".bw-col-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-12":{flex:"0 0 100%","max-width":"100%"}},h={"@media (min-width: 576px)":{".bw-col-sm-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-sm-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-sm-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-sm-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-sm-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-sm-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-sm-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-sm-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-sm-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-sm-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-sm-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-sm-12":{flex:"0 0 100%","max-width":"100%"}},"@media (min-width: 768px)":{".bw-col-md-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-md-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-md-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-md-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-md-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-md-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-md-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-md-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-md-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-md-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-md-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-md-12":{flex:"0 0 100%","max-width":"100%"}},"@media (min-width: 992px)":{".bw-col-lg-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-lg-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-lg-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-lg-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-lg-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-lg-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-lg-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-lg-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-lg-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-lg-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-lg-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-lg-12":{flex:"0 0 100%","max-width":"100%"}},"@media (max-width: 575px)":{".bw-card-img-left, .bw_card-img-left":{width:"100%"},".bw-card-img-right, .bw_card-img-right":{width:"100%"},".bw-hero, .bw_hero":{padding:"2rem 1rem"},".bw-cta-actions, .bw_cta-actions":{"flex-direction":"column"},".bw-hstack, .bw_hstack":{"flex-direction":"column"},".bw-feature-grid, .bw_feature-grid":{"grid-template-columns":"1fr"}}};function g(e){const t={};for(const[r,o]of Object.entries(e))if(t[r]=o,r.includes(".bw-")){t[r.replace(/\.bw-/g,".bw_")]=o}return t}let y={colors:{primary:"#006666",secondary:"#6c757d",success:"#198754",danger:"#dc3545",warning:"#ffc107",info:"#0dcaf0",light:"#f8f9fa",dark:"#212529",white:"#fff",black:"#000"},breakpoints:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},spacing:{0:"0",1:"0.25rem",2:"0.5rem",3:"1rem",4:"1.5rem",5:"3rem"},typography:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"}},darkMode:!1};function v(e,t){for(const r of Object.keys(t))t[r]&&"object"==typeof t[r]&&!Array.isArray(t[r])&&e[r]&&"object"==typeof e[r]&&!Array.isArray(e[r])?v(e[r],t[r]):e[r]=t[r];return e}function x(e){v(y,e)}
|
|
35
|
+
*/var f={compact:{btn:"0.3rem 0.8rem",card:"0.875rem 1rem",alert:"0.625rem 1rem",cell:"0.5rem 0.75rem",input:"0.375rem 0.7rem"},normal:{btn:"0.5rem 1.125rem",card:"1.25rem 1.5rem",alert:"0.875rem 1.25rem",cell:"0.75rem 1rem",input:"0.5rem 0.875rem"},spacious:{btn:"0.75rem 1.5rem",card:"1.75rem 2rem",alert:"1.125rem 1.5rem",cell:"1rem 1.25rem",input:"0.75rem 1.125rem"}},h={none:{btn:"0",card:"0",badge:"0",alert:"0",input:"0"},sm:{btn:"4px",card:"4px",badge:".25rem",alert:"4px",input:"4px"},md:{btn:"6px",card:"8px",badge:".375rem",alert:"8px",input:"6px"},lg:{btn:"10px",card:"12px",badge:".5rem",alert:"12px",input:"10px"},pill:{btn:"50rem",card:"1rem",badge:"50rem",alert:"1rem",input:"50rem"}},g={tight:1.125,normal:1.2,relaxed:1.25,dramatic:1.333};function v(e,t){return e||(e=16),t||(t=1.2),{xs:Math.round(e/(t*t)),sm:Math.round(e/t),base:e,lg:Math.round(e*t),xl:Math.round(e*t*t),"2xl":Math.round(e*Math.pow(t,3)),"3xl":Math.round(e*Math.pow(t,4)),"4xl":Math.round(e*Math.pow(t,5))}}var y={flat:{sm:"none",md:"none",lg:"none",xl:"none"},sm:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 1px 3px rgba(0,0,0,0.08)",lg:"0 2px 6px rgba(0,0,0,0.10)",xl:"0 4px 12px rgba(0,0,0,0.12)"},md:{sm:"0 1px 3px rgba(0,0,0,0.08)",md:"0 2px 6px rgba(0,0,0,0.12)",lg:"0 4px 12px rgba(0,0,0,0.16)",xl:"0 8px 24px rgba(0,0,0,0.20)"},lg:{sm:"0 2px 4px rgba(0,0,0,0.10)",md:"0 4px 12px rgba(0,0,0,0.16)",lg:"0 8px 24px rgba(0,0,0,0.22)",xl:"0 16px 48px rgba(0,0,0,0.28)"}},x={reduced:{fast:"0ms",normal:"0ms",slow:"0ms",easing:"linear"},standard:{fast:"100ms",normal:"200ms",slow:"300ms",easing:"ease-out"},expressive:{fast:"150ms",normal:"300ms",slow:"500ms",easing:"cubic-bezier(0.34, 1.56, 0.64, 1)"}},k={primary:"#006666",secondary:"#6c757d",tertiary:"#006666",success:"#198754",danger:"#dc3545",warning:"#b38600",info:"#0891b2",light:"#f8f9fa",dark:"#212529"};function _(e,t){return e?t.includes(",")?t.split(",").map(function(t){return"."+e+" "+t.trim()}).join(", "):"."+e+" "+t:t}function S(e,t,r){return Object.assign({},function(e,t){var r={};return r[_(e,"body")]={color:t.dark.base,"background-color":"#f5f5f5"},r}(e,t),function(e,t,r){var a=r.motion,o={};return o[_(e,"a")]={color:t.primary.base,"text-decoration":"none",transition:"color "+a.fast+" "+a.easing},o[_(e,"a:hover")]={color:t.primary.hover,"text-decoration":"underline"},o}(e,t,r),function(e,t,r){var a={},o=r.spacing,n=r.radius;return a[_(e,".bw-btn")]={padding:o.btn,"border-radius":n.btn},a[_(e,".bw-btn:focus-visible")]={outline:"2px solid currentColor","outline-offset":"2px","box-shadow":"0 0 0 3px "+t.primary.focus},["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(r){var o=t[r];a[_(e,".bw-btn-"+r)]={color:o.textOn,"background-color":o.base,"border-color":o.base},a[_(e,".bw-btn-"+r+":hover")]={color:o.textOn,"background-color":o.hover,"border-color":o.active},a[_(e,".bw-btn-outline-"+r)]={color:o.base,"border-color":o.base,"background-color":"transparent"},a[_(e,".bw-btn-outline-"+r+":hover")]={color:o.textOn,"background-color":o.base,"border-color":o.base}}),a[_(e,".bw-btn-lg")]={padding:"0.625rem 1.5rem","font-size":"1rem","border-radius":"50rem"===n.btn?"50rem":parseInt(n.btn)+2+"px"},a[_(e,".bw-btn-sm")]={padding:"0.25rem 0.75rem","font-size":"0.8125rem","border-radius":"50rem"===n.btn?"50rem":Math.max(parseInt(n.btn)-1,0)+"px"},a}(e,t,r),function(e,t,r){var a={},o=r.spacing,n=r.radius;return a[_(e,".bw-alert")]={padding:o.alert,"border-radius":n.alert},["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(r){var o=t[r];a[_(e,".bw-alert-"+r)]={color:o.darkText,"background-color":o.light,"border-color":o.border},a[_(e,".bw-alert-"+r+" .alert-link")]={color:i(o.darkText,-10)}}),a}(e,t,r),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(a){var o=t[a];r[_(e,".bw-badge-"+a)]={color:o.textOn,"background-color":o.base}}),r}(e,t),function(e,t,r){var a={},o=r.spacing,n=r.radius,i=r.elevation;return a[_(e,".bw-card")]={"background-color":"#fff",border:"1px solid "+t.light.border,"border-radius":n.card,"box-shadow":i.sm},a[_(e,".bw-card:hover")]={"box-shadow":i.md},a[_(e,".bw-card-body")]={padding:o.card},a[_(e,".bw-card-header")]={padding:o.card.split(" ").map(function(e){return(.7*parseFloat(e)).toFixed(3).replace(/\.?0+$/,"")+"rem"}).join(" "),"background-color":t.light.light,"border-bottom":"1px solid "+t.light.border},a[_(e,".bw-card-footer")]={"background-color":t.light.light,"border-top":"1px solid "+t.light.border,color:t.secondary.base},a[_(e,".bw-card-title")]={color:t.dark.base},a[_(e,".bw-card-subtitle")]={color:t.secondary.base},["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(r){a[_(e,".bw-card-"+r)]={"border-left":"4px solid "+t[r].base}}),a}(e,t,r),function(e,t,r){var a={},o=r.spacing,n=r.radius;return a[_(e,".bw-form-control")]={padding:o.input,"border-radius":n.input,color:t.dark.base,"background-color":"#fff","border-color":t.light.border},a[_(e,".bw-form-control:focus")]={"border-color":t.primary.border,outline:"2px solid "+t.primary.base,"outline-offset":"-1px","box-shadow":"0 0 0 0.25rem "+t.primary.focus},a[_(e,".bw-form-control::placeholder")]={color:t.secondary.base},a[_(e,".bw-form-label")]={color:t.dark.base},a[_(e,".bw-form-text")]={color:t.secondary.base},a[_(e,".bw-form-check-input:checked")]={"background-color":t.primary.base,"border-color":t.primary.base},a[_(e,".bw-form-check-input:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},a}(e,t,r),function(e,t){var r={};return r[_(e,".bw-navbar")]={"background-color":t.light.light,"border-bottom-color":t.light.border},r[_(e,".bw-navbar-brand")]={color:t.dark.base},r[_(e,".bw-navbar-nav .bw-nav-link")]={color:t.secondary.base},r[_(e,".bw-navbar-nav .bw-nav-link:hover")]={color:t.dark.base},r[_(e,".bw-navbar-nav .bw-nav-link.active")]={color:t.primary.base,"background-color":t.primary.focus},r[_(e,".bw-navbar-dark")]={"background-color":t.dark.base,"border-bottom-color":t.dark.hover},r[_(e,".bw-navbar-dark .bw-navbar-brand")]={color:t.light.base},r[_(e,".bw-navbar-dark .bw-nav-link")]={color:"rgba(255,255,255,.65)"},r[_(e,".bw-navbar-dark .bw-nav-link:hover")]={color:"#fff"},r[_(e,".bw-navbar-dark .bw-nav-link.active")]={color:"#fff","font-weight":"600"},r[_(e,".bw-nav-pills .bw-nav-link.active")]={color:t.primary.textOn,"background-color":t.primary.base},r}(e,t),function(e,t,r){var a={},o=r.spacing;return a[_(e,".bw-table")]={color:t.dark.base,"border-color":t.light.border},a[_(e,".bw-table > :not(caption) > * > *")]={padding:o.cell,"border-bottom-color":t.light.border},a[_(e,".bw-table > thead > tr > *")]={color:t.secondary.base,"border-bottom-color":t.light.border,"background-color":t.light.light},a[_(e,".bw-table-striped > tbody > tr:nth-of-type(odd) > *")]={"background-color":"rgba(0, 0, 0, 0.05)"},a[_(e,".bw-table-hover > tbody > tr:hover > *")]={"background-color":t.primary.focus},a[_(e,".bw-table-bordered")]={"border-color":t.light.border},a[_(e,".bw-table caption")]={color:t.secondary.base},a}(e,t,r),function(e,t){var r={};return r[_(e,".bw-nav-tabs")]={"border-bottom-color":t.light.border},r[_(e,".bw-nav-link")]={color:t.secondary.base},r[_(e,".bw-nav-tabs .bw-nav-link:hover")]={color:t.dark.base,"border-bottom-color":t.light.border},r[_(e,".bw-nav-tabs .bw-nav-link.active")]={color:t.primary.base,"border-bottom":"2px solid "+t.primary.base},r}(e,t),function(e,t,r){var a={},o=r.spacing;return a[_(e,".bw-list-group-item")]={padding:o.cell,color:t.dark.base,"background-color":"#fff","border-color":t.light.border},a[_(e,"a.bw-list-group-item:hover")]={"background-color":t.light.light,color:t.dark.hover},a[_(e,".bw-list-group-item.active")]={color:t.primary.textOn,"background-color":t.primary.base,"border-color":t.primary.base},a[_(e,".bw-list-group-item.disabled")]={color:t.secondary.base,"background-color":"#fff"},a}(e,t,r),function(e,t){var r={};return r[_(e,".bw-page-link")]={color:t.primary.base,"background-color":"#fff","border-color":t.light.border},r[_(e,".bw-page-link:hover")]={color:t.primary.hover,"background-color":t.light.light,"border-color":t.light.border},r[_(e,".bw-page-link:focus")]={outline:"2px solid "+t.primary.base,"outline-offset":"-2px"},r[_(e,".bw-page-item.bw-active .bw-page-link")]={color:t.primary.textOn,"background-color":t.primary.base,"border-color":t.primary.base},r[_(e,".bw-page-item.bw-disabled .bw-page-link")]={color:t.secondary.base,"background-color":"#fff","border-color":t.light.border},r}(e,t),function(e,t){var r={};return r[_(e,".bw-progress")]={"background-color":t.light.light,"box-shadow":"inset 0 1px 2px rgba(0,0,0,.1)"},r[_(e,".bw-progress-bar")]={color:"#fff","background-color":t.primary.base,"box-shadow":"inset 0 -1px 0 rgba(0,0,0,.15)"},["primary","secondary","success","danger","warning","info"].forEach(function(a){r[_(e,".bw-progress-bar-"+a)]={"background-color":t[a].base}}),r}(e,t),function(e,t){var r={};return r[_(e,".bw-hero-primary")]={background:"linear-gradient(135deg, "+t.primary.base+" 0%, "+t.primary.hover+" 100%)",color:t.primary.textOn},r[_(e,".bw-hero-secondary")]={background:"linear-gradient(135deg, "+t.secondary.base+" 0%, "+t.secondary.hover+" 100%)",color:t.secondary.textOn},r[_(e,".bw-hero-dark")]={background:"linear-gradient(135deg, "+t.dark.base+" 0%, "+t.dark.hover+" 100%)",color:t.dark.textOn},r}(e,t),function(e,t){var r={};return r[_(e,".bw-breadcrumb-item + .bw-breadcrumb-item::before")]={color:t.secondary.base},r[_(e,".bw-breadcrumb-item.active")]={color:t.secondary.base},r}(e,t),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(a){r[_(e,".bw-spinner-border.bw-text-"+a)]={color:t[a].base},r[_(e,".bw-spinner-grow.bw-text-"+a)]={color:t[a].base}}),r}(e,t),function(e,t){var r={};return r[_(e,".bw-close")]={color:t.dark.base,opacity:"0.5"},r[_(e,".bw-close:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},r}(e,t),function(e,t){var r={};return r[_(e,".bw-section-subtitle")]={color:t.secondary.base},r[_(e,".bw-feature-description")]={color:t.secondary.base},r[_(e,".bw-cta-description")]={color:t.secondary.base},r}(e,t),function(e,t){var r={};return r[_(e,".bw-accordion-item")]={"background-color":"#fff","border-color":t.light.border},r[_(e,".bw-accordion-button")]={color:t.dark.base},r[_(e,".bw-accordion-button:not(.bw-collapsed)")]={color:t.primary.darkText,"background-color":t.primary.light},r[_(e,".bw-accordion-button:hover")]={"background-color":t.light.light},r[_(e,".bw-accordion-button:not(.bw-collapsed):hover")]={"background-color":t.primary.hover},r[_(e,".bw-accordion-button:focus-visible")]={"box-shadow":"0 0 0 0.2rem "+t.primary.focus},r[_(e,".bw-accordion-body")]={"border-top":"1px solid "+t.light.border},r}(e,t),function(e,t){var r={};return r[_(e,".bw-carousel")]={"background-color":t.light.light},r[_(e,".bw-carousel-indicator.active")]={"background-color":t.primary.base},r}(e,t),function(e,t,r){var a={};return a[_(e,".bw-modal-content")]={"background-color":"#fff","border-color":t.light.border,"box-shadow":r.elevation.lg},a[_(e,".bw-modal-header")]={"border-bottom-color":t.light.border},a[_(e,".bw-modal-footer")]={"border-top-color":t.light.border},a[_(e,".bw-modal-title")]={color:t.dark.base},a}(e,t,r),function(e,t,r){var a={};return a[_(e,".bw-toast")]={"background-color":"#fff","border-color":"rgba(0,0,0,0.1)","box-shadow":r.elevation.lg},a[_(e,".bw-toast-header")]={"border-bottom-color":"rgba(0,0,0,0.05)"},["primary","secondary","success","danger","warning","info"].forEach(function(r){a[_(e,".bw-toast-"+r)]={"border-left":"4px solid "+t[r].base}}),a}(e,t,r),function(e,t,r){var a={};return a[_(e,".bw-dropdown-menu")]={"background-color":"#fff","border-color":t.light.border,"box-shadow":r.elevation.md},a[_(e,".bw-dropdown-item")]={color:t.dark.base},a[_(e,".bw-dropdown-item:hover")]={color:t.dark.hover,"background-color":t.light.light},a[_(e,".bw-dropdown-item.disabled")]={color:t.secondary.base},a[_(e,".bw-dropdown-divider")]={"border-top-color":t.light.border},a}(e,t,r),function(e,t){var r={};return r[_(e,".bw-form-switch .bw-switch-input")]={"background-color":t.secondary.base,"border-color":t.secondary.base},r[_(e,".bw-form-switch .bw-switch-input:checked")]={"background-color":t.primary.base,"border-color":t.primary.base},r[_(e,".bw-form-switch .bw-switch-input:focus")]={"box-shadow":"0 0 0 0.25rem "+t.primary.focus},r}(e,t),function(e,t){var r={};return r[_(e,".bw-skeleton")]={background:"linear-gradient(90deg, "+t.light.border+" 25%, "+t.light.light+" 37%, "+t.light.border+" 63%)"},r}(e,t),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(a){r[_(e,".bw-avatar-"+a)]={"background-color":t[a].base,color:t[a].textOn}}),r}(e,t),function(e,t){var r={};return["primary","secondary","success","danger","warning","info","light","dark"].forEach(function(a){var o=t[a];r[_(e,".bw-text-"+a)]={color:o.base},r[_(e,".bw-bg-"+a)]={"background-color":o.base}}),r}(e,t))}const C={".bw-container":{width:"100%","padding-right":"0.75rem","padding-left":"0.75rem","margin-right":"auto","margin-left":"auto"},"@media (min-width: 576px)":{".bw-container":{"max-width":"540px"}},"@media (min-width: 768px)":{".bw-container":{"max-width":"720px"}},"@media (min-width: 992px)":{".bw-container":{"max-width":"960px"}},"@media (min-width: 1200px)":{".bw-container":{"max-width":"1140px"}},".bw-container-fluid":{width:"100%","padding-right":"15px","padding-left":"15px","margin-right":"auto","margin-left":"auto"},".bw-row":{display:"flex","flex-wrap":"wrap","margin-right":"calc(var(--bw-gutter-x, 0.75rem) * -0.5)","margin-left":"calc(var(--bw-gutter-x, 0.75rem) * -0.5)"},'.col, [class*="col-"]':{position:"relative",width:"100%","padding-right":"calc(var(--bw-gutter-x, 0.75rem) * 0.5)","padding-left":"calc(var(--bw-gutter-x, 0.75rem) * 0.5)"},".bw-col":{flex:"1 0 0%"},".bw-col":{"flex-basis":"0","flex-grow":"1","max-width":"100%"},".bw-col-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-12":{flex:"0 0 100%","max-width":"100%"}},j={"@media (min-width: 576px)":{".bw-col-sm-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-sm-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-sm-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-sm-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-sm-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-sm-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-sm-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-sm-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-sm-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-sm-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-sm-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-sm-12":{flex:"0 0 100%","max-width":"100%"}},"@media (min-width: 768px)":{".bw-col-md-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-md-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-md-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-md-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-md-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-md-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-md-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-md-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-md-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-md-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-md-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-md-12":{flex:"0 0 100%","max-width":"100%"}},"@media (min-width: 992px)":{".bw-col-lg-1":{flex:"0 0 8.333333%","max-width":"8.333333%"},".bw-col-lg-2":{flex:"0 0 16.666667%","max-width":"16.666667%"},".bw-col-lg-3":{flex:"0 0 25%","max-width":"25%"},".bw-col-lg-4":{flex:"0 0 33.333333%","max-width":"33.333333%"},".bw-col-lg-5":{flex:"0 0 41.666667%","max-width":"41.666667%"},".bw-col-lg-6":{flex:"0 0 50%","max-width":"50%"},".bw-col-lg-7":{flex:"0 0 58.333333%","max-width":"58.333333%"},".bw-col-lg-8":{flex:"0 0 66.666667%","max-width":"66.666667%"},".bw-col-lg-9":{flex:"0 0 75%","max-width":"75%"},".bw-col-lg-10":{flex:"0 0 83.333333%","max-width":"83.333333%"},".bw-col-lg-11":{flex:"0 0 91.666667%","max-width":"91.666667%"},".bw-col-lg-12":{flex:"0 0 100%","max-width":"100%"}},"@media (max-width: 575px)":{".bw-card-img-left, .bw_card-img-left":{width:"100%"},".bw-card-img-right, .bw_card-img-right":{width:"100%"},".bw-hero, .bw_hero":{padding:"2rem 1rem"},".bw-cta-actions, .bw_cta-actions":{"flex-direction":"column"},".bw-hstack, .bw_hstack":{"flex-direction":"column"},".bw-feature-grid, .bw_feature-grid":{"grid-template-columns":"1fr"}}};function A(e){const t={};for(const[r,a]of Object.entries(e))if(t[r]=a,r.includes(".bw-")){t[r.replace(/\.bw-/g,".bw_")]=a}return t}let $={colors:{primary:"#006666",secondary:"#6c757d",success:"#198754",danger:"#dc3545",warning:"#b38600",info:"#0891b2",light:"#f8f9fa",dark:"#212529",white:"#fff",black:"#000"},breakpoints:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},spacing:{0:"0",1:"0.25rem",2:"0.5rem",3:"1rem",4:"1.5rem",5:"3rem"},typography:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"}}};function L(e,t){for(const r of Object.keys(t))t[r]&&"object"==typeof t[r]&&!Array.isArray(t[r])&&e[r]&&"object"==typeof e[r]&&!Array.isArray(e[r])?L(e[r],t[r]):e[r]=t[r];return e}function z(e){L($,e)}
|
|
36
36
|
/**
|
|
37
37
|
* Bitwrench v2 Components
|
|
38
38
|
*
|
|
@@ -50,7 +50,7 @@ const e={version:"2.0.12",name:"bitwrench",description:"A library for javascript
|
|
|
50
50
|
* @module bitwrench-components-v2
|
|
51
51
|
* @license BSD-2-Clause
|
|
52
52
|
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
53
|
-
*/function k(e={}){const{tabs:t=[],activeIndex:r=0}=e;let o=r;return t.forEach((e,t)=>{e.active&&(o=t)}),{t:"div",a:{class:"bw-tabs"},c:[{t:"ul",a:{class:"bw-nav bw-nav-tabs",role:"tablist"},c:t.map((e,t)=>({t:"li",a:{class:"bw-nav-item",role:"presentation"},c:{t:"button",a:{class:"bw-nav-link "+(t===o?"active":""),type:"button",role:"tab","aria-selected":t===o?"true":"false","data-tab-index":t,onclick:e=>{const t=e.target.closest(".bw-tabs"),r=t.querySelectorAll(".bw-nav-link"),o=t.querySelectorAll(".bw-tab-pane");r.forEach(e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false")}),o.forEach(e=>e.classList.remove("active")),e.target.classList.add("active"),e.target.setAttribute("aria-selected","true");o[parseInt(e.target.getAttribute("data-tab-index"))].classList.add("active")}},c:e.label}}))},{t:"div",a:{class:"bw-tab-content"},c:t.map((e,t)=>({t:"div",a:{class:"bw-tab-pane "+(t===o?"active":""),role:"tabpanel"},c:e.content}))}],o:{type:"tabs",state:{activeIndex:o}}}}class _{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this.children={header:e.querySelector(".bw-card-header"),title:e.querySelector(".bw-card-title"),body:e.querySelector(".bw-card-body"),footer:e.querySelector(".bw-card-footer")}}setTitle(e){return this.children.title&&(this.children.title.textContent=e),this}setContent(e){if(this.children.body)if("string"==typeof e)this.children.body.textContent=e;else{this.children.body.innerHTML="";const t=window.bw.taco.toDOM(e);this.children.body.appendChild(t)}return this}addClass(e){return this.element.classList.add(e),this}removeClass(e){return this.element.classList.remove(e),this}select(e){return this.element.querySelector(e)}}class C{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this._data=this.state.data||[],this._sortColumn=null,this._sortDirection="asc",this.children={thead:e.querySelector("thead"),tbody:e.querySelector("tbody"),headers:e.querySelectorAll("th")},this.state.sortable&&this._setupSorting()}_setupSorting(){this.children.headers.forEach((e,t)=>{e.style.cursor="pointer",e.onclick=()=>this.sortBy(e.textContent)})}setData(e){return this._data=e,this._renderBody(),this}sortBy(e,t){e!==this._sortColumn||t?(this._sortColumn=e,this._sortDirection=t||"asc"):this._sortDirection="asc"===this._sortDirection?"desc":"asc";const r=Object.keys(this._data[0])[Array.from(this.children.headers).findIndex(t=>t.textContent===e)];return this._data.sort((e,t)=>{const o=e[r],a=t[r],n=o<a?-1:o>a?1:0;return"asc"===this._sortDirection?n:-n}),this._renderBody(),this}_renderBody(){this.children.tbody.innerHTML="",this._data.forEach(e=>{const t=document.createElement("tr");Object.values(e).forEach(e=>{const r=document.createElement("td");r.textContent=e,t.appendChild(r)}),this.children.tbody.appendChild(t)})}}class S{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this.children={brand:e.querySelector(".bw-navbar-brand"),links:e.querySelectorAll(".bw-nav-link")}}setActive(e){return this.children.links.forEach(t=>{t.getAttribute("href")===e?t.classList.add("active"):t.classList.remove("active")}),this}}class ${constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this.children={navItems:e.querySelectorAll(".bw-nav-link"),tabPanes:e.querySelectorAll(".bw-tab-pane")},this._setupTabs()}_setupTabs(){this.children.navItems.forEach((e,t)=>{e.onclick=e=>{e.preventDefault(),this.switchTo(t)}})}switchTo(e){return this.children.navItems.forEach((t,r)=>{r===e?t.classList.add("active"):t.classList.remove("active")}),this.children.tabPanes.forEach((t,r)=>{r===e?t.classList.add("active"):t.classList.remove("active")}),this.state.activeIndex=e,this}}class j{constructor(e,t){this.element=e,this._taco=t,this._escHandler=null}show(){return this.element.classList.add("bw-modal-show"),document.body.style.overflow="hidden",this}hide(){return this.element.classList.remove("bw-modal-show"),document.body.style.overflow="",this}toggle(){return this.element.classList.contains("bw-modal-show")?this.hide():this.show(),this}destroy(){this.hide(),this._escHandler&&document.removeEventListener("keydown",this._escHandler),this.element.parentNode&&this.element.parentNode.removeChild(this.element)}}const A={card:_,table:C,navbar:S,tabs:$,modal:j};var O=Object.freeze({__proto__:null,CardHandle:_,ModalHandle:j,NavbarHandle:S,TableHandle:C,TabsHandle:$,componentHandles:A,makeAccordion:function(e={}){const{items:t=[],multiOpen:r=!1,className:o=""}=e;return{t:"div",a:{class:`bw-accordion ${o}`.trim()},c:t.map(function(e,t){return{t:"div",a:{class:"bw-accordion-item"},c:[{t:"h2",a:{class:"bw-accordion-header"},c:{t:"button",a:{class:("bw-accordion-button "+(e.open?"":"bw-collapsed")).trim(),type:"button","aria-expanded":e.open?"true":"false","data-accordion-index":t,onclick:function(e){var t=e.target.closest(".bw-accordion-button"),o=t.closest(".bw-accordion"),a=t.closest(".bw-accordion-item").querySelector(".bw-accordion-collapse"),n=a.classList.contains("bw-collapse-show");if(!r){for(var i=o.querySelectorAll(".bw-accordion-collapse"),s=o.querySelectorAll(".bw-accordion-button"),l=0;l<i.length;l++)i[l].classList.remove("bw-collapse-show"),i[l].style.maxHeight=null;for(var c=0;c<s.length;c++)s[c].classList.add("bw-collapsed"),s[c].setAttribute("aria-expanded","false")}n?(a.classList.remove("bw-collapse-show"),a.style.maxHeight=null,t.classList.add("bw-collapsed"),t.setAttribute("aria-expanded","false")):(a.classList.add("bw-collapse-show"),a.style.maxHeight=a.scrollHeight+"px",t.classList.remove("bw-collapsed"),t.setAttribute("aria-expanded","true"))}},c:e.title}},{t:"div",a:{class:("bw-accordion-collapse "+(e.open?"bw-collapse-show":"")).trim()},c:{t:"div",a:{class:"bw-accordion-body"},c:e.content},o:e.open?{mounted:function(e){e.style.maxHeight=e.scrollHeight+"px"}}:void 0}]}}),o:{type:"accordion",state:{multiOpen:r}}}},makeAlert:function(e={}){const{content:t,variant:r="info",dismissible:o=!1,className:a=""}=e;return{t:"div",a:{class:`bw-alert bw-alert-${r} ${o?"bw-alert-dismissible":""} ${a}`.trim(),role:"alert"},c:[t,o&&{t:"button",a:{type:"button",class:"bw-close","aria-label":"Close",onclick:function(e){var t=e.target.closest(".bw-alert");t&&t.remove()}},c:"×"}].filter(Boolean)}},makeAvatar:function(e={}){const{src:t,alt:r="",initials:o,size:a="md",variant:n="primary",className:i=""}=e;return t?{t:"img",a:{class:`bw-avatar bw-avatar-${a} ${i}`.trim(),src:t,alt:r}}:{t:"div",a:{class:`bw-avatar bw-avatar-${a} bw-avatar-${n} ${i}`.trim()},c:o||""}},makeBadge:function(e={}){const{text:t,variant:r="primary",size:o,pill:a=!1,className:n=""}=e;return{t:"span",a:{class:`bw-badge bw-badge-${r}${"sm"===o?" bw-badge-sm":"lg"===o?" bw-badge-lg":""} ${a?"bw-badge-pill":""} ${n}`.trim()},c:t}},makeBreadcrumb:function(e={}){const{items:t=[]}=e;return{t:"nav",a:{"aria-label":"breadcrumb"},c:{t:"ol",a:{class:"bw-breadcrumb"},c:t.map((e,t)=>({t:"li",a:{class:"bw-breadcrumb-item "+(e.active?"active":""),"aria-current":e.active?"page":void 0},c:e.active?e.text:{t:"a",a:{href:e.href||"#"},c:e.text}}))}}},makeButton:function(e={}){const{text:t,variant:r="primary",size:o,disabled:a=!1,onclick:n,type:i="button",className:s="",style:l}=e;return{t:"button",a:{type:i,class:["bw-btn",`bw-btn-${r}`,o&&`bw-btn-${o}`,s].filter(Boolean).join(" "),disabled:a,onclick:n,style:l},c:t,o:{type:"button"}}},makeButtonGroup:function(e={}){const{children:t,size:r,vertical:o=!1,className:a=""}=e;return{t:"div",a:{class:`${o?"bw-btn-group-vertical":"bw-btn-group"} ${r?"bw-btn-group-"+r:""} ${a}`.trim(),role:"group"},c:t}},makeCTA:function(e={}){const{title:t,description:r,actions:o,variant:a="light",centered:n=!0,className:i=""}=e;return{t:"section",a:{class:`bw-cta bw-bg-${a} bw-py-5 ${i}`.trim()},c:{t:"div",a:{class:"bw-container"},c:{t:"div",a:{class:"bw-cta-content "+(n?"bw-text-center":"")},c:[t&&{t:"h2",a:{class:"bw-cta-title bw-mb-3"},c:t},r&&{t:"p",a:{class:"bw-cta-description bw-lead bw-mb-4"},c:r},o&&{t:"div",a:{class:"bw-cta-actions"},c:o}].filter(Boolean)}}}},makeCard:function(e={}){const{title:t,subtitle:r,content:o,footer:a,header:n,image:i,imagePosition:s="top",variant:l,bordered:c=!0,shadow:d,hoverable:b=!1,className:m="",style:u,headerClass:p="",bodyClass:w="",footerClass:f=""}=e,h=["bw-card",l?`bw-card-${l}`:"",d&&{none:"",sm:"bw-shadow-sm",md:"bw-shadow",lg:"bw-shadow-lg"}[d]||"",c?"":"bw-border-0",b?"bw-card-hoverable":"",m].filter(Boolean).join(" ").trim(),g=[n&&{t:"div",a:{class:`bw-card-header ${p}`.trim()},c:n},i&&("top"===s||"left"===s)&&{t:"img",a:{class:`bw-card-img-${s}`,src:i.src,alt:i.alt||""}},{t:"div",a:{class:`bw-card-body ${w}`.trim()},c:[t&&{t:"h5",a:{class:"bw-card-title"},c:t},r&&{t:"h6",a:{class:"bw-card-subtitle bw-mb-2 bw-text-muted"},c:r},o&&(Array.isArray(o)?o:[o])].flat().filter(Boolean)},i&&("bottom"===s||"right"===s)&&{t:"img",a:{class:`bw-card-img-${s}`,src:i.src,alt:i.alt||""}},a&&{t:"div",a:{class:`bw-card-footer ${f}`.trim()},c:a}].filter(Boolean);return!i||"left"!==s&&"right"!==s?{t:"div",a:{class:h,style:u},c:g,o:{type:"card",state:e.state||{}}}:{t:"div",a:{class:h,style:u},c:{t:"div",a:{class:"bw-row bw-g-0"},c:g},o:{type:"card",state:e.state||{}}}},makeCarousel:function(e={}){const{items:t=[],showControls:r=!0,showIndicators:o=!0,autoPlay:a=!1,interval:n=5e3,height:i="300px",startIndex:s=0,className:l=""}=e;function c(e,t){var r=e.querySelectorAll(".bw-carousel-slide").length;t<0&&(t=r-1),t>=r&&(t=0),e.setAttribute("data-carousel-index",t),e.querySelector(".bw-carousel-track").style.transform="translateX(-"+100*t+"%)";for(var o=e.querySelectorAll(".bw-carousel-indicator"),a=0;a<o.length;a++)a===t?o[a].classList.add("active"):o[a].classList.remove("active")}var d=t.map(function(e){var t=[e.content,e.caption&&{t:"div",a:{class:"bw-carousel-caption"},c:e.caption}].filter(Boolean);return{t:"div",a:{class:"bw-carousel-slide"},c:1===t.length?t[0]:t}}),b=[{t:"div",a:{class:"bw-carousel-track",style:"transform: translateX(-"+100*s+"%)"},c:d}];return r&&t.length>1&&(b.push({t:"button",a:{class:"bw-carousel-control bw-carousel-control-prev",type:"button","aria-label":"Previous slide",onclick:function(e){var t=e.target.closest(".bw-carousel"),r=parseInt(t.getAttribute("data-carousel-index")||"0");c(t,r-1)}},c:{t:"img",a:{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e",alt:"",role:"presentation"}}}),b.push({t:"button",a:{class:"bw-carousel-control bw-carousel-control-next",type:"button","aria-label":"Next slide",onclick:function(e){var t=e.target.closest(".bw-carousel"),r=parseInt(t.getAttribute("data-carousel-index")||"0");c(t,r+1)}},c:{t:"img",a:{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e",alt:"",role:"presentation"}}})),o&&t.length>1&&b.push({t:"div",a:{class:"bw-carousel-indicators"},c:t.map(function(e,t){return{t:"button",a:{class:"bw-carousel-indicator"+(t===s?" active":""),type:"button","aria-label":"Go to slide "+(t+1),"data-slide-index":t,onclick:function(e){c(e.target.closest(".bw-carousel"),parseInt(e.target.getAttribute("data-slide-index")))}}}})}),{t:"div",a:{class:("bw-carousel "+l).trim(),style:"height: "+i,"data-carousel-index":s},c:b,o:{type:"carousel",state:{activeIndex:s,autoPlay:a,interval:n},mounted:a?function(e){var t=setInterval(function(){var t=parseInt(e.getAttribute("data-carousel-index")||"0");c(e,t+1)},n);e._bw_carouselInterval=t}:void 0,unmount:a?function(e){e._bw_carouselInterval&&clearInterval(e._bw_carouselInterval)}:void 0}}},makeCheckbox:function(e={}){const{label:t,checked:r=!1,id:o,name:a,disabled:n=!1,value:i,className:s="",...l}=e;return{t:"div",a:{class:`bw-form-check ${s}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw-form-check-input",checked:r,id:o,name:a,disabled:n,value:i,...l}},t&&{t:"label",a:{class:"bw-form-check-label",for:o},c:t}].filter(Boolean)}},makeCodeDemo:function(e={}){const{title:t,description:r,code:o,result:a,language:n="javascript"}=e;Math.random().toString(36).substr(2,9);const i=[{label:"Result",active:!0,content:a}];return o&&i.push({label:"Code",content:{t:"div",a:{style:"position: relative;"},c:[{t:"button",a:{class:"bw-copy-btn bw-code-copy-btn",onclick:e=>{navigator.clipboard.writeText(o).then(()=>{const t=e.target,r=t.textContent;t.textContent="Copied!",t.style.background="#006666",t.style.color="#fff",setTimeout(()=>{t.textContent=r,t.style.background="rgba(255,255,255,0.12)",t.style.color="#aaa"},2e3)})}},c:"Copy"},"undefined"!=typeof globalThis&&void 0!==globalThis.bw&&"function"==typeof globalThis.bw.codeEditor?globalThis.bw.codeEditor({code:o,lang:"javascript"===n?"js":n,readOnly:!0,height:"auto"}):{t:"pre",a:{class:"bw-code-pre"},c:{t:"code",a:{class:`bw-code-block language-${n}`},c:o}}]}}),{t:"div",a:{class:"bw-code-demo"},c:[t&&{t:"h3",c:t},r&&{t:"p",a:{class:"bw-text-muted",style:"margin-bottom: 1rem;"},c:r},k({tabs:i})].filter(Boolean)}},makeCol:function(e={}){const{size:t,offset:r,push:o,pull:a,content:n,children:i,className:s=""}=e,l=[];return"object"==typeof t?Object.entries(t).forEach(([e,t])=>{"xs"===e?l.push(`bw-col-${t}`):l.push(`bw-col-${e}-${t}`)}):t?l.push(`bw-col-${t}`):l.push("bw-col"),r&&l.push(`bw-offset-${r}`),o&&l.push(`bw-push-${o}`),a&&l.push(`bw-pull-${a}`),{t:"div",a:{class:`${l.join(" ")} ${s}`.trim()},c:n||i}},makeContainer:function(e={}){const{fluid:t=!1,children:r,className:o=""}=e;return{t:"div",a:{class:`bw-container${t?"-fluid":""} ${o}`.trim()},c:r}},makeDropdown:function(e={}){const{trigger:t,items:r=[],align:o="start",variant:a="primary",className:n=""}=e;var i;return i="string"==typeof t||void 0===t?{t:"button",a:{class:`bw-btn bw-btn-${a} bw-dropdown-toggle`,type:"button",onclick:function(e){e.target.closest(".bw-dropdown").querySelector(".bw-dropdown-menu").classList.toggle("bw-dropdown-show")}},c:t||"Dropdown"}:t,{t:"div",a:{class:`bw-dropdown ${n}`.trim()},c:[i,{t:"div",a:{class:("bw-dropdown-menu "+("end"===o?"bw-dropdown-menu-end":"")).trim()},c:r.map(function(e){return e.divider?{t:"hr",a:{class:"bw-dropdown-divider"}}:{t:"a",a:{class:("bw-dropdown-item "+(e.disabled?"disabled":"")).trim(),href:e.href||"#",onclick:e.disabled?void 0:function(t){e.href||t.preventDefault(),t.target.closest(".bw-dropdown").querySelector(".bw-dropdown-menu").classList.remove("bw-dropdown-show"),e.onclick&&e.onclick(t)}},c:e.text}})}],o:{type:"dropdown",mounted:function(e){var t=function(t){if(!e.contains(t.target)){var r=e.querySelector(".bw-dropdown-menu");r&&r.classList.remove("bw-dropdown-show")}};document.addEventListener("click",t),e._bw_outsideHandler=t},unmount:function(e){e._bw_outsideHandler&&document.removeEventListener("click",e._bw_outsideHandler)}}}},makeFeatureGrid:function(e={}){const{features:t=[],columns:r=3,centered:o=!0,iconSize:a="3rem",className:n=""}=e,i="bw-col-md-"+12/r;return{t:"div",a:{class:`bw-feature-grid ${n}`.trim()},c:{t:"div",a:{class:"bw-row bw-g-4"},c:t.map(e=>({t:"div",a:{class:i},c:{t:"div",a:{class:"bw-feature "+(o?"bw-text-center":"")},c:[e.icon&&{t:"div",a:{class:"bw-feature-icon bw-mb-3 bw-text-primary",style:`font-size: ${a};`},c:e.icon},e.title&&{t:"h3",a:{class:"bw-feature-title bw-h5 bw-mb-2"},c:e.title},e.description&&{t:"p",a:{class:"bw-feature-description bw-text-muted"},c:e.description}].filter(Boolean)}}))}}},makeForm:function(e={}){const{children:t,onsubmit:r,className:o=""}=e;return{t:"form",a:{class:o,onsubmit:r||(e=>e.preventDefault())},c:t}},makeFormGroup:function(e={}){const{label:t,input:r,help:o,id:a}=e;return{t:"div",a:{class:"bw-form-group"},c:[t&&{t:"label",a:{for:a,class:"bw-form-label"},c:t},r,o&&{t:"small",a:{class:"bw-form-text bw-text-muted"},c:o}].filter(Boolean)}},makeHero:function(e={}){const{title:t,subtitle:r,content:o,variant:a="primary",size:n="lg",centered:i=!0,overlay:s=!1,backgroundImage:l,actions:c,className:d=""}=e,b={sm:"bw-py-3",md:"bw-py-4",lg:"bw-py-5",xl:"bw-py-6"};return{t:"section",a:{class:`bw-hero bw-hero-${a} ${b[n]||b.lg} ${i?"bw-text-center":""} ${d}`.trim(),style:l?`background-image: url('${l}'); background-size: cover; background-position: center;`:void 0},c:[s&&{t:"div",a:{class:"bw-hero-overlay"}},{t:"div",a:{class:"bw-container"},c:{t:"div",a:{class:"bw-hero-content"},c:[t&&{t:"h1",a:{class:"bw-hero-title bw-display-4 bw-mb-3"},c:t},r&&{t:"p",a:{class:"bw-hero-subtitle bw-lead bw-mb-4"},c:r},o,c&&{t:"div",a:{class:"bw-hero-actions bw-mt-4"},c:c}].filter(Boolean)}}].filter(Boolean)}},makeInput:function(e={}){const{type:t="text",placeholder:r,value:o,id:a,name:n,disabled:i=!1,readonly:s=!1,required:l=!1,className:c="",style:d,...b}=e;return{t:"input",a:{type:t,class:`bw-form-control ${c}`.trim(),placeholder:r,value:o,id:a,name:n,style:d,disabled:i,readonly:s,required:l,...b}}},makeListGroup:function(e={}){const{items:t=[],flush:r=!1,interactive:o=!1}=e;return{t:"div",a:{class:("bw-list-group "+(r?"bw-list-group-flush":"")).trim()},c:t.map(e=>{const t="object"==typeof e,r=t?e.text:e,a=!!t&&e.active,n=!!t&&e.disabled,i=t?e.href:null,s=t?e.onclick:null;return o||i||s?{t:"a",a:{class:["bw-list-group-item",a&&"active",n&&"disabled"].filter(Boolean).join(" "),href:i||"#",onclick:s||(e=>{i||e.preventDefault()}),style:n?"pointer-events: none; opacity: 0.65;":""},c:r}:{t:"div",a:{class:["bw-list-group-item",a&&"active",n&&"disabled"].filter(Boolean).join(" ")},c:r}})}},makeModal:function(e={}){const{title:t,content:r,footer:o,size:a,closeButton:n=!0,onClose:i,className:s=""}=e;function l(e){var t=e.closest(".bw-modal");t&&(t.classList.remove("bw-modal-show"),document.body.style.overflow=""),i&&i()}return{t:"div",a:{class:`bw-modal ${s}`.trim()},c:{t:"div",a:{class:("bw-modal-dialog "+(a?"bw-modal-"+a:"")).trim()},c:{t:"div",a:{class:"bw-modal-content"},c:[(t||n)&&{t:"div",a:{class:"bw-modal-header"},c:[t&&{t:"h5",a:{class:"bw-modal-title"},c:t},n&&{t:"button",a:{type:"button",class:"bw-close","aria-label":"Close",onclick:function(e){l(e.target)}},c:"×"}].filter(Boolean)},r&&{t:"div",a:{class:"bw-modal-body"},c:r},o&&{t:"div",a:{class:"bw-modal-footer"},c:o}].filter(Boolean)}},o:{type:"modal",mounted:function(e){e.addEventListener("click",function(t){t.target===e&&l(e)});var t=function(t){"Escape"===t.key&&e.classList.contains("bw-modal-show")&&l(e)};document.addEventListener("keydown",t),e._bw_escHandler=t},unmount:function(e){e._bw_escHandler&&document.removeEventListener("keydown",e._bw_escHandler),document.body.style.overflow=""}}}},makeNav:function(e={}){const{items:t=[],pills:r=!1,vertical:o=!1,className:a=""}=e;return{t:"ul",a:{class:`bw-nav ${r?"bw-nav-pills":"bw-nav-tabs"} ${o?"bw-nav-vertical":""} ${a}`.trim()},c:t.map(e=>({t:"li",a:{class:"bw-nav-item"},c:{t:"a",a:{href:e.href||"#",class:`bw-nav-link ${e.active?"active":""} ${e.disabled?"disabled":""}`.trim()},c:e.text}}))}},makeNavbar:function(e={}){const{brand:t,brandHref:r="#",items:o=[],dark:a=!0,className:n=""}=e;return{t:"nav",a:{class:`bw-navbar ${a?"bw-navbar-dark":"bw-navbar-light"} ${n}`.trim()},c:{t:"div",a:{class:"bw-container"},c:[t&&{t:"a",a:{href:r,class:"bw-navbar-brand"},c:t},o.length>0&&{t:"div",a:{class:"bw-navbar-nav"},c:o.map(e=>({t:"a",a:{href:e.href||"#",class:"bw-nav-link "+(e.active?"active":"")},c:e.text}))}].filter(Boolean)},o:{type:"navbar",state:{activeItem:o.findIndex(e=>e.active)}}}},makePagination:function(e={}){const{pages:t=1,currentPage:r=1,onPageChange:o,size:a,className:n=""}=e;function i(e){return function(a){a.preventDefault(),e<1||e>t||e===r||o&&o(e)}}const s=[];s.push({t:"li",a:{class:("bw-page-item "+(r<=1?"bw-disabled":"")).trim()},c:{t:"a",a:{class:"bw-page-link",href:"#",onclick:i(r-1),"aria-label":"Previous"},c:"‹"}});for(var l=1;l<=t;l++)(function(e){s.push({t:"li",a:{class:("bw-page-item "+(e===r?"bw-active":"")).trim()},c:{t:"a",a:{class:"bw-page-link",href:"#",onclick:i(e)},c:""+e}})})(l);return s.push({t:"li",a:{class:("bw-page-item "+(r>=t?"bw-disabled":"")).trim()},c:{t:"a",a:{class:"bw-page-link",href:"#",onclick:i(r+1),"aria-label":"Next"},c:"›"}}),{t:"nav",a:{"aria-label":"Pagination"},c:{t:"ul",a:{class:`bw-pagination ${a?"bw-pagination-"+a:""} ${n}`.trim()},c:s}}},makeProgress:function(e={}){const{value:t=0,max:r=100,variant:o="primary",striped:a=!1,animated:n=!1,label:i,height:s}=e,l=Math.round(t/r*100);return{t:"div",a:{class:"bw-progress",style:s?{height:`${s}px`}:void 0},c:{t:"div",a:{class:["bw-progress-bar",`bw-progress-bar-${o}`,a&&"bw-progress-bar-striped",n&&"bw-progress-bar-animated"].filter(Boolean).join(" "),role:"progressbar",style:{width:`${l}%`},"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r},c:i||`${l}%`}}},makeRadio:function(e={}){const{label:t,name:r,value:o,checked:a=!1,id:n,disabled:i=!1,className:s="",...l}=e;return{t:"div",a:{class:`bw-form-check ${s}`.trim()},c:[{t:"input",a:{type:"radio",class:"bw-form-check-input",name:r,value:o,checked:a,id:n,disabled:i,...l}},t&&{t:"label",a:{class:"bw-form-check-label",for:n},c:t}].filter(Boolean)}},makeRow:function(e={}){const{children:t,className:r="",gap:o}=e;return{t:"div",a:{class:`bw-row ${o?`bw-g-${o}`:""} ${r}`.trim()},c:t}},makeSection:function(e={}){const{title:t,subtitle:r,content:o,variant:a="default",spacing:n="md",className:i=""}=e,s={sm:"bw-py-3",md:"bw-py-4",lg:"bw-py-5",xl:"bw-py-6"};return{t:"section",a:{class:`bw-section ${s[n]||s.md} ${"default"!==a?`bw-bg-${a}`:""} ${i}`.trim()},c:{t:"div",a:{class:"bw-container"},c:[(t||r)&&{t:"div",a:{class:"bw-section-header bw-text-center bw-mb-5"},c:[t&&{t:"h2",a:{class:"bw-section-title"},c:t},r&&{t:"p",a:{class:"bw-section-subtitle bw-text-muted"},c:r}].filter(Boolean)},o].filter(Boolean)}}},makeSelect:function(e={}){const{options:t=[],value:r,id:o,name:a,disabled:n=!1,required:i=!1,className:s="",...l}=e;return{t:"select",a:{class:`bw-form-control ${s}`.trim(),id:o,name:a,disabled:n,required:i,...l},c:t.map(e=>({t:"option",a:{value:e.value,selected:e.value===r},c:e.text||e.value}))}},makeSkeleton:function(e={}){const{variant:t="text",width:r,height:o,count:a=1,className:n=""}=e;if("circle"===t){var i=r||o||"3rem";return{t:"div",a:{class:`bw-skeleton bw-skeleton-circle ${n}`.trim(),style:{width:i,height:i}}}}if("rect"===t)return{t:"div",a:{class:`bw-skeleton bw-skeleton-rect ${n}`.trim(),style:{width:r||"100%",height:o||"120px"}}};if(1===a)return{t:"div",a:{class:`bw-skeleton bw-skeleton-text ${n}`.trim(),style:{width:r||"100%",height:o||"1em"}}};for(var s=[],l=0;l<a;l++)s.push({t:"div",a:{class:"bw-skeleton bw-skeleton-text",style:{width:l===a-1?"75%":r||"100%",height:o||"1em"}}});return{t:"div",a:{class:`bw-skeleton-group ${n}`.trim()},c:s}},makeSpinner:function(e={}){const{variant:t="primary",size:r="md",type:o="border"}=e;return{t:"div",a:{class:`bw-spinner-${o} bw-spinner-${o}-${r} bw-text-${t}`,role:"status"},c:{t:"span",a:{class:"bw-visually-hidden"},c:"Loading..."}}},makeStack:function(e={}){const{children:t,direction:r="vertical",gap:o=3,className:a=""}=e;return{t:"div",a:{class:`bw-${"vertical"===r?"vstack":"hstack"} bw-gap-${o} ${a}`.trim()},c:t}},makeSwitch:function(e={}){const{label:t,checked:r=!1,id:o,name:a,disabled:n=!1,className:i="",...s}=e;return{t:"div",a:{class:`bw-form-check bw-form-switch ${i}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw-form-check-input bw-switch-input",role:"switch",checked:r,id:o,name:a,disabled:n,...s}},t&&{t:"label",a:{class:"bw-form-check-label",for:o},c:t}].filter(Boolean)}},makeTabs:k,makeTextarea:function(e={}){const{placeholder:t,value:r,rows:o=3,id:a,name:n,disabled:i=!1,readonly:s=!1,required:l=!1,className:c="",...d}=e;return{t:"textarea",a:{class:`bw-form-control ${c}`.trim(),placeholder:t,rows:o,id:a,name:n,disabled:i,readonly:s,required:l,...d},c:r}},makeToast:function(e={}){const{title:t,content:r,variant:o="info",autoDismiss:a=!0,delay:n=5e3,position:i="top-right",className:s=""}=e;return{t:"div",a:{class:`bw-toast bw-toast-${o} ${s}`.trim(),role:"alert","data-position":i},c:[t&&{t:"div",a:{class:"bw-toast-header"},c:[{t:"strong",c:t},{t:"button",a:{type:"button",class:"bw-close","aria-label":"Close",onclick:function(e){var t=e.target.closest(".bw-toast");t&&(t.classList.add("bw-toast-hiding"),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},300))}},c:"×"}]},r&&{t:"div",a:{class:"bw-toast-body"},c:r}].filter(Boolean),o:{type:"toast",mounted:function(e){requestAnimationFrame(function(){e.classList.add("bw-toast-show")}),a&&setTimeout(function(){e.classList.add("bw-toast-hiding"),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},300)},n)}}}}});
|
|
53
|
+
*/function T(e={}){const{tabs:t=[],activeIndex:r=0}=e;let a=r;return t.forEach((e,t)=>{e.active&&(a=t)}),{t:"div",a:{class:"bw-tabs"},c:[{t:"ul",a:{class:"bw-nav bw-nav-tabs",role:"tablist"},c:t.map((e,t)=>({t:"li",a:{class:"bw-nav-item",role:"presentation"},c:{t:"button",a:{class:"bw-nav-link "+(t===a?"active":""),type:"button",role:"tab",tabindex:t===a?"0":"-1","aria-selected":t===a?"true":"false","data-tab-index":t,onclick:e=>{const t=e.target.closest(".bw-tabs"),r=t.querySelectorAll(".bw-nav-link"),a=t.querySelectorAll(".bw-tab-pane");r.forEach(e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")}),a.forEach(e=>e.classList.remove("active")),e.target.classList.add("active"),e.target.setAttribute("aria-selected","true"),e.target.setAttribute("tabindex","0");a[parseInt(e.target.getAttribute("data-tab-index"))].classList.add("active")}},c:e.label}}))},{t:"div",a:{class:"bw-tab-content"},c:t.map((e,t)=>({t:"div",a:{class:"bw-tab-pane "+(t===a?"active":""),role:"tabpanel"},c:e.content}))}],o:{type:"tabs",state:{activeIndex:a},mounted:function(e){var t=e.querySelector('[role="tablist"]');t&&t.addEventListener("keydown",function(e){for(var r=t.querySelectorAll('[role="tab"]'),a=-1,o=0;o<r.length;o++)if(r[o]===e.target){a=o;break}if(-1!==a){var n=-1;"ArrowLeft"===e.key||"ArrowUp"===e.key?(e.preventDefault(),n=a>0?a-1:r.length-1):"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),n=a<r.length-1?a+1:0):"Home"===e.key?(e.preventDefault(),n=0):"End"===e.key&&(e.preventDefault(),n=r.length-1),n>=0&&(r[n].focus(),r[n].click())}})}}}}class E{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this.children={header:e.querySelector(".bw-card-header"),title:e.querySelector(".bw-card-title"),body:e.querySelector(".bw-card-body"),footer:e.querySelector(".bw-card-footer")}}setTitle(e){return this.children.title&&(this.children.title.textContent=e),this}setContent(e){if(this.children.body)if("string"==typeof e)this.children.body.textContent=e;else{this.children.body.innerHTML="";const t=window.bw.taco.toDOM(e);this.children.body.appendChild(t)}return this}addClass(e){return this.element.classList.add(e),this}removeClass(e){return this.element.classList.remove(e),this}select(e){return this.element.querySelector(e)}}class O{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this._data=this.state.data||[],this._sortColumn=null,this._sortDirection="asc",this.children={thead:e.querySelector("thead"),tbody:e.querySelector("tbody"),headers:e.querySelectorAll("th")},this.state.sortable&&this._setupSorting()}_setupSorting(){this.children.headers.forEach((e,t)=>{e.style.cursor="pointer",e.onclick=()=>this.sortBy(e.textContent)})}setData(e){return this._data=e,this._renderBody(),this}sortBy(e,t){e!==this._sortColumn||t?(this._sortColumn=e,this._sortDirection=t||"asc"):this._sortDirection="asc"===this._sortDirection?"desc":"asc";const r=Object.keys(this._data[0])[Array.from(this.children.headers).findIndex(t=>t.textContent===e)];return this._data.sort((e,t)=>{const a=e[r],o=t[r],n=a<o?-1:a>o?1:0;return"asc"===this._sortDirection?n:-n}),this._renderBody(),this}_renderBody(){this.children.tbody.innerHTML="",this._data.forEach(e=>{const t=document.createElement("tr");Object.values(e).forEach(e=>{const r=document.createElement("td");r.textContent=e,t.appendChild(r)}),this.children.tbody.appendChild(t)})}}class M{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this.children={brand:e.querySelector(".bw-navbar-brand"),links:e.querySelectorAll(".bw-nav-link")}}setActive(e){return this.children.links.forEach(t=>{t.getAttribute("href")===e?t.classList.add("active"):t.classList.remove("active")}),this}}class N{constructor(e,t){this.element=e,this._taco=t,this.state=t.o?.state||{},this.children={navItems:e.querySelectorAll(".bw-nav-link"),tabPanes:e.querySelectorAll(".bw-tab-pane")},this._setupTabs()}_setupTabs(){this.children.navItems.forEach((e,t)=>{e.onclick=e=>{e.preventDefault(),this.switchTo(t)}})}switchTo(e){return this.children.navItems.forEach((t,r)=>{r===e?t.classList.add("active"):t.classList.remove("active")}),this.children.tabPanes.forEach((t,r)=>{r===e?t.classList.add("active"):t.classList.remove("active")}),this.state.activeIndex=e,this}}class B{constructor(e,t){this.element=e,this._taco=t,this._escHandler=null}show(){return this.element.classList.add("bw-modal-show"),document.body.style.overflow="hidden",this}hide(){return this.element.classList.remove("bw-modal-show"),document.body.style.overflow="",this}toggle(){return this.element.classList.contains("bw-modal-show")?this.hide():this.show(),this}destroy(){this.hide(),this._escHandler&&document.removeEventListener("keydown",this._escHandler),this.element.parentNode&&this.element.parentNode.removeChild(this.element)}}const I={card:E,table:O,navbar:M,tabs:N,modal:B};var D=Object.freeze({__proto__:null,CardHandle:E,ModalHandle:B,NavbarHandle:M,TableHandle:O,TabsHandle:N,componentHandles:I,makeAccordion:function(e={}){const{items:t=[],multiOpen:r=!1,className:a=""}=e;return{t:"div",a:{class:`bw-accordion ${a}`.trim()},c:t.map(function(e,t){return{t:"div",a:{class:"bw-accordion-item"},c:[{t:"h2",a:{class:"bw-accordion-header"},c:{t:"button",a:{class:("bw-accordion-button "+(e.open?"":"bw-collapsed")).trim(),type:"button","aria-expanded":e.open?"true":"false","data-accordion-index":t,onclick:function(e){var t=e.target.closest(".bw-accordion-button"),a=t.closest(".bw-accordion"),o=t.closest(".bw-accordion-item"),n=o.querySelector(".bw-accordion-collapse"),i=n.classList.contains("bw-collapse-show");if(!r)for(var s=a.querySelectorAll(".bw-accordion-item"),l=0;l<s.length;l++)if(s[l]!==o){var c=s[l].querySelector(".bw-accordion-collapse"),d=s[l].querySelector(".bw-accordion-button");c.classList.contains("bw-collapse-show")&&(c.style.maxHeight=c.scrollHeight+"px",c.offsetHeight,c.style.maxHeight="0px",c.classList.remove("bw-collapse-show"),d.classList.add("bw-collapsed"),d.setAttribute("aria-expanded","false"))}if(i)n.style.maxHeight=n.scrollHeight+"px",n.offsetHeight,n.style.maxHeight="0px",n.classList.remove("bw-collapse-show"),t.classList.add("bw-collapsed"),t.setAttribute("aria-expanded","false");else{n.classList.add("bw-collapse-show"),n.style.maxHeight="0px",n.offsetHeight,n.style.maxHeight=n.scrollHeight+"px",t.classList.remove("bw-collapsed"),t.setAttribute("aria-expanded","true");var b=function(e){"max-height"===e.propertyName&&n.classList.contains("bw-collapse-show")&&(n.style.maxHeight="none"),n.removeEventListener("transitionend",b)};n.addEventListener("transitionend",b)}}},c:e.title}},{t:"div",a:{class:("bw-accordion-collapse "+(e.open?"bw-collapse-show":"")).trim()},c:{t:"div",a:{class:"bw-accordion-body"},c:e.content},o:e.open?{mounted:function(e){e.style.maxHeight="none"}}:void 0}]}}),o:{type:"accordion",state:{multiOpen:r}}}},makeAlert:function(e={}){"string"==typeof e&&(e={content:e});const{content:t,variant:r="info",dismissible:a=!1,className:o=""}=e;return{t:"div",a:{class:`bw-alert bw-alert-${r} ${a?"bw-alert-dismissible":""} ${o}`.trim(),role:"alert"},c:[t,a&&{t:"button",a:{type:"button",class:"bw-close","aria-label":"Close",onclick:function(e){var t=e.target.closest(".bw-alert");t&&t.remove()}},c:"×"}].filter(Boolean)}},makeAvatar:function(e={}){const{src:t,alt:r="",initials:a,size:o="md",variant:n="primary",className:i=""}=e;return t?{t:"img",a:{class:`bw-avatar bw-avatar-${o} ${i}`.trim(),src:t,alt:r}}:{t:"div",a:{class:`bw-avatar bw-avatar-${o} bw-avatar-${n} ${i}`.trim()},c:a||""}},makeBadge:function(e={}){"string"==typeof e&&(e={text:e});const{text:t,variant:r="primary",size:a,pill:o=!1,className:n=""}=e;return{t:"span",a:{class:`bw-badge bw-badge-${r}${"sm"===a?" bw-badge-sm":"lg"===a?" bw-badge-lg":""} ${o?"bw-badge-pill":""} ${n}`.trim()},c:t}},makeBreadcrumb:function(e={}){const{items:t=[]}=e;return{t:"nav",a:{"aria-label":"breadcrumb"},c:{t:"ol",a:{class:"bw-breadcrumb"},c:t.map((e,t)=>({t:"li",a:{class:"bw-breadcrumb-item "+(e.active?"active":""),"aria-current":e.active?"page":void 0},c:e.active?e.text:{t:"a",a:{href:e.href||"#"},c:e.text}}))}}},makeButton:function(e={}){"string"==typeof e&&(e={text:e});const{text:t,variant:r="primary",size:a,disabled:o=!1,onclick:n,type:i="button",className:s="",style:l}=e;return{t:"button",a:{type:i,class:["bw-btn",`bw-btn-${r}`,a&&`bw-btn-${a}`,s].filter(Boolean).join(" "),disabled:o,onclick:n,style:l},c:t,o:{type:"button"}}},makeButtonGroup:function(e={}){const{children:t,size:r,vertical:a=!1,className:o=""}=e;return{t:"div",a:{class:`${a?"bw-btn-group-vertical":"bw-btn-group"} ${r?"bw-btn-group-"+r:""} ${o}`.trim(),role:"group"},c:t}},makeCTA:function(e={}){const{title:t,description:r,actions:a,variant:o="light",centered:n=!0,className:i=""}=e;return{t:"section",a:{class:`bw-cta bw-bg-${o} bw-py-5 ${i}`.trim()},c:{t:"div",a:{class:"bw-container"},c:{t:"div",a:{class:"bw-cta-content "+(n?"bw-text-center":"")},c:[t&&{t:"h2",a:{class:"bw-cta-title bw-mb-3"},c:t},r&&{t:"p",a:{class:"bw-cta-description bw-lead bw-mb-4"},c:r},a&&{t:"div",a:{class:"bw-cta-actions"},c:a}].filter(Boolean)}}}},makeCard:function(e={}){const{title:t,subtitle:r,content:a,footer:o,header:n,image:i,imagePosition:s="top",variant:l,bordered:c=!0,shadow:d,hoverable:b=!1,className:m="",style:p,headerClass:u="",bodyClass:w="",footerClass:f=""}=e,h=["bw-card",l?`bw-card-${l}`:"",d&&{none:"",sm:"bw-shadow-sm",md:"bw-shadow",lg:"bw-shadow-lg"}[d]||"",c?"":"bw-border-0",b?"bw-card-hoverable":"",m].filter(Boolean).join(" ").trim(),g=[n&&{t:"div",a:{class:`bw-card-header ${u}`.trim()},c:n},i&&("top"===s||"left"===s)&&{t:"img",a:{class:`bw-card-img-${s}`,src:i.src,alt:i.alt||""}},{t:"div",a:{class:`bw-card-body ${w}`.trim()},c:[t&&{t:"h5",a:{class:"bw-card-title"},c:t},r&&{t:"h6",a:{class:"bw-card-subtitle bw-mb-2 bw-text-muted"},c:r},a&&(Array.isArray(a)?a:[a])].flat().filter(Boolean)},i&&("bottom"===s||"right"===s)&&{t:"img",a:{class:`bw-card-img-${s}`,src:i.src,alt:i.alt||""}},o&&{t:"div",a:{class:`bw-card-footer ${f}`.trim()},c:o}].filter(Boolean);return!i||"left"!==s&&"right"!==s?{t:"div",a:{class:h,style:p},c:g,o:{type:"card",state:e.state||{}}}:{t:"div",a:{class:h,style:p},c:{t:"div",a:{class:"bw-row bw-g-0"},c:g},o:{type:"card",state:e.state||{}}}},makeCarousel:function(e={}){const{items:t=[],showControls:r=!0,showIndicators:a=!0,autoPlay:o=!1,interval:n=5e3,height:i="300px",startIndex:s=0,className:l=""}=e;function c(e,t){var r=e.querySelectorAll(".bw-carousel-slide").length;t<0&&(t=r-1),t>=r&&(t=0),e.setAttribute("data-carousel-index",t),e.querySelector(".bw-carousel-track").style.transform="translateX(-"+100*t+"%)";for(var a=e.querySelectorAll(".bw-carousel-indicator"),o=0;o<a.length;o++)o===t?a[o].classList.add("active"):a[o].classList.remove("active")}var d=t.map(function(e){var t=[e.content,e.caption&&{t:"div",a:{class:"bw-carousel-caption"},c:e.caption}].filter(Boolean);return{t:"div",a:{class:"bw-carousel-slide"},c:1===t.length?t[0]:t}}),b=[{t:"div",a:{class:"bw-carousel-track",style:"transform: translateX(-"+100*s+"%)"},c:d}];return r&&t.length>1&&(b.push({t:"button",a:{class:"bw-carousel-control bw-carousel-control-prev",type:"button","aria-label":"Previous slide",onclick:function(e){var t=e.target.closest(".bw-carousel"),r=parseInt(t.getAttribute("data-carousel-index")||"0");c(t,r-1)}},c:{t:"img",a:{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e",alt:"",role:"presentation"}}}),b.push({t:"button",a:{class:"bw-carousel-control bw-carousel-control-next",type:"button","aria-label":"Next slide",onclick:function(e){var t=e.target.closest(".bw-carousel"),r=parseInt(t.getAttribute("data-carousel-index")||"0");c(t,r+1)}},c:{t:"img",a:{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e",alt:"",role:"presentation"}}})),a&&t.length>1&&b.push({t:"div",a:{class:"bw-carousel-indicators"},c:t.map(function(e,t){return{t:"button",a:{class:"bw-carousel-indicator"+(t===s?" active":""),type:"button","aria-label":"Go to slide "+(t+1),"data-slide-index":t,onclick:function(e){c(e.target.closest(".bw-carousel"),parseInt(e.target.getAttribute("data-slide-index")))}}}})}),{t:"div",a:{class:("bw-carousel "+l).trim(),style:"height: "+i,tabindex:"0","aria-roledescription":"carousel","data-carousel-index":s},c:b,o:{type:"carousel",state:{activeIndex:s,autoPlay:o,interval:n},mounted:function(e){if(e.addEventListener("keydown",function(t){var r=parseInt(e.getAttribute("data-carousel-index")||"0");"ArrowLeft"===t.key?(t.preventDefault(),c(e,r-1)):"ArrowRight"===t.key&&(t.preventDefault(),c(e,r+1))}),o){var t=setInterval(function(){var t=parseInt(e.getAttribute("data-carousel-index")||"0");c(e,t+1)},n);e._bw_carouselInterval=t,e.addEventListener("mouseenter",function(){e._bw_carouselInterval&&clearInterval(e._bw_carouselInterval)}),e.addEventListener("mouseleave",function(){e._bw_carouselInterval=setInterval(function(){var t=parseInt(e.getAttribute("data-carousel-index")||"0");c(e,t+1)},n)})}},unmount:function(e){e._bw_carouselInterval&&clearInterval(e._bw_carouselInterval)}}}},makeCheckbox:function(e={}){const{label:t,checked:r=!1,id:a,name:o,disabled:n=!1,value:i,className:s="",...l}=e;return{t:"div",a:{class:`bw-form-check ${s}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw-form-check-input",checked:r,id:a,name:o,disabled:n,value:i,...l}},t&&{t:"label",a:{class:"bw-form-check-label",for:a},c:t}].filter(Boolean)}},makeChipInput:function(e={}){var{chips:t=[],placeholder:r="Add...",onAdd:a,onRemove:o,className:n=""}=e;return{t:"div",a:{class:("bw-chip-input "+n).trim()},c:[...t.map(function(e){return{t:"span",a:{class:"bw-chip","data-chip-value":e},c:[e,{t:"button",a:{type:"button",class:"bw-chip-remove","aria-label":"Remove "+e,onclick:function(e){var t=e.target.closest(".bw-chip"),r=t.getAttribute("data-chip-value");t.parentNode.removeChild(t),o&&o(r)}},c:"×"}]}}),{t:"input",a:{type:"text",class:"bw-chip-field",placeholder:r,onkeydown:function(e){if("Enter"===e.key&&e.target.value.trim()){e.preventDefault();var t=e.target.value.trim(),r=e.target.closest(".bw-chip-input"),n=document.createElement("span");n.className="bw-chip",n.setAttribute("data-chip-value",t),n.innerHTML="",n.textContent=t;var i=document.createElement("button");i.type="button",i.className="bw-chip-remove",i.setAttribute("aria-label","Remove "+t),i.textContent="×",i.onclick=function(){n.parentNode.removeChild(n),o&&o(t)},n.appendChild(i),r.insertBefore(n,e.target),e.target.value="",a&&a(t)}if("Backspace"===e.key&&!e.target.value){var s=(r=e.target.closest(".bw-chip-input")).querySelectorAll(".bw-chip");if(s.length){var l=s[s.length-1],c=l.getAttribute("data-chip-value");l.parentNode.removeChild(l),o&&o(c)}}}}}],o:{type:"chip-input"}}},makeCodeDemo:function(e={}){const{title:t,description:r,code:a,result:o,language:n="javascript"}=e;Math.random().toString(36).substr(2,9);const i=[{label:"Result",active:!0,content:o}];return a&&i.push({label:"Code",content:{t:"div",a:{style:"position: relative;"},c:[{t:"button",a:{class:"bw-copy-btn bw-code-copy-btn",onclick:function(e){navigator.clipboard.writeText(a).then(function(){var t=e.target,r=t.textContent;t.textContent="Copied!",t.classList.add("bw-code-copy-btn-copied"),setTimeout(function(){t.textContent=r,t.classList.remove("bw-code-copy-btn-copied")},2e3)})}},c:"Copy"},"undefined"!=typeof globalThis&&void 0!==globalThis.bw&&"function"==typeof globalThis.bw.codeEditor?globalThis.bw.codeEditor({code:a,lang:"javascript"===n?"js":n,readOnly:!0,height:"auto"}):{t:"pre",a:{class:"bw-code-pre"},c:{t:"code",a:{class:`bw-code-block language-${n}`},c:a}}]}}),{t:"div",a:{class:"bw-code-demo"},c:[t&&{t:"h3",c:t},r&&{t:"p",a:{class:"bw-text-muted",style:"margin-bottom: 1rem;"},c:r},T({tabs:i})].filter(Boolean)}},makeCol:function(e={}){const{size:t,offset:r,push:a,pull:o,content:n,children:i,className:s=""}=e,l=[];return"object"==typeof t?Object.entries(t).forEach(([e,t])=>{"xs"===e?l.push(`bw-col-${t}`):l.push(`bw-col-${e}-${t}`)}):t?l.push(`bw-col-${t}`):l.push("bw-col"),r&&l.push(`bw-offset-${r}`),a&&l.push(`bw-push-${a}`),o&&l.push(`bw-pull-${o}`),{t:"div",a:{class:`${l.join(" ")} ${s}`.trim()},c:n||i}},makeContainer:function(e={}){const{fluid:t=!1,children:r,className:a=""}=e;return{t:"div",a:{class:`bw-container${t?"-fluid":""} ${a}`.trim()},c:r}},makeDropdown:function(e={}){const{trigger:t,items:r=[],align:a="start",variant:o="primary",className:n=""}=e;var i;return i="string"==typeof t||void 0===t?{t:"button",a:{class:`bw-btn bw-btn-${o} bw-dropdown-toggle`,type:"button",onclick:function(e){e.target.closest(".bw-dropdown").querySelector(".bw-dropdown-menu").classList.toggle("bw-dropdown-show")}},c:t||"Dropdown"}:t,{t:"div",a:{class:`bw-dropdown ${n}`.trim()},c:[i,{t:"div",a:{class:("bw-dropdown-menu "+("end"===a?"bw-dropdown-menu-end":"")).trim()},c:r.map(function(e){return e.divider?{t:"hr",a:{class:"bw-dropdown-divider"}}:{t:"a",a:{class:("bw-dropdown-item "+(e.disabled?"disabled":"")).trim(),href:e.href||"#",onclick:e.disabled?void 0:function(t){e.href||t.preventDefault(),t.target.closest(".bw-dropdown").querySelector(".bw-dropdown-menu").classList.remove("bw-dropdown-show"),e.onclick&&e.onclick(t)}},c:e.text}})}],o:{type:"dropdown",mounted:function(e){var t=function(t){if(!e.contains(t.target)){var r=e.querySelector(".bw-dropdown-menu");r&&r.classList.remove("bw-dropdown-show")}};document.addEventListener("click",t),e._bw_outsideHandler=t},unmount:function(e){e._bw_outsideHandler&&document.removeEventListener("click",e._bw_outsideHandler)}}}},makeFeatureGrid:function(e={}){const{features:t=[],columns:r=3,centered:a=!0,iconSize:o="3rem",className:n=""}=e,i="bw-col-md-"+12/r;return{t:"div",a:{class:`bw-feature-grid ${n}`.trim()},c:{t:"div",a:{class:"bw-row bw-g-4"},c:t.map(e=>({t:"div",a:{class:i},c:{t:"div",a:{class:"bw-feature "+(a?"bw-text-center":"")},c:[e.icon&&{t:"div",a:{class:"bw-feature-icon bw-mb-3 bw-text-primary",style:`font-size: ${o};`},c:e.icon},e.title&&{t:"h3",a:{class:"bw-feature-title bw-h5 bw-mb-2"},c:e.title},e.description&&{t:"p",a:{class:"bw-feature-description bw-text-muted"},c:e.description}].filter(Boolean)}}))}}},makeFileUpload:function(e={}){var{accept:t,multiple:r=!1,onFiles:a,text:o="Drop files here or click to browse",id:n,className:i=""}=e;return{t:"div",a:{class:("bw-file-upload "+i).trim(),tabindex:"0",role:"button","aria-label":o},c:[{t:"div",a:{class:"bw-file-upload-icon"},c:"📁"},{t:"div",a:{class:"bw-file-upload-text"},c:o},{t:"input",a:{type:"file",class:"bw-file-upload-input",accept:t,multiple:r,id:n,onchange:function(e){a&&e.target.files.length&&a(e.target.files)}}}],o:{type:"file-upload",mounted:function(e){var t=e.querySelector(".bw-file-upload-input");e.addEventListener("click",function(e){e.target!==t&&t.click()}),e.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.click())}),e.addEventListener("dragover",function(t){t.preventDefault(),e.classList.add("bw-file-upload-active")}),e.addEventListener("dragleave",function(){e.classList.remove("bw-file-upload-active")}),e.addEventListener("drop",function(t){t.preventDefault(),e.classList.remove("bw-file-upload-active"),a&&t.dataTransfer.files.length&&a(t.dataTransfer.files)})}}}},makeForm:function(e={}){const{children:t,onsubmit:r,className:a=""}=e;return{t:"form",a:{class:a,onsubmit:r||(e=>e.preventDefault())},c:t}},makeFormGroup:function(e={}){var{label:t,input:r,help:a,id:o,validation:n,feedback:i,required:s}=e,l=r;if(n&&r&&r.a){l={t:r.t,a:Object.assign({},r.a),c:r.c,o:r.o};var c="valid"===n?"bw-is-valid":"invalid"===n?"bw-is-invalid":"";c&&(l.a.class=((l.a.class||"")+" "+c).trim())}return{t:"div",a:{class:"bw-form-group"},c:[t&&{t:"label",a:{for:o,class:"bw-form-label"},c:s?[t,{t:"span",a:{class:"bw-text-danger",style:"margin-left: 0.25rem"},c:"*"}]:t},l,i&&n&&{t:"div",a:{class:"valid"===n?"bw-valid-feedback":"bw-invalid-feedback"},c:i},a&&{t:"small",a:{class:"bw-form-text bw-text-muted"},c:a}].filter(Boolean)}},makeHero:function(e={}){const{title:t,subtitle:r,content:a,variant:o="primary",size:n="lg",centered:i=!0,overlay:s=!1,backgroundImage:l,actions:c,className:d=""}=e,b={sm:"bw-py-3",md:"bw-py-4",lg:"bw-py-5",xl:"bw-py-6"};return{t:"section",a:{class:`bw-hero bw-hero-${o} ${b[n]||b.lg} ${i?"bw-text-center":""} ${d}`.trim(),style:l?`background-image: url('${l}'); background-size: cover; background-position: center;`:void 0},c:[s&&{t:"div",a:{class:"bw-hero-overlay"}},{t:"div",a:{class:"bw-container"},c:{t:"div",a:{class:"bw-hero-content"},c:[t&&{t:"h1",a:{class:"bw-hero-title bw-display-4 bw-mb-3"},c:t},r&&{t:"p",a:{class:"bw-hero-subtitle bw-lead bw-mb-4"},c:r},a,c&&{t:"div",a:{class:"bw-hero-actions bw-mt-4"},c:c}].filter(Boolean)}}].filter(Boolean)}},makeInput:function(e={}){const{type:t="text",placeholder:r,value:a,id:o,name:n,disabled:i=!1,readonly:s=!1,required:l=!1,className:c="",style:d,...b}=e;return{t:"input",a:{type:t,class:`bw-form-control ${c}`.trim(),placeholder:r,value:a,id:o,name:n,style:d,disabled:i,readonly:s,required:l,...b}}},makeListGroup:function(e={}){const{items:t=[],flush:r=!1,interactive:a=!1}=e;return{t:"div",a:{class:("bw-list-group "+(r?"bw-list-group-flush":"")).trim()},c:t.map(e=>{const t="object"==typeof e,r=t?e.text:e,o=!!t&&e.active,n=!!t&&e.disabled,i=t?e.href:null,s=t?e.onclick:null;return a||i||s?{t:"a",a:{class:["bw-list-group-item",o&&"active",n&&"disabled"].filter(Boolean).join(" "),href:i||"#",onclick:s||(e=>{i||e.preventDefault()}),style:n?"pointer-events: none; opacity: 0.65;":""},c:r}:{t:"div",a:{class:["bw-list-group-item",o&&"active",n&&"disabled"].filter(Boolean).join(" ")},c:r}})}},makeMediaObject:function(e={}){var{src:t,alt:r="",title:a,content:o,reverse:n=!1,imageSize:i="3rem",className:s=""}=e,l=t?{t:"img",a:{class:"bw-media-img",src:t,alt:r,style:"width:"+i+";height:"+i}}:null,c={t:"div",a:{class:"bw-media-body"},c:[a&&{t:"h5",a:{class:"bw-media-title"},c:a},o].filter(Boolean)};return{t:"div",a:{class:("bw-media "+(n?"bw-media-reverse ":"")+s).trim()},c:n?[c,l].filter(Boolean):[l,c].filter(Boolean),o:{type:"media-object"}}},makeModal:function(e={}){const{title:t,content:r,footer:a,size:o,closeButton:n=!0,onClose:i,className:s=""}=e;function l(e){var t=e.closest(".bw-modal");t&&(t.classList.remove("bw-modal-show"),document.body.style.overflow=""),i&&i()}return{t:"div",a:{class:`bw-modal ${s}`.trim()},c:{t:"div",a:{class:("bw-modal-dialog "+(o?"bw-modal-"+o:"")).trim()},c:{t:"div",a:{class:"bw-modal-content"},c:[(t||n)&&{t:"div",a:{class:"bw-modal-header"},c:[t&&{t:"h5",a:{class:"bw-modal-title"},c:t},n&&{t:"button",a:{type:"button",class:"bw-close","aria-label":"Close",onclick:function(e){l(e.target)}},c:"×"}].filter(Boolean)},r&&{t:"div",a:{class:"bw-modal-body"},c:r},a&&{t:"div",a:{class:"bw-modal-footer"},c:a}].filter(Boolean)}},o:{type:"modal",mounted:function(e){e.addEventListener("click",function(t){t.target===e&&l(e)});var t=function(t){"Escape"===t.key&&e.classList.contains("bw-modal-show")&&l(e)};document.addEventListener("keydown",t),e._bw_escHandler=t},unmount:function(e){e._bw_escHandler&&document.removeEventListener("keydown",e._bw_escHandler),document.body.style.overflow=""}}}},makeNav:function(e={}){const{items:t=[],pills:r=!1,vertical:a=!1,className:o=""}=e;return{t:"ul",a:{class:`bw-nav ${r?"bw-nav-pills":"bw-nav-tabs"} ${a?"bw-nav-vertical":""} ${o}`.trim()},c:t.map(e=>({t:"li",a:{class:"bw-nav-item"},c:{t:"a",a:{href:e.href||"#",class:`bw-nav-link ${e.active?"active":""} ${e.disabled?"disabled":""}`.trim()},c:e.text}}))}},makeNavbar:function(e={}){const{brand:t,brandHref:r="#",items:a=[],dark:o=!0,className:n=""}=e;return{t:"nav",a:{class:`bw-navbar ${o?"bw-navbar-dark":"bw-navbar-light"} ${n}`.trim()},c:{t:"div",a:{class:"bw-container"},c:[t&&{t:"a",a:{href:r,class:"bw-navbar-brand"},c:t},a.length>0&&{t:"div",a:{class:"bw-navbar-nav"},c:a.map(e=>({t:"a",a:{href:e.href||"#",class:"bw-nav-link "+(e.active?"active":"")},c:e.text}))}].filter(Boolean)},o:{type:"navbar",state:{activeItem:a.findIndex(e=>e.active)}}}},makePagination:function(e={}){const{pages:t=1,currentPage:r=1,onPageChange:a,size:o,className:n=""}=e;function i(e){return function(o){o.preventDefault(),e<1||e>t||e===r||a&&a(e)}}const s=[];s.push({t:"li",a:{class:("bw-page-item "+(r<=1?"bw-disabled":"")).trim()},c:{t:"a",a:{class:"bw-page-link",href:"#",onclick:i(r-1),"aria-label":"Previous"},c:"‹"}});for(var l=1;l<=t;l++)(function(e){s.push({t:"li",a:{class:("bw-page-item "+(e===r?"bw-active":"")).trim()},c:{t:"a",a:{class:"bw-page-link",href:"#",onclick:i(e)},c:""+e}})})(l);return s.push({t:"li",a:{class:("bw-page-item "+(r>=t?"bw-disabled":"")).trim()},c:{t:"a",a:{class:"bw-page-link",href:"#",onclick:i(r+1),"aria-label":"Next"},c:"›"}}),{t:"nav",a:{"aria-label":"Pagination"},c:{t:"ul",a:{class:`bw-pagination ${o?"bw-pagination-"+o:""} ${n}`.trim()},c:s}}},makePopover:function(e={}){var{trigger:t,title:r,content:a,placement:o="top",className:n=""}=e,i=[r&&{t:"div",a:{class:"bw-popover-header"},c:r},a&&{t:"div",a:{class:"bw-popover-body"},c:a}].filter(Boolean);return{t:"span",a:{class:("bw-popover-wrapper "+n).trim()},c:[{t:"span",a:{class:"bw-popover-trigger",onclick:function(e){e.target.closest(".bw-popover-wrapper").querySelector(".bw-popover").classList.toggle("bw-popover-show")}},c:t},{t:"div",a:{class:"bw-popover bw-popover-"+o},c:i}],o:{type:"popover",mounted:function(e){var t=function(t){if(!e.contains(t.target)){var r=e.querySelector(".bw-popover");r&&r.classList.remove("bw-popover-show")}};document.addEventListener("click",t),e._bw_outsideHandler=t},unmount:function(e){e._bw_outsideHandler&&document.removeEventListener("click",e._bw_outsideHandler)}}}},makeProgress:function(e={}){const{value:t=0,max:r=100,variant:a="primary",striped:o=!1,animated:n=!1,label:i,height:s}=e,l=Math.round(t/r*100);return{t:"div",a:{class:"bw-progress",style:s?{height:`${s}px`}:void 0},c:{t:"div",a:{class:["bw-progress-bar",`bw-progress-bar-${a}`,o&&"bw-progress-bar-striped",n&&"bw-progress-bar-animated"].filter(Boolean).join(" "),role:"progressbar",style:{width:`${l}%`},"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r},c:i||`${l}%`}}},makeRadio:function(e={}){const{label:t,name:r,value:a,checked:o=!1,id:n,disabled:i=!1,className:s="",...l}=e;return{t:"div",a:{class:`bw-form-check ${s}`.trim()},c:[{t:"input",a:{type:"radio",class:"bw-form-check-input",name:r,value:a,checked:o,id:n,disabled:i,...l}},t&&{t:"label",a:{class:"bw-form-check-label",for:n},c:t}].filter(Boolean)}},makeRange:function(e={}){var{min:t=0,max:r=100,step:a=1,value:o=50,label:n,showValue:i=!1,id:s,name:l,disabled:c=!1,className:d="",...b}=e,m=[];if(n||i){var p=[];n&&p.push({t:"span",c:n}),i&&p.push({t:"span",a:{class:"bw-range-value"},c:""+o}),m.push({t:"div",a:{class:"bw-range-label"},c:p})}var u=b.oninput;return i&&(b.oninput=function(e){var t=e.target.closest(".bw-range-wrapper").querySelector(".bw-range-value");t&&(t.textContent=e.target.value),u&&u(e)}),m.push({t:"input",a:{type:"range",class:"bw-range",min:t,max:r,step:a,value:o,id:s,name:l,disabled:c,...b}}),{t:"div",a:{class:("bw-range-wrapper "+d).trim()},c:m,o:{type:"range"}}},makeRow:function(e={}){const{children:t,className:r="",gap:a}=e;return{t:"div",a:{class:`bw-row ${a?`bw-g-${a}`:""} ${r}`.trim()},c:t}},makeSearchInput:function(e={}){"string"==typeof e&&(e={placeholder:e});var{placeholder:t="Search...",value:r,onSearch:a,onInput:o,id:n,name:i,className:s=""}=e;return{t:"div",a:{class:("bw-search-input "+s).trim()},c:[{t:"input",a:{type:"search",class:"bw-form-control bw-search-field",placeholder:t,value:r,id:n,name:i,onkeydown:function(e){"Enter"===e.key&&a&&(e.preventDefault(),a(e.target.value))},oninput:function(e){var t=e.target.closest(".bw-search-input").querySelector(".bw-search-clear");t&&(t.style.display=e.target.value?"flex":"none"),o&&o(e.target.value)}}},{t:"button",a:{type:"button",class:"bw-search-clear","aria-label":"Clear search",style:r?void 0:"display: none",onclick:function(e){var t=e.target.closest(".bw-search-input").querySelector(".bw-search-field");t.value="",e.target.style.display="none",t.focus(),o&&o(""),a&&a("")}},c:"×"}],o:{type:"search-input"}}},makeSection:function(e={}){const{title:t,subtitle:r,content:a,variant:o="default",spacing:n="md",className:i=""}=e,s={sm:"bw-py-3",md:"bw-py-4",lg:"bw-py-5",xl:"bw-py-6"};return{t:"section",a:{class:`bw-section ${s[n]||s.md} ${"default"!==o?`bw-bg-${o}`:""} ${i}`.trim()},c:{t:"div",a:{class:"bw-container"},c:[(t||r)&&{t:"div",a:{class:"bw-section-header bw-text-center bw-mb-5"},c:[t&&{t:"h2",a:{class:"bw-section-title"},c:t},r&&{t:"p",a:{class:"bw-section-subtitle bw-text-muted"},c:r}].filter(Boolean)},a].filter(Boolean)}}},makeSelect:function(e={}){const{options:t=[],value:r,id:a,name:o,disabled:n=!1,required:i=!1,className:s="",...l}=e;return{t:"select",a:{class:`bw-form-control ${s}`.trim(),id:a,name:o,disabled:n,required:i,...l},c:t.map(e=>({t:"option",a:{value:e.value,selected:e.value===r},c:e.text||e.value}))}},makeSkeleton:function(e={}){const{variant:t="text",width:r,height:a,count:o=1,className:n=""}=e;if("circle"===t){var i=r||a||"3rem";return{t:"div",a:{class:`bw-skeleton bw-skeleton-circle ${n}`.trim(),style:{width:i,height:i}}}}if("rect"===t)return{t:"div",a:{class:`bw-skeleton bw-skeleton-rect ${n}`.trim(),style:{width:r||"100%",height:a||"120px"}}};if(1===o)return{t:"div",a:{class:`bw-skeleton bw-skeleton-text ${n}`.trim(),style:{width:r||"100%",height:a||"1em"}}};for(var s=[],l=0;l<o;l++)s.push({t:"div",a:{class:"bw-skeleton bw-skeleton-text",style:{width:l===o-1?"75%":r||"100%",height:a||"1em"}}});return{t:"div",a:{class:`bw-skeleton-group ${n}`.trim()},c:s}},makeSpinner:function(e={}){const{variant:t="primary",size:r="md",type:a="border"}=e;return{t:"div",a:{class:`bw-spinner-${a} bw-spinner-${a}-${r} bw-text-${t}`,role:"status"},c:{t:"span",a:{class:"bw-visually-hidden"},c:"Loading..."}}},makeStack:function(e={}){const{children:t,direction:r="vertical",gap:a=3,className:o=""}=e;return{t:"div",a:{class:`bw-${"vertical"===r?"vstack":"hstack"} bw-gap-${a} ${o}`.trim()},c:t}},makeStatCard:function(e={}){"string"==typeof e&&(e={label:e});var{value:t=0,label:r,change:a,format:o,prefix:n,suffix:i,icon:s,variant:l,className:c="",style:d}=e,b=["bw-stat-card",l?"bw-stat-card-"+l:"",c].filter(Boolean).join(" ").trim(),m=[];return s&&m.push({t:"div",a:{class:"bw-stat-icon"},c:s}),m.push({t:"div",a:{class:"bw-stat-value"},c:function(e,t){if(n||i)return(n||"")+e+(i||"");switch(t){case"currency":return"$"+Number(e).toLocaleString();case"percent":return e+"%";case"number":return Number(e).toLocaleString();default:return""+e}}(t,o)}),r&&m.push({t:"div",a:{class:"bw-stat-label"},c:r}),null!=a&&m.push({t:"div",a:{class:"bw-stat-change "+(a>=0?"bw-stat-change-up":"bw-stat-change-down")},c:(a>=0?"↑ +":"↓ ")+a+"%"}),{t:"div",a:{class:b,style:d},c:m,o:{type:"stat-card"}}},makeStepper:function(e={}){var{steps:t=[],currentStep:r=0,className:a=""}=e;return{t:"div",a:{class:("bw-stepper "+a).trim(),role:"list"},c:t.map(function(e,t){var a=t<r?"completed":t===r?"active":"pending";return{t:"div",a:{class:"bw-step bw-step-"+a,role:"listitem","aria-current":"active"===a?"step":void 0},c:[{t:"div",a:{class:"bw-step-indicator"},c:"completed"===a?"✓":""+(t+1)},{t:"div",a:{class:"bw-step-body"},c:[{t:"div",a:{class:"bw-step-label"},c:e.label},e.description&&{t:"div",a:{class:"bw-step-description"},c:e.description}].filter(Boolean)}]}}),o:{type:"stepper"}}},makeSwitch:function(e={}){const{label:t,checked:r=!1,id:a,name:o,disabled:n=!1,className:i="",...s}=e;return{t:"div",a:{class:`bw-form-check bw-form-switch ${i}`.trim()},c:[{t:"input",a:{type:"checkbox",class:"bw-form-check-input bw-switch-input",role:"switch",checked:r,id:a,name:o,disabled:n,...s}},t&&{t:"label",a:{class:"bw-form-check-label",for:a},c:t}].filter(Boolean)}},makeTabs:T,makeTextarea:function(e={}){const{placeholder:t,value:r,rows:a=3,id:o,name:n,disabled:i=!1,readonly:s=!1,required:l=!1,className:c="",...d}=e;return{t:"textarea",a:{class:`bw-form-control ${c}`.trim(),placeholder:t,rows:a,id:o,name:n,disabled:i,readonly:s,required:l,...d},c:r}},makeTimeline:function(e={}){var{items:t=[],className:r=""}=e;return{t:"div",a:{class:("bw-timeline "+r).trim()},c:t.map(function(e){return{t:"div",a:{class:"bw-timeline-item"},c:[{t:"div",a:{class:"bw-timeline-marker bw-timeline-marker-"+(e.variant||"primary")}},{t:"div",a:{class:"bw-timeline-content"},c:[e.date&&{t:"div",a:{class:"bw-timeline-date"},c:e.date},e.title&&{t:"h5",a:{class:"bw-timeline-title"},c:e.title},e.content&&("string"==typeof e.content?{t:"p",a:{class:"bw-timeline-text"},c:e.content}:e.content)].filter(Boolean)}]}}),o:{type:"timeline"}}},makeToast:function(e={}){const{title:t,content:r,variant:a="info",autoDismiss:o=!0,delay:n=5e3,position:i="top-right",className:s=""}=e;return{t:"div",a:{class:`bw-toast bw-toast-${a} ${s}`.trim(),role:"alert","data-position":i},c:[t&&{t:"div",a:{class:"bw-toast-header"},c:[{t:"strong",c:t},{t:"button",a:{type:"button",class:"bw-close","aria-label":"Close",onclick:function(e){var t=e.target.closest(".bw-toast");t&&(t.classList.add("bw-toast-hiding"),setTimeout(function(){t.parentNode&&t.parentNode.removeChild(t)},300))}},c:"×"}]},r&&{t:"div",a:{class:"bw-toast-body"},c:r}].filter(Boolean),o:{type:"toast",mounted:function(e){requestAnimationFrame(function(){e.classList.add("bw-toast-show")}),o&&setTimeout(function(){e.classList.add("bw-toast-hiding"),setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},300)},n)}}}},makeTooltip:function(e={}){var{content:t,text:r="",placement:a="top",className:o=""}=e;return{t:"span",a:{class:("bw-tooltip-wrapper "+o).trim()},c:[t,{t:"span",a:{class:"bw-tooltip bw-tooltip-"+a,role:"tooltip"},c:r}],o:{type:"tooltip",mounted:function(e){var t=e.querySelector(".bw-tooltip");e.addEventListener("mouseenter",function(){t.classList.add("bw-tooltip-show")}),e.addEventListener("mouseleave",function(){t.classList.remove("bw-tooltip-show")}),e.addEventListener("focusin",function(){t.classList.add("bw-tooltip-show")}),e.addEventListener("focusout",function(){t.classList.remove("bw-tooltip-show")})}}}}});
|
|
54
54
|
/**
|
|
55
55
|
* Bitwrench v2 Core
|
|
56
56
|
* Zero-dependency UI library using JavaScript objects
|
|
@@ -58,5 +58,5 @@ const e={version:"2.0.12",name:"bitwrench",description:"A library for javascript
|
|
|
58
58
|
*
|
|
59
59
|
* @license BSD-2-Clause
|
|
60
60
|
* @author M A Chatterjee <deftio [at] deftio [dot] com>
|
|
61
|
-
*/const M={version:e.version,versionInfo:e,getVersion:function(){return{...e}},_idCounter:0,_unmountCallbacks:new Map,_topics:{},_subIdCounter:0,_nodeMap:{},__monkey_patch_is_nodejs__:{_value:"ignore",set:function(e){this._value="boolean"==typeof e?e:"ignore"},get:function(){return this._value}},isNodeJS:function(){return"ignore"!==M.__monkey_patch_is_nodejs__.get()?M.__monkey_patch_is_nodejs__.get():"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}};M._isNode=M.isNodeJS(),Object.defineProperty(M,"_isBrowser",{get:function(){return"undefined"!=typeof document&&"undefined"!=typeof window},configurable:!0}),M._fsCache=void 0,M._getFs=function(){if(void 0!==M._fsCache)return Promise.resolve(M._fsCache);if(!M.isNodeJS())return M._fsCache=null,Promise.resolve(null);if("function"==typeof require)try{return M._fsCache=require("fs"),Promise.resolve(M._fsCache)}catch(e){}try{return new Function("m","return import(m)")("fs").then(function(e){return M._fsCache=e.default||e,M._fsCache}).catch(function(){return M._fsCache=null,null})}catch(e){return M._fsCache=null,Promise.resolve(null)}},M.typeOf=function(e,t){if(null===e)return"null";const r=typeof e;if("object"!==r)return r;if(t)return r;const o=Object.prototype.toString.call(e),a={"[object Array]":"array","[object Date]":"Date","[object RegExp]":"RegExp","[object Error]":"Error","[object Promise]":"Promise","[object Map]":"Map","[object Set]":"Set","[object WeakMap]":"WeakMap","[object WeakSet]":"WeakSet","[object ArrayBuffer]":"ArrayBuffer","[object DataView]":"DataView","[object Int8Array]":"Int8Array","[object Uint8Array]":"Uint8Array","[object Uint8ClampedArray]":"Uint8ClampedArray","[object Int16Array]":"Int16Array","[object Uint16Array]":"Uint16Array","[object Int32Array]":"Int32Array","[object Uint32Array]":"Uint32Array","[object Float32Array]":"Float32Array","[object Float64Array]":"Float64Array"};return a[o]?a[o]:e._bw_type?e._bw_type:e.constructor&&e.constructor.name?e.constructor.name:r},M.to=M.typeOf,M.uuid=function(e){var t=e?"bw_"+e+"_":"bw_";if(M._isBrowser&&crypto&&crypto.randomUUID)return t+crypto.randomUUID().replace(/-/g,"");return`${t}${Date.now().toString(36)}_${(++M._idCounter).toString(36)}_${Math.random().toString(36).substring(2,11)}`},M._el=function(e){if("string"!=typeof e)return e||null;if(!e)return null;if(!M._isBrowser)return null;var t=M._nodeMap[e];if(t){if(null!==t.parentNode)return t;delete M._nodeMap[e]}var r=document.getElementById(e);return r||"#"!==e.charAt(0)&&"."!==e.charAt(0)||(r=document.querySelector(e)),r||(r=document.querySelector('[data-bw-id="'+e+'"]')),r&&(M._nodeMap[e]=r),r},M._registerNode=function(e,t){if(e){t&&(M._nodeMap[t]=e);var r=e.getAttribute?e.getAttribute("id"):null;r&&(M._nodeMap[r]=e)}},M._deregisterNode=function(e,t){t&&delete M._nodeMap[t];var r=e&&e.getAttribute?e.getAttribute("id"):null;r&&delete M._nodeMap[r]},M.escapeHTML=function(e){if("string"!=typeof e)return"";const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'/]/g,e=>t[e])},M.raw=function(e){return{__bw_raw:!0,v:String(e)}},M.normalizeClass=function(e){return"string"!=typeof e?e:e.replace(/\bbw_/g,"bw-")},M.html=function(e,t={}){if(null==e)return"";if(Array.isArray(e))return e.map(e=>M.html(e,t)).join("");if(e&&e.__bw_raw)return e.v;if("object"!=typeof e||!e.t)return t.raw?String(e):M.escapeHTML(String(e));const{t:r,a:o={},c:a,o:n={}}=e,i=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(r.toLowerCase());let s="";for(const[e,t]of Object.entries(o))if(null!=t&&!1!==t&&!e.startsWith("on"))if("style"===e&&"object"==typeof t){const e=Object.entries(t).filter(([,e])=>null!=e).map(([e,t])=>`${e}:${t}`).join(";");e&&(s+=` style="${M.escapeHTML(e)}"`)}else if("class"===e){const e=M.normalizeClass(Array.isArray(t)?t.filter(Boolean).join(" "):String(t));e&&(s+=` class="${M.escapeHTML(e)}"`)}else s+=!0===t?` ${e}`:` ${e}="${M.escapeHTML(String(t))}"`;if((n.mounted||n.unmount)&&!o.class?.includes("bw-id-")){const e=n.bw_id||M.uuid();s=s.replace(/class="([^"]*)"/,(t,r)=>`class="${r} bw-id-${e}"`.trim()),s.includes("class=")||(s+=` class="bw-id-${e}"`)}if(i)return`<${r}${s} />`;return`<${r}${s}>${null!=a?M.html(a,t):""}</${r}>`},M.createDOM=function(e,t={}){if(!M._isBrowser)throw new Error("bw.createDOM requires a DOM environment (document/window). Use bw.html() instead.");if(null==e)return document.createTextNode("");if(e&&e.__bw_raw){var r=document.createDocumentFragment(),o=document.createElement("span");for(o.innerHTML=e.v;o.firstChild;)r.appendChild(o.firstChild);return r}if("object"!=typeof e||!e.t)return document.createTextNode(String(e));const{t:a,a:n={},c:i,o:s={}}=e,l=document.createElement(a);for(const[e,t]of Object.entries(n))if(null!=t&&!1!==t)if("style"===e&&"object"==typeof t)Object.assign(l.style,t);else if("class"===e){const e=M.normalizeClass(Array.isArray(t)?t.filter(Boolean).join(" "):String(t));e&&(l.className=e)}else if(e.startsWith("on")&&"function"==typeof t){const r=e.slice(2).toLowerCase();l.addEventListener(r,t)}else"value"===e&&"input"===a?l.value=t:!0===t?l.setAttribute(e,""):l.setAttribute(e,String(t));if(null!=i)if(Array.isArray(i))i.forEach(e=>{if(null!=e){var r=M.createDOM(e,t);l.appendChild(r);var o=e&&e.a?e.a["data-bw-id"]||e.a.id:null;if(o&&(l._bw_refs||(l._bw_refs={}),l._bw_refs[o]=r),r._bw_refs)for(var a in l._bw_refs||(l._bw_refs={}),r._bw_refs)Object.prototype.hasOwnProperty.call(r._bw_refs,a)&&(l._bw_refs[a]=r._bw_refs[a])}});else if("object"==typeof i&&i.__bw_raw)l.innerHTML=i.v;else if("object"==typeof i&&i.t){var c=M.createDOM(i,t);l.appendChild(c);var d=i.a?i.a["data-bw-id"]||i.a.id:null;if(d&&(l._bw_refs||(l._bw_refs={}),l._bw_refs[d]=c),c._bw_refs)for(var b in l._bw_refs||(l._bw_refs={}),c._bw_refs)Object.prototype.hasOwnProperty.call(c._bw_refs,b)&&(l._bw_refs[b]=c._bw_refs[b])}else l.textContent=String(i);if(n.id&&M._registerNode(l,null),s.mounted||s.unmount||s.render||s.state){const e=n["data-bw-id"]||M.uuid();l.setAttribute("data-bw-id",e),M._registerNode(l,e),s.state&&(l._bw_state=s.state),s.render?(l._bw_render=s.render,s.mounted&&console.warn("bw.createDOM: o.render and o.mounted are mutually exclusive. o.render wins."),document.body.contains(l)?s.render(l,l._bw_state||{}):requestAnimationFrame(()=>{document.body.contains(l)&&s.render(l,l._bw_state||{})})):s.mounted&&(document.body.contains(l)?s.mounted(l,l._bw_state||{}):requestAnimationFrame(()=>{document.body.contains(l)&&s.mounted(l,l._bw_state||{})})),s.unmount&&M._unmountCallbacks.set(e,()=>{s.unmount(l,l._bw_state||{})})}else n["data-bw-id"]&&M._registerNode(l,n["data-bw-id"]);return l},M.DOM=function(e,t,r={}){if(!M._isBrowser)throw new Error("bw.DOM requires a DOM environment (document/window). Use bw.html() instead.");const o=M._el(e);if(!o)return console.error("bw.DOM: Target element not found:",e),null;const a=o._bw_state,n=o._bw_render,i=o.getAttribute("data-bw-id"),s=o._bw_subs;return delete o._bw_subs,M.cleanup(o),void 0!==a&&(o._bw_state=a),n&&(o._bw_render=n),i&&(o.setAttribute("data-bw-id",i),M._registerNode(o,i)),s&&(o._bw_subs=s),o.innerHTML="",null!=t&&(t.element instanceof Element?o.appendChild(t.element):Array.isArray(t)?t.forEach(e=>{null!=e&&(e.element instanceof Element?o.appendChild(e.element):o.appendChild(M.createDOM(e,r)))}):o.appendChild(M.createDOM(t,r))),o},M.compileProps=function(e,t={}){const r={};return Object.keys(t).forEach(t=>{Object.defineProperty(r,t,{get:()=>e._props[t],set(r){const o=e._props[t];o!==r&&(e._props[t]=r,e.onPropChange&&e.onPropChange(t,r,o))},enumerable:!0,configurable:!0})}),r},M.renderComponent=function(e,t={}){const r=M.createDOM(e,t),o={element:r,taco:e,_props:{...e.a},_state:e.o?.state||{},_children:{},get props(){return this._compiledProps||(this._compiledProps=M.compileProps(this,this._props)),this._compiledProps},$(e){return this.element.querySelectorAll(e)},$first(e){return this.element.querySelector(e)},update(e){Object.assign(this._props,e);const r={...this.taco,a:{...this.taco.a,...e}},o=M.createDOM(r,t);return this.element.replaceWith(o),this.element=o,this.taco=r,this},render(){const e=M.createDOM(this.taco,t);return this.element.replaceWith(e),this.element=e,this},onPropChange(e,t,r){this.render()},get state(){return this._state},set state(e){this._state=e,this.render()},setState(e){return Object.assign(this._state,e),this.render(),this},addChild(e,t){return this._children[e]=t,this},getChild(e){return this._children[e]},destroy(){Object.values(this._children).forEach(e=>{e&&e.destroy&&e.destroy()}),M.cleanup(this.element),this.element.remove(),this._children={},this._props={},this._state={},this._compiledProps=null}};return r._bwHandle=o,o},M.cleanup=function(e){if(!M._isBrowser||!e)return;e.querySelectorAll("[data-bw-id]").forEach(e=>{const t=e.getAttribute("data-bw-id"),r=M._unmountCallbacks.get(t);r&&(r(),M._unmountCallbacks.delete(t)),M._deregisterNode(e,t),e._bw_subs&&(e._bw_subs.forEach(function(e){e()}),delete e._bw_subs),delete e._bw_state,delete e._bw_render,delete e._bw_refs});const t=e.getAttribute("data-bw-id");if(t){const r=M._unmountCallbacks.get(t);r&&(r(),M._unmountCallbacks.delete(t)),M._deregisterNode(e,t),e._bw_subs&&(e._bw_subs.forEach(function(e){e()}),delete e._bw_subs),delete e._bw_state,delete e._bw_render,delete e._bw_refs}},M.update=function(e){var t=M._el(e);return t&&t._bw_render&&(t._bw_render(t,t._bw_state||{}),M.emit(t,"statechange",t._bw_state)),t||null},M.patch=function(e,t,r){var o=M._el(e);return o?(r?o.setAttribute(r,String(t)):Array.isArray(t)?(o.innerHTML="",t.forEach(function(e){"string"==typeof e||"number"==typeof e?o.appendChild(document.createTextNode(String(e))):e&&e.t&&o.appendChild(M.createDOM(e))})):"object"==typeof t&&null!==t&&t.t?(o.innerHTML="",o.appendChild(M.createDOM(t))):o.textContent=String(t),o):null},M.patchAll=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=M.patch(r,e[r]));return t},M.emit=function(e,t,r){var o=M._el(e);o&&o.dispatchEvent(new CustomEvent("bw:"+t,{bubbles:!0,detail:r||{}}))},M.on=function(e,t,r){var o=M._el(e);return o&&o.addEventListener("bw:"+t,function(e){r(e.detail,e)}),o||null},M.pub=function(e,t){var r=M._topics[e];if(!r||0===r.length)return 0;for(var o=r.slice(),a=0,n=0;n<o.length;n++)try{o[n].handler(t),a++}catch(t){console.warn('bw.pub: subscriber error on topic "'+e+'":',t)}return a},M.sub=function(e,t,r){var o=++M._subIdCounter;M._topics[e]||(M._topics[e]=[]),M._topics[e].push({handler:t,id:o});var a=function(){var t=M._topics[e];t&&(M._topics[e]=t.filter(function(e){return e.id!==o}),0===M._topics[e].length&&delete M._topics[e])};if(r&&(r._bw_subs||(r._bw_subs=[]),r._bw_subs.push(a),!r.getAttribute("data-bw-id"))){var n="bw_sub_"+o;r.setAttribute("data-bw-id",n)}return a},M.unsub=function(e,t){var r=M._topics[e];if(!r)return 0;var o=r.length;M._topics[e]=r.filter(function(e){return e.handler!==t});var a=o-M._topics[e].length;return 0===M._topics[e].length&&delete M._topics[e],a},M.css=function(e,t={}){const{minify:r=!1,pretty:o=!r}=t;if("string"==typeof e)return e;let a="";const n=o?" ":"",i=o?"\n":"",s=o?" ":"";return Array.isArray(e)?a=e.map(e=>M.css(e,t)).join(i):"object"==typeof e&&Object.entries(e).forEach(([e,r])=>{if("object"==typeof r&&!Array.isArray(r)){if("@"===e.charAt(0)){const o=M.css(r,t);return void(o&&(a+=`${e}${s}{${i}${o}${i}}${i}`))}const o=Object.entries(r).filter(([,e])=>null!=e).map(([e,t])=>{const r=e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase());return`${n}${r}:${s}${t};`}).join(i);o&&(a+=`${e}${s}{${i}${o}${i}}${i}`)}}),a.trim()},M.injectCSS=function(e,t={}){if(!M._isBrowser)return console.warn("bw.injectCSS requires a DOM environment"),null;const{id:r="bw-styles",append:o=!0}=t;let a=document.getElementById(r);a||(a=document.createElement("style"),a.id=r,a.type="text/css",document.head.appendChild(a));const n="string"==typeof e?e:M.css(e,t);return o&&a.textContent?a.textContent+="\n"+n:a.textContent=n,a},M.s=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];r&&"object"==typeof r&&Object.assign(e,r)}return e},M.u={flex:{display:"flex"},flexCol:{display:"flex",flexDirection:"column"},flexRow:{display:"flex",flexDirection:"row"},flexWrap:{display:"flex",flexWrap:"wrap"},block:{display:"block"},inline:{display:"inline"},hidden:{display:"none"},justifyCenter:{justifyContent:"center"},justifyBetween:{justifyContent:"space-between"},justifyEnd:{justifyContent:"flex-end"},alignCenter:{alignItems:"center"},alignStart:{alignItems:"flex-start"},alignEnd:{alignItems:"flex-end"},gap1:{gap:"0.25rem"},gap2:{gap:"0.5rem"},gap3:{gap:"0.75rem"},gap4:{gap:"1rem"},gap6:{gap:"1.5rem"},gap8:{gap:"2rem"},p0:{padding:"0"},p1:{padding:"0.25rem"},p2:{padding:"0.5rem"},p3:{padding:"0.75rem"},p4:{padding:"1rem"},p6:{padding:"1.5rem"},p8:{padding:"2rem"},px4:{paddingLeft:"1rem",paddingRight:"1rem"},py2:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},py4:{paddingTop:"1rem",paddingBottom:"1rem"},m0:{margin:"0"},m4:{margin:"1rem"},mt2:{marginTop:"0.5rem"},mt4:{marginTop:"1rem"},mb2:{marginBottom:"0.5rem"},mb4:{marginBottom:"1rem"},mx_auto:{marginLeft:"auto",marginRight:"auto"},textSm:{fontSize:"0.875rem"},textBase:{fontSize:"1rem"},textLg:{fontSize:"1.125rem"},textXl:{fontSize:"1.25rem"},text2xl:{fontSize:"1.5rem"},text3xl:{fontSize:"1.875rem"},bold:{fontWeight:"700"},semibold:{fontWeight:"600"},italic:{fontStyle:"italic"},textCenter:{textAlign:"center"},textRight:{textAlign:"right"},bgWhite:{background:"#ffffff"},bgTeal:{background:"#006666",color:"#ffffff"},textWhite:{color:"#ffffff"},textTeal:{color:"#006666"},textMuted:{color:"#888"},rounded:{borderRadius:"0.375rem"},roundedLg:{borderRadius:"0.5rem"},roundedFull:{borderRadius:"9999px"},border:{border:"1px solid #d8d8d8"},wFull:{width:"100%"},hFull:{height:"100%"},transition:{transition:"all 0.2s ease"}},M.responsive=function(e,t){var r={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},o=[];return Object.keys(t).forEach(function(a){var n={};"base"===a?(n[e]=t[a],o.push(M.css(n))):r[a]&&(n[e]=t[a],o.push("@media (min-width: "+r[a]+") {\n"+M.css(n)+"\n}"))}),o.join("\n")},M.mapScale=function(e,t,r,o,a,n={}){const{clip:i=!1,expScale:s=1}=n;let l=(e-t)/(r-t);1!==s&&(l=Math.pow(l,s));let c=l*(a-o)+o;if(i){const e=Math.min(o,a),t=Math.max(o,a);c=Math.max(e,Math.min(t,c))}return c},M.clip=function(e,t,r){return Math.max(t,Math.min(r,e))},M._isBrowser&&(M.$=function(e){return e?Array.isArray(e)?e:e.nodeType?[e]:void 0!==e.length&&"string"!=typeof e?Array.from(e):"string"==typeof e?Array.from(document.querySelectorAll(e)):[]:[]},M.$.one=function(e){return M.$(e)[0]||null}),M.loadDefaultStyles=function(e={}){const{minify:t=!0,palette:r}=e;if(M._isBrowser){var o=M.css(function(){var e={"*":{"box-sizing":"border-box",margin:"0",padding:"0"},html:{"font-size":"16px","line-height":"1.5","-webkit-text-size-adjust":"100%","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},body:{"font-family":'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"font-size":"1rem","font-weight":"400","line-height":"1.6",margin:"0",padding:"0","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},".bw-page":{"min-height":"100vh",display:"flex","flex-direction":"column"},".bw-page-content":{flex:"1",padding:"2rem 0"},main:{display:"block"},hr:{"box-sizing":"content-box",height:"0",overflow:"visible",margin:"1rem 0",border:"0"},"hr:not([size])":{height:"1px"},"h1, h2, h3, h4, h5, h6":{"margin-top":"0","margin-bottom":".5rem","font-weight":"600","line-height":"1.25","letter-spacing":"-0.01em"},h1:{"font-size":"calc(1.375rem + 1.5vw)"},h2:{"font-size":"calc(1.325rem + .9vw)"},h3:{"font-size":"calc(1.3rem + .6vw)"},h4:{"font-size":"calc(1.275rem + .3vw)"},h5:{"font-size":"1.25rem"},h6:{"font-size":"1rem"},p:{"margin-top":"0","margin-bottom":"1rem"},small:{"font-size":"0.875rem"},a:{"text-decoration":"none",transition:"color 0.15s"}};Object.assign(e,f),e[".bw-btn"]={display:"inline-flex","align-items":"center","justify-content":"center","font-weight":"500","line-height":"1.5","text-align":"center","text-decoration":"none","vertical-align":"middle",cursor:"pointer","user-select":"none",border:"1px solid transparent",padding:"0.5rem 1.125rem","font-size":"0.875rem","font-family":"inherit","border-radius":"6px",transition:"all 0.15s cubic-bezier(0.4, 0, 0.2, 1)",gap:"0.5rem"},e[".bw-btn:hover"]={"text-decoration":"none",transform:"translateY(-1px)"},e[".bw-btn:active"]={transform:"translateY(0)"},e[".bw-btn:focus-visible"]={outline:"0"},e[".bw-btn:disabled"]={opacity:"0.5",cursor:"not-allowed","pointer-events":"none"},e[".bw-btn-lg"]={padding:"0.625rem 1.5rem","font-size":"1rem","border-radius":"8px"},e[".bw-btn-sm"]={padding:"0.25rem 0.75rem","font-size":"0.8125rem","border-radius":"5px"},e[".bw-card"]={position:"relative",display:"flex","flex-direction":"column","min-width":"0",height:"100%","word-wrap":"break-word","background-clip":"border-box",border:"1px solid transparent","border-radius":"8px",transition:"box-shadow 0.2s cubic-bezier(0.4,0,0.2,1), transform 0.2s cubic-bezier(0.4,0,0.2,1)","margin-bottom":"1.5rem",overflow:"hidden"},e[".bw-card-body"]={flex:"1 1 auto",padding:"1.25rem 1.5rem"},e[".bw-card-body > *:last-child"]={"margin-bottom":"0"},e[".bw-card-title"]={"margin-bottom":"0.5rem","font-size":"1.125rem","font-weight":"600","line-height":"1.3"},e[".bw-card-text"]={"margin-bottom":"0","font-size":"0.9375rem","line-height":"1.6"},e[".bw-card-header"]={padding:"0.875rem 1.5rem","margin-bottom":"0","font-weight":"600","font-size":"0.875rem"},e[".bw-card-footer"]={padding:"0.75rem 1.5rem","font-size":"0.875rem"},e[".bw-card-hoverable"]={transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},e[".bw-card-img-top"]={width:"100%","border-top-left-radius":"7px","border-top-right-radius":"7px"},e[".bw-card-img-bottom"]={width:"100%","border-bottom-left-radius":"7px","border-bottom-right-radius":"7px"},e[".bw-card-img-left"]={width:"40%","object-fit":"cover"},e[".bw-card-img-right"]={width:"40%","object-fit":"cover"},e[".bw-card-subtitle"]={"margin-top":"-0.25rem","margin-bottom":"0.5rem","font-size":"0.875rem"},e[".bw-form-control"]={display:"block",width:"100%",padding:"0.5rem 0.875rem","font-size":"0.9375rem","font-weight":"400","line-height":"1.5","background-clip":"padding-box",appearance:"none",border:"1px solid transparent","border-radius":"6px",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","font-family":"inherit"},e[".bw-form-control:focus"]={outline:"0"},e[".bw-form-control::placeholder"]={opacity:"1"},e[".bw-form-label"]={display:"block","margin-bottom":"0.375rem","font-size":"0.875rem","font-weight":"600"},e[".bw-form-group"]={"margin-bottom":"1.25rem"},e[".bw-form-text"]={"margin-top":"0.25rem","font-size":"0.8125rem"},e["select.bw-form-control"]={"padding-right":"2.25rem","background-repeat":"no-repeat","background-position":"right 0.75rem center","background-size":"16px 12px"},e["textarea.bw-form-control"]={"min-height":"5rem",resize:"vertical"},Object.assign(e,{".bw-form-check":{display:"flex","align-items":"center",gap:"0.5rem","min-height":"1.5rem","margin-bottom":"0.25rem"},".bw-form-check-input":{width:"1rem",height:"1rem",margin:"0",cursor:"pointer","flex-shrink":"0","border-radius":"0.25rem",appearance:"auto"},".bw-form-check-input:disabled":{opacity:"0.5",cursor:"not-allowed"},".bw-form-check-label":{cursor:"pointer","user-select":"none","font-size":"0.9375rem"}}),e[".bw-navbar"]={position:"relative",display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"space-between",padding:"0.5rem 1.5rem"},e[".bw-navbar > .bw-container, .bw-navbar > .container"]={display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"space-between"},e[".bw-navbar-brand"]={display:"inline-flex","align-items":"center",gap:"0.5rem","padding-top":"0.25rem","padding-bottom":"0.25rem","margin-right":"1.5rem","font-size":"1.125rem","font-weight":"600","line-height":"inherit","white-space":"nowrap","text-decoration":"none"},e[".bw-navbar-nav"]={display:"flex","flex-direction":"row","padding-left":"0","margin-bottom":"0","list-style":"none",gap:"0.25rem"},e[".bw-navbar-nav .bw-nav-link"]={display:"block",padding:"0.5rem 0.875rem","text-decoration":"none","font-size":"0.875rem","font-weight":"500","border-radius":"6px",transition:"color 0.15s, background-color 0.15s"},e[".bw-table"]={width:"100%","margin-bottom":"1.5rem","vertical-align":"top","border-collapse":"collapse","font-size":"0.9375rem","line-height":"1.5"},e[".bw-table > :not(caption) > * > *"]={padding:"0.75rem 1rem"},e[".bw-table > tbody"]={"vertical-align":"inherit"},e[".bw-table > thead"]={"vertical-align":"bottom"},e[".bw-table > thead > tr > *"]={padding:"0.625rem 1rem","font-size":"0.8125rem","font-weight":"600","text-transform":"uppercase","letter-spacing":"0.04em"},e[".bw-table caption"]={padding:"0.5rem 1rem","font-size":"0.875rem","caption-side":"bottom"},e[".bw-table-responsive"]={"overflow-x":"auto","-webkit-overflow-scrolling":"touch"},e[".bw-alert"]={position:"relative",padding:"0.875rem 1.25rem","margin-bottom":"1rem",border:"1px solid transparent","border-radius":"8px","font-size":"0.9375rem","line-height":"1.6"},e[".bw-alert-heading, .alert-heading"]={color:"inherit"},e[".bw-alert-link, .alert-link"]={"font-weight":"700"},e[".bw-alert-dismissible"]={"padding-right":"3rem"},e[".bw-alert-dismissible .btn-close"]={position:"absolute",top:"0",right:"0","z-index":"2",padding:"1.25rem 1rem"},e[".bw-badge"]={display:"inline-block",padding:".4em .75em","font-size":".875em","font-weight":"600","line-height":"1.3","text-align":"center","white-space":"nowrap","vertical-align":"baseline","border-radius":".375rem"},e[".bw-badge:empty"]={display:"none"},e[".bw-badge-sm"]={"font-size":".75em",padding:".25em .5em"},e[".bw-badge-lg"]={"font-size":"1em",padding:".5em .9em"},e[".bw-badge-pill"]={"border-radius":"50rem"},e[".bw-progress"]={display:"flex",height:"1.25rem",overflow:"hidden","font-size":".875rem","border-radius":".5rem"},e[".bw-progress-bar"]={display:"flex","flex-direction":"column","justify-content":"center",overflow:"hidden","text-align":"center","white-space":"nowrap",transition:"width .6s ease","font-weight":"600"},e[".bw-progress-bar-striped"]={"background-image":"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)","background-size":"1rem 1rem"},e[".bw-progress-bar-animated"]={animation:"progress-bar-stripes 1s linear infinite"},e["@keyframes progress-bar-stripes"]={"0%":{"background-position-x":"1rem"}},e[".bw-nav"]={display:"flex","flex-wrap":"wrap","padding-left":"0","margin-bottom":"0","list-style":"none",gap:"0"},e[".bw-nav-item"]={display:"block"},e[".bw-nav-tabs .bw-nav-item"]={"margin-bottom":"-2px"},e[".bw-nav-link"]={display:"block",padding:"0.625rem 1rem","font-size":"0.875rem","font-weight":"500","text-decoration":"none",cursor:"pointer",border:"none",background:"transparent",transition:"color 0.15s, border-color 0.15s","font-family":"inherit"},e[".bw-nav-tabs .bw-nav-link"]={border:"none","border-bottom":"2px solid transparent","border-radius":"0","background-color":"transparent"},e[".bw-nav-pills .bw-nav-link"]={"border-radius":"6px"},e[".bw-nav-vertical"]={"flex-direction":"column"},e[".bw-tab-content"]={padding:"1.25rem 0"},e[".bw-tab-pane"]={display:"none"},e[".bw-tab-pane.active"]={display:"block"},e[".bw-nav-scrollable"]={"flex-wrap":"nowrap","overflow-x":"auto","-webkit-overflow-scrolling":"touch","scrollbar-width":"none"},e[".bw-nav-scrollable .bw-nav-link"]={"white-space":"nowrap"},e[".bw-list-group"]={display:"flex","flex-direction":"column","padding-left":"0","margin-bottom":"0","border-radius":"0.375rem"},e[".bw-list-group-item"]={position:"relative",display:"block",padding:"0.75rem 1.25rem","text-decoration":"none","font-size":"0.9375rem"},e[".bw-list-group-item:first-child"]={"border-top-left-radius":"inherit","border-top-right-radius":"inherit"},e[".bw-list-group-item:last-child"]={"border-bottom-right-radius":"inherit","border-bottom-left-radius":"inherit"},e[".bw-list-group-item + .bw-list-group-item"]={"border-top-width":"0"},e[".bw-list-group-item.disabled"]={"pointer-events":"none"},e["a.bw-list-group-item"]={cursor:"pointer"},e[".bw-list-group-flush"]={"border-radius":"0"},e[".bw-list-group-flush > .bw-list-group-item"]={"border-width":"0 0 1px","border-radius":"0"},e[".bw-list-group-flush > .bw-list-group-item:last-child"]={"border-bottom-width":"0"},e[".bw-pagination"]={display:"flex","padding-left":"0","list-style":"none","margin-bottom":"0"},e[".bw-page-item"]={display:"list-item","list-style":"none"},e[".bw-page-link"]={position:"relative",display:"block",padding:"0.375rem 0.75rem","margin-left":"-1px","line-height":"1.25","text-decoration":"none",transition:"color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out"},e[".bw-page-item:first-child .bw-page-link"]={"margin-left":"0","border-top-left-radius":"0.375rem","border-bottom-left-radius":"0.375rem"},e[".bw-page-item:last-child .bw-page-link"]={"border-top-right-radius":"0.375rem","border-bottom-right-radius":"0.375rem"},e[".bw-breadcrumb"]={display:"flex","flex-wrap":"wrap",padding:"0 0","margin-bottom":"1rem","list-style":"none"},e[".bw-breadcrumb-item"]={display:"flex"},e[".bw-breadcrumb-item + .bw-breadcrumb-item"]={"padding-left":"0.5rem"},e[".bw-breadcrumb-item + .bw-breadcrumb-item::before"]={float:"left","padding-right":"0.5rem",content:'"/"'},e[".bw-hero"]={position:"relative",overflow:"hidden"},e[".bw-hero-overlay"]={position:"absolute",top:"0",left:"0",right:"0",bottom:"0","z-index":"1"},e[".bw-hero-content"]={position:"relative","z-index":"2"},e[".bw-hero-title"]={"font-weight":"300","letter-spacing":"-0.05rem",color:"inherit"},e[".bw-hero-subtitle"]={color:"inherit"},e[".bw-hero-actions"]={display:"flex",gap:"1rem","justify-content":"center","flex-wrap":"wrap"},e[".bw-display-4"]={"font-size":"calc(1.475rem + 2.7vw)","font-weight":"300","line-height":"1.2"},e[".bw-lead"]={"font-size":"1.25rem","font-weight":"300"},e[".bw-feature"]={padding:"1rem"},e[".bw-feature-icon"]={display:"inline-block","margin-bottom":"1rem"},e[".bw-feature-title"]={"margin-bottom":"0.5rem"},e[".bw-feature-grid"]={width:"100%"},e[".bw-g-4"]={"--bw-gutter-x":"1.5rem","--bw-gutter-y":"1.5rem"},e[".bw-section"]={position:"relative"},e[".bw-section-header"]={"margin-bottom":"3rem"},e[".bw-section-title"]={"margin-bottom":"1rem","font-weight":"300","font-size":"calc(1.325rem + .9vw)"},e[".bw-cta"]={position:"relative"},e[".bw-cta-content"]={"max-width":"48rem",margin:"0 auto"},e[".bw-cta-title"]={"font-weight":"300"},e[".bw-cta-actions"]={display:"flex",gap:"1rem","justify-content":"center","flex-wrap":"wrap"},e[".bw-spinner-border"]={display:"inline-block",width:"2rem",height:"2rem","vertical-align":"-0.125em",border:"0.25em solid currentcolor","border-right-color":"transparent","border-radius":"50%",animation:"bw-spinner-border 0.75s linear infinite"},e[".bw-spinner-border-sm"]={width:"1rem",height:"1rem","border-width":"0.2em"},e[".bw-spinner-border-lg"]={width:"3rem",height:"3rem","border-width":"0.3em"},e[".bw-spinner-grow"]={display:"inline-block",width:"2rem",height:"2rem","vertical-align":"-0.125em","border-radius":"50%",opacity:"0",animation:"bw-spinner-grow 0.75s linear infinite"},e[".bw-spinner-grow-sm"]={width:"1rem",height:"1rem"},e[".bw-spinner-grow-lg"]={width:"3rem",height:"3rem"},e["@keyframes bw-spinner-border"]={"100%":{transform:"rotate(360deg)"}},e["@keyframes bw-spinner-grow"]={"0%":{transform:"scale(0)"},"50%":{opacity:"1",transform:"none"}},e[".bw-visually-hidden"]={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)","white-space":"nowrap",border:"0"},e[".bw-close"]={display:"inline-flex","align-items":"center","justify-content":"center",width:"1.5rem",height:"1.5rem",padding:"0","font-size":"1.25rem","font-weight":"700","line-height":"1",background:"transparent",border:"0","border-radius":"0.25rem",cursor:"pointer"},e[".bw-vstack"]={display:"flex","flex-direction":"column"},e[".bw-hstack"]={display:"flex","flex-direction":"row","align-items":"center"},e[".bw-gap-0"]={gap:"0"},e[".bw-gap-1"]={gap:"0.25rem"},e[".bw-gap-2"]={gap:"0.5rem"},e[".bw-gap-3"]={gap:"1rem"},e[".bw-gap-4"]={gap:"1.5rem"},e[".bw-gap-5"]={gap:"3rem"};for(var t=1;t<=11;t++)e[".bw-offset-"+t]={"margin-left":(t/12*100).toFixed(6).replace(/\.?0+$/,"")+"%"};e[".bw-code-demo"]={"margin-bottom":"2rem"},e[".bw-code-pre"]={margin:"0",border:"none","border-radius":"6px","overflow-x":"auto"},e[".bw-code-block"]={display:"block",padding:"1.25rem","font-family":'"SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace',"font-size":"0.8125rem","line-height":"1.6"},e[".bw-code-copy-btn"]={position:"absolute",top:"0.5rem",right:"0.5rem",padding:"0.25rem 0.625rem","font-size":"0.6875rem","border-radius":"4px",cursor:"pointer","font-family":"inherit",transition:"all 0.15s"},e[".bw-btn-group, .bw-btn-group-vertical"]={position:"relative",display:"inline-flex","vertical-align":"middle"},e[".bw-btn-group > .bw-btn, .bw-btn-group-vertical > .bw-btn"]={position:"relative",flex:"1 1 auto","border-radius":"0","margin-left":"-1px"},e[".bw-btn-group > .bw-btn:first-child"]={"margin-left":"0","border-top-left-radius":"6px","border-bottom-left-radius":"6px"},e[".bw-btn-group > .bw-btn:last-child"]={"border-top-right-radius":"6px","border-bottom-right-radius":"6px"},e[".bw-btn-group-vertical"]={"flex-direction":"column","align-items":"flex-start","justify-content":"center"},e[".bw-btn-group-vertical > .bw-btn"]={width:"100%","margin-left":"0","margin-top":"-1px"},e[".bw-btn-group-vertical > .bw-btn:first-child"]={"margin-top":"0","border-top-left-radius":"6px","border-top-right-radius":"6px","border-bottom-left-radius":"0","border-bottom-right-radius":"0"},e[".bw-btn-group-vertical > .bw-btn:last-child"]={"border-top-left-radius":"0","border-top-right-radius":"0","border-bottom-left-radius":"6px","border-bottom-right-radius":"6px"},e[".bw-accordion"]={"border-radius":"8px",overflow:"hidden"},e[".bw-accordion-item"]={border:"1px solid transparent"},e[".bw-accordion-item + .bw-accordion-item"]={"border-top":"0"},e[".bw-accordion-header"]={margin:"0"},e[".bw-accordion-button"]={position:"relative",display:"flex","align-items":"center",width:"100%",padding:"1rem 1.25rem","font-size":"1rem","font-weight":"500","text-align":"left","background-color":"transparent",border:"0","overflow-anchor":"none",cursor:"pointer","font-family":"inherit",transition:"color 0.15s ease-in-out, background-color 0.15s ease-in-out"},e[".bw-accordion-button::after"]={"flex-shrink":"0",width:"1.25rem",height:"1.25rem","margin-left":"auto",content:'""',"background-repeat":"no-repeat","background-size":"1.25rem",transition:"transform 0.2s ease-in-out"},e[".bw-accordion-button:not(.bw-collapsed)::after"]={transform:"rotate(-180deg)"},e[".bw-accordion-collapse"]={"max-height":"0",overflow:"hidden",transition:"max-height 0.3s ease"},e[".bw-accordion-collapse.bw-collapse-show"]={"max-height":"none"},e[".bw-accordion-body"]={padding:"1rem 1.25rem"},e[".bw-modal"]={display:"none",position:"fixed",top:"0",left:"0",width:"100%",height:"100%","z-index":"1050","overflow-x":"hidden","overflow-y":"auto",opacity:"0",transition:"opacity 0.15s linear"},e[".bw-modal.bw-modal-show"]={display:"flex","align-items":"center","justify-content":"center",opacity:"1"},e[".bw-modal-dialog"]={position:"relative",width:"100%","max-width":"500px",margin:"1.75rem auto","pointer-events":"none",transform:"translateY(-20px)",transition:"transform 0.2s ease-out"},e[".bw-modal.bw-modal-show .bw-modal-dialog"]={transform:"translateY(0)"},e[".bw-modal-sm"]={"max-width":"300px"},e[".bw-modal-lg"]={"max-width":"800px"},e[".bw-modal-xl"]={"max-width":"1140px"},e[".bw-modal-content"]={position:"relative",display:"flex","flex-direction":"column","pointer-events":"auto","background-clip":"padding-box",border:"1px solid transparent","border-radius":"8px",outline:"0"},e[".bw-modal-header"]={display:"flex","align-items":"center","justify-content":"space-between",padding:"1rem 1.5rem"},e[".bw-modal-title"]={margin:"0","font-size":"1.25rem","font-weight":"600","line-height":"1.3"},e[".bw-modal-body"]={position:"relative",flex:"1 1 auto",padding:"1.5rem"},e[".bw-modal-footer"]={display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"flex-end",padding:"0.75rem 1.5rem",gap:"0.5rem"},e[".bw-carousel"]={position:"relative",overflow:"hidden","border-radius":"8px"},e[".bw-carousel-track"]={display:"flex",transition:"transform 0.4s ease",height:"100%"},e[".bw-carousel-slide"]={"min-width":"100%","flex-shrink":"0",overflow:"hidden",position:"relative",display:"flex","align-items":"center","justify-content":"center"},e[".bw-carousel-slide img"]={width:"100%",height:"100%","object-fit":"cover"},e[".bw-carousel-caption"]={position:"absolute",bottom:"0",left:"0",right:"0",padding:"0.75rem 1rem"},e[".bw-carousel-control"]={position:"absolute",top:"50%",transform:"translateY(-50%)",width:"40px",height:"40px",border:"none","border-radius":"50%",cursor:"pointer",display:"flex","align-items":"center","justify-content":"center","z-index":"2",padding:"0",transition:"background-color 0.2s ease"},e[".bw-carousel-control img"]={width:"20px",height:"20px","pointer-events":"none"},e[".bw-carousel-control-prev"]={left:"10px"},e[".bw-carousel-control-next"]={right:"10px"},e[".bw-carousel-indicators"]={position:"absolute",bottom:"12px",left:"50%",transform:"translateX(-50%)",display:"flex",gap:"6px","z-index":"2"},e[".bw-carousel-indicator"]={width:"10px",height:"10px","border-radius":"50%",border:"2px solid transparent",padding:"0",cursor:"pointer",transition:"opacity 0.2s ease, background-color 0.2s ease"},e[".bw-toast-container"]={position:"fixed","z-index":"1080","pointer-events":"none",display:"flex","flex-direction":"column",gap:"0.5rem",padding:"1rem"},e[".bw-toast"]={"pointer-events":"auto",width:"350px","max-width":"100%","background-clip":"padding-box","border-radius":"8px",opacity:"0",transform:"translateY(-10px)",transition:"opacity 0.3s ease, transform 0.3s ease"},e[".bw-toast.bw-toast-show"]={opacity:"1",transform:"translateY(0)"},e[".bw-toast.bw-toast-hiding"]={opacity:"0",transform:"translateY(-10px)"},e[".bw-toast-header"]={display:"flex","align-items":"center","justify-content":"space-between",padding:"0.5rem 0.75rem","font-size":"0.875rem"},e[".bw-toast-body"]={padding:"0.75rem","font-size":"0.9375rem"},e[".bw-dropdown"]={position:"relative",display:"inline-block"},e[".bw-dropdown-toggle::after"]={display:"inline-block","margin-left":"0.255em","vertical-align":"0.255em",content:'""',"border-top":"0.3em solid","border-right":"0.3em solid transparent","border-bottom":"0","border-left":"0.3em solid transparent"},e[".bw-dropdown-menu"]={position:"absolute",top:"100%",left:"0","z-index":"1000",display:"none","min-width":"10rem",padding:"0.5rem 0",margin:"0.125rem 0 0","background-clip":"padding-box","border-radius":"6px"},e[".bw-dropdown-menu.bw-dropdown-show"]={display:"block"},e[".bw-dropdown-menu-end"]={left:"auto",right:"0"},e[".bw-dropdown-item"]={display:"block",width:"100%",padding:"0.375rem 1rem",clear:"both","font-weight":"400","text-align":"inherit","text-decoration":"none","white-space":"nowrap","background-color":"transparent",border:"0","font-size":"0.9375rem",transition:"background-color 0.15s, color 0.15s"},e[".bw-dropdown-divider"]={height:"0",margin:"0.5rem 0",overflow:"hidden",opacity:"1"},e[".bw-form-switch"]={"padding-left":"2.5em"},e[".bw-form-switch .bw-switch-input"]={width:"2em",height:"1.125em","margin-left":"-2.5em","border-radius":"2em",appearance:"none","background-position":"left center","background-repeat":"no-repeat","background-size":"contain",transition:"background-position 0.15s ease-in-out, background-color 0.15s ease-in-out",cursor:"pointer"},e[".bw-form-switch .bw-switch-input:checked"]={"background-position":"right center"},e[".bw-form-switch .bw-switch-input:disabled"]={opacity:"0.5",cursor:"not-allowed"},e[".bw-skeleton"]={"border-radius":"4px","background-size":"400% 100%",animation:"bw-skeleton-shimmer 1.4s ease infinite"},e[".bw-skeleton-text"]={height:"1em","margin-bottom":"0.5rem"},e[".bw-skeleton-circle"]={"border-radius":"50%"},e[".bw-skeleton-rect"]={"border-radius":"8px"},e[".bw-skeleton-group"]={display:"flex","flex-direction":"column"},e["@keyframes bw-skeleton-shimmer"]={"0%":{"background-position":"100% 50%"},"100%":{"background-position":"0 50%"}},e[".bw-avatar"]={display:"inline-flex","align-items":"center","justify-content":"center","border-radius":"50%",overflow:"hidden","font-weight":"600","text-transform":"uppercase","vertical-align":"middle","object-fit":"cover"},e[".bw-avatar-sm"]={width:"2rem",height:"2rem","font-size":"0.75rem"},e[".bw-avatar-md"]={width:"3rem",height:"3rem","font-size":"1rem"},e[".bw-avatar-lg"]={width:"4rem",height:"4rem","font-size":"1.25rem"},e[".bw-avatar-xl"]={width:"5rem",height:"5rem","font-size":"1.5rem"},e[".bw-bar-chart-container"]={padding:"1rem",border:"1px solid transparent","border-radius":"8px"},e[".bw-bar-chart"]={display:"flex","align-items":"flex-end",gap:"6px",padding:"0 0.5rem"},e[".bw-bar-group"]={flex:"1",display:"flex","flex-direction":"column","align-items":"center",height:"100%","justify-content":"flex-end"},e[".bw-bar"]={width:"100%","border-radius":"3px 3px 0 0",transition:"height 0.5s ease","min-height":"4px"},e[".bw-bar:hover"]={opacity:"0.85"},e[".bw-bar-value"]={"font-size":"0.65rem","font-weight":"600","margin-bottom":"2px","text-align":"center"},e[".bw-bar-label"]={"font-size":"0.7rem","margin-top":"4px","text-align":"center"},e[".bw-bar-chart-title"]={"font-size":"1.1rem","font-weight":"600",margin:"0 0 0.75rem 0"};var r={0:"0",1:".25rem",2:".5rem",3:"1rem",4:"1.5rem",5:"3rem"};for(var o in r){var a=r[o];e[".bw-m-"+o]={margin:a+" !important"},e[".bw-mt-"+o]={"margin-top":a+" !important"},e[".bw-mb-"+o]={"margin-bottom":a+" !important"},e[".bw-ms-"+o]={"margin-left":a+" !important"},e[".bw-me-"+o]={"margin-right":a+" !important"},e[".bw-p-"+o]={padding:a+" !important"},e[".bw-pt-"+o+", .pt-"+o]={"padding-top":a+" !important"},e[".bw-pb-"+o+", .pb-"+o]={"padding-bottom":a+" !important"},e[".bw-ps-"+o+", .ps-"+o]={"padding-left":a+" !important"},e[".bw-pe-"+o+", .pe-"+o]={"padding-right":a+" !important"}}e[".bw-m-auto, .m-auto"]={margin:"auto !important"},e[".bw-py-3"]={"padding-top":"1rem !important","padding-bottom":"1rem !important"},e[".bw-py-4"]={"padding-top":"1.5rem !important","padding-bottom":"1.5rem !important"},e[".bw-py-5"]={"padding-top":"3rem !important","padding-bottom":"3rem !important"},e[".bw-py-6"]={"padding-top":"4rem !important","padding-bottom":"4rem !important"},e[".bw-d-none"]={display:"none"},e[".bw-d-block"]={display:"block"},e[".bw-d-inline"]={display:"inline"},e[".bw-d-inline-block"]={display:"inline-block"},e[".bw-d-flex"]={display:"flex"},e[".bw-text-left"]={"text-align":"left"},e[".bw-text-right"]={"text-align":"right"},e[".bw-text-center"]={"text-align":"center"};var n={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around"};for(var i in n)e[".bw-justify-content-"+i+", .justify-content-"+i]={"justify-content":n[i]};var s={start:"flex-start",end:"flex-end",center:"center"};for(var l in s)e[".bw-align-items-"+l+", .align-items-"+l]={"align-items":s[l]};return["25","50","75","100"].forEach(function(t){e[".bw-w-"+t+", .w-"+t]={width:t+"% !important"},e[".bw-h-"+t+", .h-"+t]={height:t+"% !important"}}),e[".bw-w-auto, .w-auto"]={width:"auto !important"},e[".bw-h-auto, .h-auto"]={height:"auto !important"},e[".bw-mw-100, .mw-100"]={"max-width":"100% !important"},e[".bw-mh-100, .mh-100"]={"max-height":"100% !important"},["static","relative","absolute","fixed","sticky"].forEach(function(t){e[".bw-position-"+t+", .position-"+t]={position:t+" !important"}}),e[".bw-translate-middle, .translate-middle"]={transform:"translate(-50%, -50%) !important"},["auto","hidden","visible","scroll"].forEach(function(t){e[".bw-overflow-"+t+", .overflow-"+t]={overflow:t+" !important"}}),e[".bw-visible, .visible"]={visibility:"visible !important"},e[".bw-invisible, .invisible"]={visibility:"hidden !important"},["all","auto","none"].forEach(function(t){e[".bw-user-select-"+t+", .user-select-"+t]={"user-select":t+" !important"}}),e[".pe-none"]={"pointer-events":"none !important"},e[".pe-auto"]={"pointer-events":"auto !important"},e[".fw-light"]={"font-weight":"300 !important"},e[".fw-lighter"]={"font-weight":"lighter !important"},e[".fw-normal"]={"font-weight":"400 !important"},e[".fw-bold"]={"font-weight":"700 !important"},e[".fw-bolder"]={"font-weight":"bolder !important"},e[".fst-italic"]={"font-style":"italic !important"},e[".fst-normal"]={"font-style":"normal !important"},e[".text-decoration-none"]={"text-decoration":"none !important"},e[".text-decoration-underline"]={"text-decoration":"underline !important"},e[".text-decoration-line-through"]={"text-decoration":"line-through !important"},e[".text-lowercase"]={"text-transform":"lowercase !important"},e[".text-uppercase"]={"text-transform":"uppercase !important"},e[".text-capitalize"]={"text-transform":"capitalize !important"},e[".text-wrap"]={"white-space":"normal !important"},e[".text-nowrap"]={"white-space":"nowrap !important"},e[".fs-1"]={"font-size":"calc(1.375rem + 1.5vw) !important"},e[".fs-2"]={"font-size":"calc(1.325rem + .9vw) !important"},e[".fs-3"]={"font-size":"calc(1.3rem + .6vw) !important"},e[".fs-4"]={"font-size":"calc(1.275rem + .3vw) !important"},e[".fs-5"]={"font-size":"1.25rem !important"},e[".fs-6"]={"font-size":"1rem !important"},e[".list-unstyled"]={"padding-left":"0","list-style":"none"},e[".list-inline"]={"padding-left":"0","list-style":"none"},e[".list-inline-item"]={display:"inline-block"},e[".list-inline-item:not(:last-child)"]={"margin-right":".5rem"},e[".opacity-0"]={opacity:"0 !important"},e[".opacity-25"]={opacity:".25 !important"},e[".opacity-50"]={opacity:".5 !important"},e[".opacity-75"]={opacity:".75 !important"},e[".opacity-100"]={opacity:"1 !important"},Object.assign(e,h),g(e)}());M.injectCSS(o,{id:"bw-structural",append:!1,minify:t})}var a=Object.assign({},u,r||{});return M.generateTheme("",Object.assign({},a,{inject:!0}))},M.getTheme=function(){return"undefined"!=typeof console&&console.warn&&console.warn("bw.getTheme() is deprecated. Use bw.generateTheme() instead."),JSON.parse(JSON.stringify(y))},M.setTheme=function(e,t={}){"undefined"!=typeof console&&console.warn&&console.warn("bw.setTheme() is deprecated. Use bw.generateTheme() instead.");const{inject:r=!0}=t;if(x(e),r&&M._isBrowser&&e.colors){const t=document.documentElement;for(const[r,o]of Object.entries(e.colors))t.style.setProperty("--bw-"+r,o)}return M.getTheme()},M.toggleDarkMode=function(e){const t=void 0!==e?e:!y.darkMode;if(y.darkMode=t,M._isBrowser){const e=document.documentElement;if(t){e.classList.add("bw-dark");var r=function(e){var t=o(n(e.primary.base,-15)),r=a([t[0],Math.min(t[1],30),10]),i=a([t[0],Math.min(t[1],25),15]),s=n(e.light.base,5),l=a([t[0],Math.min(t[1],15),30]);return{":root.bw-dark":{"--bw-body-color":s,"--bw-body-bg":r},".bw-dark body, :root.bw-dark body":{color:s,"background-color":r},".bw-dark .bw-card":{"background-color":i,"border-color":l,color:s},".bw-dark .bw-card-header":{"background-color":r,"border-bottom-color":l,color:s},".bw-dark .bw-card-footer":{"background-color":r,"border-top-color":l,color:s},".bw-dark .bw-card-title":{color:s},".bw-dark .bw-navbar":{"background-color":i,"border-bottom-color":l},".bw-dark .bw-navbar-brand":{color:s},".bw-dark .bw-navbar-nav .bw-nav-link":{color:n(s,-15)},".bw-dark .bw-navbar-nav .bw-nav-link:hover":{color:s},".bw-dark .bw-form-control":{"background-color":i,"border-color":l,color:s},".bw-dark .bw-form-label":{color:s},".bw-dark .bw-form-text":{color:n(s,-20)},".bw-dark .bw-table":{color:s},".bw-dark .bw-table > :not(caption) > * > *":{"border-bottom-color":l},".bw-dark .bw-table > thead > tr > *":{"background-color":r,color:n(s,-10),"border-bottom-color":l},".bw-dark .bw-table-striped > tbody > tr:nth-of-type(odd) > *":{"background-color":"rgba(255, 255, 255, 0.05)"},".bw-dark .bw-alert":{"border-color":l},".bw-dark .bw-list-group-item":{"background-color":i,"border-color":l,color:s},".bw-dark .bw-badge":{color:s},".bw-dark .bw-nav-tabs":{"border-bottom-color":l},".bw-dark .bw-nav-link":{color:n(s,-15)},".bw-dark .bw-nav-tabs .bw-nav-link:hover":{color:s,"border-bottom-color":l},".bw-dark .bw-pagination .bw-page-link":{"background-color":i,"border-color":l,color:s},".bw-dark .bw-breadcrumb-item + .bw-breadcrumb-item::before":{color:n(s,-20)},".bw-dark .bw-breadcrumb-item.active":{color:n(s,-10)},".bw-dark .bw-hero-light":{background:i,color:s},".bw-dark .bw-progress":{"background-color":i},".bw-dark .bw-section-subtitle":{color:n(s,-15)},".bw-dark .bw-close":{color:s},".bw-dark .bw-accordion-item":{"background-color":i,"border-color":l},".bw-dark .bw-accordion-button":{color:s},".bw-dark .bw-accordion-button:not(.bw-collapsed)":{color:"#7dd3e0","background-color":"rgba(125, 211, 224, 0.1)"},".bw-dark .bw-accordion-button:hover":{"background-color":r},".bw-dark .bw-accordion-button:not(.bw-collapsed):hover":{"background-color":"rgba(125, 211, 224, 0.15)"},".bw-dark .bw-accordion-button:focus-visible":{"box-shadow":"0 0 0 0.2rem rgba(125, 211, 224, 0.3)"},".bw-dark .bw-accordion-body":{"border-top-color":l},".bw-dark .bw-carousel":{"background-color":r},".bw-dark .bw-carousel-control":{"background-color":"rgba(255,255,255,0.15)"},".bw-dark .bw-carousel-control:hover":{"background-color":"rgba(255,255,255,0.25)"},".bw-dark .bw-modal-content":{"background-color":i,"border-color":l},".bw-dark .bw-modal-header":{"border-bottom-color":l},".bw-dark .bw-modal-footer":{"border-top-color":l},".bw-dark .bw-modal-title":{color:s},".bw-dark .bw-toast":{"background-color":i,"border-color":l},".bw-dark .bw-toast-header":{"border-bottom-color":l,color:s},".bw-dark .bw-dropdown-menu":{"background-color":i,"border-color":l},".bw-dark .bw-dropdown-item":{color:s},".bw-dark .bw-dropdown-item:hover":{"background-color":r},".bw-dark .bw-dropdown-divider":{"border-top-color":l},".bw-dark .bw-skeleton":{background:"linear-gradient(90deg, "+l+" 25%, "+i+" 37%, "+l+" 63%)"},".bw-dark h1, .bw-dark h2, .bw-dark h3, .bw-dark h4, .bw-dark h5, .bw-dark h6":{color:s},"@media (prefers-color-scheme: dark)":{":root.bw-auto-dark body":{color:s,"background-color":r}}}}(M._activePalette||d(u)),i=M.css(r),s=document.getElementById("bw-dark-styles");s&&s.remove();var l=document.createElement("style");l.id="bw-dark-styles",l.textContent=i,document.head.appendChild(l)}else{e.classList.remove("bw-dark");var c=document.getElementById("bw-dark-styles");c&&c.remove()}}return t},M.generateTheme=function(e,t){if(!t||!t.primary||!t.secondary)throw new Error("bw.generateTheme requires config.primary and config.secondary");var r=Object.assign({},u,t);t.tertiary||(r.tertiary=r.primary);var o=d(r);M._activePalette=o;var a=function(e){var t=e&&e.spacing||"normal",r=e&&e.radius||"md",o=e&&e.fontSize||1;return{spacing:"string"==typeof t?b[t]||b.normal:t,radius:"string"==typeof r?m[r]||m.md:r,fontSize:o}}(r),n=g(w(e,o,a)),i=M.css(n);if(!1!==t.inject&&M._isBrowser){var s=e?"bw-theme-"+e:"bw-theme-default";M.injectCSS(i,{id:s,append:!1})}return e||(M.u.bgTeal={background:o.primary.base,color:o.primary.textOn},M.u.textTeal={color:o.primary.base},M.u.bgWhite={background:"#ffffff"},M.u.textWhite={color:"#ffffff"}),{css:i,palette:o,name:e}},M.hexToHsl=o,M.hslToHex=a,M.adjustLightness=n,M.mixColor=i,M.relativeLuminance=s,M.textOnColor=l,M.deriveShades=c,M.derivePalette=d,M.SPACING_PRESETS=b,M.RADIUS_PRESETS=m,M.DEFAULT_PALETTE_CONFIG=u,M.THEME_PRESETS={teal:{primary:"#006666",secondary:"#6c757d",tertiary:"#006666",label:"Teal",desc:"The signature bitwrench palette — professional teal and neutral gray."},ocean:{primary:"#0077b6",secondary:"#90e0ef",tertiary:"#00b4d8",label:"Ocean",desc:"Cool blues and teals for a calm, professional look."},sunset:{primary:"#e76f51",secondary:"#264653",tertiary:"#e9c46a",label:"Sunset",desc:"Warm oranges and deep earth tones for a bold feel."},forest:{primary:"#2d6a4f",secondary:"#95d5b2",tertiary:"#52b788",label:"Forest",desc:"Natural greens for an organic, earthy vibe."},slate:{primary:"#343a40",secondary:"#adb5bd",tertiary:"#6c757d",label:"Slate",desc:"Elegant grays for a minimal, modern interface."},rose:{primary:"#e11d48",secondary:"#fda4af",tertiary:"#fb7185",label:"Rose",desc:"Vibrant pinks and reds for a bold, energetic design."},indigo:{primary:"#4f46e5",secondary:"#a5b4fc",tertiary:"#818cf8",label:"Indigo",desc:"Deep purples and soft lavenders for a creative palette."},amber:{primary:"#d97706",secondary:"#fbbf24",tertiary:"#f59e0b",label:"Amber",desc:"Warm golds and yellows for a sunny, welcoming feel."},emerald:{primary:"#059669",secondary:"#6ee7b7",tertiary:"#34d399",label:"Emerald",desc:"Bright greens and mints for a fresh, modern look."},nord:{primary:"#5e81ac",secondary:"#88c0d0",tertiary:"#81a1c1",label:"Nord",desc:"Muted arctic blues inspired by the Nord color scheme."},coral:{primary:"#ef6461",secondary:"#4a7c7e",tertiary:"#e8a87c",label:"Coral",desc:"Warm coral and teal for a balanced, approachable design."},midnight:{primary:"#1e3a5f",secondary:"#7c8db5",tertiary:"#3d5a80",label:"Midnight",desc:"Deep navy and steel blue for a sophisticated, authoritative feel."}},M.choice=function(e,t,r){const o=e in t?t[e]:r;return"function"===M.typeOf(o)?o(e):o},M.arrayUniq=function(e){return"array"!==M.typeOf(e)?[]:e.filter((e,t,r)=>r.indexOf(e)===t)},M.arrayBinA=function(e,t){return"array"!==M.typeOf(e)||"array"!==M.typeOf(t)?[]:M.arrayUniq(e.filter(e=>-1!==t.indexOf(e)))},M.arrayBNotInA=function(e,t){return"array"!==M.typeOf(e)||"array"!==M.typeOf(t)?[]:M.arrayUniq(t.filter(t=>e.indexOf(t)<0))},M.colorInterp=function(e,t,r,o,a){let n=Array.isArray(o)?o:["#000","#fff"];if(n=0===n.length?["#000","#fff"]:n,1===n.length)return n[0];n=n.map(e=>M.colorParse(e));const i=M.mapScale(e,t,r,0,n.length-1,{clip:!0,expScale:a}),s=M.clip(Math.floor(i),0,n.length-2),l=i-s,c=e=>M.mapScale(l,0,1,n[s][e],n[s+1][e],{clip:!0});return[c(0),c(1),c(2),c(3),"rgb"]},M.colorHslToRgb=function(e,t,r,o=255,a=!0){"array"===M.typeOf(e)&&(t=e[1],r=e[2],o=e[3],e=e[0]);const n=e/360,i=t/100,s=r/100;let l,c,d;if(0===i)l=c=d=255*s;else{const e=(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),t=s<.5?s*(1+i):s+i-s*i,r=2*s-t;l=255*e(r,t,n+1/3),c=255*e(r,t,n),d=255*e(r,t,n-1/3)}return a&&(l=Math.round(l),c=Math.round(c),d=Math.round(d),o=Math.round(o)),[l,c,d,o,"rgb"]},M.colorRgbToHsl=function(e,t,r,o=255,a=!0){"array"===M.typeOf(e)&&(t=e[1],r=e[2],o=e[3],e=e[0]),e/=255,t/=255,r/=255;const n=Math.max(e,t,r),i=Math.min(e,t,r);let s,l,c=(n+i)/2;if(n===i)s=l=0;else{const o=n-i;switch(l=c>.5?o/(2-n-i):o/(n+i),n){case e:s=((t-r)/o+(t<r?6:0))/6;break;case t:s=((r-e)/o+2)/6;break;case r:s=((e-t)/o+4)/6}}return s*=360,l*=100,c*=100,a&&(s=Math.round(s),l=Math.round(l),c=Math.round(c),o=Math.round(o)),[s,l,c,o,"hsl"]},M.colorParse=function(e,t=255){let r=[0,0,0,t,"rgb"];if("array"===M.typeOf(e)){const t=[0,0,0,255,"rgb"];for(let r=0;r<e.length&&r<t.length;r++)t[r]=e[r];return t}if("#"===(e=String(e).replace(/\s/g,""))[0]){const t=e.slice(1);if(3===t.length||4===t.length)for(let e=0;e<t.length;e++)r[e]=parseInt(t[e]+t[e],16);else if(6===t.length||8===t.length)for(let e=0;e<t.length;e+=2)r[e/2]=parseInt(t.substring(e,e+2),16)}else{const o=e.match(/^(rgb|hsl)a?\(([^)]+)\)$/i);if(o){const e=o[1].toLowerCase(),a=o[2].split(",").map(e=>parseFloat(e));if("rgb"===e)r[0]=a[0]||0,r[1]=a[1]||0,r[2]=a[2]||0,r[3]=void 0!==a[3]?255*a[3]:t,r[4]="rgb";else if("hsl"===e){return M.colorHslToRgb(a[0]||0,a[1]||0,a[2]||0,void 0!==a[3]?255*a[3]:t)}}}return r},M.setCookie=function(e,t,r,o={}){if(!M._isBrowser)return;const a=new Date;a.setTime(a.getTime()+24*r*60*60*1e3);let n=`${e}=${t}; expires=${a.toUTCString()}`;o.path&&(n+=`; path=${o.path}`),o.domain&&(n+=`; domain=${o.domain}`),o.secure&&(n+="; secure"),o.sameSite&&(n+=`; samesite=${o.sameSite}`),document.cookie=n},M.getCookie=function(e,t){if(!M._isBrowser)return t;const r=e+"=",o=document.cookie.split(";");for(let e=0;e<o.length;e++){let t=o[e];for(;" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(r))return t.substring(r.length,t.length)}return t},M.getURLParam=function(e,t){if(!M._isBrowser||"object"!=typeof window)return t;try{const r=new URLSearchParams(window.location.search);if(!e){const e={};for(const[t,o]of r)e[t]=o||!0;return e}return r.has(e)?r.get(e)||!0:t}catch(e){return t}},M.htmlTable=function(e,t={}){if(console.warn("bw.htmlTable() is deprecated. Use bw.makeTableFromArray() for TACO output or bw.makeTable() for object-array data."),"array"!==M.typeOf(e)||e.length<1)return"";const r={useFirstRowAsHeaders:!0,caption:null,atr:{class:"table"},thead_atr:{},th_atr:{},tbody_atr:{},tr_atr:{},td_atr:{}};Object.assign(r,t);let o=`<table${M._attrsToStr(r.atr)}>`;r.caption&&(o+=`<caption>${M.escapeHTML(r.caption)}</caption>`);let a=0;if(r.useFirstRowAsHeaders&&e.length>0&&(o+=`<thead${M._attrsToStr(r.thead_atr)}>`,o+=`<tr${M._attrsToStr(r.tr_atr)}>`,e[0].forEach(e=>{o+=`<th${M._attrsToStr(r.th_atr)}>${M.escapeHTML(String(e))}</th>`}),o+="</tr></thead>",a=1),e.length>a){o+=`<tbody${M._attrsToStr(r.tbody_atr)}>`;for(let t=a;t<e.length;t++)o+=`<tr${M._attrsToStr(r.tr_atr)}>`,e[t].forEach(e=>{o+=`<td${M._attrsToStr(r.td_atr)}>${M.escapeHTML(String(e))}</td>`}),o+="</tr>";o+="</tbody>"}return o+="</table>",o},M._attrsToStr=function(e){if(!e||"object"!=typeof e)return"";let t="";for(const[r,o]of Object.entries(e))null!=o&&!1!==o&&(t+=!0===o?` ${r}`:` ${r}="${M.escapeHTML(String(o))}"`);return t},M.htmlTabs=function(e,t={}){if(console.warn("bw.htmlTabs() is deprecated. Use bw.makeTabs() instead."),"array"!==M.typeOf(e)||e.length<1)return"";const r={atr:{class:"bw-tab-container"},tab_atr:{class:"bw-tab-item-list"},tabc_atr:{class:"bw-tab-content-list"}};Object.assign(r,t);const o=e.map((e,t)=>({t:"li",a:{class:0===t?"bw-tab-item bw-tab-active":"bw-tab-item",onclick:"bw.selectTabContent(this)"},c:e[0]})),a=e.map((e,t)=>({t:"div",a:{class:0===t?"bw-tab-content bw-show":"bw-tab-content"},c:e[1]}));return M.html({t:"div",a:r.atr,c:[{t:"ul",a:r.tab_atr,c:o},{t:"div",a:r.tabc_atr,c:a}]})},M.selectTabContent=function(e){if(console.warn("bw.selectTabContent() is deprecated. Use bw.makeTabs() instead."),!M._isBrowser||!e)return;const t=e.closest(".bw-tab-container");if(!t)return;t.querySelectorAll(".bw-tab-item").forEach(e=>{e.classList.remove("bw-tab-active")}),e.classList.add("bw-tab-active");const r=Array.from(e.parentElement.children).indexOf(e);t.querySelectorAll(".bw-tab-content").forEach(e=>{e.classList.remove("bw-show")});const o=t.querySelectorAll(".bw-tab-content");o[r]&&o[r].classList.add("bw-show")},M.loremIpsum=function(e,t,r=!0){const o="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ";"number"!=typeof e&&(e=Math.floor(125*Math.random())+25),void 0===t&&(t=Math.floor(446*Math.random())),t%=446;let a=0;for(;" "===o[t]||/[.,:;!?]/.test(o[t]);)if(t=(t+1)%446,a++,a>=446){t=0,a=0;break}let n=o.substring(t)+o.substring(0,t),i="",s=e+a;for(;s>0;)i+=s<n.length?n.substring(0,s):n,s-=n.length;if(i.length>e&&(i=i.substring(0,e))," "===i[i.length-1]&&(i=i.substring(0,i.length-1)+"."),r){let e=i[0].toUpperCase();e=/[A-Z]/.test(e)?e:"L",i=e+i.substring(1)}return i},M.multiArray=function(e,t){t="number"==typeof t?[t]:t;const r=o=>{if(o>=t.length)return"function"===M.typeOf(e)?e():e;const a=[];for(let e=0;e<t[o];e++)a[e]=r(o+1);return a};return r(0)},M.naturalCompare=function(e,t){if(isFinite(e)&&isFinite(t))return Math.sign(e-t);const r=String(e).toLowerCase(),o=String(t).toLowerCase();if(r===o)return e>t?1:0;if(!/\d/.test(r)||!/\d/.test(o))return r>o?1:-1;const a=r.match(/(\d+|\D+)/g)||[],n=o.match(/(\d+|\D+)/g)||[],i=Math.min(a.length,n.length);for(let e=0;e<i;e++){const t=a[e],r=n[e];if(t!==r){if(/^\d+$/.test(t)&&/^\d+$/.test(r)){let e=t,o=r;return"0"===t[0]&&(e="0."+t),"0"===r[0]&&(o="0."+r),parseFloat(e)-parseFloat(o)}return t>r?1:-1}}return a.length-n.length},M.setIntervalX=function(e,t,r){let o=0;const a=setInterval(function(){e(o),++o>=r&&clearInterval(a)},t);return a},M.repeatUntil=function(e,t,r,o=250,a=10,n){if("function"!=typeof e)return"err";let i=0;const s=setInterval(function(){const o=e();i++,o?(clearInterval(s),t&&t(o),n&&n(!0,i)):i>=a?(clearInterval(s),r&&r(),n&&n(!1,i)):r&&r()},o);return s},M.saveClientFile=function(e,t){if(M.isNodeJS())M._getFs().then(function(r){r?r.writeFile(e,t,function(e){e&&console.error("Error saving file:",e)}):console.error("bw.saveClientFile: fs module not available")});else{const r=new Blob([t],{type:"application/octet-stream"}),o=window.URL.createObjectURL(r),a=M.createDOM({t:"a",a:{href:o,download:e,style:"display: none"}});document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(o),document.body.removeChild(a)}},M.saveClientJSON=function(e,t){M.saveClientFile(e,JSON.stringify(t,null,2))},M.loadClientFile=function(e,t,r){var o={parser:"raw"};r&&r.parser&&(o.parser=r.parser);var a="JSON"===o.parser?JSON.parse:function(e){return e};if(M.isNodeJS())M._getFs().then(function(r){r?r.readFile(e,"utf8",function(e,r){if(e)t(null,e);else try{t(a(r),null)}catch(e){t(null,e)}}):t(null,new Error("fs module not available"))});else{var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){if(4===n.readyState)if(n.status>=200&&n.status<300)try{t(a(n.responseText),null)}catch(e){t(null,e)}else t(null,new Error("HTTP "+n.status+": "+e))},n.send(null)}return"BW_OK"},M.loadClientJSON=function(e,t){return M.loadClientFile(e,t,{parser:"JSON"})},M.loadLocalFile=function(e,t){var r={parser:"raw",accept:""};t&&(t.parser&&(r.parser=t.parser),t.accept&&(r.accept=t.accept));var o="JSON"===r.parser?JSON.parse:function(e){return e};if(M.isNodeJS())e(null,"",new Error("bw.loadLocalFile is browser-only. Use bw.loadClientFile() in Node."));else{var a=M.createDOM({t:"input",a:{type:"file",accept:r.accept,style:"display: none"}});a.addEventListener("change",function(){var t=a.files[0];if(t){var r=new FileReader;r.onload=function(r){try{e(o(r.target.result),t.name,null)}catch(r){e(null,t.name,r)}},r.onerror=function(){e(null,t.name,r.error)},r.readAsText(t),a.remove()}else e(null,"",new Error("No file selected"))}),document.body.appendChild(a),a.click()}},M.loadLocalJSON=function(e){M.loadLocalFile(e,{parser:"JSON",accept:".json"})},M.copyToClipboard=function(e){return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e):new Promise((t,r)=>{const o=M.createDOM({t:"textarea",a:{value:e,style:{position:"fixed",top:"-999px",left:"-999px",width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}}});document.body.appendChild(o),o.focus(),o.select();try{const e=document.execCommand("copy");document.body.removeChild(o),e?t():r(new Error("Copy command failed"))}catch(e){document.body.removeChild(o),r(e)}})},M.makeTable=function(e){const{data:t=[],columns:r,className:o="",striped:a=!1,hover:n=!1,sortable:i=!0,onSort:s,sortColumn:l,sortDirection:c="asc"}=e;let d="bw-table";a&&(d+=" bw-table-striped"),n&&(d+=" bw-table-hover"),o&&(d+=" "+o),d=d.trim();const b=r||(t.length>0?Object.keys(t[0]).map(e=>({key:e,label:e})):[]);let m=l||null,u=c,p=[...t];m&&p.sort((e,t)=>{const r=e[m],o=t[m];if("number"==typeof r&&"number"==typeof o)return"asc"===u?r-o:o-r;const a=String(r||"").toLowerCase(),n=String(o||"").toLowerCase();return"asc"===u?a.localeCompare(n):n.localeCompare(a)});return{t:"table",a:{class:d},c:[{t:"thead",c:{t:"tr",c:b.map(e=>({t:"th",a:i?{style:{cursor:"pointer",userSelect:"none"},onclick:()=>{return t=e.key,void(i&&(m===t?u="asc"===u?"desc":"asc":(m=t,u="asc"),s&&s(t,u)));var t}}:{},c:[e.label,i&&m===e.key&&{t:"span",a:{style:{marginLeft:"5px"}},c:"asc"===u?"▲":"▼"}].filter(Boolean)}))}},{t:"tbody",c:p.map(e=>({t:"tr",c:b.map(t=>({t:"td",c:t.render?t.render(e[t.key],e):String(e[t.key]||"")}))}))}]}},M.makeTableFromArray=function(e){const{data:t=[],headerRow:r=!0,columns:o,...a}=e;if(!Array.isArray(t)||0===t.length)return M.makeTable({data:[],columns:o||[],...a});let n,i;if(r&&t.length>0)n=t[0].map(function(e){return String(e)}),i=t.slice(1);else{const e=t[0].length;n=[];for(let t=0;t<e;t++)n.push("col"+t);i=t}const s=i.map(function(e){const t={};return n.forEach(function(r,o){t[r]=void 0!==e[o]?e[o]:""}),t}),l=o||n.map(function(e){return{key:e,label:e}});return M.makeTable({data:s,columns:l,...a})},M.makeBarChart=function(e){const{data:t=[],labelKey:r="label",valueKey:o="value",title:a,color:n="#006666",height:i="200px",formatValue:s,showValues:l=!0,showLabels:c=!0,className:d=""}=e;if(!Array.isArray(t)||0===t.length)return{t:"div",a:{class:("bw-bar-chart-container "+d).trim()},c:""};const b=t.map(function(e){return Number(e[o])||0}),m=Math.max.apply(null,b),u=t.map(function(e,t){const o=b[t],a=m>0?o/m*100:0,i=s?s(o):String(o),d=[];return l&&d.push({t:"div",a:{class:"bw-bar-value"},c:i}),d.push({t:"div",a:{class:"bw-bar",style:"height:"+a+"%;background:"+n+";"}}),c&&d.push({t:"div",a:{class:"bw-bar-label"},c:String(e[r]||"")}),{t:"div",a:{class:"bw-bar-group"},c:d}}),p=[];return a&&p.push({t:"h3",a:{class:"bw-bar-chart-title"},c:a}),p.push({t:"div",a:{class:"bw-bar-chart",style:"height:"+i+";"},c:u}),{t:"div",a:{class:("bw-bar-chart-container "+d).trim()},c:p}},M.makeDataTable=function(e){const{title:t,data:r,columns:o,className:a="",striped:n=!0,hover:i=!0,responsive:s=!0,...l}=e,c=M.makeTable({data:r,columns:o,className:a,striped:n,hover:i,...l}),d=[];return t&&d.push({t:"h5",a:{class:"mb-3"},c:t}),s?d.push({t:"div",a:{class:"table-responsive"},c:c}):d.push(c),{t:"div",a:{class:"table-container"},c:d}},M._componentRegistry=new Map,M.render=function(e,t,r){const o="string"==typeof e?document.querySelector(e):e;if(!o)return{object_type:"error",component_id:null,object_handle_in_dom:null,status_code:"error=target_element_not_found"};const a=r.o?.id||M.uuid();let n;try{n=M.createDOM(r)}catch(e){return{object_type:"error",component_id:a,object_handle_in_dom:null,status_code:`error=render_failed:${e.message}`}}n.setAttribute("data-bw-id",a);try{switch(t){case"replace":o.parentNode.replaceChild(n,o);break;case"prepend":o.insertBefore(n,o.firstChild);break;case"append":o.appendChild(n);break;case"before":o.parentNode.insertBefore(n,o);break;case"after":o.parentNode.insertBefore(n,o.nextSibling);break;default:throw new Error(`Invalid position: ${t}`)}}catch(e){return{object_type:"error",component_id:a,object_handle_in_dom:null,status_code:`error=insertion_failed:${e.message}`}}const i={object_type:r.t||"element",component_id:a,object_handle_in_dom:n,status_code:"success",_taco:{...r},_state:{...r.o?.state||{}},_mounted:!0,get element(){return this.object_handle_in_dom},getState(){return{...this._state}},setState(e){return this._state={...this._state,...e},this._taco.o?.onStateChange&&this._taco.o.onStateChange(this._state,e),this},update(){if(!this._mounted||!this.element)return this;const e=this.element.parentNode;this._taco.o&&(this._taco.o.state=this._state);const t=M.createDOM(this._taco);return t.setAttribute("data-bw-id",a),e.replaceChild(t,this.element),this.object_handle_in_dom=t,this._taco.o?.onUpdate&&this._taco.o.onUpdate(t,this._state),this},getProp(e){return this._taco.a?.[e]},setProp(e,t){return this._taco.a||(this._taco.a={}),this._taco.a[e]=t,this.element&&(null==t?this.element.removeAttribute(e):!0===t?this.element.setAttribute(e,""):this.element.setAttribute(e,String(t))),this},getContent(){return this._taco.c},setContent(e){return this._taco.c=e,this.element&&("string"==typeof e?this.element.textContent=e:this.update()),this},addClass(e){return this.element&&this.element.classList.add(e),this},removeClass(e){return this.element&&this.element.classList.remove(e),this},toggleClass(e){return this.element&&this.element.classList.toggle(e),this},hasClass(e){return!!this.element&&this.element.classList.contains(e)},show(){return this.element&&(this.element.style.display=""),this},hide(){return this.element&&(this.element.style.display="none"),this},on(e,t){return this.element&&this.element.addEventListener(e,t),this},off(e,t){return this.element&&this.element.removeEventListener(e,t),this},destroy(){return this._mounted?(this._taco.o?.unmount&&this._taco.o.unmount(this.element),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),M._componentRegistry.delete(a),this._mounted=!1,this.object_handle_in_dom=null,this.status_code="destroyed",this):this}};return M._componentRegistry.set(a,i),r.o?.mounted&&r.o.mounted(n,i),i},M.getComponent=function(e){return M._componentRegistry.get(e)||null},M.getAllComponents=function(){return new Map(M._componentRegistry)},Object.entries(O).forEach(([e,t])=>{e.startsWith("make")&&(M[e]=t)}),M._componentHandles=A||{},Object.entries(O).forEach(([e,t])=>{if(e.startsWith("make")){const r=e.substring(4).toLowerCase(),o="create"+e.substring(4);M[o]=function(e){const o=t(e),a=M.renderComponent(o),n=M._componentHandles[r];if(n){const e=new n(a.element,o);return Object.setPrototypeOf(e,a),e}return a}}}),M.createTable=function(e,t={}){const r=M.makeTable({data:e,...t}),o=M.renderComponent(r),a=M._componentHandles.table;if(a){const e=new a(o.element,r);return Object.setPrototypeOf(e,o),e}return o},M._isBrowser&&"undefined"!=typeof window&&(window.bw=M);export{M as default};
|
|
61
|
+
*/const q={version:e.version,versionInfo:e,getVersion:function(){return{...e}},_idCounter:0,_unmountCallbacks:new Map,_topics:{},_subIdCounter:0,_nodeMap:{},__monkey_patch_is_nodejs__:{_value:"ignore",set:function(e){this._value="boolean"==typeof e?e:"ignore"},get:function(){return this._value}},isNodeJS:function(){return"ignore"!==q.__monkey_patch_is_nodejs__.get()?q.__monkey_patch_is_nodejs__.get():"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}};q._isNode=q.isNodeJS(),Object.defineProperty(q,"_isBrowser",{get:function(){return"undefined"!=typeof document&&"undefined"!=typeof window},configurable:!0}),q._fsCache=void 0,q._getFs=function(){if(void 0!==q._fsCache)return Promise.resolve(q._fsCache);if(!q.isNodeJS())return q._fsCache=null,Promise.resolve(null);if("function"==typeof require)try{return q._fsCache=require("fs"),Promise.resolve(q._fsCache)}catch(e){}try{return new Function("m","return import(m)")("fs").then(function(e){return q._fsCache=e.default||e,q._fsCache}).catch(function(){return q._fsCache=null,null})}catch(e){return q._fsCache=null,Promise.resolve(null)}},q.typeOf=function(e,t){if(null===e)return"null";const r=typeof e;if("object"!==r)return r;if(t)return r;const a=Object.prototype.toString.call(e),o={"[object Array]":"array","[object Date]":"Date","[object RegExp]":"RegExp","[object Error]":"Error","[object Promise]":"Promise","[object Map]":"Map","[object Set]":"Set","[object WeakMap]":"WeakMap","[object WeakSet]":"WeakSet","[object ArrayBuffer]":"ArrayBuffer","[object DataView]":"DataView","[object Int8Array]":"Int8Array","[object Uint8Array]":"Uint8Array","[object Uint8ClampedArray]":"Uint8ClampedArray","[object Int16Array]":"Int16Array","[object Uint16Array]":"Uint16Array","[object Int32Array]":"Int32Array","[object Uint32Array]":"Uint32Array","[object Float32Array]":"Float32Array","[object Float64Array]":"Float64Array"};return o[a]?o[a]:e._bw_type?e._bw_type:e.constructor&&e.constructor.name?e.constructor.name:r},q.to=q.typeOf,q.uuid=function(e){var t=e?"bw_"+e+"_":"bw_";if(q._isBrowser&&crypto&&crypto.randomUUID)return t+crypto.randomUUID().replace(/-/g,"");return`${t}${Date.now().toString(36)}_${(++q._idCounter).toString(36)}_${Math.random().toString(36).substring(2,11)}`},q._el=function(e){if("string"!=typeof e)return e||null;if(!e)return null;if(!q._isBrowser)return null;var t=q._nodeMap[e];if(t){if(null!==t.parentNode)return t;delete q._nodeMap[e]}var r=document.getElementById(e);return r||"#"!==e.charAt(0)&&"."!==e.charAt(0)||(r=document.querySelector(e)),r||(r=document.querySelector('[data-bw-id="'+e+'"]')),r&&(q._nodeMap[e]=r),r},q._registerNode=function(e,t){if(e){t&&(q._nodeMap[t]=e);var r=e.getAttribute?e.getAttribute("id"):null;r&&(q._nodeMap[r]=e)}},q._deregisterNode=function(e,t){t&&delete q._nodeMap[t];var r=e&&e.getAttribute?e.getAttribute("id"):null;r&&delete q._nodeMap[r]},q.escapeHTML=function(e){if("string"!=typeof e)return"";const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>"'/]/g,e=>t[e])},q.raw=function(e){return{__bw_raw:!0,v:String(e)}},q.normalizeClass=function(e){return"string"!=typeof e?e:e.replace(/\bbw_/g,"bw-")},q.html=function(e,t={}){if(null==e)return"";if(Array.isArray(e))return e.map(e=>q.html(e,t)).join("");if(e&&e.__bw_raw)return e.v;if("object"!=typeof e||!e.t)return t.raw?String(e):q.escapeHTML(String(e));const{t:r,a:a={},c:o,o:n={}}=e,i=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].includes(r.toLowerCase());let s="";for(const[e,t]of Object.entries(a))if(null!=t&&!1!==t&&!e.startsWith("on"))if("style"===e&&"object"==typeof t){const e=Object.entries(t).filter(([,e])=>null!=e).map(([e,t])=>`${e}:${t}`).join(";");e&&(s+=` style="${q.escapeHTML(e)}"`)}else if("class"===e){const e=q.normalizeClass(Array.isArray(t)?t.filter(Boolean).join(" "):String(t));e&&(s+=` class="${q.escapeHTML(e)}"`)}else s+=!0===t?` ${e}`:` ${e}="${q.escapeHTML(String(t))}"`;if((n.mounted||n.unmount)&&!a.class?.includes("bw-id-")){const e=n.bw_id||q.uuid();s=s.replace(/class="([^"]*)"/,(t,r)=>`class="${r} bw-id-${e}"`.trim()),s.includes("class=")||(s+=` class="bw-id-${e}"`)}if(i)return`<${r}${s} />`;return`<${r}${s}>${null!=o?q.html(o,t):""}</${r}>`},q.createDOM=function(e,t={}){if(!q._isBrowser)throw new Error("bw.createDOM requires a DOM environment (document/window). Use bw.html() instead.");if(null==e)return document.createTextNode("");if(e&&e.__bw_raw){var r=document.createDocumentFragment(),a=document.createElement("span");for(a.innerHTML=e.v;a.firstChild;)r.appendChild(a.firstChild);return r}if("object"!=typeof e||!e.t)return document.createTextNode(String(e));const{t:o,a:n={},c:i,o:s={}}=e,l=document.createElement(o);for(const[e,t]of Object.entries(n))if(null!=t&&!1!==t)if("style"===e&&"object"==typeof t)Object.assign(l.style,t);else if("class"===e){const e=q.normalizeClass(Array.isArray(t)?t.filter(Boolean).join(" "):String(t));e&&(l.className=e)}else if(e.startsWith("on")&&"function"==typeof t){const r=e.slice(2).toLowerCase();l.addEventListener(r,t)}else"value"===e&&"input"===o?l.value=t:!0===t?l.setAttribute(e,""):l.setAttribute(e,String(t));if(null!=i)if(Array.isArray(i))i.forEach(e=>{if(null!=e){var r=q.createDOM(e,t);l.appendChild(r);var a=e&&e.a?e.a["data-bw-id"]||e.a.id:null;if(a&&(l._bw_refs||(l._bw_refs={}),l._bw_refs[a]=r),r._bw_refs)for(var o in l._bw_refs||(l._bw_refs={}),r._bw_refs)Object.prototype.hasOwnProperty.call(r._bw_refs,o)&&(l._bw_refs[o]=r._bw_refs[o])}});else if("object"==typeof i&&i.__bw_raw)l.innerHTML=i.v;else if("object"==typeof i&&i.t){var c=q.createDOM(i,t);l.appendChild(c);var d=i.a?i.a["data-bw-id"]||i.a.id:null;if(d&&(l._bw_refs||(l._bw_refs={}),l._bw_refs[d]=c),c._bw_refs)for(var b in l._bw_refs||(l._bw_refs={}),c._bw_refs)Object.prototype.hasOwnProperty.call(c._bw_refs,b)&&(l._bw_refs[b]=c._bw_refs[b])}else l.textContent=String(i);if(n.id&&q._registerNode(l,null),s.mounted||s.unmount||s.render||s.state){const e=n["data-bw-id"]||q.uuid();l.setAttribute("data-bw-id",e),q._registerNode(l,e),s.state&&(l._bw_state=s.state),s.render?(l._bw_render=s.render,s.mounted&&console.warn("bw.createDOM: o.render and o.mounted are mutually exclusive. o.render wins."),document.body.contains(l)?s.render(l,l._bw_state||{}):requestAnimationFrame(()=>{document.body.contains(l)&&s.render(l,l._bw_state||{})})):s.mounted&&(document.body.contains(l)?s.mounted(l,l._bw_state||{}):requestAnimationFrame(()=>{document.body.contains(l)&&s.mounted(l,l._bw_state||{})})),s.unmount&&q._unmountCallbacks.set(e,()=>{s.unmount(l,l._bw_state||{})})}else n["data-bw-id"]&&q._registerNode(l,n["data-bw-id"]);return l},q.DOM=function(e,t,r={}){if(!q._isBrowser)throw new Error("bw.DOM requires a DOM environment (document/window). Use bw.html() instead.");const a=q._el(e);if(!a)return console.error("bw.DOM: Target element not found:",e),null;const o=a._bw_state,n=a._bw_render,i=a.getAttribute("data-bw-id"),s=a._bw_subs;return delete a._bw_subs,q.cleanup(a),void 0!==o&&(a._bw_state=o),n&&(a._bw_render=n),i&&(a.setAttribute("data-bw-id",i),q._registerNode(a,i)),s&&(a._bw_subs=s),a.innerHTML="",null!=t&&(t.element instanceof Element?a.appendChild(t.element):Array.isArray(t)?t.forEach(e=>{null!=e&&(e.element instanceof Element?a.appendChild(e.element):a.appendChild(q.createDOM(e,r)))}):a.appendChild(q.createDOM(t,r))),a},q.compileProps=function(e,t={}){const r={};return Object.keys(t).forEach(t=>{Object.defineProperty(r,t,{get:()=>e._props[t],set(r){const a=e._props[t];a!==r&&(e._props[t]=r,e.onPropChange&&e.onPropChange(t,r,a))},enumerable:!0,configurable:!0})}),r},q.renderComponent=function(e,t={}){const r=q.createDOM(e,t),a={element:r,taco:e,_props:{...e.a},_state:e.o?.state||{},_children:{},get props(){return this._compiledProps||(this._compiledProps=q.compileProps(this,this._props)),this._compiledProps},$(e){return this.element.querySelectorAll(e)},$first(e){return this.element.querySelector(e)},update(e){Object.assign(this._props,e);const r={...this.taco,a:{...this.taco.a,...e}},a=q.createDOM(r,t);return this.element.replaceWith(a),this.element=a,this.taco=r,this},render(){const e=q.createDOM(this.taco,t);return this.element.replaceWith(e),this.element=e,this},onPropChange(e,t,r){this.render()},get state(){return this._state},set state(e){this._state=e,this.render()},setState(e){return Object.assign(this._state,e),this.render(),this},addChild(e,t){return this._children[e]=t,this},getChild(e){return this._children[e]},destroy(){Object.values(this._children).forEach(e=>{e&&e.destroy&&e.destroy()}),q.cleanup(this.element),this.element.remove(),this._children={},this._props={},this._state={},this._compiledProps=null}};return r._bwHandle=a,a},q.cleanup=function(e){if(!q._isBrowser||!e)return;e.querySelectorAll("[data-bw-id]").forEach(e=>{const t=e.getAttribute("data-bw-id"),r=q._unmountCallbacks.get(t);r&&(r(),q._unmountCallbacks.delete(t)),q._deregisterNode(e,t),e._bw_subs&&(e._bw_subs.forEach(function(e){e()}),delete e._bw_subs),delete e._bw_state,delete e._bw_render,delete e._bw_refs});const t=e.getAttribute("data-bw-id");if(t){const r=q._unmountCallbacks.get(t);r&&(r(),q._unmountCallbacks.delete(t)),q._deregisterNode(e,t),e._bw_subs&&(e._bw_subs.forEach(function(e){e()}),delete e._bw_subs),delete e._bw_state,delete e._bw_render,delete e._bw_refs}},q.update=function(e){var t=q._el(e);return t&&t._bw_render&&(t._bw_render(t,t._bw_state||{}),q.emit(t,"statechange",t._bw_state)),t||null},q.patch=function(e,t,r){var a=q._el(e);return a?(r?a.setAttribute(r,String(t)):Array.isArray(t)?(a.innerHTML="",t.forEach(function(e){"string"==typeof e||"number"==typeof e?a.appendChild(document.createTextNode(String(e))):e&&e.t&&a.appendChild(q.createDOM(e))})):"object"==typeof t&&null!==t&&t.t?(a.innerHTML="",a.appendChild(q.createDOM(t))):a.textContent=String(t),a):null},q.patchAll=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=q.patch(r,e[r]));return t},q.emit=function(e,t,r){var a=q._el(e);a&&a.dispatchEvent(new CustomEvent("bw:"+t,{bubbles:!0,detail:r||{}}))},q.on=function(e,t,r){var a=q._el(e);return a&&a.addEventListener("bw:"+t,function(e){r(e.detail,e)}),a||null},q.pub=function(e,t){var r=q._topics[e];if(!r||0===r.length)return 0;for(var a=r.slice(),o=0,n=0;n<a.length;n++)try{a[n].handler(t),o++}catch(t){console.warn('bw.pub: subscriber error on topic "'+e+'":',t)}return o},q.sub=function(e,t,r){var a=++q._subIdCounter;q._topics[e]||(q._topics[e]=[]),q._topics[e].push({handler:t,id:a});var o=function(){var t=q._topics[e];t&&(q._topics[e]=t.filter(function(e){return e.id!==a}),0===q._topics[e].length&&delete q._topics[e])};if(r&&(r._bw_subs||(r._bw_subs=[]),r._bw_subs.push(o),!r.getAttribute("data-bw-id"))){var n="bw_sub_"+a;r.setAttribute("data-bw-id",n)}return o},q.unsub=function(e,t){var r=q._topics[e];if(!r)return 0;var a=r.length;q._topics[e]=r.filter(function(e){return e.handler!==t});var o=a-q._topics[e].length;return 0===q._topics[e].length&&delete q._topics[e],o},q.css=function(e,t={}){const{minify:r=!1,pretty:a=!r}=t;if("string"==typeof e)return e;let o="";const n=a?" ":"",i=a?"\n":"",s=a?" ":"";return Array.isArray(e)?o=e.map(e=>q.css(e,t)).join(i):"object"==typeof e&&Object.entries(e).forEach(([e,r])=>{if("object"==typeof r&&!Array.isArray(r)){if("@"===e.charAt(0)){const a=q.css(r,t);return void(a&&(o+=`${e}${s}{${i}${a}${i}}${i}`))}const a=Object.entries(r).filter(([,e])=>null!=e).map(([e,t])=>{const r=e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase());return`${n}${r}:${s}${t};`}).join(i);a&&(o+=`${e}${s}{${i}${a}${i}}${i}`)}}),o.trim()},q.injectCSS=function(e,t={}){if(!q._isBrowser)return console.warn("bw.injectCSS requires a DOM environment"),null;const{id:r="bw-styles",append:a=!0}=t;let o=document.getElementById(r);o||(o=document.createElement("style"),o.id=r,o.type="text/css",document.head.appendChild(o));const n="string"==typeof e?e:q.css(e,t);return a&&o.textContent?o.textContent+="\n"+n:o.textContent=n,o},q.s=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];r&&"object"==typeof r&&Object.assign(e,r)}return e},q.u={flex:{display:"flex"},flexCol:{display:"flex",flexDirection:"column"},flexRow:{display:"flex",flexDirection:"row"},flexWrap:{display:"flex",flexWrap:"wrap"},block:{display:"block"},inline:{display:"inline"},hidden:{display:"none"},justifyCenter:{justifyContent:"center"},justifyBetween:{justifyContent:"space-between"},justifyEnd:{justifyContent:"flex-end"},alignCenter:{alignItems:"center"},alignStart:{alignItems:"flex-start"},alignEnd:{alignItems:"flex-end"},gap1:{gap:"0.25rem"},gap2:{gap:"0.5rem"},gap3:{gap:"0.75rem"},gap4:{gap:"1rem"},gap6:{gap:"1.5rem"},gap8:{gap:"2rem"},p0:{padding:"0"},p1:{padding:"0.25rem"},p2:{padding:"0.5rem"},p3:{padding:"0.75rem"},p4:{padding:"1rem"},p6:{padding:"1.5rem"},p8:{padding:"2rem"},px4:{paddingLeft:"1rem",paddingRight:"1rem"},py2:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},py4:{paddingTop:"1rem",paddingBottom:"1rem"},m0:{margin:"0"},m4:{margin:"1rem"},mt2:{marginTop:"0.5rem"},mt4:{marginTop:"1rem"},mb2:{marginBottom:"0.5rem"},mb4:{marginBottom:"1rem"},mx_auto:{marginLeft:"auto",marginRight:"auto"},textSm:{fontSize:"0.875rem"},textBase:{fontSize:"1rem"},textLg:{fontSize:"1.125rem"},textXl:{fontSize:"1.25rem"},text2xl:{fontSize:"1.5rem"},text3xl:{fontSize:"1.875rem"},bold:{fontWeight:"700"},semibold:{fontWeight:"600"},italic:{fontStyle:"italic"},textCenter:{textAlign:"center"},textRight:{textAlign:"right"},bgWhite:{background:"#ffffff"},bgTeal:{background:"#006666",color:"#ffffff"},textWhite:{color:"#ffffff"},textTeal:{color:"#006666"},textMuted:{color:"#888"},rounded:{borderRadius:"0.375rem"},roundedLg:{borderRadius:"0.5rem"},roundedFull:{borderRadius:"9999px"},border:{border:"1px solid #d8d8d8"},wFull:{width:"100%"},hFull:{height:"100%"},transition:{transition:"all 0.2s ease"}},q.responsive=function(e,t){var r={sm:"576px",md:"768px",lg:"992px",xl:"1200px"},a=[];return Object.keys(t).forEach(function(o){var n={};"base"===o?(n[e]=t[o],a.push(q.css(n))):r[o]&&(n[e]=t[o],a.push("@media (min-width: "+r[o]+") {\n"+q.css(n)+"\n}"))}),a.join("\n")},q.mapScale=function(e,t,r,a,o,n={}){const{clip:i=!1,expScale:s=1}=n;let l=(e-t)/(r-t);1!==s&&(l=Math.pow(l,s));let c=l*(o-a)+a;if(i){const e=Math.min(a,o),t=Math.max(a,o);c=Math.max(e,Math.min(t,c))}return c},q.clip=function(e,t,r){return Math.max(t,Math.min(r,e))},q._isBrowser&&(q.$=function(e){return e?Array.isArray(e)?e:e.nodeType?[e]:void 0!==e.length&&"string"!=typeof e?Array.from(e):"string"==typeof e?Array.from(document.querySelectorAll(e)):[]:[]},q.$.one=function(e){return q.$(e)[0]||null}),q.loadDefaultStyles=function(e={}){const{minify:t=!0,palette:r}=e;if(q._isBrowser){var a=q.css(function(){var e={"*":{"box-sizing":"border-box",margin:"0",padding:"0"},html:{"font-size":"16px","line-height":"1.5","-webkit-text-size-adjust":"100%","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},body:{"font-family":'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',"font-size":"1rem","font-weight":"400","line-height":"1.6",margin:"0",padding:"0","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},".bw-page":{"min-height":"100vh",display:"flex","flex-direction":"column"},".bw-page-content":{flex:"1",padding:"2rem 0"},main:{display:"block"},hr:{"box-sizing":"content-box",height:"0",overflow:"visible",margin:"1rem 0",border:"0"},"hr:not([size])":{height:"1px"},"h1, h2, h3, h4, h5, h6":{"margin-top":"0","margin-bottom":".5rem","font-weight":"600","line-height":"1.25","letter-spacing":"-0.01em"},h1:{"font-size":"calc(1.375rem + 1.5vw)"},h2:{"font-size":"calc(1.325rem + .9vw)"},h3:{"font-size":"calc(1.3rem + .6vw)"},h4:{"font-size":"calc(1.275rem + .3vw)"},h5:{"font-size":"1.25rem"},h6:{"font-size":"1rem"},p:{"margin-top":"0","margin-bottom":"1rem"},small:{"font-size":"0.875rem"},a:{"text-decoration":"none",transition:"color 0.15s"}};Object.assign(e,C),e[".bw-btn"]={display:"inline-flex","align-items":"center","justify-content":"center","font-weight":"500","line-height":"1.5","text-align":"center","text-decoration":"none","vertical-align":"middle",cursor:"pointer","user-select":"none",border:"1px solid transparent",padding:"0.5rem 1.125rem","font-size":"0.875rem","font-family":"inherit","border-radius":"6px",transition:"all 0.15s ease-out",gap:"0.5rem"},e[".bw-btn:hover"]={"text-decoration":"none",transform:"translateY(-1px)"},e[".bw-btn:active"]={transform:"translateY(0)"},e[".bw-btn:focus-visible"]={outline:"2px solid currentColor","outline-offset":"2px"},e[".bw-btn:disabled"]={opacity:"0.5",cursor:"not-allowed","pointer-events":"none"},e[".bw-btn-lg"]={padding:"0.625rem 1.5rem","font-size":"1rem","border-radius":"8px"},e[".bw-btn-sm"]={padding:"0.25rem 0.75rem","font-size":"0.8125rem","border-radius":"5px"},e[".bw-card"]={position:"relative",display:"flex","flex-direction":"column","min-width":"0",height:"100%","word-wrap":"break-word","background-clip":"border-box",border:"1px solid transparent","border-radius":"8px",transition:"box-shadow 0.2s ease-out, transform 0.2s ease-out","margin-bottom":"1.5rem",overflow:"hidden"},e[".bw-card-body"]={flex:"1 1 auto",padding:"1.25rem 1.5rem"},e[".bw-card-body > *:last-child"]={"margin-bottom":"0"},e[".bw-card-title"]={"margin-bottom":"0.5rem","font-size":"1.125rem","font-weight":"600","line-height":"1.3"},e[".bw-card-text"]={"margin-bottom":"0","font-size":"0.9375rem","line-height":"1.6"},e[".bw-card-header"]={padding:"0.875rem 1.5rem","margin-bottom":"0","font-weight":"600","font-size":"0.875rem"},e[".bw-card-footer"]={padding:"0.75rem 1.5rem","font-size":"0.875rem"},e[".bw-card-hoverable"]={transition:"all 0.3s ease-out"},e[".bw-card-img-top"]={width:"100%","border-top-left-radius":"7px","border-top-right-radius":"7px"},e[".bw-card-img-bottom"]={width:"100%","border-bottom-left-radius":"7px","border-bottom-right-radius":"7px"},e[".bw-card-img-left"]={width:"40%","object-fit":"cover"},e[".bw-card-img-right"]={width:"40%","object-fit":"cover"},e[".bw-card-subtitle"]={"margin-top":"-0.25rem","margin-bottom":"0.5rem","font-size":"0.875rem"},e[".bw-form-control"]={display:"block",width:"100%",padding:"0.5rem 0.875rem","font-size":"0.9375rem","font-weight":"400","line-height":"1.5","background-clip":"padding-box",appearance:"none",border:"1px solid transparent","border-radius":"6px",transition:"border-color 0.15s ease-out, box-shadow 0.15s ease-out","font-family":"inherit"},e[".bw-form-control:focus"]={outline:"2px solid currentColor","outline-offset":"-1px"},e[".bw-form-control::placeholder"]={opacity:"1"},e[".bw-form-label"]={display:"block","margin-bottom":"0.375rem","font-size":"0.875rem","font-weight":"600"},e[".bw-form-group"]={"margin-bottom":"1.25rem"},e[".bw-form-text"]={"margin-top":"0.25rem","font-size":"0.8125rem"},e["select.bw-form-control"]={"padding-right":"2.25rem","background-repeat":"no-repeat","background-position":"right 0.75rem center","background-size":"16px 12px"},e["textarea.bw-form-control"]={"min-height":"5rem",resize:"vertical"},e[".bw-valid-feedback"]={display:"block","font-size":"0.875rem","margin-top":"0.25rem"},e[".bw-invalid-feedback"]={display:"block","font-size":"0.875rem","margin-top":"0.25rem"},Object.assign(e,{".bw-form-check":{display:"flex","align-items":"center",gap:"0.5rem","min-height":"1.5rem","margin-bottom":"0.25rem"},".bw-form-check-input":{width:"1rem",height:"1rem",margin:"0",cursor:"pointer","flex-shrink":"0","border-radius":"0.25rem",appearance:"auto"},".bw-form-check-input:disabled":{opacity:"0.5",cursor:"not-allowed"},".bw-form-check-label":{cursor:"pointer","user-select":"none","font-size":"0.9375rem"}}),e[".bw-navbar"]={position:"relative",display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"space-between",padding:"0.5rem 1.5rem"},e[".bw-navbar > .bw-container, .bw-navbar > .container"]={display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"space-between"},e[".bw-navbar-brand"]={display:"inline-flex","align-items":"center",gap:"0.5rem","padding-top":"0.25rem","padding-bottom":"0.25rem","margin-right":"1.5rem","font-size":"1.125rem","font-weight":"600","line-height":"inherit","white-space":"nowrap","text-decoration":"none"},e[".bw-navbar-nav"]={display:"flex","flex-direction":"row","padding-left":"0","margin-bottom":"0","list-style":"none",gap:"0.25rem"},e[".bw-navbar-nav .bw-nav-link"]={display:"block",padding:"0.5rem 0.875rem","text-decoration":"none","font-size":"0.875rem","font-weight":"500","border-radius":"6px",transition:"color 0.15s, background-color 0.15s"},e[".bw-table"]={width:"100%","margin-bottom":"1.5rem","vertical-align":"top","border-collapse":"collapse","font-size":"0.9375rem","line-height":"1.5"},e[".bw-table > :not(caption) > * > *"]={padding:"0.75rem 1rem"},e[".bw-table > tbody"]={"vertical-align":"inherit"},e[".bw-table > thead"]={"vertical-align":"bottom"},e[".bw-table > thead > tr > *"]={padding:"0.625rem 1rem","font-size":"0.8125rem","font-weight":"600","text-transform":"uppercase","letter-spacing":"0.04em"},e[".bw-table caption"]={padding:"0.5rem 1rem","font-size":"0.875rem","caption-side":"bottom"},e[".bw-table-responsive"]={"overflow-x":"auto","-webkit-overflow-scrolling":"touch"},e[".bw-alert"]={position:"relative",padding:"0.875rem 1.25rem","margin-bottom":"1rem",border:"1px solid transparent","border-radius":"8px","font-size":"0.9375rem","line-height":"1.6"},e[".bw-alert-heading, .alert-heading"]={color:"inherit"},e[".bw-alert-link, .alert-link"]={"font-weight":"700"},e[".bw-alert-dismissible"]={"padding-right":"3rem"},e[".bw-alert-dismissible .btn-close"]={position:"absolute",top:"0",right:"0","z-index":"2",padding:"1.25rem 1rem"},e[".bw-badge"]={display:"inline-block",padding:"0.375rem 0.625rem","font-size":"0.875rem","font-weight":"600","line-height":"1.3","text-align":"center","white-space":"nowrap","vertical-align":"baseline","border-radius":".375rem"},e[".bw-badge:empty"]={display:"none"},e[".bw-badge-sm"]={"font-size":"0.75rem",padding:"0.25rem 0.5rem"},e[".bw-badge-lg"]={"font-size":"1rem",padding:"0.5rem 0.875rem"},e[".bw-badge-pill"]={"border-radius":"50rem"},e[".bw-progress"]={display:"flex",height:"1.25rem",overflow:"hidden","font-size":".875rem","border-radius":".5rem"},e[".bw-progress-bar"]={display:"flex","flex-direction":"column","justify-content":"center",overflow:"hidden","text-align":"center","white-space":"nowrap",transition:"width 0.3s ease-out","font-weight":"600"},e[".bw-progress-bar-striped"]={"background-image":"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)","background-size":"1rem 1rem"},e[".bw-progress-bar-animated"]={animation:"progress-bar-stripes 1s linear infinite"},e["@keyframes progress-bar-stripes"]={"0%":{"background-position-x":"1rem"}},e[".bw-nav"]={display:"flex","flex-wrap":"wrap","padding-left":"0","margin-bottom":"0","list-style":"none",gap:"0"},e[".bw-nav-item"]={display:"block"},e[".bw-nav-tabs .bw-nav-item"]={"margin-bottom":"-2px"},e[".bw-nav-link"]={display:"block",padding:"0.625rem 1rem","font-size":"0.875rem","font-weight":"500","text-decoration":"none",cursor:"pointer",border:"none",background:"transparent",transition:"color 0.15s ease-out, background-color 0.15s ease-out, border-color 0.15s ease-out","font-family":"inherit"},e[".bw-nav-tabs .bw-nav-link"]={border:"none","border-bottom":"2px solid transparent","border-radius":"0","background-color":"transparent"},e[".bw-nav-pills .bw-nav-link"]={"border-radius":"6px"},e[".bw-nav-vertical"]={"flex-direction":"column"},e[".bw-tab-content"]={padding:"1.25rem 0"},e[".bw-tab-pane"]={display:"none"},e[".bw-tab-pane.active"]={display:"block"},e[".bw-nav-scrollable"]={"flex-wrap":"nowrap","overflow-x":"auto","-webkit-overflow-scrolling":"touch","scrollbar-width":"none"},e[".bw-nav-scrollable .bw-nav-link"]={"white-space":"nowrap"},e[".bw-list-group"]={display:"flex","flex-direction":"column","padding-left":"0","margin-bottom":"0","border-radius":"0.375rem"},e[".bw-list-group-item"]={position:"relative",display:"block",padding:"0.75rem 1.25rem","text-decoration":"none","font-size":"0.9375rem"},e[".bw-list-group-item:first-child"]={"border-top-left-radius":"inherit","border-top-right-radius":"inherit"},e[".bw-list-group-item:last-child"]={"border-bottom-right-radius":"inherit","border-bottom-left-radius":"inherit"},e[".bw-list-group-item + .bw-list-group-item"]={"border-top-width":"0"},e[".bw-list-group-item.disabled"]={"pointer-events":"none"},e["a.bw-list-group-item"]={cursor:"pointer",transition:"background-color 0.15s ease-out, color 0.15s ease-out"},e["a.bw-list-group-item:focus-visible, .bw-list-group-item:focus-visible"]={"z-index":"2",outline:"2px solid currentColor","outline-offset":"-2px"},e[".bw-list-group-flush"]={"border-radius":"0"},e[".bw-list-group-flush > .bw-list-group-item"]={"border-width":"0 0 1px","border-radius":"0"},e[".bw-list-group-flush > .bw-list-group-item:last-child"]={"border-bottom-width":"0"},e[".bw-pagination"]={display:"flex","padding-left":"0","list-style":"none","margin-bottom":"0"},e[".bw-page-item"]={display:"list-item","list-style":"none"},e[".bw-page-link"]={position:"relative",display:"block",padding:"0.375rem 0.75rem","margin-left":"-1px","line-height":"1.25","text-decoration":"none",transition:"color 0.15s ease-out, background-color 0.15s ease-out, border-color 0.15s ease-out"},e[".bw-page-item:first-child .bw-page-link"]={"margin-left":"0","border-top-left-radius":"0.375rem","border-bottom-left-radius":"0.375rem"},e[".bw-page-item:last-child .bw-page-link"]={"border-top-right-radius":"0.375rem","border-bottom-right-radius":"0.375rem"},e[".bw-page-link:focus-visible"]={"z-index":"3",outline:"2px solid currentColor","outline-offset":"-2px"},e[".bw-breadcrumb"]={display:"flex","flex-wrap":"wrap",padding:"0 0","margin-bottom":"1rem","list-style":"none"},e[".bw-breadcrumb-item"]={display:"flex"},e[".bw-breadcrumb-item + .bw-breadcrumb-item"]={"padding-left":"0.5rem"},e[".bw-breadcrumb-item + .bw-breadcrumb-item::before"]={float:"left","padding-right":"0.5rem",content:'"/"'},e[".bw-breadcrumb-item a"]={"text-decoration":"none",transition:"color 0.15s ease-out"},e[".bw-breadcrumb-item.active"]={"font-weight":"500"},e[".bw-hero"]={position:"relative",overflow:"hidden"},e[".bw-hero-overlay"]={position:"absolute",top:"0",left:"0",right:"0",bottom:"0","z-index":"1"},e[".bw-hero-content"]={position:"relative","z-index":"2"},e[".bw-hero-title"]={"font-weight":"300","letter-spacing":"-0.05rem",color:"inherit"},e[".bw-hero-subtitle"]={color:"inherit"},e[".bw-hero-actions"]={display:"flex",gap:"1rem","justify-content":"center","flex-wrap":"wrap"},e[".bw-display-4"]={"font-size":"calc(1.475rem + 2.7vw)","font-weight":"300","line-height":"1.2"},e[".bw-lead"]={"font-size":"1.25rem","font-weight":"300"},e[".bw-feature"]={padding:"1rem"},e[".bw-feature-icon"]={display:"inline-block","margin-bottom":"1rem"},e[".bw-feature-title"]={"margin-bottom":"0.5rem"},e[".bw-feature-grid"]={width:"100%"},e[".bw-g-4"]={"--bw-gutter-x":"1.5rem","--bw-gutter-y":"1.5rem"},e[".bw-section"]={position:"relative"},e[".bw-section-header"]={"margin-bottom":"3rem"},e[".bw-section-title"]={"margin-bottom":"1rem","font-weight":"300","font-size":"calc(1.325rem + .9vw)"},e[".bw-cta"]={position:"relative"},e[".bw-cta-content"]={"max-width":"48rem",margin:"0 auto"},e[".bw-cta-title"]={"font-weight":"300"},e[".bw-cta-actions"]={display:"flex",gap:"1rem","justify-content":"center","flex-wrap":"wrap"},e[".bw-spinner-border"]={display:"inline-block",width:"2rem",height:"2rem","vertical-align":"-0.125em",border:"0.25em solid currentcolor","border-right-color":"transparent","border-radius":"50%",animation:"bw-spinner-border 0.75s linear infinite"},e[".bw-spinner-border-sm"]={width:"1rem",height:"1rem","border-width":"0.2em"},e[".bw-spinner-border-lg"]={width:"3rem",height:"3rem","border-width":"0.3em"},e[".bw-spinner-grow"]={display:"inline-block",width:"2rem",height:"2rem","vertical-align":"-0.125em","border-radius":"50%",opacity:"0",animation:"bw-spinner-grow 0.75s linear infinite"},e[".bw-spinner-grow-sm"]={width:"1rem",height:"1rem"},e[".bw-spinner-grow-lg"]={width:"3rem",height:"3rem"},e["@keyframes bw-spinner-border"]={"100%":{transform:"rotate(360deg)"}},e["@keyframes bw-spinner-grow"]={"0%":{transform:"scale(0)"},"50%":{opacity:"1",transform:"none"}},e[".bw-visually-hidden"]={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)","white-space":"nowrap",border:"0"},e[".bw-close"]={display:"inline-flex","align-items":"center","justify-content":"center",width:"1.5rem",height:"1.5rem",padding:"0","font-size":"1.25rem","font-weight":"700","line-height":"1",background:"transparent",border:"0","border-radius":"0.25rem",cursor:"pointer"},e[".bw-vstack"]={display:"flex","flex-direction":"column"},e[".bw-hstack"]={display:"flex","flex-direction":"row","align-items":"center"},e[".bw-gap-0"]={gap:"0"},e[".bw-gap-1"]={gap:"0.25rem"},e[".bw-gap-2"]={gap:"0.5rem"},e[".bw-gap-3"]={gap:"1rem"},e[".bw-gap-4"]={gap:"1.5rem"},e[".bw-gap-5"]={gap:"3rem"};for(var t=1;t<=11;t++)e[".bw-offset-"+t]={"margin-left":(t/12*100).toFixed(6).replace(/\.?0+$/,"")+"%"};e[".bw-code-demo"]={"margin-bottom":"2rem"},e[".bw-code-pre"]={margin:"0",border:"none","border-radius":"6px","overflow-x":"auto"},e[".bw-code-block"]={display:"block",padding:"1.25rem","font-family":'"SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace',"font-size":"0.8125rem","line-height":"1.6"},e[".bw-code-copy-btn"]={position:"absolute",top:"0.5rem",right:"0.5rem",padding:"0.25rem 0.625rem","font-size":"0.6875rem","border-radius":"4px",cursor:"pointer","font-family":"inherit",transition:"all 0.15s"},e[".bw-btn-group, .bw-btn-group-vertical"]={position:"relative",display:"inline-flex","vertical-align":"middle"},e[".bw-btn-group > .bw-btn, .bw-btn-group-vertical > .bw-btn"]={position:"relative",flex:"1 1 auto","border-radius":"0","margin-left":"-1px"},e[".bw-btn-group > .bw-btn:first-child"]={"margin-left":"0","border-top-left-radius":"6px","border-bottom-left-radius":"6px"},e[".bw-btn-group > .bw-btn:last-child"]={"border-top-right-radius":"6px","border-bottom-right-radius":"6px"},e[".bw-btn-group-vertical"]={"flex-direction":"column","align-items":"flex-start","justify-content":"center"},e[".bw-btn-group-vertical > .bw-btn"]={width:"100%","margin-left":"0","margin-top":"-1px"},e[".bw-btn-group-vertical > .bw-btn:first-child"]={"margin-top":"0","border-top-left-radius":"6px","border-top-right-radius":"6px","border-bottom-left-radius":"0","border-bottom-right-radius":"0"},e[".bw-btn-group-vertical > .bw-btn:last-child"]={"border-top-left-radius":"0","border-top-right-radius":"0","border-bottom-left-radius":"6px","border-bottom-right-radius":"6px"},e[".bw-accordion"]={"border-radius":"8px",overflow:"hidden"},e[".bw-accordion-item"]={border:"1px solid transparent"},e[".bw-accordion-item + .bw-accordion-item"]={"border-top":"0"},e[".bw-accordion-header"]={margin:"0"},e[".bw-accordion-button"]={position:"relative",display:"flex","align-items":"center",width:"100%",padding:"1rem 1.25rem","font-size":"1rem","font-weight":"500","text-align":"left","background-color":"transparent",border:"0","overflow-anchor":"none",cursor:"pointer","font-family":"inherit",transition:"color 0.15s ease-out, background-color 0.15s ease-out"},e[".bw-accordion-button::after"]={"flex-shrink":"0",width:"1.25rem",height:"1.25rem","margin-left":"auto",content:'""',"background-repeat":"no-repeat","background-size":"1.25rem",transition:"transform 0.2s ease-out"},e[".bw-accordion-button:not(.bw-collapsed)::after"]={transform:"rotate(-180deg)"},e[".bw-accordion-collapse"]={"max-height":"0",overflow:"hidden",transition:"max-height 0.3s ease"},e[".bw-accordion-collapse.bw-collapse-show"]={"max-height":"none"},e[".bw-accordion-body"]={padding:"1rem 1.25rem"},e[".bw-modal"]={display:"flex","align-items":"center","justify-content":"center",position:"fixed",top:"0",left:"0",width:"100%",height:"100%","z-index":"1050","overflow-x":"hidden","overflow-y":"auto",opacity:"0",visibility:"hidden","pointer-events":"none",transition:"opacity 0.2s ease, visibility 0.2s ease"},e[".bw-modal.bw-modal-show"]={opacity:"1",visibility:"visible","pointer-events":"auto"},e[".bw-modal-dialog"]={position:"relative",width:"100%","max-width":"500px",margin:"1.75rem auto","pointer-events":"none",transform:"translateY(-20px)",transition:"transform 0.2s ease-out"},e[".bw-modal.bw-modal-show .bw-modal-dialog"]={transform:"translateY(0)"},e[".bw-modal-sm"]={"max-width":"300px"},e[".bw-modal-lg"]={"max-width":"800px"},e[".bw-modal-xl"]={"max-width":"1140px"},e[".bw-modal-content"]={position:"relative",display:"flex","flex-direction":"column","pointer-events":"auto","background-clip":"padding-box",border:"1px solid transparent","border-radius":"8px",outline:"0"},e[".bw-modal-header"]={display:"flex","align-items":"center","justify-content":"space-between",padding:"1rem 1.5rem"},e[".bw-modal-title"]={margin:"0","font-size":"1.25rem","font-weight":"600","line-height":"1.3"},e[".bw-modal-body"]={position:"relative",flex:"1 1 auto",padding:"1.5rem"},e[".bw-modal-footer"]={display:"flex","flex-wrap":"wrap","align-items":"center","justify-content":"flex-end",padding:"0.75rem 1.5rem",gap:"0.5rem"},e[".bw-carousel"]={position:"relative",overflow:"hidden","border-radius":"8px"},e[".bw-carousel-track"]={display:"flex",transition:"transform 0.3s ease-out",height:"100%"},e[".bw-carousel-slide"]={"min-width":"100%","flex-shrink":"0",overflow:"hidden",position:"relative",display:"flex","align-items":"center","justify-content":"center"},e[".bw-carousel-slide img"]={width:"100%",height:"100%","object-fit":"cover"},e[".bw-carousel-caption"]={position:"absolute",bottom:"0",left:"0",right:"0",padding:"0.75rem 1rem"},e[".bw-carousel-control"]={position:"absolute",top:"50%",transform:"translateY(-50%)",width:"40px",height:"40px",border:"none","border-radius":"50%",cursor:"pointer",display:"flex","align-items":"center","justify-content":"center","z-index":"2",padding:"0",transition:"background-color 0.2s ease"},e[".bw-carousel-control img"]={width:"20px",height:"20px","pointer-events":"none"},e[".bw-carousel-control-prev"]={left:"10px"},e[".bw-carousel-control-next"]={right:"10px"},e[".bw-carousel-indicators"]={position:"absolute",bottom:"12px",left:"50%",transform:"translateX(-50%)",display:"flex",gap:"6px","z-index":"2"},e[".bw-carousel-indicator"]={width:"10px",height:"10px","border-radius":"50%",border:"2px solid transparent",padding:"0",cursor:"pointer",transition:"opacity 0.2s ease, background-color 0.2s ease"},e[".bw-toast-container"]={position:"fixed","z-index":"1080","pointer-events":"none",display:"flex","flex-direction":"column",gap:"0.5rem",padding:"1rem"},e[".bw-toast"]={"pointer-events":"auto",width:"350px","max-width":"100%","background-clip":"padding-box","border-radius":"8px",opacity:"0",transform:"translateY(-10px)",transition:"opacity 0.3s ease, transform 0.3s ease"},e[".bw-toast.bw-toast-show"]={opacity:"1",transform:"translateY(0)"},e[".bw-toast.bw-toast-hiding"]={opacity:"0",transform:"translateY(-10px)"},e[".bw-toast-header"]={display:"flex","align-items":"center","justify-content":"space-between",padding:"0.5rem 0.75rem","font-size":"0.875rem"},e[".bw-toast-body"]={padding:"0.75rem","font-size":"0.9375rem"},e[".bw-dropdown"]={position:"relative",display:"inline-block"},e[".bw-dropdown-toggle::after"]={display:"inline-block","margin-left":"0.255em","vertical-align":"0.255em",content:'""',"border-top":"0.3em solid","border-right":"0.3em solid transparent","border-bottom":"0","border-left":"0.3em solid transparent"},e[".bw-dropdown-menu"]={position:"absolute",top:"100%",left:"0","z-index":"1000",display:"block","min-width":"10rem",padding:"0.5rem 0",margin:"0.125rem 0 0","background-clip":"padding-box","border-radius":"6px",opacity:"0",visibility:"hidden",transform:"translateY(-4px)","pointer-events":"none",transition:"opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease"},e[".bw-dropdown-menu.bw-dropdown-show"]={opacity:"1",visibility:"visible",transform:"translateY(0)","pointer-events":"auto"},e[".bw-dropdown-menu-end"]={left:"auto",right:"0"},e[".bw-dropdown-item"]={display:"block",width:"100%",padding:"0.375rem 1rem",clear:"both","font-weight":"400","text-align":"inherit","text-decoration":"none","white-space":"nowrap","background-color":"transparent",border:"0","font-size":"0.9375rem",transition:"background-color 0.15s, color 0.15s"},e[".bw-dropdown-item:focus-visible"]={outline:"2px solid currentColor","outline-offset":"-2px"},e[".bw-dropdown-divider"]={height:"0",margin:"0.5rem 0",overflow:"hidden",opacity:"1"},e[".bw-form-switch"]={"padding-left":"2.5em"},e[".bw-form-switch .bw-switch-input"]={width:"2em",height:"1.125em","margin-left":"-2.5em","border-radius":"2em",appearance:"none","background-position":"left center","background-repeat":"no-repeat","background-size":"contain",transition:"background-position 0.15s ease-out, background-color 0.15s ease-out",cursor:"pointer"},e[".bw-form-switch .bw-switch-input:checked"]={"background-position":"right center"},e[".bw-form-switch .bw-switch-input:disabled"]={opacity:"0.5",cursor:"not-allowed"},e[".bw-skeleton"]={"border-radius":"4px","background-size":"400% 100%",animation:"bw-skeleton-shimmer 1.4s ease infinite"},e[".bw-skeleton-text"]={height:"1em","margin-bottom":"0.5rem"},e[".bw-skeleton-circle"]={"border-radius":"50%"},e[".bw-skeleton-rect"]={"border-radius":"8px"},e[".bw-skeleton-group"]={display:"flex","flex-direction":"column"},e["@keyframes bw-skeleton-shimmer"]={"0%":{"background-position":"100% 50%"},"100%":{"background-position":"0 50%"}},e[".bw-avatar"]={display:"inline-flex","align-items":"center","justify-content":"center","border-radius":"50%",overflow:"hidden","font-weight":"600","text-transform":"uppercase","vertical-align":"middle","object-fit":"cover"},e[".bw-avatar-sm"]={width:"2rem",height:"2rem","font-size":"0.75rem"},e[".bw-avatar-md"]={width:"3rem",height:"3rem","font-size":"1rem"},e[".bw-avatar-lg"]={width:"4rem",height:"4rem","font-size":"1.25rem"},e[".bw-avatar-xl"]={width:"5rem",height:"5rem","font-size":"1.5rem"},e[".bw-stat-card"]={"border-radius":"8px",padding:"1.25rem","border-left":"4px solid transparent",transition:"box-shadow 0.15s ease-out, transform 0.15s ease-out"},e[".bw-stat-card:hover"]={transform:"translateY(-1px)"},e[".bw-stat-icon"]={"font-size":"1.5rem","margin-bottom":"0.5rem"},e[".bw-stat-value"]={"font-size":"2rem","font-weight":"700","line-height":"1.2"},e[".bw-stat-label"]={"font-size":"0.875rem","margin-top":"0.25rem"},e[".bw-stat-change"]={"font-size":"0.875rem","font-weight":"500","margin-top":"0.5rem"},e[".bw-tooltip-wrapper"]={position:"relative",display:"inline-block"},e[".bw-tooltip"]={position:"absolute","z-index":"999",padding:"0.375rem 0.75rem","border-radius":"4px","font-size":"0.875rem","white-space":"nowrap","pointer-events":"none",opacity:"0",visibility:"hidden",transition:"opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease"},e[".bw-tooltip.bw-tooltip-show"]={opacity:"1",visibility:"visible"},e[".bw-tooltip-top"]={bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-4px)","margin-bottom":"4px"},e[".bw-tooltip-top.bw-tooltip-show"]={transform:"translateX(-50%) translateY(0)"},e[".bw-tooltip-bottom"]={top:"100%",left:"50%",transform:"translateX(-50%) translateY(4px)","margin-top":"4px"},e[".bw-tooltip-bottom.bw-tooltip-show"]={transform:"translateX(-50%) translateY(0)"},e[".bw-tooltip-left"]={right:"100%",top:"50%",transform:"translateY(-50%) translateX(-4px)","margin-right":"4px"},e[".bw-tooltip-left.bw-tooltip-show"]={transform:"translateY(-50%) translateX(0)"},e[".bw-tooltip-right"]={left:"100%",top:"50%",transform:"translateY(-50%) translateX(4px)","margin-left":"4px"},e[".bw-tooltip-right.bw-tooltip-show"]={transform:"translateY(-50%) translateX(0)"},e[".bw-search-input"]={position:"relative",display:"flex","align-items":"center"},e[".bw-search-input .bw-search-field"]={"padding-right":"2.5rem"},e[".bw-search-clear"]={position:"absolute",right:"0.5rem",display:"flex","align-items":"center","justify-content":"center",width:"1.5rem",height:"1.5rem",border:"none",background:"none","font-size":"1.25rem",cursor:"pointer",padding:"0","border-radius":"50%",transition:"color 0.15s ease-out"},e[".bw-range-wrapper"]={"margin-bottom":"1rem"},e[".bw-range-label"]={display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"0.5rem","font-size":"0.875rem","font-weight":"500"},e[".bw-range-value"]={"font-weight":"600"},e[".bw-range"]={width:"100%",height:"0.5rem",padding:"0",appearance:"none",border:"none","border-radius":"0.25rem",cursor:"pointer",outline:"none"},e[".bw-range:disabled"]={opacity:"0.5",cursor:"not-allowed"},e[".bw-media"]={display:"flex","align-items":"flex-start",gap:"1rem"},e[".bw-media-reverse"]={"flex-direction":"row-reverse"},e[".bw-media-img"]={"border-radius":"50%","object-fit":"cover","flex-shrink":"0"},e[".bw-media-body"]={flex:"1","min-width":"0"},e[".bw-media-title"]={margin:"0 0 0.25rem 0","font-size":"1rem","font-weight":"600","line-height":"1.3"},e[".bw-file-upload"]={display:"flex","flex-direction":"column","align-items":"center","justify-content":"center",padding:"2rem",border:"2px dashed transparent","border-radius":"8px",cursor:"pointer","text-align":"center",position:"relative",transition:"border-color 0.15s ease-out, background-color 0.15s ease-out"},e[".bw-file-upload-icon"]={"font-size":"2rem","margin-bottom":"0.5rem"},e[".bw-file-upload-text"]={"font-size":"0.875rem"},e[".bw-file-upload-input"]={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:"0"},e[".bw-timeline"]={position:"relative","padding-left":"2rem"},e[".bw-timeline-item"]={position:"relative","padding-bottom":"1.5rem"},e[".bw-timeline-item:last-child"]={"padding-bottom":"0"},e[".bw-timeline-marker"]={position:"absolute",left:"-1.75rem",top:"0.25rem",width:"0.75rem",height:"0.75rem","border-radius":"50%"},e[".bw-timeline-content"]={"padding-left":"0.5rem"},e[".bw-timeline-date"]={"font-size":"0.75rem","margin-bottom":"0.25rem","font-weight":"500"},e[".bw-timeline-title"]={"font-size":"1rem","font-weight":"600",margin:"0 0 0.25rem 0","line-height":"1.3"},e[".bw-timeline-text"]={"font-size":"0.875rem",margin:"0","line-height":"1.5"},e[".bw-stepper"]={display:"flex",gap:"0"},e[".bw-step"]={flex:"1",display:"flex","flex-direction":"column","align-items":"center","text-align":"center",position:"relative"},e[".bw-step-indicator"]={width:"2rem",height:"2rem","border-radius":"50%",display:"flex","align-items":"center","justify-content":"center","font-size":"0.875rem","font-weight":"600",position:"relative","z-index":"1",transition:"background-color 0.2s ease-out, color 0.2s ease-out"},e[".bw-step-body"]={"margin-top":"0.5rem"},e[".bw-step-label"]={"font-size":"0.875rem","font-weight":"500"},e[".bw-step-description"]={"font-size":"0.75rem","margin-top":"0.125rem"},e[".bw-chip-input"]={display:"flex","flex-wrap":"wrap","align-items":"center",gap:"0.375rem",padding:"0.375rem 0.5rem","border-radius":"6px","min-height":"2.5rem",cursor:"text",transition:"border-color 0.15s ease-out, box-shadow 0.15s ease-out"},e[".bw-chip"]={display:"inline-flex","align-items":"center",gap:"0.25rem",padding:"0.125rem 0.5rem","border-radius":"1rem","font-size":"0.8125rem","line-height":"1.5","white-space":"nowrap"},e[".bw-chip-remove"]={display:"inline-flex","align-items":"center","justify-content":"center",width:"1rem",height:"1rem",border:"none",background:"none","font-size":"0.875rem",cursor:"pointer",padding:"0","border-radius":"50%",transition:"color 0.15s ease-out, background-color 0.15s ease-out"},e[".bw-chip-field"]={flex:"1","min-width":"80px",border:"none",outline:"none","font-size":"0.875rem",padding:"0.125rem 0",background:"transparent"},e[".bw-popover-wrapper"]={position:"relative",display:"inline-block"},e[".bw-popover-trigger"]={cursor:"pointer"},e[".bw-popover"]={position:"absolute","z-index":"1000","min-width":"200px","max-width":"320px","border-radius":"8px","pointer-events":"none",opacity:"0",visibility:"hidden",transition:"opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease"},e[".bw-popover.bw-popover-show"]={opacity:"1",visibility:"visible","pointer-events":"auto"},e[".bw-popover-header"]={padding:"0.625rem 0.875rem","font-weight":"600","font-size":"0.9375rem"},e[".bw-popover-body"]={padding:"0.75rem 0.875rem","font-size":"0.875rem","line-height":"1.5"},e[".bw-popover-top"]={bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-8px)","margin-bottom":"8px"},e[".bw-popover-top.bw-popover-show"]={transform:"translateX(-50%) translateY(0)"},e[".bw-popover-bottom"]={top:"100%",left:"50%",transform:"translateX(-50%) translateY(8px)","margin-top":"8px"},e[".bw-popover-bottom.bw-popover-show"]={transform:"translateX(-50%) translateY(0)"},e[".bw-popover-left"]={right:"100%",top:"50%",transform:"translateY(-50%) translateX(-8px)","margin-right":"8px"},e[".bw-popover-left.bw-popover-show"]={transform:"translateY(-50%) translateX(0)"},e[".bw-popover-right"]={left:"100%",top:"50%",transform:"translateY(-50%) translateX(8px)","margin-left":"8px"},e[".bw-popover-right.bw-popover-show"]={transform:"translateY(-50%) translateX(0)"},e[".bw-bar-chart-container"]={padding:"1rem",border:"1px solid transparent","border-radius":"8px"},e[".bw-bar-chart"]={display:"flex","align-items":"flex-end",gap:"6px",padding:"0 0.5rem"},e[".bw-bar-group"]={flex:"1",display:"flex","flex-direction":"column","align-items":"center",height:"100%","justify-content":"flex-end"},e[".bw-bar"]={width:"100%","border-radius":"3px 3px 0 0",transition:"height 0.3s ease-out","min-height":"4px"},e[".bw-bar:hover"]={opacity:"0.85"},e[".bw-bar-value"]={"font-size":"0.65rem","font-weight":"600","margin-bottom":"2px","text-align":"center"},e[".bw-bar-label"]={"font-size":"0.7rem","margin-top":"4px","text-align":"center"},e[".bw-bar-chart-title"]={"font-size":"1.1rem","font-weight":"600",margin:"0 0 0.75rem 0"};var r={0:"0",1:".25rem",2:".5rem",3:"1rem",4:"1.5rem",5:"3rem"};for(var a in r){var o=r[a];e[".bw-m-"+a]={margin:o+" !important"},e[".bw-mt-"+a]={"margin-top":o+" !important"},e[".bw-mb-"+a]={"margin-bottom":o+" !important"},e[".bw-ms-"+a]={"margin-left":o+" !important"},e[".bw-me-"+a]={"margin-right":o+" !important"},e[".bw-p-"+a]={padding:o+" !important"},e[".bw-pt-"+a+", .pt-"+a]={"padding-top":o+" !important"},e[".bw-pb-"+a+", .pb-"+a]={"padding-bottom":o+" !important"},e[".bw-ps-"+a+", .ps-"+a]={"padding-left":o+" !important"},e[".bw-pe-"+a+", .pe-"+a]={"padding-right":o+" !important"}}e[".bw-m-auto, .m-auto"]={margin:"auto !important"},e[".bw-py-3"]={"padding-top":"1rem !important","padding-bottom":"1rem !important"},e[".bw-py-4"]={"padding-top":"1.5rem !important","padding-bottom":"1.5rem !important"},e[".bw-py-5"]={"padding-top":"3rem !important","padding-bottom":"3rem !important"},e[".bw-py-6"]={"padding-top":"4rem !important","padding-bottom":"4rem !important"},e[".bw-d-none"]={display:"none"},e[".bw-d-block"]={display:"block"},e[".bw-d-inline"]={display:"inline"},e[".bw-d-inline-block"]={display:"inline-block"},e[".bw-d-flex"]={display:"flex"},e[".bw-text-left"]={"text-align":"left"},e[".bw-text-right"]={"text-align":"right"},e[".bw-text-center"]={"text-align":"center"};var n={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around"};for(var i in n)e[".bw-justify-content-"+i+", .justify-content-"+i]={"justify-content":n[i]};var s={start:"flex-start",end:"flex-end",center:"center"};for(var l in s)e[".bw-align-items-"+l+", .align-items-"+l]={"align-items":s[l]};return["25","50","75","100"].forEach(function(t){e[".bw-w-"+t+", .w-"+t]={width:t+"% !important"},e[".bw-h-"+t+", .h-"+t]={height:t+"% !important"}}),e[".bw-w-auto, .w-auto"]={width:"auto !important"},e[".bw-h-auto, .h-auto"]={height:"auto !important"},e[".bw-mw-100, .mw-100"]={"max-width":"100% !important"},e[".bw-mh-100, .mh-100"]={"max-height":"100% !important"},["static","relative","absolute","fixed","sticky"].forEach(function(t){e[".bw-position-"+t+", .position-"+t]={position:t+" !important"}}),e[".bw-translate-middle, .translate-middle"]={transform:"translate(-50%, -50%) !important"},["auto","hidden","visible","scroll"].forEach(function(t){e[".bw-overflow-"+t+", .overflow-"+t]={overflow:t+" !important"}}),e[".bw-visible, .visible"]={visibility:"visible !important"},e[".bw-invisible, .invisible"]={visibility:"hidden !important"},["all","auto","none"].forEach(function(t){e[".bw-user-select-"+t+", .user-select-"+t]={"user-select":t+" !important"}}),e[".pe-none"]={"pointer-events":"none !important"},e[".pe-auto"]={"pointer-events":"auto !important"},e[".fw-light"]={"font-weight":"300 !important"},e[".fw-lighter"]={"font-weight":"lighter !important"},e[".fw-normal"]={"font-weight":"400 !important"},e[".fw-bold"]={"font-weight":"700 !important"},e[".fw-bolder"]={"font-weight":"bolder !important"},e[".fst-italic"]={"font-style":"italic !important"},e[".fst-normal"]={"font-style":"normal !important"},e[".text-decoration-none"]={"text-decoration":"none !important"},e[".text-decoration-underline"]={"text-decoration":"underline !important"},e[".text-decoration-line-through"]={"text-decoration":"line-through !important"},e[".text-lowercase"]={"text-transform":"lowercase !important"},e[".text-uppercase"]={"text-transform":"uppercase !important"},e[".text-capitalize"]={"text-transform":"capitalize !important"},e[".text-wrap"]={"white-space":"normal !important"},e[".text-nowrap"]={"white-space":"nowrap !important"},e[".fs-1"]={"font-size":"calc(1.375rem + 1.5vw) !important"},e[".fs-2"]={"font-size":"calc(1.325rem + .9vw) !important"},e[".fs-3"]={"font-size":"calc(1.3rem + .6vw) !important"},e[".fs-4"]={"font-size":"calc(1.275rem + .3vw) !important"},e[".fs-5"]={"font-size":"1.25rem !important"},e[".fs-6"]={"font-size":"1rem !important"},e[".list-unstyled"]={"padding-left":"0","list-style":"none"},e[".list-inline"]={"padding-left":"0","list-style":"none"},e[".list-inline-item"]={display:"inline-block"},e[".list-inline-item:not(:last-child)"]={"margin-right":".5rem"},e[".opacity-0"]={opacity:"0 !important"},e[".opacity-25"]={opacity:".25 !important"},e[".opacity-50"]={opacity:".5 !important"},e[".opacity-75"]={opacity:".75 !important"},e[".opacity-100"]={opacity:"1 !important"},Object.assign(e,j),e["@media (prefers-reduced-motion: reduce)"]={"*, *::before, *::after":{"animation-duration":"0.01ms !important","animation-iteration-count":"1 !important","transition-duration":"0.01ms !important","scroll-behavior":"auto !important"}},A(e)}());q.injectCSS(a,{id:"bw-structural",append:!1,minify:t})}var o=Object.assign({},k,r||{});return q.generateTheme("",Object.assign({},o,{inject:!0}))},q.getTheme=function(){return"undefined"!=typeof console&&console.warn&&console.warn("bw.getTheme() is deprecated. Use bw.generateTheme() instead."),JSON.parse(JSON.stringify($))},q.setTheme=function(e,t={}){"undefined"!=typeof console&&console.warn&&console.warn("bw.setTheme() is deprecated. Use bw.generateTheme() instead.");const{inject:r=!0}=t;if(z(e),r&&q._isBrowser&&e.colors){const t=document.documentElement;for(const[r,a]of Object.entries(e.colors))t.style.setProperty("--bw-"+r,a)}return q.getTheme()},q.generateTheme=function(e,t){if(!t||!t.primary||!t.secondary)throw new Error("bw.generateTheme requires config.primary and config.secondary");var r=Object.assign({},k,t);t.tertiary||(r.tertiary=r.primary);var a=w(r),o=function(e){var t=e&&e.spacing||"normal",r=e&&e.radius||"md",a=e&&e.fontSize||1,o=e&&e.typeRatio||"normal",n="string"==typeof o?g[o]||g.normal:o,i=e&&e.elevation||"md",s=e&&e.motion||"standard";return{spacing:"string"==typeof t?f[t]||f.normal:t,radius:"string"==typeof r?h[r]||h.md:r,fontSize:a,typeScale:v(16,n),elevation:"string"==typeof i?y[i]||y.md:i,motion:"string"==typeof s?x[s]||x.standard:s}}(r),n=A(S(e,a,o)),i=q.css(n),s=w(u(r)),l=function(e,t,r){var a=S("",t,r),o=e?"."+e+".bw-theme-alt":".bw-theme-alt",n={};for(var i in a)if(a.hasOwnProperty(i))if("@"===i.charAt(0)){var s=a[i],l={};for(var c in s)s.hasOwnProperty(c)&&(l[o+" "+c]=s[c]);n[i]=l}else{for(var d=i.split(","),b=[],m=0;m<d.length;m++){var p=d[m].trim();"body"===p||p.indexOf("body"),b.push(o+" "+p)}n[b.join(", ")]=a[i]}return n[o+" body, :root"+o+" body"]={color:t.dark.base,"background-color":t.light.base},n}(e,s,o),c=A(l),d=q.css(c),b=p(r);if(!1!==t.inject&&q._isBrowser){var m=e?"bw-theme-"+e:"bw-theme-default";q.injectCSS(i,{id:m,append:!1});var _=e?"bw-theme-"+e+"-alt":"bw-theme-default-alt";q.injectCSS(d,{id:_,append:!1})}e||(q.u.bgTeal={background:a.primary.base,color:a.primary.textOn},q.u.textTeal={color:a.primary.base},q.u.bgWhite={background:"#ffffff"},q.u.textWhite={color:"#ffffff"});var C={css:i,palette:a,name:e,isLightPrimary:b,alternate:{css:d,palette:s}};return q._activeTheme=C,q._activeThemeMode="primary",C},q.applyTheme=function(e){if(!q._isBrowser)return e||"primary";var t,r=document.documentElement,a=!q._activeTheme||q._activeTheme.isLightPrimary;return(t="primary"!==e&&("alternate"===e||("light"===e?!a:"dark"===e&&a)))?r.classList.add("bw-theme-alt"):r.classList.remove("bw-theme-alt"),q._activeThemeMode=t?"alternate":"primary",q._activeThemeMode},q.toggleTheme=function(){var e=q._activeThemeMode||"primary";return q.applyTheme("primary"===e?"alternate":"primary")},q.hexToHsl=o,q.hslToHex=n,q.adjustLightness=i,q.mixColor=s,q.relativeLuminance=l,q.textOnColor=c,q.deriveShades=b,q.derivePalette=w,q.harmonize=d,q.deriveAlternateSeed=m,q.deriveAlternateConfig=u,q.isLightPalette=p,q.SPACING_PRESETS=f,q.RADIUS_PRESETS=h,q.TYPE_RATIO_PRESETS=g,q.ELEVATION_PRESETS=y,q.MOTION_PRESETS=x,q.generateTypeScale=v,q.DEFAULT_PALETTE_CONFIG=k,q.THEME_PRESETS={teal:{primary:"#006666",secondary:"#6c757d",tertiary:"#006666",label:"Teal",desc:"The signature bitwrench palette — professional teal and neutral gray."},ocean:{primary:"#0077b6",secondary:"#90e0ef",tertiary:"#00b4d8",label:"Ocean",desc:"Cool blues and teals for a calm, professional look."},sunset:{primary:"#e76f51",secondary:"#264653",tertiary:"#e9c46a",label:"Sunset",desc:"Warm oranges and deep earth tones for a bold feel."},forest:{primary:"#2d6a4f",secondary:"#95d5b2",tertiary:"#52b788",label:"Forest",desc:"Natural greens for an organic, earthy vibe."},slate:{primary:"#343a40",secondary:"#adb5bd",tertiary:"#6c757d",label:"Slate",desc:"Elegant grays for a minimal, modern interface."},rose:{primary:"#e11d48",secondary:"#fda4af",tertiary:"#fb7185",label:"Rose",desc:"Vibrant pinks and reds for a bold, energetic design."},indigo:{primary:"#4f46e5",secondary:"#a5b4fc",tertiary:"#818cf8",label:"Indigo",desc:"Deep purples and soft lavenders for a creative palette."},amber:{primary:"#d97706",secondary:"#fbbf24",tertiary:"#f59e0b",label:"Amber",desc:"Warm golds and yellows for a sunny, welcoming feel."},emerald:{primary:"#059669",secondary:"#6ee7b7",tertiary:"#34d399",label:"Emerald",desc:"Bright greens and mints for a fresh, modern look."},nord:{primary:"#5e81ac",secondary:"#88c0d0",tertiary:"#81a1c1",label:"Nord",desc:"Muted arctic blues inspired by the Nord color scheme."},coral:{primary:"#ef6461",secondary:"#4a7c7e",tertiary:"#e8a87c",label:"Coral",desc:"Warm coral and teal for a balanced, approachable design."},midnight:{primary:"#1e3a5f",secondary:"#7c8db5",tertiary:"#3d5a80",label:"Midnight",desc:"Deep navy and steel blue for a sophisticated, authoritative feel."}},q.choice=function(e,t,r){const a=e in t?t[e]:r;return"function"===q.typeOf(a)?a(e):a},q.arrayUniq=function(e){return"array"!==q.typeOf(e)?[]:e.filter((e,t,r)=>r.indexOf(e)===t)},q.arrayBinA=function(e,t){return"array"!==q.typeOf(e)||"array"!==q.typeOf(t)?[]:q.arrayUniq(e.filter(e=>-1!==t.indexOf(e)))},q.arrayBNotInA=function(e,t){return"array"!==q.typeOf(e)||"array"!==q.typeOf(t)?[]:q.arrayUniq(t.filter(t=>e.indexOf(t)<0))},q.colorInterp=function(e,t,r,a,o){let n=Array.isArray(a)?a:["#000","#fff"];if(n=0===n.length?["#000","#fff"]:n,1===n.length)return n[0];n=n.map(e=>q.colorParse(e));const i=q.mapScale(e,t,r,0,n.length-1,{clip:!0,expScale:o}),s=q.clip(Math.floor(i),0,n.length-2),l=i-s,c=e=>q.mapScale(l,0,1,n[s][e],n[s+1][e],{clip:!0});return[c(0),c(1),c(2),c(3),"rgb"]},q.colorHslToRgb=function(e,t,r,a=255,o=!0){"array"===q.typeOf(e)&&(t=e[1],r=e[2],a=e[3],e=e[0]);const n=e/360,i=t/100,s=r/100;let l,c,d;if(0===i)l=c=d=255*s;else{const e=(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e),t=s<.5?s*(1+i):s+i-s*i,r=2*s-t;l=255*e(r,t,n+1/3),c=255*e(r,t,n),d=255*e(r,t,n-1/3)}return o&&(l=Math.round(l),c=Math.round(c),d=Math.round(d),a=Math.round(a)),[l,c,d,a,"rgb"]},q.colorRgbToHsl=function(e,t,r,a=255,o=!0){"array"===q.typeOf(e)&&(t=e[1],r=e[2],a=e[3],e=e[0]),e/=255,t/=255,r/=255;const n=Math.max(e,t,r),i=Math.min(e,t,r);let s,l,c=(n+i)/2;if(n===i)s=l=0;else{const a=n-i;switch(l=c>.5?a/(2-n-i):a/(n+i),n){case e:s=((t-r)/a+(t<r?6:0))/6;break;case t:s=((r-e)/a+2)/6;break;case r:s=((e-t)/a+4)/6}}return s*=360,l*=100,c*=100,o&&(s=Math.round(s),l=Math.round(l),c=Math.round(c),a=Math.round(a)),[s,l,c,a,"hsl"]},q.colorParse=function(e,t=255){let r=[0,0,0,t,"rgb"];if("array"===q.typeOf(e)){const t=[0,0,0,255,"rgb"];for(let r=0;r<e.length&&r<t.length;r++)t[r]=e[r];return t}if("#"===(e=String(e).replace(/\s/g,""))[0]){const t=e.slice(1);if(3===t.length||4===t.length)for(let e=0;e<t.length;e++)r[e]=parseInt(t[e]+t[e],16);else if(6===t.length||8===t.length)for(let e=0;e<t.length;e+=2)r[e/2]=parseInt(t.substring(e,e+2),16)}else{const a=e.match(/^(rgb|hsl)a?\(([^)]+)\)$/i);if(a){const e=a[1].toLowerCase(),o=a[2].split(",").map(e=>parseFloat(e));if("rgb"===e)r[0]=o[0]||0,r[1]=o[1]||0,r[2]=o[2]||0,r[3]=void 0!==o[3]?255*o[3]:t,r[4]="rgb";else if("hsl"===e){return q.colorHslToRgb(o[0]||0,o[1]||0,o[2]||0,void 0!==o[3]?255*o[3]:t)}}}return r},q.setCookie=function(e,t,r,a={}){if(!q._isBrowser)return;const o=new Date;o.setTime(o.getTime()+24*r*60*60*1e3);let n=`${e}=${t}; expires=${o.toUTCString()}`;a.path&&(n+=`; path=${a.path}`),a.domain&&(n+=`; domain=${a.domain}`),a.secure&&(n+="; secure"),a.sameSite&&(n+=`; samesite=${a.sameSite}`),document.cookie=n},q.getCookie=function(e,t){if(!q._isBrowser)return t;const r=e+"=",a=document.cookie.split(";");for(let e=0;e<a.length;e++){let t=a[e];for(;" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(r))return t.substring(r.length,t.length)}return t},q.getURLParam=function(e,t){if(!q._isBrowser||"object"!=typeof window)return t;try{const r=new URLSearchParams(window.location.search);if(!e){const e={};for(const[t,a]of r)e[t]=a||!0;return e}return r.has(e)?r.get(e)||!0:t}catch(e){return t}},q.htmlTable=function(e,t={}){if(console.warn("bw.htmlTable() is deprecated. Use bw.makeTableFromArray() for TACO output or bw.makeTable() for object-array data."),"array"!==q.typeOf(e)||e.length<1)return"";const r={useFirstRowAsHeaders:!0,caption:null,atr:{class:"table"},thead_atr:{},th_atr:{},tbody_atr:{},tr_atr:{},td_atr:{}};Object.assign(r,t);let a=`<table${q._attrsToStr(r.atr)}>`;r.caption&&(a+=`<caption>${q.escapeHTML(r.caption)}</caption>`);let o=0;if(r.useFirstRowAsHeaders&&e.length>0&&(a+=`<thead${q._attrsToStr(r.thead_atr)}>`,a+=`<tr${q._attrsToStr(r.tr_atr)}>`,e[0].forEach(e=>{a+=`<th${q._attrsToStr(r.th_atr)}>${q.escapeHTML(String(e))}</th>`}),a+="</tr></thead>",o=1),e.length>o){a+=`<tbody${q._attrsToStr(r.tbody_atr)}>`;for(let t=o;t<e.length;t++)a+=`<tr${q._attrsToStr(r.tr_atr)}>`,e[t].forEach(e=>{a+=`<td${q._attrsToStr(r.td_atr)}>${q.escapeHTML(String(e))}</td>`}),a+="</tr>";a+="</tbody>"}return a+="</table>",a},q._attrsToStr=function(e){if(!e||"object"!=typeof e)return"";let t="";for(const[r,a]of Object.entries(e))null!=a&&!1!==a&&(t+=!0===a?` ${r}`:` ${r}="${q.escapeHTML(String(a))}"`);return t},q.htmlTabs=function(e,t={}){if(console.warn("bw.htmlTabs() is deprecated. Use bw.makeTabs() instead."),"array"!==q.typeOf(e)||e.length<1)return"";const r={atr:{class:"bw-tab-container"},tab_atr:{class:"bw-tab-item-list"},tabc_atr:{class:"bw-tab-content-list"}};Object.assign(r,t);const a=e.map((e,t)=>({t:"li",a:{class:0===t?"bw-tab-item bw-tab-active":"bw-tab-item",onclick:"bw.selectTabContent(this)"},c:e[0]})),o=e.map((e,t)=>({t:"div",a:{class:0===t?"bw-tab-content bw-show":"bw-tab-content"},c:e[1]}));return q.html({t:"div",a:r.atr,c:[{t:"ul",a:r.tab_atr,c:a},{t:"div",a:r.tabc_atr,c:o}]})},q.selectTabContent=function(e){if(console.warn("bw.selectTabContent() is deprecated. Use bw.makeTabs() instead."),!q._isBrowser||!e)return;const t=e.closest(".bw-tab-container");if(!t)return;t.querySelectorAll(".bw-tab-item").forEach(e=>{e.classList.remove("bw-tab-active")}),e.classList.add("bw-tab-active");const r=Array.from(e.parentElement.children).indexOf(e);t.querySelectorAll(".bw-tab-content").forEach(e=>{e.classList.remove("bw-show")});const a=t.querySelectorAll(".bw-tab-content");a[r]&&a[r].classList.add("bw-show")},q.loremIpsum=function(e,t,r=!0){const a="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ";"number"!=typeof e&&(e=Math.floor(125*Math.random())+25),void 0===t&&(t=Math.floor(446*Math.random())),t%=446;let o=0;for(;" "===a[t]||/[.,:;!?]/.test(a[t]);)if(t=(t+1)%446,o++,o>=446){t=0,o=0;break}let n=a.substring(t)+a.substring(0,t),i="",s=e+o;for(;s>0;)i+=s<n.length?n.substring(0,s):n,s-=n.length;if(i.length>e&&(i=i.substring(0,e))," "===i[i.length-1]&&(i=i.substring(0,i.length-1)+"."),r){let e=i[0].toUpperCase();e=/[A-Z]/.test(e)?e:"L",i=e+i.substring(1)}return i},q.multiArray=function(e,t){t="number"==typeof t?[t]:t;const r=a=>{if(a>=t.length)return"function"===q.typeOf(e)?e():e;const o=[];for(let e=0;e<t[a];e++)o[e]=r(a+1);return o};return r(0)},q.naturalCompare=function(e,t){if(isFinite(e)&&isFinite(t))return Math.sign(e-t);const r=String(e).toLowerCase(),a=String(t).toLowerCase();if(r===a)return e>t?1:0;if(!/\d/.test(r)||!/\d/.test(a))return r>a?1:-1;const o=r.match(/(\d+|\D+)/g)||[],n=a.match(/(\d+|\D+)/g)||[],i=Math.min(o.length,n.length);for(let e=0;e<i;e++){const t=o[e],r=n[e];if(t!==r){if(/^\d+$/.test(t)&&/^\d+$/.test(r)){let e=t,a=r;return"0"===t[0]&&(e="0."+t),"0"===r[0]&&(a="0."+r),parseFloat(e)-parseFloat(a)}return t>r?1:-1}}return o.length-n.length},q.setIntervalX=function(e,t,r){let a=0;const o=setInterval(function(){e(a),++a>=r&&clearInterval(o)},t);return o},q.repeatUntil=function(e,t,r,a=250,o=10,n){if("function"!=typeof e)return"err";let i=0;const s=setInterval(function(){const a=e();i++,a?(clearInterval(s),t&&t(a),n&&n(!0,i)):i>=o?(clearInterval(s),r&&r(),n&&n(!1,i)):r&&r()},a);return s},q.saveClientFile=function(e,t){if(q.isNodeJS())q._getFs().then(function(r){r?r.writeFile(e,t,function(e){e&&console.error("Error saving file:",e)}):console.error("bw.saveClientFile: fs module not available")});else{const r=new Blob([t],{type:"application/octet-stream"}),a=window.URL.createObjectURL(r),o=q.createDOM({t:"a",a:{href:a,download:e,style:"display: none"}});document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(a),document.body.removeChild(o)}},q.saveClientJSON=function(e,t){q.saveClientFile(e,JSON.stringify(t,null,2))},q.loadClientFile=function(e,t,r){var a={parser:"raw"};r&&r.parser&&(a.parser=r.parser);var o="JSON"===a.parser?JSON.parse:function(e){return e};if(q.isNodeJS())q._getFs().then(function(r){r?r.readFile(e,"utf8",function(e,r){if(e)t(null,e);else try{t(o(r),null)}catch(e){t(null,e)}}):t(null,new Error("fs module not available"))});else{var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){if(4===n.readyState)if(n.status>=200&&n.status<300)try{t(o(n.responseText),null)}catch(e){t(null,e)}else t(null,new Error("HTTP "+n.status+": "+e))},n.send(null)}return"BW_OK"},q.loadClientJSON=function(e,t){return q.loadClientFile(e,t,{parser:"JSON"})},q.loadLocalFile=function(e,t){var r={parser:"raw",accept:""};t&&(t.parser&&(r.parser=t.parser),t.accept&&(r.accept=t.accept));var a="JSON"===r.parser?JSON.parse:function(e){return e};if(q.isNodeJS())e(null,"",new Error("bw.loadLocalFile is browser-only. Use bw.loadClientFile() in Node."));else{var o=q.createDOM({t:"input",a:{type:"file",accept:r.accept,style:"display: none"}});o.addEventListener("change",function(){var t=o.files[0];if(t){var r=new FileReader;r.onload=function(r){try{e(a(r.target.result),t.name,null)}catch(r){e(null,t.name,r)}},r.onerror=function(){e(null,t.name,r.error)},r.readAsText(t),o.remove()}else e(null,"",new Error("No file selected"))}),document.body.appendChild(o),o.click()}},q.loadLocalJSON=function(e){q.loadLocalFile(e,{parser:"JSON",accept:".json"})},q.copyToClipboard=function(e){return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e):new Promise((t,r)=>{const a=q.createDOM({t:"textarea",a:{value:e,style:{position:"fixed",top:"-999px",left:"-999px",width:"2em",height:"2em",padding:0,border:"none",outline:"none",boxShadow:"none",background:"transparent"}}});document.body.appendChild(a),a.focus(),a.select();try{const e=document.execCommand("copy");document.body.removeChild(a),e?t():r(new Error("Copy command failed"))}catch(e){document.body.removeChild(a),r(e)}})},q.makeTable=function(e){const{data:t=[],columns:r,className:a="",striped:o=!1,hover:n=!1,sortable:i=!0,onSort:s,sortColumn:l,sortDirection:c="asc"}=e;let d="bw-table";o&&(d+=" bw-table-striped"),n&&(d+=" bw-table-hover"),a&&(d+=" "+a),d=d.trim();const b=r||(t.length>0?Object.keys(t[0]).map(e=>({key:e,label:e})):[]);let m=l||null,p=c,u=[...t];m&&u.sort((e,t)=>{const r=e[m],a=t[m];if("number"==typeof r&&"number"==typeof a)return"asc"===p?r-a:a-r;const o=String(r||"").toLowerCase(),n=String(a||"").toLowerCase();return"asc"===p?o.localeCompare(n):n.localeCompare(o)});return{t:"table",a:{class:d},c:[{t:"thead",c:{t:"tr",c:b.map(e=>({t:"th",a:i?{style:{cursor:"pointer",userSelect:"none"},onclick:()=>{return t=e.key,void(i&&(m===t?p="asc"===p?"desc":"asc":(m=t,p="asc"),s&&s(t,p)));var t}}:{},c:[e.label,i&&m===e.key&&{t:"span",a:{style:{marginLeft:"5px"}},c:"asc"===p?"▲":"▼"}].filter(Boolean)}))}},{t:"tbody",c:u.map(e=>({t:"tr",c:b.map(t=>({t:"td",c:t.render?t.render(e[t.key],e):String(e[t.key]||"")}))}))}]}},q.makeTableFromArray=function(e){const{data:t=[],headerRow:r=!0,columns:a,...o}=e;if(!Array.isArray(t)||0===t.length)return q.makeTable({data:[],columns:a||[],...o});let n,i;if(r&&t.length>0)n=t[0].map(function(e){return String(e)}),i=t.slice(1);else{const e=t[0].length;n=[];for(let t=0;t<e;t++)n.push("col"+t);i=t}const s=i.map(function(e){const t={};return n.forEach(function(r,a){t[r]=void 0!==e[a]?e[a]:""}),t}),l=a||n.map(function(e){return{key:e,label:e}});return q.makeTable({data:s,columns:l,...o})},q.makeBarChart=function(e){const{data:t=[],labelKey:r="label",valueKey:a="value",title:o,color:n="#006666",height:i="200px",formatValue:s,showValues:l=!0,showLabels:c=!0,className:d=""}=e;if(!Array.isArray(t)||0===t.length)return{t:"div",a:{class:("bw-bar-chart-container "+d).trim()},c:""};const b=t.map(function(e){return Number(e[a])||0}),m=Math.max.apply(null,b),p=t.map(function(e,t){const a=b[t],o=m>0?a/m*100:0,i=s?s(a):String(a),d=[];return l&&d.push({t:"div",a:{class:"bw-bar-value"},c:i}),d.push({t:"div",a:{class:"bw-bar",style:"height:"+o+"%;background:"+n+";"}}),c&&d.push({t:"div",a:{class:"bw-bar-label"},c:String(e[r]||"")}),{t:"div",a:{class:"bw-bar-group"},c:d}}),u=[];return o&&u.push({t:"h3",a:{class:"bw-bar-chart-title"},c:o}),u.push({t:"div",a:{class:"bw-bar-chart",style:"height:"+i+";"},c:p}),{t:"div",a:{class:("bw-bar-chart-container "+d).trim()},c:u}},q.makeDataTable=function(e){const{title:t,data:r,columns:a,className:o="",striped:n=!0,hover:i=!0,responsive:s=!0,...l}=e,c=q.makeTable({data:r,columns:a,className:o,striped:n,hover:i,...l}),d=[];return t&&d.push({t:"h5",a:{class:"mb-3"},c:t}),s?d.push({t:"div",a:{class:"table-responsive"},c:c}):d.push(c),{t:"div",a:{class:"table-container"},c:d}},q._componentRegistry=new Map,q.render=function(e,t,r){const a="string"==typeof e?document.querySelector(e):e;if(!a)return{object_type:"error",component_id:null,object_handle_in_dom:null,status_code:"error=target_element_not_found"};const o=r.o?.id||q.uuid();let n;try{n=q.createDOM(r)}catch(e){return{object_type:"error",component_id:o,object_handle_in_dom:null,status_code:`error=render_failed:${e.message}`}}n.setAttribute("data-bw-id",o);try{switch(t){case"replace":a.parentNode.replaceChild(n,a);break;case"prepend":a.insertBefore(n,a.firstChild);break;case"append":a.appendChild(n);break;case"before":a.parentNode.insertBefore(n,a);break;case"after":a.parentNode.insertBefore(n,a.nextSibling);break;default:throw new Error(`Invalid position: ${t}`)}}catch(e){return{object_type:"error",component_id:o,object_handle_in_dom:null,status_code:`error=insertion_failed:${e.message}`}}const i={object_type:r.t||"element",component_id:o,object_handle_in_dom:n,status_code:"success",_taco:{...r},_state:{...r.o?.state||{}},_mounted:!0,get element(){return this.object_handle_in_dom},getState(){return{...this._state}},setState(e){return this._state={...this._state,...e},this._taco.o?.onStateChange&&this._taco.o.onStateChange(this._state,e),this},update(){if(!this._mounted||!this.element)return this;const e=this.element.parentNode;this._taco.o&&(this._taco.o.state=this._state);const t=q.createDOM(this._taco);return t.setAttribute("data-bw-id",o),e.replaceChild(t,this.element),this.object_handle_in_dom=t,this._taco.o?.onUpdate&&this._taco.o.onUpdate(t,this._state),this},getProp(e){return this._taco.a?.[e]},setProp(e,t){return this._taco.a||(this._taco.a={}),this._taco.a[e]=t,this.element&&(null==t?this.element.removeAttribute(e):!0===t?this.element.setAttribute(e,""):this.element.setAttribute(e,String(t))),this},getContent(){return this._taco.c},setContent(e){return this._taco.c=e,this.element&&("string"==typeof e?this.element.textContent=e:this.update()),this},addClass(e){return this.element&&this.element.classList.add(e),this},removeClass(e){return this.element&&this.element.classList.remove(e),this},toggleClass(e){return this.element&&this.element.classList.toggle(e),this},hasClass(e){return!!this.element&&this.element.classList.contains(e)},show(){return this.element&&(this.element.style.display=""),this},hide(){return this.element&&(this.element.style.display="none"),this},on(e,t){return this.element&&this.element.addEventListener(e,t),this},off(e,t){return this.element&&this.element.removeEventListener(e,t),this},destroy(){return this._mounted?(this._taco.o?.unmount&&this._taco.o.unmount(this.element),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),q._componentRegistry.delete(o),this._mounted=!1,this.object_handle_in_dom=null,this.status_code="destroyed",this):this}};return q._componentRegistry.set(o,i),r.o?.mounted&&r.o.mounted(n,i),i},q.getComponent=function(e){return q._componentRegistry.get(e)||null},q.getAllComponents=function(){return new Map(q._componentRegistry)},Object.entries(D).forEach(([e,t])=>{e.startsWith("make")&&(q[e]=t)}),q._componentHandles=I||{},Object.entries(D).forEach(([e,t])=>{if(e.startsWith("make")){const r=e.substring(4).toLowerCase(),a="create"+e.substring(4);q[a]=function(e){const a=t(e),o=q.renderComponent(a),n=q._componentHandles[r];if(n){const e=new n(o.element,a);return Object.setPrototypeOf(e,o),e}return o}}}),q.createTable=function(e,t={}){const r=q.makeTable({data:e,...t}),a=q.renderComponent(r),o=q._componentHandles.table;if(o){const e=new o(a.element,r);return Object.setPrototypeOf(e,a),e}return a},q._isBrowser&&"undefined"!=typeof window&&(window.bw=q);export{q as default};
|
|
62
62
|
//# sourceMappingURL=bitwrench.esm.min.js.map
|